@blade-hq/agent-client 2610.0.0-beta.7 → 2610.0.0-beta.71

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 (40) hide show
  1. package/README.md +248 -9
  2. package/dist/auth.d.ts +0 -1
  3. package/dist/blade-client.d.ts +21 -3
  4. package/dist/index.d.ts +35 -6
  5. package/dist/index.js +2210 -268
  6. package/dist/index.js.map +1 -1
  7. package/dist/platform-endpoints.d.ts +14 -0
  8. package/dist/polling-backoff.d.ts +11 -0
  9. package/dist/resources/chat-groups.d.ts +26 -0
  10. package/dist/resources/computers.d.ts +115 -0
  11. package/dist/resources/models.d.ts +2 -0
  12. package/dist/resources/plugins.d.ts +43 -0
  13. package/dist/resources/sessions.d.ts +186 -1
  14. package/dist/resources/site-visits.d.ts +32 -0
  15. package/dist/rest.d.ts +8 -0
  16. package/dist/schemas/context.d.ts +49 -0
  17. package/dist/schemas/event.d.ts +9 -0
  18. package/dist/schemas/mcp-app.d.ts +30 -0
  19. package/dist/schemas/message-utils.d.ts +13 -1
  20. package/dist/schemas/message.d.ts +3 -0
  21. package/dist/schemas/projection.d.ts +37 -2
  22. package/dist/schemas/session.d.ts +9 -1
  23. package/dist/session/agent-session.d.ts +142 -16
  24. package/dist/session/events.d.ts +4 -0
  25. package/dist/session/history-page.d.ts +9 -0
  26. package/dist/session/hub.d.ts +9 -1
  27. package/dist/session/queue.d.ts +99 -0
  28. package/dist/session/state.d.ts +18 -2
  29. package/dist/shared/auth-busy.d.ts +9 -0
  30. package/dist/shared/projection/builder.d.ts +12 -0
  31. package/dist/shared/projection/context.d.ts +3 -0
  32. package/dist/shared/projection/helpers.d.ts +2 -2
  33. package/dist/shared/projection/history.d.ts +1 -0
  34. package/dist/shared/projection/index.d.ts +2 -1
  35. package/dist/shared/projection/state.d.ts +7 -0
  36. package/dist/shared/tool-ui-card.d.ts +58 -0
  37. package/dist/shared/type-guards.d.ts +2 -0
  38. package/dist/types/socket-events.d.ts +195 -6
  39. package/package.json +1 -1
  40. package/public-api.md +918 -12
package/public-api.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
4
4
  > 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
5
5
 
6
- 共 137 个公开声明。
6
+ 共 244 个公开声明。
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
@@ -41,26 +69,38 @@ toolCallId: string
41
69
  ## `AgentSession` (class)
42
70
 
43
71
  ```ts
44
- append: (text: string) => void
45
72
  attach: (label: string, data: unknown) => void
46
73
  attachApp: (options: AttachAppOptions) => Promise<AppCliAttachment | null>
74
+ cancelPendingLocate: () => void
75
+ cancelQueuedMessage: (itemId: string, expectedVersion?: number) => Promise<QueueOperationResult>
47
76
  compact: () => Promise<Record<string, unknown>>
48
77
  countFiles: (dirPath?: string) => Promise<number>
78
+ deliverQueuedMessage: (itemId: string, expectedVersion: number) => Promise<QueueOperationResult>
49
79
  dispose: () => void
50
80
  downloadFile: (filePath: string, downloadName?: string) => Promise<void>
51
81
  exitReplay: () => Promise<void>
52
82
  getState: () => SessionState
83
+ hasOlderHistory: boolean
53
84
  insertText: (text: string) => void
54
85
  isDisposed: boolean
86
+ isStatic: boolean
55
87
  listDir: (dirPath?: string) => Promise<FileEntry[]>
88
+ loadOlderHistory: (options?: { beforeCommit?: () => void; }) => Promise<void>
89
+ loadTurnIndex: () => Promise<SessionTurnIndexItem[]>
90
+ locateEntry: (entryId: string) => Promise<boolean>
56
91
  off: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => void
57
92
  on: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => () => void
58
93
  onCommand: (action: string, handler: CommandHandler) => () => void
94
+ queueMessage: (content: string) => Promise<QueueOperationResult>
95
+ refreshQueue: () => Promise<QueueOperationResult>
96
+ reorderQueuedMessages: (expectedRevision: number, orderedIds: string[]) => Promise<QueueOperationResult>
97
+ resumeQueue: () => Promise<QueueOperationResult>
59
98
  send: (content: MessageContent, options?: SendOptions) => Promise<boolean>
60
99
  sessionId: string
61
100
  setReplaySpeed: (speed: ReplaySpeed) => Promise<void>
62
101
  stop: () => Promise<Record<string, unknown>>
63
102
  subscribe: (listener: () => void) => () => void
103
+ updateQueuedMessage: (itemId: string, expectedVersion: number, content: string) => Promise<QueueOperationResult>
64
104
  ```
65
105
 
66
106
  ## `AgentSessionEventName` (type)
@@ -88,8 +128,8 @@ sandboxOom: { toolCallId: string; }
88
128
  sessionUpdated: { intent?: string; status?: SessionStatus; model?: string | null; boundSkillId?: string | null; replayState?: Record<string, unknown> | null; }
89
129
  taskListUpdated: { tasks: unknown[]; }
90
130
  toolCall: { toolCall: ToolCallInfo; turn: TurnProjection; }
91
- toolPreview: { toolCallId: string; type: "resource-html" | "resource-uri"; content: string; title: string; }
92
- toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; }
131
+ toolPreview: { toolCallId: string; type: "resource-html" | "resource-uri"; content: string; title: string; mcpApp?: McpAppData; }
132
+ toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; source: "live" | "bootstrap_replay" | "reconnect_replay"; }
93
133
  workspaceChanged: { filePath?: string; }
94
134
  ```
95
135
 
@@ -133,6 +173,7 @@ tool_name: string | null | undefined
133
173
 
134
174
  ```ts
135
175
  custom: Record<number, string>
176
+ note: string | undefined
136
177
  selections: Record<number, number[]>
137
178
  ```
138
179
 
@@ -152,6 +193,20 @@ cli: AppCliDefinition | undefined
152
193
  getContext: () => Record<string, unknown> | Promise<Record<string, unknown>>
153
194
  ```
154
195
 
196
+ ## `AuthBusyReconnect` (class)
197
+
198
+ ```ts
199
+ cancel: () => void
200
+ pending: boolean
201
+ schedule: (error: unknown, reconnect: () => void) => boolean
202
+ ```
203
+
204
+ ## `authBusyRetryDelayMs` (function)
205
+
206
+ ```ts
207
+ authBusyRetryDelayMs: (error: unknown) => number | null
208
+ ```
209
+
155
210
  ## `AuthResource` (class)
156
211
 
157
212
  ```ts
@@ -217,6 +272,8 @@ statusText: string
217
272
  auth: AuthResource
218
273
  blob: (method: HttpMethod, path: string) => Promise<Blob>
219
274
  buildAuthedUrl: (path: string) => string
275
+ chatGroups: ChatGroupsResource
276
+ computers: ComputersResource
220
277
  fetch: (method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean) => Promise<Response>
221
278
  formData: (method: HttpMethod, path: string, form: FormData, options?: { expectOk?: boolean; onUploadProgress?: (progress: UploadProgress) => void; }) => Promise<Response>
222
279
  hasToken: () => boolean
@@ -229,10 +286,12 @@ logoutToken: () => void
229
286
  models: ModelsResource
230
287
  onSocketReplaced: (listener: () => void) => () => void
231
288
  options: BladeClientOptions
289
+ plugins: PluginsResource
232
290
  responseFromInit: (path: string, init?: RequestInit) => Promise<Response>
233
291
  sessions: SessionsResource
234
292
  setBaseUrl: (baseUrl: string) => void
235
293
  setToken: (token: string | null) => void
294
+ siteVisits: SiteVisitsResource
236
295
  socket: () => TypedSocket
237
296
  text: (method: HttpMethod, path: string) => Promise<string>
238
297
  textFromInit: (path: string, init?: RequestInit) => Promise<string>
@@ -246,7 +305,6 @@ baseUrl: string
246
305
  fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
247
306
  onRefreshSuccess: (() => void | Promise<void>) | undefined
248
307
  socketToken: string | (() => string | null | undefined) | undefined
249
- streamTokens: boolean | undefined
250
308
  token: string | (() => string | null | undefined) | undefined
251
309
  tokenStorage: TokenStorageMode | undefined
252
310
  ```
@@ -257,12 +315,76 @@ tokenStorage: TokenStorageMode | undefined
257
315
  buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
258
316
  ```
259
317
 
318
+ ## `buildToolUiCardKey` (function)
319
+
320
+ ```ts
321
+ buildToolUiCardKey: (toolCallId: string, type: ToolUiCardContentType, content: string) => string
322
+ ```
323
+
324
+ ## `canCancelQueuedMessage` (function)
325
+
326
+ ```ts
327
+ canCancelQueuedMessage: (item: QueuedMessage) => boolean
328
+ ```
329
+
330
+ ## `canDeliverQueuedMessage` (function)
331
+
332
+ ```ts
333
+ canDeliverQueuedMessage: (item: QueuedMessage) => boolean
334
+ ```
335
+
336
+ ## `canEditQueuedMessage` (function)
337
+
338
+ ```ts
339
+ canEditQueuedMessage: (item: QueuedMessage) => boolean
340
+ ```
341
+
342
+ ## `canToggleComputer` (function)
343
+
344
+ ```ts
345
+ canToggleComputer: (computer: SessionComputer) => boolean
346
+ ```
347
+
348
+ ## `ChatEnd` (interface)
349
+
350
+ ```ts
351
+ duration_ms: number
352
+ status: string
353
+ ```
354
+
355
+ ## `chatErrorForDisplay` (function)
356
+
357
+ ```ts
358
+ chatErrorForDisplay: (message: string, developer?: boolean) => string
359
+ ```
360
+
361
+ ## `ChatGroup` (interface)
362
+
363
+ ```ts
364
+ created_at: string
365
+ id: string
366
+ instructions: string
367
+ name: string
368
+ session_count: number
369
+ updated_at: string
370
+ ```
371
+
372
+ ## `ChatGroupsResource` (class)
373
+
374
+ ```ts
375
+ create: (payload: { name: string; instructions?: string; }) => Promise<ChatGroup>
376
+ delete: (groupId: string) => Promise<{ deleted: boolean; deleted_sessions: number; }>
377
+ list: () => Promise<ChatGroup[]>
378
+ update: (groupId: string, payload: { name?: string; instructions?: string; }) => Promise<ChatGroup>
379
+ ```
380
+
260
381
  ## `ChatMessage` (interface)
261
382
 
262
383
  ```ts
263
384
  blocks: ContentBlock[] | undefined
264
385
  compaction: CompactionInfo | undefined
265
386
  content: MessageContent
387
+ context: ContextProjectionData | undefined
266
388
  duration_ms: number | undefined
267
389
  entry_id: string | undefined
268
390
  kind: string | undefined
@@ -286,6 +408,18 @@ reset: () => void
286
408
  seedSequence: (maxSeq: number) => void
287
409
  ```
288
410
 
411
+ ## `collectInlineToolUiCards` (function)
412
+
413
+ ```ts
414
+ collectInlineToolUiCards: (messages: ChatMessage[]) => InlineToolUiCardEntry[]
415
+ ```
416
+
417
+ ## `collectPreviewToolUiCards` (function)
418
+
419
+ ```ts
420
+ collectPreviewToolUiCards: (messages: ChatMessage[]) => PreviewToolUiCardEntry[]
421
+ ```
422
+
289
423
  ## `CommandEnvelope` (interface)
290
424
 
291
425
  ```ts
@@ -318,6 +452,50 @@ tokens_before: number | null | undefined
318
452
  trigger: "auto" | "manual" | "forced_retry" | null | undefined
319
453
  ```
320
454
 
455
+ ## `computerDaemonVersion` (function)
456
+
457
+ ```ts
458
+ computerDaemonVersion: (computer: SessionComputer) => string
459
+ ```
460
+
461
+ ## `computerOS` (function)
462
+
463
+ ```ts
464
+ computerOS: (computer: SessionComputer) => ComputerOS
465
+ ```
466
+
467
+ ## `ComputerOS` (type)
468
+
469
+ ```ts
470
+ export type ComputerOS = "macos" | "windows" | "linux" | "unknown"
471
+ ```
472
+
473
+ ## `computerPlatformLabel` (function)
474
+
475
+ ```ts
476
+ computerPlatformLabel: (computer: SessionComputer) => string
477
+ ```
478
+
479
+ ## `ComputersResource` (class)
480
+
481
+ ```ts
482
+ list: (sessionId: string) => Promise<SessionComputerList>
483
+ listAccount: () => Promise<AccountComputerList>
484
+ setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
485
+ ```
486
+
487
+ ## `computerState` (function)
488
+
489
+ ```ts
490
+ computerState: (computer: SessionComputer) => ComputerState
491
+ ```
492
+
493
+ ## `ComputerState` (type)
494
+
495
+ ```ts
496
+ export type ComputerState = "primary" | "enabled" | "offline" | "idle"
497
+ ```
498
+
321
499
  ## `connectEmbedded` (function)
322
500
 
323
501
  ```ts
@@ -334,18 +512,89 @@ export type ConnectionStatus = "connecting" | "connected" | "reconnecting" | "di
334
512
 
335
513
  ```ts
336
514
  content: unknown
515
+ delivery_id: string | null | undefined
337
516
  display_name: string | null | undefined
338
517
  tool_call_id: string | null | undefined
339
518
  tool_name: string | null | undefined
340
519
  type: "text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridge" | "system_notification" | "mode_change" | "plan_status" | "ask_user_answer"
341
520
  ```
342
521
 
522
+ ## `ContentDelta` (interface)
523
+
524
+ ```ts
525
+ content: string
526
+ loop_name: string | undefined
527
+ ```
528
+
343
529
  ## `contentPreview` (function)
344
530
 
345
531
  ```ts
346
532
  contentPreview: (content: MessageContent, maxLen?: number) => string
347
533
  ```
348
534
 
535
+ ## `ContextAction` (type)
536
+
537
+ ```ts
538
+ export type ContextAction = "published" | "retained" | "removed"
539
+ ```
540
+
541
+ ## `ContextDisplayState` (interface)
542
+
543
+ ```ts
544
+ detail: string
545
+ isRemoved: boolean
546
+ summary: string
547
+ title: string
548
+ ```
549
+
550
+ ## `ContextGroupDisplayState` (interface)
551
+
552
+ ```ts
553
+ count: number
554
+ summary: string
555
+ title: string
556
+ ```
557
+
558
+ ## `contextProjectionData` (function)
559
+
560
+ ```ts
561
+ contextProjectionData: (fields: ContextProjectionFields) => ContextProjectionData | null
562
+ ```
563
+
564
+ ## `ContextProjectionData` (interface)
565
+
566
+ ```ts
567
+ context_action: ContextAction
568
+ context_key: string
569
+ context_kind: string
570
+ context_name: string
571
+ context_order: number
572
+ context_revision: string
573
+ display_summary: string | null | undefined
574
+ display_title: string | null | undefined
575
+ sources: ContextSourceInfo[]
576
+ ```
577
+
578
+ ## `ContextProjectionFields` (interface)
579
+
580
+ ```ts
581
+ context_action: ContextAction | null | undefined
582
+ context_key: string | null | undefined
583
+ context_kind: string | null | undefined
584
+ context_name: string | null | undefined
585
+ context_order: number | null | undefined
586
+ context_revision: string | null | undefined
587
+ display_summary: string | null | undefined
588
+ display_title: string | null | undefined
589
+ sources: ContextSourceInfo[] | null | undefined
590
+ ```
591
+
592
+ ## `ContextSourceInfo` (type)
593
+
594
+ ```ts
595
+ export type ContextSourceInfo = Record<string, unknown>
596
+ ```
597
+
349
598
  ## `createInitialSessionState` (function)
350
599
 
351
600
  ```ts
@@ -355,7 +604,9 @@ createInitialSessionState: (sessionId: string) => SessionState
355
604
  ## `CreateSessionRequest` (interface)
356
605
 
357
606
  ```ts
607
+ agent_runtime_id: string | null | undefined
358
608
  biz_role_id: string | null | undefined
609
+ chat_group_id: string | null | undefined
359
610
  compaction_ratio: number | null | undefined
360
611
  daemon_id: string | null | undefined
361
612
  disable_tools: string[] | null | undefined
@@ -365,7 +616,7 @@ intent: string | undefined
365
616
  memory_enabled: boolean | null | undefined
366
617
  model: string | null | undefined
367
618
  primary_skill_id: string | null | undefined
368
- runtime_type: "sandbox" | "daemon" | null | undefined
619
+ runtime_type: "sandbox" | "daemon" | "native" | null | undefined
369
620
  session_solution_asset_id: string | null | undefined
370
621
  solution_id: string | undefined
371
622
  solution_ref: PublishedSolutionRef | undefined
@@ -410,6 +661,18 @@ allowedOrigins: string[]
410
661
  iframe: HTMLIFrameElement | undefined
411
662
  ```
412
663
 
664
+ ## `EMPTY_PLATFORM_ENDPOINTS` (const)
665
+
666
+ ```ts
667
+ EMPTY_PLATFORM_ENDPOINTS: PlatformEndpoints
668
+ ```
669
+
670
+ ## `EMPTY_SESSION_QUEUE` (const)
671
+
672
+ ```ts
673
+ EMPTY_SESSION_QUEUE: SessionQueueSnapshot
674
+ ```
675
+
413
676
  ## `ExchangeCodeParams` (interface)
414
677
 
415
678
  ```ts
@@ -466,6 +729,18 @@ label: string
466
729
  target: string
467
730
  ```
468
731
 
732
+ ## `getContextDisplayState` (function)
733
+
734
+ ```ts
735
+ getContextDisplayState: (context: ContextProjectionData) => ContextDisplayState
736
+ ```
737
+
738
+ ## `getContextGroupDisplayState` (function)
739
+
740
+ ```ts
741
+ getContextGroupDisplayState: (contexts: readonly ContextProjectionData[]) => ContextGroupDisplayState
742
+ ```
743
+
469
744
  ## `getFileParts` (function)
470
745
 
471
746
  ```ts
@@ -520,12 +795,24 @@ export type GlobalSearchResultItem =
520
795
  | GlobalSearchFileResult
521
796
  ```
522
797
 
798
+ ## `groupAdjacentContextRuns` (function)
799
+
800
+ ```ts
801
+ groupAdjacentContextRuns: (kinds: readonly (string | null)[]) => readonly (readonly number[])[]
802
+ ```
803
+
523
804
  ## `groupMessagesByLoop` (function)
524
805
 
525
806
  ```ts
526
807
  groupMessagesByLoop: (messages: ChatMessage[]) => MessageGroup[]
527
808
  ```
528
809
 
810
+ ## `hasChatRunEvent` (function)
811
+
812
+ ```ts
813
+ hasChatRunEvent: (events: RawEvent[]) => boolean
814
+ ```
815
+
529
816
  ## `HeadlessResource` (class)
530
817
 
531
818
  ```ts
@@ -534,6 +821,15 @@ runInSession: { <T = unknown>(sessionId: string, prompt: string, options: Headle
534
821
  runWithSession: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<HeadlessRunInSessionResult<T>>; (prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>; }
535
822
  ```
536
823
 
824
+ ## `HistoricalCommand` (interface)
825
+
826
+ ```ts
827
+ action: string
828
+ deliveryId: string
829
+ payload: unknown
830
+ toolCallId: string | undefined
831
+ ```
832
+
537
833
  ## `ImageUrlContentPart` (interface)
538
834
 
539
835
  ```ts
@@ -562,16 +858,42 @@ direction: "host-to-agent"
562
858
  payload: unknown
563
859
  ```
564
860
 
861
+ ## `inferToolStatus` (function)
862
+
863
+ ```ts
864
+ inferToolStatus: (resultStr: string) => "done" | "error" | "cancelled"
865
+ ```
866
+
867
+ ## `InlineToolUiCardEntry` (interface)
868
+
869
+ ```ts
870
+ card: ToolUiCard
871
+ key: string
872
+ toolCallId: string
873
+ ```
874
+
875
+ ## `isAppDevToolUiCard` (function)
876
+
877
+ ```ts
878
+ isAppDevToolUiCard: (card: ToolUiCard, isAppDev: boolean) => boolean
879
+ ```
880
+
565
881
  ## `isCommandEnvelope` (function)
566
882
 
567
883
  ```ts
568
884
  isCommandEnvelope: (value: unknown) => value is CommandEnvelope
569
885
  ```
570
886
 
887
+ ## `isEntryGoneError` (function)
888
+
889
+ ```ts
890
+ isEntryGoneError: (error: unknown) => boolean
891
+ ```
892
+
571
893
  ## `isHiddenInternalMessage` (function)
572
894
 
573
895
  ```ts
574
- isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">) => boolean
896
+ isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">, options?: { includeLegacyForkContext?: boolean; }) => boolean
575
897
  ```
576
898
 
577
899
  ## `isInboundEnvelope` (function)
@@ -580,6 +902,30 @@ isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">) => boo
580
902
  isInboundEnvelope: (value: unknown) => value is InboundEnvelope
581
903
  ```
582
904
 
905
+ ## `isInternalStatusToolUiCard` (function)
906
+
907
+ ```ts
908
+ isInternalStatusToolUiCard: (card: { title?: string | null; } | null) => boolean
909
+ ```
910
+
911
+ ## `isMcpAppData` (function)
912
+
913
+ ```ts
914
+ isMcpAppData: (value: unknown) => value is McpAppData
915
+ ```
916
+
917
+ ## `isSessionQueueSnapshot` (function)
918
+
919
+ ```ts
920
+ isSessionQueueSnapshot: (value: unknown) => value is SessionQueueSnapshot
921
+ ```
922
+
923
+ ## `isToolUiCard` (function)
924
+
925
+ ```ts
926
+ isToolUiCard: (value: unknown) => value is ToolUiCard
927
+ ```
928
+
583
929
  ## `latestPostChatFollowup` (function)
584
930
 
585
931
  ```ts
@@ -602,6 +948,37 @@ export enum LayoutType {
602
948
  }
603
949
  ```
604
950
 
951
+ ## `LiveRevisionState` (interface)
952
+
953
+ ```ts
954
+ byTurnId: ReadonlyMap<string, number>
955
+ current: number
956
+ ```
957
+
958
+ ## `LlmResponseDone` (interface)
959
+
960
+ ```ts
961
+ content: string | null | undefined
962
+ loop_name: string | undefined
963
+ reasoning: string | null | undefined
964
+ role: string
965
+ tool_calls: { id: string; function: { name: string; arguments: string; }; }[] | undefined
966
+ ```
967
+
968
+ ## `loadPlatformEndpoints` (function)
969
+
970
+ ```ts
971
+ loadPlatformEndpoints: (options?: LoadPlatformEndpointsOptions) => Promise<PlatformEndpoints>
972
+ ```
973
+
974
+ ## `LoadPlatformEndpointsOptions` (interface)
975
+
976
+ ```ts
977
+ baseUrl: string | undefined
978
+ fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
979
+ timeoutMs: number | undefined
980
+ ```
981
+
605
982
  ## `LoginOptions` (interface)
606
983
 
607
984
  ```ts
@@ -617,6 +994,49 @@ token: string
617
994
  user: { id?: string; username?: string; display_name?: string; } | undefined
618
995
  ```
619
996
 
997
+ ## `McpAppArchive` (interface)
998
+
999
+ ```ts
1000
+ html: string
1001
+ mimeType: string
1002
+ plugin: string
1003
+ previousToolInput: Record<string, unknown> | undefined
1004
+ previousToolResult: Record<string, unknown> | undefined
1005
+ resourceMeta: Record<string, unknown>
1006
+ resourceUri: string
1007
+ sourceId: string
1008
+ toolInput: Record<string, unknown>
1009
+ toolResult: Record<string, unknown>
1010
+ ```
1011
+
1012
+ ## `McpAppContextState` (interface)
1013
+
1014
+ ```ts
1015
+ content: string
1016
+ plugin: string | null
1017
+ revision: string
1018
+ server_alias: string | null
1019
+ ```
1020
+
1021
+ ## `McpAppContextUpdate` (interface)
1022
+
1023
+ ```ts
1024
+ content: string
1025
+ expected_revision: string | null
1026
+ request_id: string
1027
+ ```
1028
+
1029
+ ## `McpAppData` (interface)
1030
+
1031
+ ```ts
1032
+ mimeType: string
1033
+ resourceMeta: Record<string, unknown>
1034
+ resourceUri: string
1035
+ sourceId: string
1036
+ toolInput: Record<string, unknown>
1037
+ toolResult: Record<string, unknown>
1038
+ ```
1039
+
620
1040
  ## `MemoryRef` (interface)
621
1041
 
622
1042
  ```ts
@@ -658,6 +1078,8 @@ baseUrl: string | undefined
658
1078
  default: string
659
1079
  defaultServiceModel: string | undefined
660
1080
  models: ModelOption[]
1081
+ unavailableModelIds: string[] | undefined
1082
+ unavailableProviderIds: string[] | undefined
661
1083
  ```
662
1084
 
663
1085
  ## `ModelOption` (interface)
@@ -704,6 +1126,12 @@ content: string
704
1126
  label: string
705
1127
  ```
706
1128
 
1129
+ ## `parseQueueAck` (function)
1130
+
1131
+ ```ts
1132
+ parseQueueAck: (response: unknown, fallbackSessionId: string) => QueueOperationResult
1133
+ ```
1134
+
707
1135
  ## `PatchEnvelope` (interface)
708
1136
 
709
1137
  ```ts
@@ -714,6 +1142,51 @@ sequence: number
714
1142
  turn_id: string
715
1143
  ```
716
1144
 
1145
+ ## `PendingQuestionRef` (interface)
1146
+
1147
+ ```ts
1148
+ child_loop_name: string
1149
+ child_tool_call_id: string
1150
+ description: string | null | undefined
1151
+ ```
1152
+
1153
+ ## `PlatformEndpoints` (interface)
1154
+
1155
+ ```ts
1156
+ services: Partial<Record<"os" | "hub" | "agent" | "oauth" | "llmGateway" | "gitea" | "tile", string>>
1157
+ ```
1158
+
1159
+ ## `PlatformServiceName` (type)
1160
+
1161
+ ```ts
1162
+ export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
1163
+ ```
1164
+
1165
+ ## `PluginCatalogEntry` (interface)
1166
+
1167
+ ```ts
1168
+ display_name: string | null
1169
+ icon: string | null
1170
+ installed: boolean
1171
+ name: string
1172
+ ```
1173
+
1174
+ ## `PluginsResource` (class)
1175
+
1176
+ ```ts
1177
+ catalog: (init?: RequestInit) => Promise<{ plugins: PluginCatalogEntry[]; }>
1178
+ fetchIcon: (name: string) => Promise<Blob>
1179
+ iconUrl: (name: string) => string
1180
+ ```
1181
+
1182
+ ## `PollingBackoff` (class)
1183
+
1184
+ ```ts
1185
+ failed: (error: unknown) => void
1186
+ reset: () => void
1187
+ waitMs: () => number | false
1188
+ ```
1189
+
717
1190
  ## `PostChatFollowup` (interface)
718
1191
 
719
1192
  ```ts
@@ -744,6 +1217,21 @@ bizRoleId: string | undefined
744
1217
  kind: "prepared"
745
1218
  ```
746
1219
 
1220
+ ## `prependOlder` (function)
1221
+
1222
+ ```ts
1223
+ prependOlder: (current: TurnProjection[], page: TurnProjection[]) => TurnProjection[]
1224
+ ```
1225
+
1226
+ ## `PreviewToolUiCardEntry` (interface)
1227
+
1228
+ ```ts
1229
+ blocks: ContentBlock[]
1230
+ card: ToolUiCard
1231
+ key: string
1232
+ toolCall: ToolCallInfo
1233
+ ```
1234
+
747
1235
  ## `PrimarySkillParallelMode` (interface)
748
1236
 
749
1237
  ```ts
@@ -764,6 +1252,21 @@ title: string
764
1252
  version: number
765
1253
  ```
766
1254
 
1255
+ ## `PrimarySkillStageSpec` (interface)
1256
+
1257
+ ```ts
1258
+ id: string
1259
+ name: string
1260
+ steps: PrimarySkillStepSpec[]
1261
+ ```
1262
+
1263
+ ## `PrimarySkillStepSpec` (interface)
1264
+
1265
+ ```ts
1266
+ label: string
1267
+ n: number
1268
+ ```
1269
+
767
1270
  ## `ProvidersResponse` (interface)
768
1271
 
769
1272
  ```ts
@@ -779,6 +1282,60 @@ export type PublishedSolutionRef =
779
1282
  | { source: "hub"; org: string; name: string }
780
1283
  ```
781
1284
 
1285
+ ## `QueueAck` (interface)
1286
+
1287
+ ```ts
1288
+ items: QueuedMessage[] | undefined
1289
+ message: string | null | undefined
1290
+ pause_reason: string | null | undefined
1291
+ paused: boolean | undefined
1292
+ revision: number | undefined
1293
+ running: boolean | undefined
1294
+ session_id: string | undefined
1295
+ status: "error" | "ok" | "conflict" | "queued"
1296
+ ```
1297
+
1298
+ ## `QueuedMessage` (interface)
1299
+
1300
+ ```ts
1301
+ content: string
1302
+ created_at: string
1303
+ error: string | undefined
1304
+ id: string
1305
+ position: number
1306
+ status: QueuedMessageStatus
1307
+ target_run_id: string | undefined
1308
+ updated_at: string
1309
+ version: number
1310
+ ```
1311
+
1312
+ ## `QueuedMessageStatus` (type)
1313
+
1314
+ ```ts
1315
+ export type QueuedMessageStatus = "pending" | "delivering" | "claimed" | "consumed" | "cancelled"
1316
+ ```
1317
+
1318
+ ## `queuedMessageStatusLabel` (function)
1319
+
1320
+ ```ts
1321
+ queuedMessageStatusLabel: (status: QueuedMessageStatus) => string
1322
+ ```
1323
+
1324
+ ## `QueueOperationResult` (interface)
1325
+
1326
+ ```ts
1327
+ conflict: boolean
1328
+ message: string | null
1329
+ ok: boolean
1330
+ snapshot: SessionQueueSnapshot | null
1331
+ ```
1332
+
1333
+ ## `queuePauseReasonLabel` (function)
1334
+
1335
+ ```ts
1336
+ queuePauseReasonLabel: (reason: string | null | undefined) => string | null
1337
+ ```
1338
+
782
1339
  ## `RawEvent` (interface)
783
1340
 
784
1341
  ```ts
@@ -786,12 +1343,24 @@ payload: Record<string, unknown>
786
1343
  type: string
787
1344
  ```
788
1345
 
1346
+ ## `reconcileHistoricalUserTurns` (function)
1347
+
1348
+ ```ts
1349
+ reconcileHistoricalUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
1350
+ ```
1351
+
789
1352
  ## `reconcileOptimisticUserTurns` (function)
790
1353
 
791
1354
  ```ts
792
1355
  reconcileOptimisticUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
793
1356
  ```
794
1357
 
1358
+ ## `replaceWindow` (function)
1359
+
1360
+ ```ts
1361
+ replaceWindow: (current: TurnProjection[], page: TurnProjection[], liveRevisionAtStart: number, liveRevisions: LiveRevisionState) => TurnProjection[]
1362
+ ```
1363
+
795
1364
  ## `ReplayPreview` (interface)
796
1365
 
797
1366
  ```ts
@@ -826,6 +1395,18 @@ speed: ReplaySpeed | undefined
826
1395
  status: "replay" | "autonomous" | undefined
827
1396
  ```
828
1397
 
1398
+ ## `resolveServiceUrl` (function)
1399
+
1400
+ ```ts
1401
+ resolveServiceUrl: (endpoints: PlatformEndpoints, name: PlatformServiceName, path?: string) => string | null
1402
+ ```
1403
+
1404
+ ## `resolveToolUiCardContent` (function)
1405
+
1406
+ ```ts
1407
+ resolveToolUiCardContent: (card: ToolUiCard) => { type: ToolUiCardContentType; content: string; } | null
1408
+ ```
1409
+
829
1410
  ## `ResultFeedback` (interface)
830
1411
 
831
1412
  ```ts
@@ -872,6 +1453,17 @@ result: unknown
872
1453
  sessionId: string
873
1454
  ```
874
1455
 
1456
+ ## `RunTiming` (interface)
1457
+
1458
+ ```ts
1459
+ duration_ms: number | null | undefined
1460
+ loop_id: string
1461
+ run_id: string
1462
+ scope: "chat" | "subagent"
1463
+ started_at: string | null | undefined
1464
+ status: "completed" | "paused" | "failed" | "cancelled" | "incomplete"
1465
+ ```
1466
+
875
1467
  ## `RunTrace` (interface)
876
1468
 
877
1469
  ```ts
@@ -897,13 +1489,42 @@ SDK_VERSION: string
897
1489
 
898
1490
  ```ts
899
1491
  askUserAnswer: Record<string, unknown> | undefined
1492
+ kbIds: number[] | undefined
900
1493
  mode: string | undefined
901
1494
  model: string | undefined
1495
+ queueWhenRunning: boolean | undefined
902
1496
  replayDecision: "keep_replay" | "continue_replay" | undefined
903
1497
  thinkingOverride: boolean | undefined
904
1498
  whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
905
1499
  ```
906
1500
 
1501
+ ## `SessionComputer` (interface)
1502
+
1503
+ ```ts
1504
+ agent_runtimes: unknown[] | undefined
1505
+ allowed_paths: string[] | undefined
1506
+ arch: string | null | undefined
1507
+ blade_home: string | null | undefined
1508
+ created_at: string
1509
+ daemon_version: string | null | undefined
1510
+ enabled: boolean
1511
+ home: string | null | undefined
1512
+ hostname: string | null | undefined
1513
+ id: string
1514
+ is_primary: boolean
1515
+ label: string
1516
+ last_seen_at: string | null | undefined
1517
+ online: boolean
1518
+ os: string | null | undefined
1519
+ workspace: string | null | undefined
1520
+ ```
1521
+
1522
+ ## `SessionComputerList` (interface)
1523
+
1524
+ ```ts
1525
+ computers: SessionComputer[]
1526
+ ```
1527
+
907
1528
  ## `SessionConfig` (interface)
908
1529
 
909
1530
  ```ts
@@ -915,6 +1536,12 @@ memoryEnabled: boolean | undefined
915
1536
  model: string | undefined
916
1537
  ```
917
1538
 
1539
+ ## `SessionConnectOptions` (interface)
1540
+
1541
+ ```ts
1542
+ setup: ((session: AgentSession) => void) | undefined
1543
+ ```
1544
+
918
1545
  ## `SessionContextStats` (interface)
919
1546
 
920
1547
  ```ts
@@ -935,8 +1562,11 @@ solution: SolutionDefinition | undefined
935
1562
  ## `SessionDetail` (interface)
936
1563
 
937
1564
  ```ts
1565
+ agent_runtime_id: string | null | undefined
1566
+ ba_version: string | null | undefined
938
1567
  biz_role_id: string | null | undefined
939
1568
  bound_skill_id: string | null | undefined
1569
+ chat_group_id: string | null | undefined
940
1570
  created_at: string
941
1571
  daemon_id: string | null | undefined
942
1572
  disable_tools: (string[] & string[]) | undefined
@@ -959,6 +1589,7 @@ primary_skill_id: string | null | undefined
959
1589
  primary_skill_snapshot: PrimarySkillSnapshot | null | undefined
960
1590
  replay_state: ReplayState | null | undefined
961
1591
  runtime_type: string | null | undefined
1592
+ sandbox_version: string | null | undefined
962
1593
  shared: boolean | undefined
963
1594
  solution: Solution | null | undefined
964
1595
  solution_id: string | null | undefined
@@ -984,7 +1615,7 @@ tools_tokens: number | null | undefined
984
1615
  ## `SessionHub` (class)
985
1616
 
986
1617
  ```ts
987
- connect: (sessionId: string) => Promise<AgentSession>
1618
+ connect: (sessionId: string, options?: SessionConnectOptions) => Promise<AgentSession>
988
1619
  disconnect: () => void
989
1620
  disposeAll: () => void
990
1621
  getConnection: () => ConnectionStatus
@@ -1027,11 +1658,84 @@ SessionInfo = type({
1027
1658
  "disable_tools?": "string[]",
1028
1659
  "runtime_type?": "string | null",
1029
1660
  "daemon_id?": "string | null",
1661
+ "agent_runtime_id?": "string | null",
1030
1662
  "workspace_path?": "string | null",
1663
+ "ba_version?": "string | null",
1664
+ "sandbox_version?": "string | null",
1665
+ "chat_group_id?": "string | null",
1031
1666
  "match?": "unknown",
1032
1667
  })
1033
1668
  ```
1034
1669
 
1670
+ ## `SessionPlugin` (interface)
1671
+
1672
+ ```ts
1673
+ active: boolean
1674
+ config: SessionPluginConfigSummary | undefined
1675
+ display_name: string | null | undefined
1676
+ icon: string | null | undefined
1677
+ installed: boolean | null
1678
+ name: string
1679
+ projected: boolean
1680
+ projection_source: string | null | undefined
1681
+ reason: string | null | undefined
1682
+ status: string
1683
+ ```
1684
+
1685
+ ## `SessionPluginActivation` (type)
1686
+
1687
+ ```ts
1688
+ export type SessionPluginActivation = Pick<SessionPlugin, "name" | "active" | "status" | "reason">
1689
+ ```
1690
+
1691
+ ## `SessionPluginConfigError` (interface)
1692
+
1693
+ ```ts
1694
+ message: string
1695
+ path: string
1696
+ ```
1697
+
1698
+ ## `SessionPluginConfigSet` (interface)
1699
+
1700
+ ```ts
1701
+ path: string
1702
+ value: unknown
1703
+ ```
1704
+
1705
+ ## `SessionPluginConfigState` (interface)
1706
+
1707
+ ```ts
1708
+ errors: SessionPluginConfigError[]
1709
+ reason: string | null
1710
+ revision: string | null
1711
+ schema: Record<string, unknown> | null
1712
+ state: SessionPluginConfigStateName
1713
+ values: Record<string, unknown>
1714
+ write_only: string[]
1715
+ ```
1716
+
1717
+ ## `SessionPluginConfigStateName` (type)
1718
+
1719
+ ```ts
1720
+ export type SessionPluginConfigStateName = "not_required" | "required" | "configured" | "error"
1721
+ ```
1722
+
1723
+ ## `SessionPluginConfigSummary` (type)
1724
+
1725
+ ```ts
1726
+ export type SessionPluginConfigSummary =
1727
+ | SessionPluginConfigStateName
1728
+ | "unchecked"
1729
+ ```
1730
+
1731
+ ## `SessionPluginConfigUpdate` (interface)
1732
+
1733
+ ```ts
1734
+ expected_revision: string | null | undefined
1735
+ remove: string[] | undefined
1736
+ set: SessionPluginConfigSet[] | undefined
1737
+ ```
1738
+
1035
1739
  ## `SessionPortMapping` (interface)
1036
1740
 
1037
1741
  ```ts
@@ -1051,6 +1755,23 @@ model: string | undefined
1051
1755
  solution: SolutionRef | undefined
1052
1756
  ```
1053
1757
 
1758
+ ## `SessionQueueSnapshot` (interface)
1759
+
1760
+ ```ts
1761
+ items: QueuedMessage[]
1762
+ pause_reason: string | null
1763
+ paused: boolean
1764
+ revision: number
1765
+ session_id: string
1766
+ ```
1767
+
1768
+ ## `SessionSearchMatch` (interface)
1769
+
1770
+ ```ts
1771
+ field: "title" | "content"
1772
+ snippet: { role: string; text: string; } | null
1773
+ ```
1774
+
1054
1775
  ## `SessionSetupError` (class)
1055
1776
 
1056
1777
  ```ts
@@ -1072,6 +1793,7 @@ export type SessionSetupStage = "solution" | "session" | "skill" | "connection"
1072
1793
 
1073
1794
  ```ts
1074
1795
  attachAppCli: (sessionId: string, definition: AppCliDefinition) => Promise<AppCliAttachment>
1796
+ callMcpApp: (sessionId: string, sourceId: string, request: { request_id: string; name: string; arguments: Record<string, unknown>; }, init?: RequestInit) => Promise<{ response: Record<string, unknown>; replayed: boolean; }>
1075
1797
  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; }>
1076
1798
  connect: (sessionId: string) => Promise<AgentSession>
1077
1799
  copyFile: (sessionId: string, filePath: string) => Promise<{ path: string; }>
@@ -1085,24 +1807,34 @@ deleteFile: (sessionId: string, filePath: string) => Promise<void>
1085
1807
  deleteSession: (sessionId: string, options?: { deleteWorkspace?: boolean; }) => Promise<{ deleted: boolean; workspace_deleted?: boolean; }>
1086
1808
  downloadFile: (sessionId: string, filePath: string, downloadName?: string) => Promise<void>
1087
1809
  exportSession: (sessionId: string) => Promise<void>
1810
+ fetchSessionPluginIcon: (sessionId: string, name: string) => Promise<Blob>
1088
1811
  getBackgroundTask: (sessionId: string, taskId: string, tail?: number, init?: RequestInit) => Promise<BackgroundTask>
1089
1812
  getDownloadDirUrl: (sessionId: string, dirPath: string) => string
1813
+ getMcpApp: (sessionId: string, sourceId: string, init?: RequestInit) => Promise<McpAppArchive>
1814
+ getMcpAppContext: (sessionId: string, sourceId: string, init?: RequestInit) => Promise<McpAppContextState>
1090
1815
  getReplayPreview: (sessionId: string) => Promise<ReplayPreview>
1091
1816
  getSession: (sessionId: string, init?: RequestInit) => Promise<SessionDetail>
1092
1817
  getSessionCheckpoints: (sessionId: string, init?: RequestInit) => Promise<{ nodes: CheckpointNode[]; leaf_id: string | null; }>
1093
1818
  getSessionContextStats: (sessionId: string, init?: RequestInit) => Promise<SessionContextStats>
1094
1819
  getSessionHistory: (sessionId: string, init?: RequestInit) => Promise<SessionHistory>
1820
+ getSessionPluginConfig: (sessionId: string, name: string, init?: RequestInit) => Promise<{ plugin: string; config: SessionPluginConfigState; }>
1095
1821
  getSessionTasks: (sessionId: string) => Promise<Task[]>
1822
+ getSessionTurnCommands: (sessionId: string) => Promise<HistoricalCommand[]>
1823
+ getSessionTurnIndex: (sessionId: string) => Promise<SessionTurnIndex>
1096
1824
  getSessionTurns: (sessionId: string) => Promise<TurnProjection[]>
1825
+ getSessionTurnsPage: (sessionId: string, options?: SessionTurnsQuery, init?: RequestInit) => Promise<SessionTurnsPage>
1097
1826
  getSharedSession: (token: string) => Promise<TurnProjection[]>
1098
1827
  importSession: (file: File, name?: string, solutionOverride?: string | null | ImportSessionOptions) => Promise<{ session_id: string; }>
1099
1828
  listBackgroundTasks: (sessionId: string, init?: RequestInit) => Promise<BackgroundTask[]>
1100
1829
  listDir: (sessionId: string, dirPath: string) => Promise<FileEntry[]>
1101
1830
  listResultFeedback: (sessionId: string) => Promise<ResultFeedback[]>
1831
+ listSessionPlugins: (sessionId: string, init?: RequestInit) => Promise<{ plugins: SessionPlugin[]; sync_version: number; sync_pending: boolean; }>
1102
1832
  listSessions: (template_id_prefix?: string, solution_id?: string) => Promise<SessionInfo[]>
1103
- listSessionsPaginated: (params: { limit: number; offset: number; template_id_prefix?: string; solution_id?: string; solution_registry_id?: string; q?: string; }) => Promise<PaginatedSessionsResult>
1833
+ 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>
1104
1834
  listSessionsWithSkillData: () => Promise<SkillDevSession[]>
1835
+ onMcpAppChanged: (sessionId: string, sourceId: string, listener: () => void) => () => void
1105
1836
  pinSession: (sessionId: string, pinned: boolean) => Promise<SessionInfo>
1837
+ prepareSessionPluginConfig: (sessionId: string, name: string, init?: RequestInit) => Promise<{ plugin: string; config: SessionPluginConfigState; }>
1106
1838
  previewImport: (file: File) => Promise<ImportPreview>
1107
1839
  probeSessionUrl: (sessionId: string, url: string) => Promise<{ reachable: boolean; requires_proxy: boolean; }>
1108
1840
  putResultFeedback: (sessionId: string, assistantEntryId: string, feedback: { helpful: boolean; reason?: ResultFeedbackReason | null; }) => Promise<ResultFeedback>
@@ -1110,16 +1842,20 @@ renameFile: (sessionId: string, filePath: string, newName: string) => Promise<{
1110
1842
  revokeShare: (sessionId: string, token: string) => Promise<{ revoked: boolean; }>
1111
1843
  rewindSession: (sessionId: string, checkpointId: string) => Promise<{ id: string; content: string; }>
1112
1844
  searchOwnedContent: (params: { q: string; limit?: number; }) => Promise<GlobalSearchResult>
1845
+ sessionPluginIconUrl: (sessionId: string, name: string) => string
1113
1846
  setSessionEnv: (sessionId: string, env: Record<string, string>) => Promise<SessionDetail>
1847
+ setSessionPluginActivation: (sessionId: string, name: string, active: boolean, init?: RequestInit) => Promise<{ plugin: SessionPluginActivation; sync_version: number; }>
1114
1848
  shareFile: (sessionId: string, sourcePath: string, linkName?: string, shareFolder?: string) => Promise<{ path: string; target: string; }>
1115
1849
  startReplaySession: (sourceSessionId: string, speed?: ReplaySpeed) => Promise<{ session_id: string; }>
1116
1850
  stopBackgroundTask: (sessionId: string, taskId: string) => Promise<BackgroundTaskStopResult>
1117
1851
  switchBranch: (sessionId: string, checkpointId: string) => Promise<{ id: string; leaf_id: string; }>
1118
1852
  tokenizeMessages: (messages: Array<Record<string, unknown>>, options?: { model?: string; add_generation_prompt?: boolean; enable_thinking?: boolean | null; tools?: Array<Record<string, unknown>>; }) => Promise<TokenizeResult>
1119
1853
  tokenizePrompt: (prompt: string, model?: string) => Promise<TokenizeResult>
1854
+ updateMcpAppContext: (sessionId: string, sourceId: string, body: McpAppContextUpdate, init?: RequestInit) => Promise<{ status: "accepted"; revision: string; }>
1120
1855
  updateReplaySession: (sessionId: string, payload: { speed?: ReplaySpeed; status?: "autonomous"; }) => Promise<{ replay_state: SessionInfo["replay_state"]; }>
1121
- updateSession: (sessionId: string, payload: { intent?: string; }) => Promise<SessionDetail>
1856
+ updateSession: (sessionId: string, payload: { intent?: string; chat_group_id?: string | null; }) => Promise<SessionDetail>
1122
1857
  updateSessionMemory: (sessionId: string, memoryEnabled: boolean) => Promise<{ memory_enabled: boolean; }>
1858
+ updateSessionPluginConfig: (sessionId: string, name: string, update: SessionPluginConfigUpdate, init?: RequestInit) => Promise<{ plugin: string; config: SessionPluginConfigState; }>
1123
1859
  updateSharing: (sessionId: string, shared: boolean) => Promise<{ shared: boolean; }>
1124
1860
  uploadFiles: (sessionId: string, dirPath: string, files: FileList | File[] | UploadFileEntry[], options?: UploadFilesOptions) => Promise<{ uploaded: string[]; failed: string[]; }>
1125
1861
  writeFile: (sessionId: string, filePath: string, content: string) => Promise<{ success: boolean; }>
@@ -1134,8 +1870,11 @@ askAnswers: Record<string, AskUserAnswerData>
1134
1870
  connection: ConnectionStatus
1135
1871
  errorMessage: string | null
1136
1872
  isStreaming: boolean
1873
+ loadingOlder: boolean
1137
1874
  messages: ChatMessage[]
1138
1875
  mode: "planning" | "executing" | null
1876
+ nextBefore: string | null
1877
+ queue: SessionQueueSnapshot
1139
1878
  replay: ReplaySnapshot | null
1140
1879
  sessionId: string
1141
1880
  status: "completed" | "failed" | "interrupted" | "running" | "created" | "waiting_for_input" | null
@@ -1151,6 +1890,44 @@ SessionStatus = type(
1151
1890
  )
1152
1891
  ```
1153
1892
 
1893
+ ## `SessionStatusEvent` (interface)
1894
+
1895
+ ```ts
1896
+ session_id: string
1897
+ status: string
1898
+ ```
1899
+
1900
+ ## `SessionTurnIndex` (interface)
1901
+
1902
+ ```ts
1903
+ items: SessionTurnIndexItem[]
1904
+ sessionId: string
1905
+ ```
1906
+
1907
+ ## `SessionTurnIndexItem` (interface)
1908
+
1909
+ ```ts
1910
+ createdAt: string | null
1911
+ entryId: string
1912
+ preview: string
1913
+ ```
1914
+
1915
+ ## `SessionTurnsPage` (interface)
1916
+
1917
+ ```ts
1918
+ currentMode: "planning" | "executing"
1919
+ nextBefore: string | null
1920
+ turns: TurnProjection[]
1921
+ ```
1922
+
1923
+ ## `SessionTurnsQuery` (interface)
1924
+
1925
+ ```ts
1926
+ before: string | undefined
1927
+ fromEntryId: string | undefined
1928
+ limit: number | undefined
1929
+ ```
1930
+
1154
1931
  ## `ShareLinkResult` (interface)
1155
1932
 
1156
1933
  ```ts
@@ -1159,6 +1936,30 @@ token: string
1159
1936
  url: string
1160
1937
  ```
1161
1938
 
1939
+ ## `shouldApplySnapshot` (function)
1940
+
1941
+ ```ts
1942
+ shouldApplySnapshot: (current: SessionQueueSnapshot | undefined, next: SessionQueueSnapshot) => boolean
1943
+ ```
1944
+
1945
+ ## `SiteVisitsResource` (class)
1946
+
1947
+ ```ts
1948
+ record: () => Promise<SiteVisitsSummary>
1949
+ summary: () => Promise<SiteVisitsSummary>
1950
+ ```
1951
+
1952
+ ## `SiteVisitsSummary` (interface)
1953
+
1954
+ ```ts
1955
+ as_of: string
1956
+ date: string
1957
+ timezone: string
1958
+ today_pv: number
1959
+ today_uv: number
1960
+ total_pv: number
1961
+ ```
1962
+
1162
1963
  ## `SkillDefinition` (interface)
1163
1964
 
1164
1965
  ```ts
@@ -1166,6 +1967,12 @@ files: TextFile[]
1166
1967
  name: string
1167
1968
  ```
1168
1969
 
1970
+ ## `SkillEditorTemplateId` (type)
1971
+
1972
+ ```ts
1973
+ export type SkillEditorTemplateId = "skill_editor"
1974
+ ```
1975
+
1169
1976
  ## `SkillMentionAvailability` (interface)
1170
1977
 
1171
1978
  ```ts
@@ -1243,6 +2050,18 @@ export type SolutionDefinition =
1243
2050
  export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
1244
2051
  ```
1245
2052
 
2053
+ ## `sortComputers` (function)
2054
+
2055
+ ```ts
2056
+ sortComputers: (computers: SessionComputer[]) => SessionComputer[]
2057
+ ```
2058
+
2059
+ ## `SystemError` (interface)
2060
+
2061
+ ```ts
2062
+ message: string
2063
+ ```
2064
+
1246
2065
  ## `Task` (type)
1247
2066
 
1248
2067
  ```ts
@@ -1303,6 +2122,25 @@ action: string
1303
2122
  payload: unknown
1304
2123
  ```
1305
2124
 
2125
+ ## `ToolCallArgumentsDelta` (interface)
2126
+
2127
+ ```ts
2128
+ arguments_delta: string
2129
+ function: { name: string; }
2130
+ id: string
2131
+ index: number
2132
+ loop_name: string | undefined
2133
+ ```
2134
+
2135
+ ## `ToolCallCreated` (interface)
2136
+
2137
+ ```ts
2138
+ function: { name: string; arguments: string; }
2139
+ id: string
2140
+ index: number
2141
+ loop_name: string | undefined
2142
+ ```
2143
+
1306
2144
  ## `ToolCallInfo` (interface)
1307
2145
 
1308
2146
  ```ts
@@ -1316,6 +2154,59 @@ result: unknown
1316
2154
  status: "done" | "error" | "cancelled" | "awaiting_answer" | "pending" | undefined
1317
2155
  ```
1318
2156
 
2157
+ ## `ToolCallProjection` (interface)
2158
+
2159
+ ```ts
2160
+ arguments: string
2161
+ display_name: string
2162
+ duration_ms: number | null | undefined
2163
+ id: string
2164
+ pending_question_ref: PendingQuestionRef | null | undefined
2165
+ ran_in_parallel: boolean | undefined
2166
+ result: unknown
2167
+ started_at: string | null | undefined
2168
+ status: string
2169
+ subagent_runs: RunTiming[] | undefined
2170
+ tool_name: string
2171
+ ```
2172
+
2173
+ ## `ToolResultDelta` (interface)
2174
+
2175
+ ```ts
2176
+ content: string
2177
+ loop_name: string | undefined
2178
+ stream: "stdout" | "stderr" | undefined
2179
+ tool_call_id: string
2180
+ ```
2181
+
2182
+ ## `ToolResultDone` (interface)
2183
+
2184
+ ```ts
2185
+ content: string
2186
+ function: { name: string; }
2187
+ loop_name: string | undefined
2188
+ tool_call_id: string
2189
+ ```
2190
+
2191
+ ## `ToolUiCard` (interface)
2192
+
2193
+ ```ts
2194
+ archived: boolean | undefined
2195
+ height: number
2196
+ mcpApp: McpAppData | undefined
2197
+ resourceHTML: string | undefined
2198
+ resourceUri: string | undefined
2199
+ resourceURI: string | undefined
2200
+ target: "inline" | "preview"
2201
+ title: string | undefined
2202
+ ```
2203
+
2204
+ ## `ToolUiCardContentType` (type)
2205
+
2206
+ ```ts
2207
+ export type ToolUiCardContentType = "resource-html" | "resource-uri"
2208
+ ```
2209
+
1319
2210
  ## `toReplaySnapshot` (function)
1320
2211
 
1321
2212
  ```ts
@@ -1336,13 +2227,26 @@ archived_files: ArchivedFileInfo[] | null | undefined
1336
2227
  archived_tool_calls: ArchivedToolCallInfo[] | null | undefined
1337
2228
  blocks: ContentBlock[]
1338
2229
  client_render_id: string | null | undefined
2230
+ client_request_id: string | null | undefined
1339
2231
  compaction_id: string | null | undefined
2232
+ context_action: ContextAction | null | undefined
2233
+ context_content: unknown
2234
+ context_key: string | null | undefined
2235
+ context_kind: string | null | undefined
2236
+ context_name: string | null | undefined
2237
+ context_order: number | null | undefined
2238
+ context_revision: string | null | undefined
1340
2239
  context_window: number | undefined
1341
- duration_ms: number | undefined
2240
+ display_summary: string | null | undefined
2241
+ display_title: string | null | undefined
2242
+ duration_ms: number | null | undefined
1342
2243
  failure_reason: string | null | undefined
1343
2244
  fallback_applied: boolean | null | undefined
2245
+ first_token_delivery_ms: number | null | undefined
2246
+ first_token_ms: number | null | undefined
2247
+ has_reported_timing: boolean | undefined
1344
2248
  id: string
1345
- kind: "message" | "compaction" | undefined
2249
+ kind: "message" | "context" | "compaction" | undefined
1346
2250
  loop_id: string
1347
2251
  memory_refs: MemoryRef[] | null | undefined
1348
2252
  model: string | null | undefined
@@ -1351,8 +2255,10 @@ post_chat_followup: PostChatFollowup | null | undefined
1351
2255
  role: "user" | "assistant" | "system"
1352
2256
  saved_ratio: number | null | undefined
1353
2257
  sequence: number
2258
+ sources: ContextSourceInfo[] | null | undefined
1354
2259
  started_at: string | null | undefined
1355
2260
  status: "streaming" | "completed" | "paused" | "failed" | "interrupted"
2261
+ stream_duration_ms: number | null | undefined
1356
2262
  summary_full: string | null | undefined
1357
2263
  summary_preview: string | null | undefined
1358
2264
  tokens_after: number | null | undefined