@blade-hq/agent-react 2610.0.0-beta.5 → 2610.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -3
- package/dist/components/AgentChat.d.ts +3 -0
- package/dist/components/AgentLoopBlock.d.ts +1 -4
- package/dist/components/AskUserQuestionBlock.d.ts +9 -0
- package/dist/components/AssistantTurnBlock.d.ts +20 -6
- package/dist/components/ChatInput.d.ts +4 -1
- package/dist/components/ChatSurface.d.ts +12 -1
- package/dist/components/ConnectionBanner.d.ts +1 -1
- package/dist/components/ContextCard.d.ts +20 -0
- package/dist/components/MarkdownContent.d.ts +2 -0
- package/dist/components/MessageList.d.ts +8 -1
- package/dist/components/PlanUpdateBlock.d.ts +31 -0
- package/dist/components/SessionMemoryToggle.d.ts +19 -0
- package/dist/components/SessionPluginSelector.d.ts +10 -0
- package/dist/components/ToolCallBlock.d.ts +4 -2
- package/dist/components/UserMessageBubble.d.ts +1 -1
- package/dist/components/WhatIfUserBubble.d.ts +7 -0
- package/dist/components/display-utils.d.ts +10 -0
- package/dist/context.d.ts +1 -0
- package/dist/embed/entry.d.ts +29 -0
- package/dist/hooks/use-agent-session.d.ts +5 -0
- package/dist/hooks/use-message-pin.d.ts +28 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +2690 -838
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-computer-command.d.ts +34 -0
- package/dist/lib/utils.d.ts +3 -1
- package/dist/lib/whatif-prompt.d.ts +18 -0
- package/dist/style.css +91 -1
- package/dist/style.full.css +92 -2
- package/package.json +2 -2
- package/public-api.md +614 -9
package/public-api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
6
|
+
共 247 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `acceptedPostChatFollowupCompletesLatestRun` (function)
|
|
9
9
|
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
acceptedPostChatFollowupCompletesLatestRun: (events: RawEvent[], updates: ProjectionUpdate[]) => boolean
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
## `acknowledgeTurnEvents` (function)
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
acknowledgeTurnEvents: (acknowledge?: () => void) => void
|
|
18
|
+
```
|
|
19
|
+
|
|
14
20
|
## `ActiveCompactionState` (interface)
|
|
15
21
|
|
|
16
22
|
```ts
|
|
@@ -48,10 +54,17 @@ onSessionReady: ((session: AgentSession) => void) | undefined
|
|
|
48
54
|
placeholder: string | undefined
|
|
49
55
|
renderers: ChatViewRenderers | undefined
|
|
50
56
|
sessionId: string | undefined
|
|
57
|
+
sessionPluginControls: ((sessionId: string) => ReactNode) | undefined
|
|
51
58
|
slots: ChatViewSlots | undefined
|
|
52
59
|
theme: "light" | "dark" | undefined
|
|
53
60
|
```
|
|
54
61
|
|
|
62
|
+
## `AgentComputerLaunchOutcome` (type)
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
export type AgentComputerLaunchOutcome = "pending" | "succeeded" | "failed" | "unknown"
|
|
66
|
+
```
|
|
67
|
+
|
|
55
68
|
## `AgentLoopInfo` (interface)
|
|
56
69
|
|
|
57
70
|
```ts
|
|
@@ -66,18 +79,23 @@ toolCallId: string
|
|
|
66
79
|
append: (text: string) => void
|
|
67
80
|
attach: (label: string, data: unknown) => void
|
|
68
81
|
attachApp: (options: AttachAppOptions) => Promise<AppCliAttachment | null>
|
|
82
|
+
cancelQueued: (id: number) => Promise<boolean>
|
|
69
83
|
compact: () => Promise<Record<string, unknown>>
|
|
70
84
|
countFiles: (dirPath?: string) => Promise<number>
|
|
71
85
|
dispose: () => void
|
|
72
86
|
downloadFile: (filePath: string, downloadName?: string) => Promise<void>
|
|
73
87
|
exitReplay: () => Promise<void>
|
|
74
88
|
getState: () => SessionState
|
|
89
|
+
hasOlderHistory: boolean
|
|
75
90
|
insertText: (text: string) => void
|
|
76
91
|
isDisposed: boolean
|
|
77
92
|
listDir: (dirPath?: string) => Promise<FileEntry[]>
|
|
93
|
+
listQueue: () => Promise<Array<{ id: number; message: string; }>>
|
|
94
|
+
loadOlderHistory: (options?: { beforeCommit?: () => void; }) => Promise<void>
|
|
78
95
|
off: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => void
|
|
79
96
|
on: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => () => void
|
|
80
97
|
onCommand: (action: string, handler: CommandHandler) => () => void
|
|
98
|
+
queue: (content: string) => Promise<boolean>
|
|
81
99
|
send: (content: MessageContent, options?: SendOptions) => Promise<boolean>
|
|
82
100
|
sessionId: string
|
|
83
101
|
setReplaySpeed: (speed: ReplaySpeed) => Promise<void>
|
|
@@ -111,7 +129,7 @@ sessionUpdated: { intent?: string; status?: SessionStatus; model?: string | null
|
|
|
111
129
|
taskListUpdated: { tasks: unknown[]; }
|
|
112
130
|
toolCall: { toolCall: ToolCallInfo; turn: TurnProjection; }
|
|
113
131
|
toolPreview: { toolCallId: string; type: "resource-html" | "resource-uri"; content: string; title: string; }
|
|
114
|
-
toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; }
|
|
132
|
+
toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; source: "live" | "bootstrap_replay" | "reconnect_replay"; }
|
|
115
133
|
workspaceChanged: { filePath?: string; }
|
|
116
134
|
```
|
|
117
135
|
|
|
@@ -155,6 +173,7 @@ tool_name: string | null | undefined
|
|
|
155
173
|
|
|
156
174
|
```ts
|
|
157
175
|
custom: Record<number, string>
|
|
176
|
+
note: string | undefined
|
|
158
177
|
selections: Record<number, number[]>
|
|
159
178
|
```
|
|
160
179
|
|
|
@@ -174,6 +193,20 @@ cli: AppCliDefinition | undefined
|
|
|
174
193
|
getContext: () => Record<string, unknown> | Promise<Record<string, unknown>>
|
|
175
194
|
```
|
|
176
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
|
+
|
|
177
210
|
## `AuthResource` (class)
|
|
178
211
|
|
|
179
212
|
```ts
|
|
@@ -239,6 +272,8 @@ statusText: string
|
|
|
239
272
|
auth: AuthResource
|
|
240
273
|
blob: (method: HttpMethod, path: string) => Promise<Blob>
|
|
241
274
|
buildAuthedUrl: (path: string) => string
|
|
275
|
+
chatProjects: ChatProjectsResource
|
|
276
|
+
computers: ComputersResource
|
|
242
277
|
fetch: (method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean) => Promise<Response>
|
|
243
278
|
formData: (method: HttpMethod, path: string, form: FormData, options?: { expectOk?: boolean; onUploadProgress?: (progress: UploadProgress) => void; }) => Promise<Response>
|
|
244
279
|
hasToken: () => boolean
|
|
@@ -268,7 +303,6 @@ baseUrl: string
|
|
|
268
303
|
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
269
304
|
onRefreshSuccess: (() => void | Promise<void>) | undefined
|
|
270
305
|
socketToken: string | (() => string | null | undefined) | undefined
|
|
271
|
-
streamTokens: boolean | undefined
|
|
272
306
|
token: string | (() => string | null | undefined) | undefined
|
|
273
307
|
tokenStorage: TokenStorageMode | undefined
|
|
274
308
|
```
|
|
@@ -292,6 +326,12 @@ client: BladeClient
|
|
|
292
326
|
buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
|
|
293
327
|
```
|
|
294
328
|
|
|
329
|
+
## `canToggleComputer` (function)
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
canToggleComputer: (computer: SessionComputer) => boolean
|
|
333
|
+
```
|
|
334
|
+
|
|
295
335
|
## `ChatCompletionTool` (interface)
|
|
296
336
|
|
|
297
337
|
```ts
|
|
@@ -299,12 +339,19 @@ function: { name: string; description?: string; parameters?: Record<string, unkn
|
|
|
299
339
|
type: "function"
|
|
300
340
|
```
|
|
301
341
|
|
|
342
|
+
## `chatErrorForDisplay` (function)
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
chatErrorForDisplay: (message: string, developer?: boolean) => string
|
|
346
|
+
```
|
|
347
|
+
|
|
302
348
|
## `ChatMessage` (interface)
|
|
303
349
|
|
|
304
350
|
```ts
|
|
305
351
|
blocks: ContentBlock[] | undefined
|
|
306
352
|
compaction: CompactionInfo | undefined
|
|
307
353
|
content: MessageContent
|
|
354
|
+
context: ContextProjectionData | undefined
|
|
308
355
|
duration_ms: number | undefined
|
|
309
356
|
entry_id: string | undefined
|
|
310
357
|
kind: string | undefined
|
|
@@ -312,12 +359,33 @@ loop_name: string | undefined
|
|
|
312
359
|
memory_refs: MemoryRefInfo[] | undefined
|
|
313
360
|
parent_id: string | null | undefined
|
|
314
361
|
reasoning: string | undefined
|
|
362
|
+
render_id: string | undefined
|
|
315
363
|
role: "error" | "user" | "assistant" | "tool"
|
|
316
364
|
status: "streaming" | "completed" | "paused" | "failed" | "interrupted" | undefined
|
|
317
365
|
timestamp: string | undefined
|
|
318
366
|
tool_calls: ToolCallInfo[] | undefined
|
|
319
367
|
```
|
|
320
368
|
|
|
369
|
+
## `ChatProject` (interface)
|
|
370
|
+
|
|
371
|
+
```ts
|
|
372
|
+
created_at: string
|
|
373
|
+
id: string
|
|
374
|
+
instructions: string
|
|
375
|
+
name: string
|
|
376
|
+
session_count: number
|
|
377
|
+
updated_at: string
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
## `ChatProjectsResource` (class)
|
|
381
|
+
|
|
382
|
+
```ts
|
|
383
|
+
create: (payload: { name: string; instructions?: string; }) => Promise<ChatProject>
|
|
384
|
+
delete: (projectId: string) => Promise<{ deleted: boolean; deleted_sessions: number; }>
|
|
385
|
+
list: () => Promise<ChatProject[]>
|
|
386
|
+
update: (projectId: string, payload: { name?: string; instructions?: string; }) => Promise<ChatProject>
|
|
387
|
+
```
|
|
388
|
+
|
|
321
389
|
## `ChatView` (function)
|
|
322
390
|
|
|
323
391
|
```ts
|
|
@@ -348,6 +416,7 @@ onSessionReady: ((session: AgentSession) => void) | undefined
|
|
|
348
416
|
placeholder: string | undefined
|
|
349
417
|
renderers: ChatViewRenderers | undefined
|
|
350
418
|
sessionId: string | undefined
|
|
419
|
+
sessionPluginControls: ((sessionId: string) => ReactNode) | undefined
|
|
351
420
|
slots: ChatViewSlots | undefined
|
|
352
421
|
theme: "light" | "dark" | undefined
|
|
353
422
|
```
|
|
@@ -366,6 +435,12 @@ footer: ReactNode
|
|
|
366
435
|
header: ReactNode
|
|
367
436
|
```
|
|
368
437
|
|
|
438
|
+
## `classifyAgentComputerLaunchOutcome` (function)
|
|
439
|
+
|
|
440
|
+
```ts
|
|
441
|
+
classifyAgentComputerLaunchOutcome: (toolCall: { status?: string; result?: unknown; }) => AgentComputerLaunchOutcome
|
|
442
|
+
```
|
|
443
|
+
|
|
369
444
|
## `ClientProjectionBuilder` (class)
|
|
370
445
|
|
|
371
446
|
```ts
|
|
@@ -375,6 +450,12 @@ reset: () => void
|
|
|
375
450
|
seedSequence: (maxSeq: number) => void
|
|
376
451
|
```
|
|
377
452
|
|
|
453
|
+
## `collectMemoryRefs` (function)
|
|
454
|
+
|
|
455
|
+
```ts
|
|
456
|
+
collectMemoryRefs: (messages: ChatMessage[]) => MemoryRefInfo[]
|
|
457
|
+
```
|
|
458
|
+
|
|
378
459
|
## `CommandEnvelope` (interface)
|
|
379
460
|
|
|
380
461
|
```ts
|
|
@@ -407,6 +488,49 @@ tokens_before: number | null | undefined
|
|
|
407
488
|
trigger: "auto" | "manual" | "forced_retry" | null | undefined
|
|
408
489
|
```
|
|
409
490
|
|
|
491
|
+
## `computerDaemonVersion` (function)
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
computerDaemonVersion: (computer: SessionComputer) => string
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
## `computerOS` (function)
|
|
498
|
+
|
|
499
|
+
```ts
|
|
500
|
+
computerOS: (computer: SessionComputer) => ComputerOS
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
## `ComputerOS` (type)
|
|
504
|
+
|
|
505
|
+
```ts
|
|
506
|
+
export type ComputerOS = "macos" | "windows" | "linux" | "unknown"
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
## `computerPlatformLabel` (function)
|
|
510
|
+
|
|
511
|
+
```ts
|
|
512
|
+
computerPlatformLabel: (computer: SessionComputer) => string
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
## `ComputersResource` (class)
|
|
516
|
+
|
|
517
|
+
```ts
|
|
518
|
+
list: (sessionId: string) => Promise<SessionComputerList>
|
|
519
|
+
setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
## `computerState` (function)
|
|
523
|
+
|
|
524
|
+
```ts
|
|
525
|
+
computerState: (computer: SessionComputer) => ComputerState
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
## `ComputerState` (type)
|
|
529
|
+
|
|
530
|
+
```ts
|
|
531
|
+
export type ComputerState = "primary" | "enabled" | "offline" | "idle"
|
|
532
|
+
```
|
|
533
|
+
|
|
410
534
|
## `connectEmbedded` (function)
|
|
411
535
|
|
|
412
536
|
```ts
|
|
@@ -423,6 +547,7 @@ export type ConnectionStatus = "connecting" | "connected" | "reconnecting" | "di
|
|
|
423
547
|
|
|
424
548
|
```ts
|
|
425
549
|
content: unknown
|
|
550
|
+
delivery_id: string | null | undefined
|
|
426
551
|
display_name: string | null | undefined
|
|
427
552
|
tool_call_id: string | null | undefined
|
|
428
553
|
tool_name: string | null | undefined
|
|
@@ -435,6 +560,95 @@ type: "text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridg
|
|
|
435
560
|
contentPreview: (content: MessageContent, maxLen?: number) => string
|
|
436
561
|
```
|
|
437
562
|
|
|
563
|
+
## `ContextAction` (type)
|
|
564
|
+
|
|
565
|
+
```ts
|
|
566
|
+
export type ContextAction = "published" | "retained" | "removed"
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
## `ContextCard` (function)
|
|
570
|
+
|
|
571
|
+
```ts
|
|
572
|
+
ContextCard: ({ context, className }: ContextCardProps) => JSX.Element
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
## `ContextCardProps` (interface)
|
|
576
|
+
|
|
577
|
+
```ts
|
|
578
|
+
className: string | undefined
|
|
579
|
+
context: ContextProjectionData
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
## `ContextDisplayState` (interface)
|
|
583
|
+
|
|
584
|
+
```ts
|
|
585
|
+
detail: string
|
|
586
|
+
isRemoved: boolean
|
|
587
|
+
summary: string
|
|
588
|
+
title: string
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
## `ContextGroupCard` (function)
|
|
592
|
+
|
|
593
|
+
```ts
|
|
594
|
+
ContextGroupCard: ({ contexts, className }: ContextGroupCardProps) => JSX.Element | null
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
## `ContextGroupCardProps` (interface)
|
|
598
|
+
|
|
599
|
+
```ts
|
|
600
|
+
className: string | undefined
|
|
601
|
+
contexts: readonly ContextProjectionData[]
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
## `ContextGroupDisplayState` (interface)
|
|
605
|
+
|
|
606
|
+
```ts
|
|
607
|
+
count: number
|
|
608
|
+
summary: string
|
|
609
|
+
title: string
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
## `contextProjectionData` (function)
|
|
613
|
+
|
|
614
|
+
```ts
|
|
615
|
+
contextProjectionData: (fields: ContextProjectionFields) => ContextProjectionData | null
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
## `ContextProjectionData` (interface)
|
|
619
|
+
|
|
620
|
+
```ts
|
|
621
|
+
context_action: ContextAction
|
|
622
|
+
context_key: string
|
|
623
|
+
context_kind: string
|
|
624
|
+
context_name: string
|
|
625
|
+
context_order: number
|
|
626
|
+
context_revision: string
|
|
627
|
+
display_summary: string | null | undefined
|
|
628
|
+
display_title: string | null | undefined
|
|
629
|
+
sources: ContextSourceInfo[]
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
## `ContextProjectionFields` (interface)
|
|
633
|
+
|
|
634
|
+
```ts
|
|
635
|
+
context_action: ContextAction | null | undefined
|
|
636
|
+
context_key: string | null | undefined
|
|
637
|
+
context_kind: string | null | undefined
|
|
638
|
+
context_name: string | null | undefined
|
|
639
|
+
context_order: number | null | undefined
|
|
640
|
+
context_revision: string | null | undefined
|
|
641
|
+
display_summary: string | null | undefined
|
|
642
|
+
display_title: string | null | undefined
|
|
643
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
## `ContextSourceInfo` (type)
|
|
647
|
+
|
|
648
|
+
```ts
|
|
649
|
+
export type ContextSourceInfo = Record<string, unknown>
|
|
650
|
+
```
|
|
651
|
+
|
|
438
652
|
## `createInitialSessionState` (function)
|
|
439
653
|
|
|
440
654
|
```ts
|
|
@@ -444,7 +658,9 @@ createInitialSessionState: (sessionId: string) => SessionState
|
|
|
444
658
|
## `CreateSessionRequest` (interface)
|
|
445
659
|
|
|
446
660
|
```ts
|
|
661
|
+
agent_runtime_id: string | null | undefined
|
|
447
662
|
biz_role_id: string | null | undefined
|
|
663
|
+
chat_project_id: string | null | undefined
|
|
448
664
|
compaction_ratio: number | null | undefined
|
|
449
665
|
daemon_id: string | null | undefined
|
|
450
666
|
disable_tools: string[] | null | undefined
|
|
@@ -454,7 +670,7 @@ intent: string | undefined
|
|
|
454
670
|
memory_enabled: boolean | null | undefined
|
|
455
671
|
model: string | null | undefined
|
|
456
672
|
primary_skill_id: string | null | undefined
|
|
457
|
-
runtime_type: "sandbox" | "daemon" | null | undefined
|
|
673
|
+
runtime_type: "sandbox" | "daemon" | "native" | null | undefined
|
|
458
674
|
session_solution_asset_id: string | null | undefined
|
|
459
675
|
solution_id: string | undefined
|
|
460
676
|
solution_ref: PublishedSolutionRef | undefined
|
|
@@ -476,6 +692,12 @@ path: string | undefined
|
|
|
476
692
|
token: string | (() => string | null | undefined) | undefined
|
|
477
693
|
```
|
|
478
694
|
|
|
695
|
+
## `CurrentPlanPanel` (function)
|
|
696
|
+
|
|
697
|
+
```ts
|
|
698
|
+
CurrentPlanPanel: ({ messages, running, revealRevision, sessionId, className, }: { messages: ChatMessage[]; running?: boolean; revealRevision?: number; sessionId?: string; className?: string; }) => JSX.Element | null
|
|
699
|
+
```
|
|
700
|
+
|
|
479
701
|
## `DEFAULT_REPLAY_SPEED` (const)
|
|
480
702
|
|
|
481
703
|
```ts
|
|
@@ -499,6 +721,12 @@ allowedOrigins: string[]
|
|
|
499
721
|
iframe: HTMLIFrameElement | undefined
|
|
500
722
|
```
|
|
501
723
|
|
|
724
|
+
## `EMPTY_PLATFORM_ENDPOINTS` (const)
|
|
725
|
+
|
|
726
|
+
```ts
|
|
727
|
+
EMPTY_PLATFORM_ENDPOINTS: PlatformEndpoints
|
|
728
|
+
```
|
|
729
|
+
|
|
502
730
|
## `ExchangeCodeParams` (interface)
|
|
503
731
|
|
|
504
732
|
```ts
|
|
@@ -600,6 +828,18 @@ export type FollowupInteractionEvent =
|
|
|
600
828
|
artifactKind: "file"
|
|
601
829
|
```
|
|
602
830
|
|
|
831
|
+
## `getContextDisplayState` (function)
|
|
832
|
+
|
|
833
|
+
```ts
|
|
834
|
+
getContextDisplayState: (context: ContextProjectionData) => ContextDisplayState
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
## `getContextGroupDisplayState` (function)
|
|
838
|
+
|
|
839
|
+
```ts
|
|
840
|
+
getContextGroupDisplayState: (contexts: readonly ContextProjectionData[]) => ContextGroupDisplayState
|
|
841
|
+
```
|
|
842
|
+
|
|
603
843
|
## `getFileParts` (function)
|
|
604
844
|
|
|
605
845
|
```ts
|
|
@@ -612,6 +852,12 @@ getFileParts: (content: MessageContent) => FileContentPart[]
|
|
|
612
852
|
getImageParts: (content: MessageContent) => ImageUrlContentPart[]
|
|
613
853
|
```
|
|
614
854
|
|
|
855
|
+
## `getPlanUpdateDisplayState` (function)
|
|
856
|
+
|
|
857
|
+
```ts
|
|
858
|
+
getPlanUpdateDisplayState: (messages: ChatMessage[]) => PlanUpdateDisplayState
|
|
859
|
+
```
|
|
860
|
+
|
|
615
861
|
## `getTextContent` (function)
|
|
616
862
|
|
|
617
863
|
```ts
|
|
@@ -654,12 +900,24 @@ export type GlobalSearchResultItem =
|
|
|
654
900
|
| GlobalSearchFileResult
|
|
655
901
|
```
|
|
656
902
|
|
|
903
|
+
## `groupAdjacentContextRuns` (function)
|
|
904
|
+
|
|
905
|
+
```ts
|
|
906
|
+
groupAdjacentContextRuns: (kinds: readonly (string | null)[]) => readonly (readonly number[])[]
|
|
907
|
+
```
|
|
908
|
+
|
|
657
909
|
## `groupMessagesByLoop` (function)
|
|
658
910
|
|
|
659
911
|
```ts
|
|
660
912
|
groupMessagesByLoop: (messages: ChatMessage[]) => MessageGroup[]
|
|
661
913
|
```
|
|
662
914
|
|
|
915
|
+
## `hasChatRunEvent` (function)
|
|
916
|
+
|
|
917
|
+
```ts
|
|
918
|
+
hasChatRunEvent: (events: RawEvent[]) => boolean
|
|
919
|
+
```
|
|
920
|
+
|
|
663
921
|
## `HeadlessResource` (class)
|
|
664
922
|
|
|
665
923
|
```ts
|
|
@@ -668,6 +926,15 @@ runInSession: { <T = unknown>(sessionId: string, prompt: string, options: Headle
|
|
|
668
926
|
runWithSession: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<HeadlessRunInSessionResult<T>>; (prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>; }
|
|
669
927
|
```
|
|
670
928
|
|
|
929
|
+
## `HistoricalCommand` (interface)
|
|
930
|
+
|
|
931
|
+
```ts
|
|
932
|
+
action: string
|
|
933
|
+
deliveryId: string
|
|
934
|
+
payload: unknown
|
|
935
|
+
toolCallId: string | undefined
|
|
936
|
+
```
|
|
937
|
+
|
|
671
938
|
## `ImageUrlContentPart` (interface)
|
|
672
939
|
|
|
673
940
|
```ts
|
|
@@ -696,6 +963,18 @@ direction: "host-to-agent"
|
|
|
696
963
|
payload: unknown
|
|
697
964
|
```
|
|
698
965
|
|
|
966
|
+
## `isAgentComputerCommand` (function)
|
|
967
|
+
|
|
968
|
+
```ts
|
|
969
|
+
isAgentComputerCommand: (command: string) => boolean
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
## `isAgentComputerToolCall` (function)
|
|
973
|
+
|
|
974
|
+
```ts
|
|
975
|
+
isAgentComputerToolCall: (argumentsJson: string | null | undefined) => boolean
|
|
976
|
+
```
|
|
977
|
+
|
|
699
978
|
## `isCommandEnvelope` (function)
|
|
700
979
|
|
|
701
980
|
```ts
|
|
@@ -705,7 +984,7 @@ isCommandEnvelope: (value: unknown) => value is CommandEnvelope
|
|
|
705
984
|
## `isHiddenInternalMessage` (function)
|
|
706
985
|
|
|
707
986
|
```ts
|
|
708
|
-
isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content"
|
|
987
|
+
isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">, options?: { includeLegacyForkContext?: boolean; }) => boolean
|
|
709
988
|
```
|
|
710
989
|
|
|
711
990
|
## `isInboundEnvelope` (function)
|
|
@@ -714,6 +993,12 @@ isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">) => boo
|
|
|
714
993
|
isInboundEnvelope: (value: unknown) => value is InboundEnvelope
|
|
715
994
|
```
|
|
716
995
|
|
|
996
|
+
## `isPlanUpdateTool` (function)
|
|
997
|
+
|
|
998
|
+
```ts
|
|
999
|
+
isPlanUpdateTool: (toolCall: Pick<ToolCallInfo, "name">) => boolean
|
|
1000
|
+
```
|
|
1001
|
+
|
|
717
1002
|
## `latestPostChatFollowup` (function)
|
|
718
1003
|
|
|
719
1004
|
```ts
|
|
@@ -736,6 +1021,13 @@ export enum LayoutType {
|
|
|
736
1021
|
}
|
|
737
1022
|
```
|
|
738
1023
|
|
|
1024
|
+
## `LiveRevisionState` (interface)
|
|
1025
|
+
|
|
1026
|
+
```ts
|
|
1027
|
+
byTurnId: ReadonlyMap<string, number>
|
|
1028
|
+
current: number
|
|
1029
|
+
```
|
|
1030
|
+
|
|
739
1031
|
## `LlmAdvancedSettings` (interface)
|
|
740
1032
|
|
|
741
1033
|
```ts
|
|
@@ -818,6 +1110,20 @@ id: string
|
|
|
818
1110
|
name: string
|
|
819
1111
|
```
|
|
820
1112
|
|
|
1113
|
+
## `loadPlatformEndpoints` (function)
|
|
1114
|
+
|
|
1115
|
+
```ts
|
|
1116
|
+
loadPlatformEndpoints: (options?: LoadPlatformEndpointsOptions) => Promise<PlatformEndpoints>
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
## `LoadPlatformEndpointsOptions` (interface)
|
|
1120
|
+
|
|
1121
|
+
```ts
|
|
1122
|
+
baseUrl: string | undefined
|
|
1123
|
+
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
1124
|
+
timeoutMs: number | undefined
|
|
1125
|
+
```
|
|
1126
|
+
|
|
821
1127
|
## `LoginOptions` (interface)
|
|
822
1128
|
|
|
823
1129
|
```ts
|
|
@@ -864,6 +1170,12 @@ id: number
|
|
|
864
1170
|
skill_name: string | null | undefined
|
|
865
1171
|
```
|
|
866
1172
|
|
|
1173
|
+
## `MemoryRefsHint` (function)
|
|
1174
|
+
|
|
1175
|
+
```ts
|
|
1176
|
+
MemoryRefsHint: ({ refs }: { refs: MemoryRefInfo[]; }) => JSX.Element
|
|
1177
|
+
```
|
|
1178
|
+
|
|
867
1179
|
## `MessageContent` (type)
|
|
868
1180
|
|
|
869
1181
|
```ts
|
|
@@ -889,6 +1201,8 @@ baseUrl: string | undefined
|
|
|
889
1201
|
default: string
|
|
890
1202
|
defaultServiceModel: string | undefined
|
|
891
1203
|
models: ModelOption[]
|
|
1204
|
+
unavailableModelIds: string[] | undefined
|
|
1205
|
+
unavailableProviderIds: string[] | undefined
|
|
892
1206
|
```
|
|
893
1207
|
|
|
894
1208
|
## `ModelOption` (interface)
|
|
@@ -905,6 +1219,12 @@ serviceModelId: string | undefined
|
|
|
905
1219
|
list: () => Promise<ModelCatalog>
|
|
906
1220
|
```
|
|
907
1221
|
|
|
1222
|
+
## `normalizeAdjacentUrlFormatting` (function)
|
|
1223
|
+
|
|
1224
|
+
```ts
|
|
1225
|
+
normalizeAdjacentUrlFormatting: (value: string) => string
|
|
1226
|
+
```
|
|
1227
|
+
|
|
908
1228
|
## `normalizeMessageContent` (function)
|
|
909
1229
|
|
|
910
1230
|
```ts
|
|
@@ -935,6 +1255,26 @@ content: string
|
|
|
935
1255
|
label: string
|
|
936
1256
|
```
|
|
937
1257
|
|
|
1258
|
+
## `ParsedWhatIfPrompt` (interface)
|
|
1259
|
+
|
|
1260
|
+
```ts
|
|
1261
|
+
fromStep: number | null
|
|
1262
|
+
quotes: WhatIfQuote[]
|
|
1263
|
+
userText: string
|
|
1264
|
+
```
|
|
1265
|
+
|
|
1266
|
+
## `parsePlanUpdate` (function)
|
|
1267
|
+
|
|
1268
|
+
```ts
|
|
1269
|
+
parsePlanUpdate: (argumentsJson: string) => PlanUpdateData | null
|
|
1270
|
+
```
|
|
1271
|
+
|
|
1272
|
+
## `parseWhatIfPrompt` (function)
|
|
1273
|
+
|
|
1274
|
+
```ts
|
|
1275
|
+
parseWhatIfPrompt: (text: string) => ParsedWhatIfPrompt | null
|
|
1276
|
+
```
|
|
1277
|
+
|
|
938
1278
|
## `PatchEnvelope` (interface)
|
|
939
1279
|
|
|
940
1280
|
```ts
|
|
@@ -945,6 +1285,63 @@ sequence: number
|
|
|
945
1285
|
turn_id: string
|
|
946
1286
|
```
|
|
947
1287
|
|
|
1288
|
+
## `pickCurrentPlanStep` (function)
|
|
1289
|
+
|
|
1290
|
+
```ts
|
|
1291
|
+
pickCurrentPlanStep: (plan: PlanUpdateData["plan"]) => PlanUpdateData["plan"][number] | null
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
## `PLAN_AUTO_COLLAPSE_MS` (const)
|
|
1295
|
+
|
|
1296
|
+
```ts
|
|
1297
|
+
PLAN_AUTO_COLLAPSE_MS: 5000
|
|
1298
|
+
```
|
|
1299
|
+
|
|
1300
|
+
## `PlanStepStatus` (type)
|
|
1301
|
+
|
|
1302
|
+
```ts
|
|
1303
|
+
export type PlanStepStatus = "pending" | "in_progress" | "completed"
|
|
1304
|
+
```
|
|
1305
|
+
|
|
1306
|
+
## `PlanUpdateBlock` (function)
|
|
1307
|
+
|
|
1308
|
+
```ts
|
|
1309
|
+
PlanUpdateBlock: ({ toolCall, running, autoReveal, }: { toolCall: ToolCallInfo; running?: boolean; autoReveal?: boolean; }) => JSX.Element | null
|
|
1310
|
+
```
|
|
1311
|
+
|
|
1312
|
+
## `PlanUpdateData` (interface)
|
|
1313
|
+
|
|
1314
|
+
```ts
|
|
1315
|
+
plan: { step: string; status: PlanStepStatus; }[]
|
|
1316
|
+
```
|
|
1317
|
+
|
|
1318
|
+
## `PlanUpdateDisplayState` (interface)
|
|
1319
|
+
|
|
1320
|
+
```ts
|
|
1321
|
+
current: ToolCallInfo | null
|
|
1322
|
+
updating: boolean
|
|
1323
|
+
```
|
|
1324
|
+
|
|
1325
|
+
## `PlatformEndpoints` (interface)
|
|
1326
|
+
|
|
1327
|
+
```ts
|
|
1328
|
+
services: Partial<Record<"agent" | "os" | "hub" | "oauth" | "llmGateway" | "gitea" | "tile", string>>
|
|
1329
|
+
```
|
|
1330
|
+
|
|
1331
|
+
## `PlatformServiceName` (type)
|
|
1332
|
+
|
|
1333
|
+
```ts
|
|
1334
|
+
export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
|
|
1335
|
+
```
|
|
1336
|
+
|
|
1337
|
+
## `PollingBackoff` (class)
|
|
1338
|
+
|
|
1339
|
+
```ts
|
|
1340
|
+
failed: (error: unknown) => void
|
|
1341
|
+
reset: () => void
|
|
1342
|
+
waitMs: () => number | false
|
|
1343
|
+
```
|
|
1344
|
+
|
|
948
1345
|
## `PostChatFollowup` (interface)
|
|
949
1346
|
|
|
950
1347
|
```ts
|
|
@@ -975,6 +1372,12 @@ bizRoleId: string | undefined
|
|
|
975
1372
|
kind: "prepared"
|
|
976
1373
|
```
|
|
977
1374
|
|
|
1375
|
+
## `prependOlder` (function)
|
|
1376
|
+
|
|
1377
|
+
```ts
|
|
1378
|
+
prependOlder: (current: TurnProjection[], page: TurnProjection[]) => TurnProjection[]
|
|
1379
|
+
```
|
|
1380
|
+
|
|
978
1381
|
## `PrimarySkillParallelMode` (interface)
|
|
979
1382
|
|
|
980
1383
|
```ts
|
|
@@ -1017,6 +1420,24 @@ payload: Record<string, unknown>
|
|
|
1017
1420
|
type: string
|
|
1018
1421
|
```
|
|
1019
1422
|
|
|
1423
|
+
## `reconcileHistoricalUserTurns` (function)
|
|
1424
|
+
|
|
1425
|
+
```ts
|
|
1426
|
+
reconcileHistoricalUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
|
|
1427
|
+
```
|
|
1428
|
+
|
|
1429
|
+
## `reconcileOptimisticUserTurns` (function)
|
|
1430
|
+
|
|
1431
|
+
```ts
|
|
1432
|
+
reconcileOptimisticUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
|
|
1433
|
+
```
|
|
1434
|
+
|
|
1435
|
+
## `replaceWindow` (function)
|
|
1436
|
+
|
|
1437
|
+
```ts
|
|
1438
|
+
replaceWindow: (current: TurnProjection[], page: TurnProjection[], liveRevisionAtStart: number, liveRevisions: LiveRevisionState) => TurnProjection[]
|
|
1439
|
+
```
|
|
1440
|
+
|
|
1020
1441
|
## `ReplayBar` (function)
|
|
1021
1442
|
|
|
1022
1443
|
```ts
|
|
@@ -1089,6 +1510,12 @@ speed: ReplaySpeed | undefined
|
|
|
1089
1510
|
status: "replay" | "autonomous" | undefined
|
|
1090
1511
|
```
|
|
1091
1512
|
|
|
1513
|
+
## `resolveServiceUrl` (function)
|
|
1514
|
+
|
|
1515
|
+
```ts
|
|
1516
|
+
resolveServiceUrl: (endpoints: PlatformEndpoints, name: PlatformServiceName, path?: string) => string | null
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1092
1519
|
## `ResultFeedback` (interface)
|
|
1093
1520
|
|
|
1094
1521
|
```ts
|
|
@@ -1160,6 +1587,7 @@ SDK_VERSION: string
|
|
|
1160
1587
|
|
|
1161
1588
|
```ts
|
|
1162
1589
|
askUserAnswer: Record<string, unknown> | undefined
|
|
1590
|
+
kbIds: number[] | undefined
|
|
1163
1591
|
mode: string | undefined
|
|
1164
1592
|
model: string | undefined
|
|
1165
1593
|
replayDecision: "keep_replay" | "continue_replay" | undefined
|
|
@@ -1167,6 +1595,33 @@ thinkingOverride: boolean | undefined
|
|
|
1167
1595
|
whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
|
|
1168
1596
|
```
|
|
1169
1597
|
|
|
1598
|
+
## `SessionComputer` (interface)
|
|
1599
|
+
|
|
1600
|
+
```ts
|
|
1601
|
+
agent_runtimes: unknown[] | undefined
|
|
1602
|
+
allowed_paths: string[] | undefined
|
|
1603
|
+
arch: string | null | undefined
|
|
1604
|
+
blade_home: string | null | undefined
|
|
1605
|
+
created_at: string
|
|
1606
|
+
daemon_version: string | null | undefined
|
|
1607
|
+
enabled: boolean
|
|
1608
|
+
home: string | null | undefined
|
|
1609
|
+
hostname: string | null | undefined
|
|
1610
|
+
id: string
|
|
1611
|
+
is_primary: boolean
|
|
1612
|
+
label: string
|
|
1613
|
+
last_seen_at: string | null | undefined
|
|
1614
|
+
online: boolean
|
|
1615
|
+
os: string | null | undefined
|
|
1616
|
+
workspace: string | null | undefined
|
|
1617
|
+
```
|
|
1618
|
+
|
|
1619
|
+
## `SessionComputerList` (interface)
|
|
1620
|
+
|
|
1621
|
+
```ts
|
|
1622
|
+
computers: SessionComputer[]
|
|
1623
|
+
```
|
|
1624
|
+
|
|
1170
1625
|
## `SessionConfig` (interface)
|
|
1171
1626
|
|
|
1172
1627
|
```ts
|
|
@@ -1178,6 +1633,12 @@ memoryEnabled: boolean | undefined
|
|
|
1178
1633
|
model: string | undefined
|
|
1179
1634
|
```
|
|
1180
1635
|
|
|
1636
|
+
## `SessionConnectOptions` (interface)
|
|
1637
|
+
|
|
1638
|
+
```ts
|
|
1639
|
+
setup: ((session: AgentSession) => void) | undefined
|
|
1640
|
+
```
|
|
1641
|
+
|
|
1181
1642
|
## `SessionContextStats` (interface)
|
|
1182
1643
|
|
|
1183
1644
|
```ts
|
|
@@ -1198,8 +1659,11 @@ solution: SolutionDefinition | undefined
|
|
|
1198
1659
|
## `SessionDetail` (interface)
|
|
1199
1660
|
|
|
1200
1661
|
```ts
|
|
1662
|
+
agent_runtime_id: string | null | undefined
|
|
1663
|
+
ba_version: string | null | undefined
|
|
1201
1664
|
biz_role_id: string | null | undefined
|
|
1202
1665
|
bound_skill_id: string | null | undefined
|
|
1666
|
+
chat_project_id: string | null | undefined
|
|
1203
1667
|
created_at: string
|
|
1204
1668
|
daemon_id: string | null | undefined
|
|
1205
1669
|
disable_tools: (string[] & string[]) | undefined
|
|
@@ -1222,6 +1686,7 @@ primary_skill_id: string | null | undefined
|
|
|
1222
1686
|
primary_skill_snapshot: PrimarySkillSnapshot | null | undefined
|
|
1223
1687
|
replay_state: ReplayState | null | undefined
|
|
1224
1688
|
runtime_type: string | null | undefined
|
|
1689
|
+
sandbox_version: string | null | undefined
|
|
1225
1690
|
shared: boolean | undefined
|
|
1226
1691
|
solution: Solution | null | undefined
|
|
1227
1692
|
solution_id: string | null | undefined
|
|
@@ -1247,7 +1712,7 @@ tools_tokens: number | null | undefined
|
|
|
1247
1712
|
## `SessionHub` (class)
|
|
1248
1713
|
|
|
1249
1714
|
```ts
|
|
1250
|
-
connect: (sessionId: string) => Promise<AgentSession>
|
|
1715
|
+
connect: (sessionId: string, options?: SessionConnectOptions) => Promise<AgentSession>
|
|
1251
1716
|
disconnect: () => void
|
|
1252
1717
|
disposeAll: () => void
|
|
1253
1718
|
getConnection: () => ConnectionStatus
|
|
@@ -1290,11 +1755,70 @@ SessionInfo = type({
|
|
|
1290
1755
|
"disable_tools?": "string[]",
|
|
1291
1756
|
"runtime_type?": "string | null",
|
|
1292
1757
|
"daemon_id?": "string | null",
|
|
1758
|
+
"agent_runtime_id?": "string | null",
|
|
1293
1759
|
"workspace_path?": "string | null",
|
|
1760
|
+
"ba_version?": "string | null",
|
|
1761
|
+
"sandbox_version?": "string | null",
|
|
1762
|
+
"chat_project_id?": "string | null",
|
|
1294
1763
|
"match?": "unknown",
|
|
1295
1764
|
})
|
|
1296
1765
|
```
|
|
1297
1766
|
|
|
1767
|
+
## `SessionMemoryToggle` (function)
|
|
1768
|
+
|
|
1769
|
+
```ts
|
|
1770
|
+
SessionMemoryToggle: ({ sessionId, enabled, client: clientProp, disabled, label, className, labelClassName, inputClassName, onSaved, onError, }: SessionMemoryToggleProps) => JSX.Element
|
|
1771
|
+
```
|
|
1772
|
+
|
|
1773
|
+
## `SessionMemoryToggleProps` (interface)
|
|
1774
|
+
|
|
1775
|
+
```ts
|
|
1776
|
+
className: string | undefined
|
|
1777
|
+
client: BladeClient | undefined
|
|
1778
|
+
disabled: boolean | undefined
|
|
1779
|
+
enabled: boolean
|
|
1780
|
+
inputClassName: string | undefined
|
|
1781
|
+
label: string | undefined
|
|
1782
|
+
labelClassName: string | undefined
|
|
1783
|
+
onError: ((error: unknown) => void) | undefined
|
|
1784
|
+
onSaved: ((sessionId: string, enabled: boolean) => void) | undefined
|
|
1785
|
+
sessionId: string
|
|
1786
|
+
```
|
|
1787
|
+
|
|
1788
|
+
## `SessionPlugin` (interface)
|
|
1789
|
+
|
|
1790
|
+
```ts
|
|
1791
|
+
active: boolean
|
|
1792
|
+
installed: boolean | null
|
|
1793
|
+
name: string
|
|
1794
|
+
projected: boolean
|
|
1795
|
+
projection_source: string | null | undefined
|
|
1796
|
+
reason: string | null | undefined
|
|
1797
|
+
status: string
|
|
1798
|
+
```
|
|
1799
|
+
|
|
1800
|
+
## `SessionPluginActivation` (type)
|
|
1801
|
+
|
|
1802
|
+
```ts
|
|
1803
|
+
export type SessionPluginActivation = Pick<SessionPlugin, "name" | "active" | "status" | "reason">
|
|
1804
|
+
```
|
|
1805
|
+
|
|
1806
|
+
## `SessionPluginSelector` (function)
|
|
1807
|
+
|
|
1808
|
+
```ts
|
|
1809
|
+
SessionPluginSelector: (props: SessionPluginSelectorProps) => JSX.Element
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1812
|
+
## `SessionPluginSelectorProps` (interface)
|
|
1813
|
+
|
|
1814
|
+
```ts
|
|
1815
|
+
className: string | undefined
|
|
1816
|
+
client: BladeClient
|
|
1817
|
+
onChange: ((plugin: SessionPluginActivation) => void) | undefined
|
|
1818
|
+
sessionId: string
|
|
1819
|
+
side: "top" | "bottom" | undefined
|
|
1820
|
+
```
|
|
1821
|
+
|
|
1298
1822
|
## `SessionPortMapping` (interface)
|
|
1299
1823
|
|
|
1300
1824
|
```ts
|
|
@@ -1356,14 +1880,17 @@ getSessionCheckpoints: (sessionId: string, init?: RequestInit) => Promise<{ node
|
|
|
1356
1880
|
getSessionContextStats: (sessionId: string, init?: RequestInit) => Promise<SessionContextStats>
|
|
1357
1881
|
getSessionHistory: (sessionId: string, init?: RequestInit) => Promise<SessionHistory>
|
|
1358
1882
|
getSessionTasks: (sessionId: string) => Promise<Task[]>
|
|
1883
|
+
getSessionTurnCommands: (sessionId: string) => Promise<HistoricalCommand[]>
|
|
1359
1884
|
getSessionTurns: (sessionId: string) => Promise<TurnProjection[]>
|
|
1885
|
+
getSessionTurnsPage: (sessionId: string, options?: { limit?: number; before?: string; }) => Promise<SessionTurnsPage>
|
|
1360
1886
|
getSharedSession: (token: string) => Promise<TurnProjection[]>
|
|
1361
1887
|
importSession: (file: File, name?: string, solutionOverride?: string | null | ImportSessionOptions) => Promise<{ session_id: string; }>
|
|
1362
1888
|
listBackgroundTasks: (sessionId: string, init?: RequestInit) => Promise<BackgroundTask[]>
|
|
1363
1889
|
listDir: (sessionId: string, dirPath: string) => Promise<FileEntry[]>
|
|
1364
1890
|
listResultFeedback: (sessionId: string) => Promise<ResultFeedback[]>
|
|
1891
|
+
listSessionPlugins: (sessionId: string, init?: RequestInit) => Promise<{ plugins: SessionPlugin[]; sync_version: number; sync_pending: boolean; }>
|
|
1365
1892
|
listSessions: (template_id_prefix?: string, solution_id?: string) => Promise<SessionInfo[]>
|
|
1366
|
-
listSessionsPaginated: (params: { limit: number; offset: number; template_id_prefix?: string; solution_id?: string; solution_registry_id?: string; q?: string; }) => Promise<PaginatedSessionsResult>
|
|
1893
|
+
listSessionsPaginated: (params: { limit: number; offset: number; template_id_prefix?: string; solution_id?: string; solution_registry_id?: string; q?: string; chat_project_id?: string; }) => Promise<PaginatedSessionsResult>
|
|
1367
1894
|
listSessionsWithSkillData: () => Promise<SkillDevSession[]>
|
|
1368
1895
|
pinSession: (sessionId: string, pinned: boolean) => Promise<SessionInfo>
|
|
1369
1896
|
previewImport: (file: File) => Promise<ImportPreview>
|
|
@@ -1374,6 +1901,7 @@ revokeShare: (sessionId: string, token: string) => Promise<{ revoked: boolean; }
|
|
|
1374
1901
|
rewindSession: (sessionId: string, checkpointId: string) => Promise<{ id: string; content: string; }>
|
|
1375
1902
|
searchOwnedContent: (params: { q: string; limit?: number; }) => Promise<GlobalSearchResult>
|
|
1376
1903
|
setSessionEnv: (sessionId: string, env: Record<string, string>) => Promise<SessionDetail>
|
|
1904
|
+
setSessionPluginActivation: (sessionId: string, name: string, active: boolean, init?: RequestInit) => Promise<{ plugin: SessionPluginActivation; sync_version: number; }>
|
|
1377
1905
|
shareFile: (sessionId: string, sourcePath: string, linkName?: string, shareFolder?: string) => Promise<{ path: string; target: string; }>
|
|
1378
1906
|
startReplaySession: (sourceSessionId: string, speed?: ReplaySpeed) => Promise<{ session_id: string; }>
|
|
1379
1907
|
stopBackgroundTask: (sessionId: string, taskId: string) => Promise<BackgroundTaskStopResult>
|
|
@@ -1381,7 +1909,7 @@ switchBranch: (sessionId: string, checkpointId: string) => Promise<{ id: string;
|
|
|
1381
1909
|
tokenizeMessages: (messages: Array<Record<string, unknown>>, options?: { model?: string; add_generation_prompt?: boolean; enable_thinking?: boolean | null; tools?: Array<Record<string, unknown>>; }) => Promise<TokenizeResult>
|
|
1382
1910
|
tokenizePrompt: (prompt: string, model?: string) => Promise<TokenizeResult>
|
|
1383
1911
|
updateReplaySession: (sessionId: string, payload: { speed?: ReplaySpeed; status?: "autonomous"; }) => Promise<{ replay_state: SessionInfo["replay_state"]; }>
|
|
1384
|
-
updateSession: (sessionId: string, payload: { intent?: string; }) => Promise<SessionDetail>
|
|
1912
|
+
updateSession: (sessionId: string, payload: { intent?: string; chat_project_id?: string | null; }) => Promise<SessionDetail>
|
|
1385
1913
|
updateSessionMemory: (sessionId: string, memoryEnabled: boolean) => Promise<{ memory_enabled: boolean; }>
|
|
1386
1914
|
updateSharing: (sessionId: string, shared: boolean) => Promise<{ shared: boolean; }>
|
|
1387
1915
|
uploadFiles: (sessionId: string, dirPath: string, files: FileList | File[] | UploadFileEntry[], options?: UploadFilesOptions) => Promise<{ uploaded: string[]; failed: string[]; }>
|
|
@@ -1397,8 +1925,10 @@ askAnswers: Record<string, AskUserAnswerData>
|
|
|
1397
1925
|
connection: ConnectionStatus
|
|
1398
1926
|
errorMessage: string | null
|
|
1399
1927
|
isStreaming: boolean
|
|
1928
|
+
loadingOlder: boolean
|
|
1400
1929
|
messages: ChatMessage[]
|
|
1401
1930
|
mode: "planning" | "executing" | null
|
|
1931
|
+
nextBefore: string | null
|
|
1402
1932
|
replay: ReplaySnapshot | null
|
|
1403
1933
|
sessionId: string
|
|
1404
1934
|
status: "completed" | "failed" | "interrupted" | "running" | "created" | "waiting_for_input" | null
|
|
@@ -1414,6 +1944,14 @@ SessionStatus = type(
|
|
|
1414
1944
|
)
|
|
1415
1945
|
```
|
|
1416
1946
|
|
|
1947
|
+
## `SessionTurnsPage` (interface)
|
|
1948
|
+
|
|
1949
|
+
```ts
|
|
1950
|
+
currentMode: "planning" | "executing"
|
|
1951
|
+
nextBefore: string | null
|
|
1952
|
+
turns: TurnProjection[]
|
|
1953
|
+
```
|
|
1954
|
+
|
|
1417
1955
|
## `ShareLinkResult` (interface)
|
|
1418
1956
|
|
|
1419
1957
|
```ts
|
|
@@ -1506,6 +2044,12 @@ export type SolutionDefinition =
|
|
|
1506
2044
|
export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
|
|
1507
2045
|
```
|
|
1508
2046
|
|
|
2047
|
+
## `sortComputers` (function)
|
|
2048
|
+
|
|
2049
|
+
```ts
|
|
2050
|
+
sortComputers: (computers: SessionComputer[]) => SessionComputer[]
|
|
2051
|
+
```
|
|
2052
|
+
|
|
1509
2053
|
## `Task` (type)
|
|
1510
2054
|
|
|
1511
2055
|
```ts
|
|
@@ -1604,13 +2148,26 @@ archived_count: number | null | undefined
|
|
|
1604
2148
|
archived_files: ArchivedFileInfo[] | null | undefined
|
|
1605
2149
|
archived_tool_calls: ArchivedToolCallInfo[] | null | undefined
|
|
1606
2150
|
blocks: ContentBlock[]
|
|
2151
|
+
client_render_id: string | null | undefined
|
|
2152
|
+
client_request_id: string | null | undefined
|
|
1607
2153
|
compaction_id: string | null | undefined
|
|
2154
|
+
context_action: ContextAction | null | undefined
|
|
2155
|
+
context_content: unknown
|
|
2156
|
+
context_key: string | null | undefined
|
|
2157
|
+
context_kind: string | null | undefined
|
|
2158
|
+
context_name: string | null | undefined
|
|
2159
|
+
context_order: number | null | undefined
|
|
2160
|
+
context_revision: string | null | undefined
|
|
1608
2161
|
context_window: number | undefined
|
|
2162
|
+
display_summary: string | null | undefined
|
|
2163
|
+
display_title: string | null | undefined
|
|
1609
2164
|
duration_ms: number | undefined
|
|
1610
2165
|
failure_reason: string | null | undefined
|
|
1611
2166
|
fallback_applied: boolean | null | undefined
|
|
2167
|
+
first_token_delivery_ms: number | null | undefined
|
|
2168
|
+
first_token_ms: number | null | undefined
|
|
1612
2169
|
id: string
|
|
1613
|
-
kind: "message" | "compaction" | undefined
|
|
2170
|
+
kind: "message" | "context" | "compaction" | undefined
|
|
1614
2171
|
loop_id: string
|
|
1615
2172
|
memory_refs: MemoryRef[] | null | undefined
|
|
1616
2173
|
model: string | null | undefined
|
|
@@ -1619,8 +2176,10 @@ post_chat_followup: PostChatFollowup | null | undefined
|
|
|
1619
2176
|
role: "user" | "assistant" | "system"
|
|
1620
2177
|
saved_ratio: number | null | undefined
|
|
1621
2178
|
sequence: number
|
|
2179
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
1622
2180
|
started_at: string | null | undefined
|
|
1623
2181
|
status: "streaming" | "completed" | "paused" | "failed" | "interrupted"
|
|
2182
|
+
stream_duration_ms: number | null | undefined
|
|
1624
2183
|
summary_full: string | null | undefined
|
|
1625
2184
|
summary_preview: string | null | undefined
|
|
1626
2185
|
tokens_after: number | null | undefined
|
|
@@ -1667,6 +2226,7 @@ useAgentSession: (sessionId?: string, options?: UseAgentSessionOptions) => UseAg
|
|
|
1667
2226
|
|
|
1668
2227
|
```ts
|
|
1669
2228
|
createOptions: CreateSessionRequest | undefined
|
|
2229
|
+
onSessionConnected: ((session: AgentSession) => () => void) | undefined
|
|
1670
2230
|
onSessionCreated: ((sessionId: string) => void) | undefined
|
|
1671
2231
|
```
|
|
1672
2232
|
|
|
@@ -1701,6 +2261,30 @@ send: (text: string) => Promise<boolean>
|
|
|
1701
2261
|
stop: () => void
|
|
1702
2262
|
```
|
|
1703
2263
|
|
|
2264
|
+
## `useMessagePin` (function)
|
|
2265
|
+
|
|
2266
|
+
```ts
|
|
2267
|
+
useMessagePin: ({ targetKey, pinTarget, isStreaming, layoutKey, getScrollElement, getContentElement, getTargetElement, getTargetScrollTop, getSpacerHeight, setSpacerHeight, stopAutoScroll, scrollToBottom, margin, }: UseMessagePinOptions) => { release: () => void; isActive: () => boolean; }
|
|
2268
|
+
```
|
|
2269
|
+
|
|
2270
|
+
## `UseMessagePinOptions` (interface)
|
|
2271
|
+
|
|
2272
|
+
```ts
|
|
2273
|
+
getContentElement: (() => HTMLElement | null) | undefined
|
|
2274
|
+
getScrollElement: () => HTMLElement | null
|
|
2275
|
+
getSpacerHeight: () => number
|
|
2276
|
+
getTargetElement: () => HTMLElement | null
|
|
2277
|
+
getTargetScrollTop: ((scroll: HTMLElement) => number | null) | undefined
|
|
2278
|
+
isStreaming: boolean | undefined
|
|
2279
|
+
layoutKey: string | undefined
|
|
2280
|
+
margin: number | undefined
|
|
2281
|
+
pinTarget: boolean
|
|
2282
|
+
scrollToBottom: () => void
|
|
2283
|
+
setSpacerHeight: (height: number) => void
|
|
2284
|
+
stopAutoScroll: () => void
|
|
2285
|
+
targetKey: string | null
|
|
2286
|
+
```
|
|
2287
|
+
|
|
1704
2288
|
## `useReplay` (function)
|
|
1705
2289
|
|
|
1706
2290
|
```ts
|
|
@@ -1735,3 +2319,24 @@ token: string
|
|
|
1735
2319
|
username: string
|
|
1736
2320
|
```
|
|
1737
2321
|
|
|
2322
|
+
## `WhatIfQuote` (interface)
|
|
2323
|
+
|
|
2324
|
+
```ts
|
|
2325
|
+
label: string
|
|
2326
|
+
snapshot: string
|
|
2327
|
+
stepNumber: number | null
|
|
2328
|
+
```
|
|
2329
|
+
|
|
2330
|
+
## `WhatIfUserBubble` (function)
|
|
2331
|
+
|
|
2332
|
+
```ts
|
|
2333
|
+
WhatIfUserBubble: ({ parsed, onQuoteClick }: WhatIfUserBubbleProps) => JSX.Element
|
|
2334
|
+
```
|
|
2335
|
+
|
|
2336
|
+
## `WhatIfUserBubbleProps` (interface)
|
|
2337
|
+
|
|
2338
|
+
```ts
|
|
2339
|
+
onQuoteClick: ((stepNumber: number) => void) | undefined
|
|
2340
|
+
parsed: ParsedWhatIfPrompt
|
|
2341
|
+
```
|
|
2342
|
+
|