@blade-hq/agent-react 2610.0.0-beta.9 → 2610.0.0-rc.0
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 +81 -2
- 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 +6 -1
- package/dist/components/ContextCard.d.ts +20 -0
- package/dist/components/MarkdownContent.d.ts +2 -0
- package/dist/components/MessageList.d.ts +2 -1
- package/dist/components/PlanUpdateBlock.d.ts +31 -0
- package/dist/components/SessionMemoryToggle.d.ts +19 -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 +13 -0
- package/dist/hooks/use-agent-session.d.ts +5 -0
- package/dist/hooks/use-message-pin.d.ts +22 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +2356 -758
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-computer-command.d.ts +34 -0
- package/dist/lib/whatif-prompt.d.ts +18 -0
- package/dist/style.css +78 -2
- package/dist/style.full.css +79 -3
- package/package.json +2 -2
- package/public-api.md +423 -7
package/public-api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
6
|
+
共 226 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `acceptedPostChatFollowupCompletesLatestRun` (function)
|
|
9
9
|
|
|
@@ -52,6 +52,12 @@ slots: ChatViewSlots | undefined
|
|
|
52
52
|
theme: "light" | "dark" | undefined
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
## `AgentComputerLaunchOutcome` (type)
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
export type AgentComputerLaunchOutcome = "pending" | "succeeded" | "failed" | "unknown"
|
|
59
|
+
```
|
|
60
|
+
|
|
55
61
|
## `AgentLoopInfo` (interface)
|
|
56
62
|
|
|
57
63
|
```ts
|
|
@@ -111,7 +117,7 @@ sessionUpdated: { intent?: string; status?: SessionStatus; model?: string | null
|
|
|
111
117
|
taskListUpdated: { tasks: unknown[]; }
|
|
112
118
|
toolCall: { toolCall: ToolCallInfo; turn: TurnProjection; }
|
|
113
119
|
toolPreview: { toolCallId: string; type: "resource-html" | "resource-uri"; content: string; title: string; }
|
|
114
|
-
toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; }
|
|
120
|
+
toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; source: "live" | "bootstrap_replay" | "reconnect_replay"; }
|
|
115
121
|
workspaceChanged: { filePath?: string; }
|
|
116
122
|
```
|
|
117
123
|
|
|
@@ -155,6 +161,7 @@ tool_name: string | null | undefined
|
|
|
155
161
|
|
|
156
162
|
```ts
|
|
157
163
|
custom: Record<number, string>
|
|
164
|
+
note: string | undefined
|
|
158
165
|
selections: Record<number, number[]>
|
|
159
166
|
```
|
|
160
167
|
|
|
@@ -239,6 +246,7 @@ statusText: string
|
|
|
239
246
|
auth: AuthResource
|
|
240
247
|
blob: (method: HttpMethod, path: string) => Promise<Blob>
|
|
241
248
|
buildAuthedUrl: (path: string) => string
|
|
249
|
+
computers: ComputersResource
|
|
242
250
|
fetch: (method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean) => Promise<Response>
|
|
243
251
|
formData: (method: HttpMethod, path: string, form: FormData, options?: { expectOk?: boolean; onUploadProgress?: (progress: UploadProgress) => void; }) => Promise<Response>
|
|
244
252
|
hasToken: () => boolean
|
|
@@ -268,7 +276,6 @@ baseUrl: string
|
|
|
268
276
|
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
269
277
|
onRefreshSuccess: (() => void | Promise<void>) | undefined
|
|
270
278
|
socketToken: string | (() => string | null | undefined) | undefined
|
|
271
|
-
streamTokens: boolean | undefined
|
|
272
279
|
token: string | (() => string | null | undefined) | undefined
|
|
273
280
|
tokenStorage: TokenStorageMode | undefined
|
|
274
281
|
```
|
|
@@ -292,6 +299,12 @@ client: BladeClient
|
|
|
292
299
|
buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
|
|
293
300
|
```
|
|
294
301
|
|
|
302
|
+
## `canToggleComputer` (function)
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
canToggleComputer: (computer: SessionComputer) => boolean
|
|
306
|
+
```
|
|
307
|
+
|
|
295
308
|
## `ChatCompletionTool` (interface)
|
|
296
309
|
|
|
297
310
|
```ts
|
|
@@ -299,12 +312,19 @@ function: { name: string; description?: string; parameters?: Record<string, unkn
|
|
|
299
312
|
type: "function"
|
|
300
313
|
```
|
|
301
314
|
|
|
315
|
+
## `chatErrorForDisplay` (function)
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
chatErrorForDisplay: (message: string, developer?: boolean) => string
|
|
319
|
+
```
|
|
320
|
+
|
|
302
321
|
## `ChatMessage` (interface)
|
|
303
322
|
|
|
304
323
|
```ts
|
|
305
324
|
blocks: ContentBlock[] | undefined
|
|
306
325
|
compaction: CompactionInfo | undefined
|
|
307
326
|
content: MessageContent
|
|
327
|
+
context: ContextProjectionData | undefined
|
|
308
328
|
duration_ms: number | undefined
|
|
309
329
|
entry_id: string | undefined
|
|
310
330
|
kind: string | undefined
|
|
@@ -367,6 +387,12 @@ footer: ReactNode
|
|
|
367
387
|
header: ReactNode
|
|
368
388
|
```
|
|
369
389
|
|
|
390
|
+
## `classifyAgentComputerLaunchOutcome` (function)
|
|
391
|
+
|
|
392
|
+
```ts
|
|
393
|
+
classifyAgentComputerLaunchOutcome: (toolCall: { status?: string; result?: unknown; }) => AgentComputerLaunchOutcome
|
|
394
|
+
```
|
|
395
|
+
|
|
370
396
|
## `ClientProjectionBuilder` (class)
|
|
371
397
|
|
|
372
398
|
```ts
|
|
@@ -376,6 +402,12 @@ reset: () => void
|
|
|
376
402
|
seedSequence: (maxSeq: number) => void
|
|
377
403
|
```
|
|
378
404
|
|
|
405
|
+
## `collectMemoryRefs` (function)
|
|
406
|
+
|
|
407
|
+
```ts
|
|
408
|
+
collectMemoryRefs: (messages: ChatMessage[]) => MemoryRefInfo[]
|
|
409
|
+
```
|
|
410
|
+
|
|
379
411
|
## `CommandEnvelope` (interface)
|
|
380
412
|
|
|
381
413
|
```ts
|
|
@@ -408,6 +440,25 @@ tokens_before: number | null | undefined
|
|
|
408
440
|
trigger: "auto" | "manual" | "forced_retry" | null | undefined
|
|
409
441
|
```
|
|
410
442
|
|
|
443
|
+
## `ComputersResource` (class)
|
|
444
|
+
|
|
445
|
+
```ts
|
|
446
|
+
list: (sessionId: string) => Promise<SessionComputerList>
|
|
447
|
+
setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
## `computerState` (function)
|
|
451
|
+
|
|
452
|
+
```ts
|
|
453
|
+
computerState: (computer: SessionComputer) => ComputerState
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
## `ComputerState` (type)
|
|
457
|
+
|
|
458
|
+
```ts
|
|
459
|
+
export type ComputerState = "primary" | "enabled" | "offline" | "idle"
|
|
460
|
+
```
|
|
461
|
+
|
|
411
462
|
## `connectEmbedded` (function)
|
|
412
463
|
|
|
413
464
|
```ts
|
|
@@ -436,6 +487,95 @@ type: "text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridg
|
|
|
436
487
|
contentPreview: (content: MessageContent, maxLen?: number) => string
|
|
437
488
|
```
|
|
438
489
|
|
|
490
|
+
## `ContextAction` (type)
|
|
491
|
+
|
|
492
|
+
```ts
|
|
493
|
+
export type ContextAction = "published" | "retained" | "removed"
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
## `ContextCard` (function)
|
|
497
|
+
|
|
498
|
+
```ts
|
|
499
|
+
ContextCard: ({ context, className }: ContextCardProps) => JSX.Element
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
## `ContextCardProps` (interface)
|
|
503
|
+
|
|
504
|
+
```ts
|
|
505
|
+
className: string | undefined
|
|
506
|
+
context: ContextProjectionData
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
## `ContextDisplayState` (interface)
|
|
510
|
+
|
|
511
|
+
```ts
|
|
512
|
+
detail: string
|
|
513
|
+
isRemoved: boolean
|
|
514
|
+
summary: string
|
|
515
|
+
title: string
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
## `ContextGroupCard` (function)
|
|
519
|
+
|
|
520
|
+
```ts
|
|
521
|
+
ContextGroupCard: ({ contexts, className }: ContextGroupCardProps) => JSX.Element | null
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
## `ContextGroupCardProps` (interface)
|
|
525
|
+
|
|
526
|
+
```ts
|
|
527
|
+
className: string | undefined
|
|
528
|
+
contexts: readonly ContextProjectionData[]
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
## `ContextGroupDisplayState` (interface)
|
|
532
|
+
|
|
533
|
+
```ts
|
|
534
|
+
count: number
|
|
535
|
+
summary: string
|
|
536
|
+
title: string
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
## `contextProjectionData` (function)
|
|
540
|
+
|
|
541
|
+
```ts
|
|
542
|
+
contextProjectionData: (fields: ContextProjectionFields) => ContextProjectionData | null
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
## `ContextProjectionData` (interface)
|
|
546
|
+
|
|
547
|
+
```ts
|
|
548
|
+
context_action: ContextAction
|
|
549
|
+
context_key: string
|
|
550
|
+
context_kind: string
|
|
551
|
+
context_name: string
|
|
552
|
+
context_order: number
|
|
553
|
+
context_revision: string
|
|
554
|
+
display_summary: string | null | undefined
|
|
555
|
+
display_title: string | null | undefined
|
|
556
|
+
sources: ContextSourceInfo[]
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
## `ContextProjectionFields` (interface)
|
|
560
|
+
|
|
561
|
+
```ts
|
|
562
|
+
context_action: ContextAction | null | undefined
|
|
563
|
+
context_key: string | null | undefined
|
|
564
|
+
context_kind: string | null | undefined
|
|
565
|
+
context_name: string | null | undefined
|
|
566
|
+
context_order: number | null | undefined
|
|
567
|
+
context_revision: string | null | undefined
|
|
568
|
+
display_summary: string | null | undefined
|
|
569
|
+
display_title: string | null | undefined
|
|
570
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
## `ContextSourceInfo` (type)
|
|
574
|
+
|
|
575
|
+
```ts
|
|
576
|
+
export type ContextSourceInfo = Record<string, unknown>
|
|
577
|
+
```
|
|
578
|
+
|
|
439
579
|
## `createInitialSessionState` (function)
|
|
440
580
|
|
|
441
581
|
```ts
|
|
@@ -445,6 +585,7 @@ createInitialSessionState: (sessionId: string) => SessionState
|
|
|
445
585
|
## `CreateSessionRequest` (interface)
|
|
446
586
|
|
|
447
587
|
```ts
|
|
588
|
+
agent_runtime_id: string | null | undefined
|
|
448
589
|
biz_role_id: string | null | undefined
|
|
449
590
|
compaction_ratio: number | null | undefined
|
|
450
591
|
daemon_id: string | null | undefined
|
|
@@ -455,7 +596,7 @@ intent: string | undefined
|
|
|
455
596
|
memory_enabled: boolean | null | undefined
|
|
456
597
|
model: string | null | undefined
|
|
457
598
|
primary_skill_id: string | null | undefined
|
|
458
|
-
runtime_type: "sandbox" | "daemon" | null | undefined
|
|
599
|
+
runtime_type: "sandbox" | "daemon" | "native" | null | undefined
|
|
459
600
|
session_solution_asset_id: string | null | undefined
|
|
460
601
|
solution_id: string | undefined
|
|
461
602
|
solution_ref: PublishedSolutionRef | undefined
|
|
@@ -477,6 +618,12 @@ path: string | undefined
|
|
|
477
618
|
token: string | (() => string | null | undefined) | undefined
|
|
478
619
|
```
|
|
479
620
|
|
|
621
|
+
## `CurrentPlanPanel` (function)
|
|
622
|
+
|
|
623
|
+
```ts
|
|
624
|
+
CurrentPlanPanel: ({ messages, running, revealRevision, sessionId, className, }: { messages: ChatMessage[]; running?: boolean; revealRevision?: number; sessionId?: string; className?: string; }) => JSX.Element | null
|
|
625
|
+
```
|
|
626
|
+
|
|
480
627
|
## `DEFAULT_REPLAY_SPEED` (const)
|
|
481
628
|
|
|
482
629
|
```ts
|
|
@@ -500,6 +647,12 @@ allowedOrigins: string[]
|
|
|
500
647
|
iframe: HTMLIFrameElement | undefined
|
|
501
648
|
```
|
|
502
649
|
|
|
650
|
+
## `EMPTY_PLATFORM_ENDPOINTS` (const)
|
|
651
|
+
|
|
652
|
+
```ts
|
|
653
|
+
EMPTY_PLATFORM_ENDPOINTS: PlatformEndpoints
|
|
654
|
+
```
|
|
655
|
+
|
|
503
656
|
## `ExchangeCodeParams` (interface)
|
|
504
657
|
|
|
505
658
|
```ts
|
|
@@ -601,6 +754,18 @@ export type FollowupInteractionEvent =
|
|
|
601
754
|
artifactKind: "file"
|
|
602
755
|
```
|
|
603
756
|
|
|
757
|
+
## `getContextDisplayState` (function)
|
|
758
|
+
|
|
759
|
+
```ts
|
|
760
|
+
getContextDisplayState: (context: ContextProjectionData) => ContextDisplayState
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
## `getContextGroupDisplayState` (function)
|
|
764
|
+
|
|
765
|
+
```ts
|
|
766
|
+
getContextGroupDisplayState: (contexts: readonly ContextProjectionData[]) => ContextGroupDisplayState
|
|
767
|
+
```
|
|
768
|
+
|
|
604
769
|
## `getFileParts` (function)
|
|
605
770
|
|
|
606
771
|
```ts
|
|
@@ -613,6 +778,12 @@ getFileParts: (content: MessageContent) => FileContentPart[]
|
|
|
613
778
|
getImageParts: (content: MessageContent) => ImageUrlContentPart[]
|
|
614
779
|
```
|
|
615
780
|
|
|
781
|
+
## `getPlanUpdateDisplayState` (function)
|
|
782
|
+
|
|
783
|
+
```ts
|
|
784
|
+
getPlanUpdateDisplayState: (messages: ChatMessage[]) => PlanUpdateDisplayState
|
|
785
|
+
```
|
|
786
|
+
|
|
616
787
|
## `getTextContent` (function)
|
|
617
788
|
|
|
618
789
|
```ts
|
|
@@ -655,6 +826,12 @@ export type GlobalSearchResultItem =
|
|
|
655
826
|
| GlobalSearchFileResult
|
|
656
827
|
```
|
|
657
828
|
|
|
829
|
+
## `groupAdjacentContextRuns` (function)
|
|
830
|
+
|
|
831
|
+
```ts
|
|
832
|
+
groupAdjacentContextRuns: (kinds: readonly (string | null)[]) => readonly (readonly number[])[]
|
|
833
|
+
```
|
|
834
|
+
|
|
658
835
|
## `groupMessagesByLoop` (function)
|
|
659
836
|
|
|
660
837
|
```ts
|
|
@@ -697,6 +874,18 @@ direction: "host-to-agent"
|
|
|
697
874
|
payload: unknown
|
|
698
875
|
```
|
|
699
876
|
|
|
877
|
+
## `isAgentComputerCommand` (function)
|
|
878
|
+
|
|
879
|
+
```ts
|
|
880
|
+
isAgentComputerCommand: (command: string) => boolean
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
## `isAgentComputerToolCall` (function)
|
|
884
|
+
|
|
885
|
+
```ts
|
|
886
|
+
isAgentComputerToolCall: (argumentsJson: string | null | undefined) => boolean
|
|
887
|
+
```
|
|
888
|
+
|
|
700
889
|
## `isCommandEnvelope` (function)
|
|
701
890
|
|
|
702
891
|
```ts
|
|
@@ -706,7 +895,7 @@ isCommandEnvelope: (value: unknown) => value is CommandEnvelope
|
|
|
706
895
|
## `isHiddenInternalMessage` (function)
|
|
707
896
|
|
|
708
897
|
```ts
|
|
709
|
-
isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content"
|
|
898
|
+
isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">, options?: { includeLegacyForkContext?: boolean; }) => boolean
|
|
710
899
|
```
|
|
711
900
|
|
|
712
901
|
## `isInboundEnvelope` (function)
|
|
@@ -715,6 +904,12 @@ isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">) => boo
|
|
|
715
904
|
isInboundEnvelope: (value: unknown) => value is InboundEnvelope
|
|
716
905
|
```
|
|
717
906
|
|
|
907
|
+
## `isPlanUpdateTool` (function)
|
|
908
|
+
|
|
909
|
+
```ts
|
|
910
|
+
isPlanUpdateTool: (toolCall: Pick<ToolCallInfo, "name">) => boolean
|
|
911
|
+
```
|
|
912
|
+
|
|
718
913
|
## `latestPostChatFollowup` (function)
|
|
719
914
|
|
|
720
915
|
```ts
|
|
@@ -819,6 +1014,20 @@ id: string
|
|
|
819
1014
|
name: string
|
|
820
1015
|
```
|
|
821
1016
|
|
|
1017
|
+
## `loadPlatformEndpoints` (function)
|
|
1018
|
+
|
|
1019
|
+
```ts
|
|
1020
|
+
loadPlatformEndpoints: (options?: LoadPlatformEndpointsOptions) => Promise<PlatformEndpoints>
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
## `LoadPlatformEndpointsOptions` (interface)
|
|
1024
|
+
|
|
1025
|
+
```ts
|
|
1026
|
+
baseUrl: string | undefined
|
|
1027
|
+
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
1028
|
+
timeoutMs: number | undefined
|
|
1029
|
+
```
|
|
1030
|
+
|
|
822
1031
|
## `LoginOptions` (interface)
|
|
823
1032
|
|
|
824
1033
|
```ts
|
|
@@ -865,6 +1074,12 @@ id: number
|
|
|
865
1074
|
skill_name: string | null | undefined
|
|
866
1075
|
```
|
|
867
1076
|
|
|
1077
|
+
## `MemoryRefsHint` (function)
|
|
1078
|
+
|
|
1079
|
+
```ts
|
|
1080
|
+
MemoryRefsHint: ({ refs }: { refs: MemoryRefInfo[]; }) => JSX.Element
|
|
1081
|
+
```
|
|
1082
|
+
|
|
868
1083
|
## `MessageContent` (type)
|
|
869
1084
|
|
|
870
1085
|
```ts
|
|
@@ -890,6 +1105,8 @@ baseUrl: string | undefined
|
|
|
890
1105
|
default: string
|
|
891
1106
|
defaultServiceModel: string | undefined
|
|
892
1107
|
models: ModelOption[]
|
|
1108
|
+
unavailableModelIds: string[] | undefined
|
|
1109
|
+
unavailableProviderIds: string[] | undefined
|
|
893
1110
|
```
|
|
894
1111
|
|
|
895
1112
|
## `ModelOption` (interface)
|
|
@@ -906,6 +1123,12 @@ serviceModelId: string | undefined
|
|
|
906
1123
|
list: () => Promise<ModelCatalog>
|
|
907
1124
|
```
|
|
908
1125
|
|
|
1126
|
+
## `normalizeAdjacentUrlFormatting` (function)
|
|
1127
|
+
|
|
1128
|
+
```ts
|
|
1129
|
+
normalizeAdjacentUrlFormatting: (value: string) => string
|
|
1130
|
+
```
|
|
1131
|
+
|
|
909
1132
|
## `normalizeMessageContent` (function)
|
|
910
1133
|
|
|
911
1134
|
```ts
|
|
@@ -936,6 +1159,26 @@ content: string
|
|
|
936
1159
|
label: string
|
|
937
1160
|
```
|
|
938
1161
|
|
|
1162
|
+
## `ParsedWhatIfPrompt` (interface)
|
|
1163
|
+
|
|
1164
|
+
```ts
|
|
1165
|
+
fromStep: number | null
|
|
1166
|
+
quotes: WhatIfQuote[]
|
|
1167
|
+
userText: string
|
|
1168
|
+
```
|
|
1169
|
+
|
|
1170
|
+
## `parsePlanUpdate` (function)
|
|
1171
|
+
|
|
1172
|
+
```ts
|
|
1173
|
+
parsePlanUpdate: (argumentsJson: string) => PlanUpdateData | null
|
|
1174
|
+
```
|
|
1175
|
+
|
|
1176
|
+
## `parseWhatIfPrompt` (function)
|
|
1177
|
+
|
|
1178
|
+
```ts
|
|
1179
|
+
parseWhatIfPrompt: (text: string) => ParsedWhatIfPrompt | null
|
|
1180
|
+
```
|
|
1181
|
+
|
|
939
1182
|
## `PatchEnvelope` (interface)
|
|
940
1183
|
|
|
941
1184
|
```ts
|
|
@@ -946,6 +1189,55 @@ sequence: number
|
|
|
946
1189
|
turn_id: string
|
|
947
1190
|
```
|
|
948
1191
|
|
|
1192
|
+
## `pickCurrentPlanStep` (function)
|
|
1193
|
+
|
|
1194
|
+
```ts
|
|
1195
|
+
pickCurrentPlanStep: (plan: PlanUpdateData["plan"]) => PlanUpdateData["plan"][number] | null
|
|
1196
|
+
```
|
|
1197
|
+
|
|
1198
|
+
## `PLAN_AUTO_COLLAPSE_MS` (const)
|
|
1199
|
+
|
|
1200
|
+
```ts
|
|
1201
|
+
PLAN_AUTO_COLLAPSE_MS: 5000
|
|
1202
|
+
```
|
|
1203
|
+
|
|
1204
|
+
## `PlanStepStatus` (type)
|
|
1205
|
+
|
|
1206
|
+
```ts
|
|
1207
|
+
export type PlanStepStatus = "pending" | "in_progress" | "completed"
|
|
1208
|
+
```
|
|
1209
|
+
|
|
1210
|
+
## `PlanUpdateBlock` (function)
|
|
1211
|
+
|
|
1212
|
+
```ts
|
|
1213
|
+
PlanUpdateBlock: ({ toolCall, running, autoReveal, }: { toolCall: ToolCallInfo; running?: boolean; autoReveal?: boolean; }) => JSX.Element | null
|
|
1214
|
+
```
|
|
1215
|
+
|
|
1216
|
+
## `PlanUpdateData` (interface)
|
|
1217
|
+
|
|
1218
|
+
```ts
|
|
1219
|
+
plan: { step: string; status: PlanStepStatus; }[]
|
|
1220
|
+
```
|
|
1221
|
+
|
|
1222
|
+
## `PlanUpdateDisplayState` (interface)
|
|
1223
|
+
|
|
1224
|
+
```ts
|
|
1225
|
+
current: ToolCallInfo | null
|
|
1226
|
+
updating: boolean
|
|
1227
|
+
```
|
|
1228
|
+
|
|
1229
|
+
## `PlatformEndpoints` (interface)
|
|
1230
|
+
|
|
1231
|
+
```ts
|
|
1232
|
+
services: Partial<Record<"agent" | "os" | "hub" | "oauth" | "llmGateway" | "gitea" | "tile", string>>
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
## `PlatformServiceName` (type)
|
|
1236
|
+
|
|
1237
|
+
```ts
|
|
1238
|
+
export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
|
|
1239
|
+
```
|
|
1240
|
+
|
|
949
1241
|
## `PostChatFollowup` (interface)
|
|
950
1242
|
|
|
951
1243
|
```ts
|
|
@@ -1096,6 +1388,12 @@ speed: ReplaySpeed | undefined
|
|
|
1096
1388
|
status: "replay" | "autonomous" | undefined
|
|
1097
1389
|
```
|
|
1098
1390
|
|
|
1391
|
+
## `resolveServiceUrl` (function)
|
|
1392
|
+
|
|
1393
|
+
```ts
|
|
1394
|
+
resolveServiceUrl: (endpoints: PlatformEndpoints, name: PlatformServiceName, path?: string) => string | null
|
|
1395
|
+
```
|
|
1396
|
+
|
|
1099
1397
|
## `ResultFeedback` (interface)
|
|
1100
1398
|
|
|
1101
1399
|
```ts
|
|
@@ -1167,6 +1465,7 @@ SDK_VERSION: string
|
|
|
1167
1465
|
|
|
1168
1466
|
```ts
|
|
1169
1467
|
askUserAnswer: Record<string, unknown> | undefined
|
|
1468
|
+
kbIds: number[] | undefined
|
|
1170
1469
|
mode: string | undefined
|
|
1171
1470
|
model: string | undefined
|
|
1172
1471
|
replayDecision: "keep_replay" | "continue_replay" | undefined
|
|
@@ -1174,6 +1473,33 @@ thinkingOverride: boolean | undefined
|
|
|
1174
1473
|
whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
|
|
1175
1474
|
```
|
|
1176
1475
|
|
|
1476
|
+
## `SessionComputer` (interface)
|
|
1477
|
+
|
|
1478
|
+
```ts
|
|
1479
|
+
agent_runtimes: unknown[] | undefined
|
|
1480
|
+
allowed_paths: string[] | undefined
|
|
1481
|
+
arch: string | null | undefined
|
|
1482
|
+
blade_home: string | null | undefined
|
|
1483
|
+
created_at: string
|
|
1484
|
+
daemon_version: string | null | undefined
|
|
1485
|
+
enabled: boolean
|
|
1486
|
+
home: string | null | undefined
|
|
1487
|
+
hostname: string | null | undefined
|
|
1488
|
+
id: string
|
|
1489
|
+
is_primary: boolean
|
|
1490
|
+
label: string
|
|
1491
|
+
last_seen_at: string | null | undefined
|
|
1492
|
+
online: boolean
|
|
1493
|
+
os: string | null | undefined
|
|
1494
|
+
workspace: string | null | undefined
|
|
1495
|
+
```
|
|
1496
|
+
|
|
1497
|
+
## `SessionComputerList` (interface)
|
|
1498
|
+
|
|
1499
|
+
```ts
|
|
1500
|
+
computers: SessionComputer[]
|
|
1501
|
+
```
|
|
1502
|
+
|
|
1177
1503
|
## `SessionConfig` (interface)
|
|
1178
1504
|
|
|
1179
1505
|
```ts
|
|
@@ -1185,6 +1511,12 @@ memoryEnabled: boolean | undefined
|
|
|
1185
1511
|
model: string | undefined
|
|
1186
1512
|
```
|
|
1187
1513
|
|
|
1514
|
+
## `SessionConnectOptions` (interface)
|
|
1515
|
+
|
|
1516
|
+
```ts
|
|
1517
|
+
setup: ((session: AgentSession) => void) | undefined
|
|
1518
|
+
```
|
|
1519
|
+
|
|
1188
1520
|
## `SessionContextStats` (interface)
|
|
1189
1521
|
|
|
1190
1522
|
```ts
|
|
@@ -1205,6 +1537,7 @@ solution: SolutionDefinition | undefined
|
|
|
1205
1537
|
## `SessionDetail` (interface)
|
|
1206
1538
|
|
|
1207
1539
|
```ts
|
|
1540
|
+
agent_runtime_id: string | null | undefined
|
|
1208
1541
|
biz_role_id: string | null | undefined
|
|
1209
1542
|
bound_skill_id: string | null | undefined
|
|
1210
1543
|
created_at: string
|
|
@@ -1254,7 +1587,7 @@ tools_tokens: number | null | undefined
|
|
|
1254
1587
|
## `SessionHub` (class)
|
|
1255
1588
|
|
|
1256
1589
|
```ts
|
|
1257
|
-
connect: (sessionId: string) => Promise<AgentSession>
|
|
1590
|
+
connect: (sessionId: string, options?: SessionConnectOptions) => Promise<AgentSession>
|
|
1258
1591
|
disconnect: () => void
|
|
1259
1592
|
disposeAll: () => void
|
|
1260
1593
|
getConnection: () => ConnectionStatus
|
|
@@ -1297,11 +1630,33 @@ SessionInfo = type({
|
|
|
1297
1630
|
"disable_tools?": "string[]",
|
|
1298
1631
|
"runtime_type?": "string | null",
|
|
1299
1632
|
"daemon_id?": "string | null",
|
|
1633
|
+
"agent_runtime_id?": "string | null",
|
|
1300
1634
|
"workspace_path?": "string | null",
|
|
1301
1635
|
"match?": "unknown",
|
|
1302
1636
|
})
|
|
1303
1637
|
```
|
|
1304
1638
|
|
|
1639
|
+
## `SessionMemoryToggle` (function)
|
|
1640
|
+
|
|
1641
|
+
```ts
|
|
1642
|
+
SessionMemoryToggle: ({ sessionId, enabled, client: clientProp, disabled, label, className, labelClassName, inputClassName, onSaved, onError, }: SessionMemoryToggleProps) => JSX.Element
|
|
1643
|
+
```
|
|
1644
|
+
|
|
1645
|
+
## `SessionMemoryToggleProps` (interface)
|
|
1646
|
+
|
|
1647
|
+
```ts
|
|
1648
|
+
className: string | undefined
|
|
1649
|
+
client: BladeClient | undefined
|
|
1650
|
+
disabled: boolean | undefined
|
|
1651
|
+
enabled: boolean
|
|
1652
|
+
inputClassName: string | undefined
|
|
1653
|
+
label: string | undefined
|
|
1654
|
+
labelClassName: string | undefined
|
|
1655
|
+
onError: ((error: unknown) => void) | undefined
|
|
1656
|
+
onSaved: ((sessionId: string, enabled: boolean) => void) | undefined
|
|
1657
|
+
sessionId: string
|
|
1658
|
+
```
|
|
1659
|
+
|
|
1305
1660
|
## `SessionPortMapping` (interface)
|
|
1306
1661
|
|
|
1307
1662
|
```ts
|
|
@@ -1513,6 +1868,12 @@ export type SolutionDefinition =
|
|
|
1513
1868
|
export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
|
|
1514
1869
|
```
|
|
1515
1870
|
|
|
1871
|
+
## `sortComputers` (function)
|
|
1872
|
+
|
|
1873
|
+
```ts
|
|
1874
|
+
sortComputers: (computers: SessionComputer[]) => SessionComputer[]
|
|
1875
|
+
```
|
|
1876
|
+
|
|
1516
1877
|
## `Task` (type)
|
|
1517
1878
|
|
|
1518
1879
|
```ts
|
|
@@ -1613,12 +1974,21 @@ archived_tool_calls: ArchivedToolCallInfo[] | null | undefined
|
|
|
1613
1974
|
blocks: ContentBlock[]
|
|
1614
1975
|
client_render_id: string | null | undefined
|
|
1615
1976
|
compaction_id: string | null | undefined
|
|
1977
|
+
context_action: ContextAction | null | undefined
|
|
1978
|
+
context_content: unknown
|
|
1979
|
+
context_key: string | null | undefined
|
|
1980
|
+
context_kind: string | null | undefined
|
|
1981
|
+
context_name: string | null | undefined
|
|
1982
|
+
context_order: number | null | undefined
|
|
1983
|
+
context_revision: string | null | undefined
|
|
1616
1984
|
context_window: number | undefined
|
|
1985
|
+
display_summary: string | null | undefined
|
|
1986
|
+
display_title: string | null | undefined
|
|
1617
1987
|
duration_ms: number | undefined
|
|
1618
1988
|
failure_reason: string | null | undefined
|
|
1619
1989
|
fallback_applied: boolean | null | undefined
|
|
1620
1990
|
id: string
|
|
1621
|
-
kind: "message" | "compaction" | undefined
|
|
1991
|
+
kind: "message" | "context" | "compaction" | undefined
|
|
1622
1992
|
loop_id: string
|
|
1623
1993
|
memory_refs: MemoryRef[] | null | undefined
|
|
1624
1994
|
model: string | null | undefined
|
|
@@ -1627,6 +1997,7 @@ post_chat_followup: PostChatFollowup | null | undefined
|
|
|
1627
1997
|
role: "user" | "assistant" | "system"
|
|
1628
1998
|
saved_ratio: number | null | undefined
|
|
1629
1999
|
sequence: number
|
|
2000
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
1630
2001
|
started_at: string | null | undefined
|
|
1631
2002
|
status: "streaming" | "completed" | "paused" | "failed" | "interrupted"
|
|
1632
2003
|
summary_full: string | null | undefined
|
|
@@ -1675,6 +2046,7 @@ useAgentSession: (sessionId?: string, options?: UseAgentSessionOptions) => UseAg
|
|
|
1675
2046
|
|
|
1676
2047
|
```ts
|
|
1677
2048
|
createOptions: CreateSessionRequest | undefined
|
|
2049
|
+
onSessionConnected: ((session: AgentSession) => () => void) | undefined
|
|
1678
2050
|
onSessionCreated: ((sessionId: string) => void) | undefined
|
|
1679
2051
|
```
|
|
1680
2052
|
|
|
@@ -1709,6 +2081,29 @@ send: (text: string) => Promise<boolean>
|
|
|
1709
2081
|
stop: () => void
|
|
1710
2082
|
```
|
|
1711
2083
|
|
|
2084
|
+
## `useMessagePin` (function)
|
|
2085
|
+
|
|
2086
|
+
```ts
|
|
2087
|
+
useMessagePin: ({ targetKey, pinTarget, layoutKey, getScrollElement, getContentElement, getTargetElement, getTargetScrollTop, getSpacerHeight, setSpacerHeight, stopAutoScroll, scrollToBottom, margin, }: UseMessagePinOptions) => { release: () => void; isActive: () => boolean; }
|
|
2088
|
+
```
|
|
2089
|
+
|
|
2090
|
+
## `UseMessagePinOptions` (interface)
|
|
2091
|
+
|
|
2092
|
+
```ts
|
|
2093
|
+
getContentElement: (() => HTMLElement | null) | undefined
|
|
2094
|
+
getScrollElement: () => HTMLElement | null
|
|
2095
|
+
getSpacerHeight: () => number
|
|
2096
|
+
getTargetElement: () => HTMLElement | null
|
|
2097
|
+
getTargetScrollTop: ((scroll: HTMLElement) => number | null) | undefined
|
|
2098
|
+
layoutKey: string | undefined
|
|
2099
|
+
margin: number | undefined
|
|
2100
|
+
pinTarget: boolean
|
|
2101
|
+
scrollToBottom: () => void
|
|
2102
|
+
setSpacerHeight: (height: number) => void
|
|
2103
|
+
stopAutoScroll: () => void
|
|
2104
|
+
targetKey: string | null
|
|
2105
|
+
```
|
|
2106
|
+
|
|
1712
2107
|
## `useReplay` (function)
|
|
1713
2108
|
|
|
1714
2109
|
```ts
|
|
@@ -1743,3 +2138,24 @@ token: string
|
|
|
1743
2138
|
username: string
|
|
1744
2139
|
```
|
|
1745
2140
|
|
|
2141
|
+
## `WhatIfQuote` (interface)
|
|
2142
|
+
|
|
2143
|
+
```ts
|
|
2144
|
+
label: string
|
|
2145
|
+
snapshot: string
|
|
2146
|
+
stepNumber: number | null
|
|
2147
|
+
```
|
|
2148
|
+
|
|
2149
|
+
## `WhatIfUserBubble` (function)
|
|
2150
|
+
|
|
2151
|
+
```ts
|
|
2152
|
+
WhatIfUserBubble: ({ parsed, onQuoteClick }: WhatIfUserBubbleProps) => JSX.Element
|
|
2153
|
+
```
|
|
2154
|
+
|
|
2155
|
+
## `WhatIfUserBubbleProps` (interface)
|
|
2156
|
+
|
|
2157
|
+
```ts
|
|
2158
|
+
onQuoteClick: ((stepNumber: number) => void) | undefined
|
|
2159
|
+
parsed: ParsedWhatIfPrompt
|
|
2160
|
+
```
|
|
2161
|
+
|