@blade-hq/agent-react 2610.0.0-beta.27 → 2610.0.0-beta.29
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/dist/embed/entry.d.ts +5 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/public-api.md +65 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blade-hq/agent-react",
|
|
3
|
-
"version": "2610.0.0-beta.
|
|
3
|
+
"version": "2610.0.0-beta.29",
|
|
4
4
|
"description": "Blade Agent React 绑定:BladeProvider、useAgentSession、开箱即用的 ChatView 聊天界面。",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@blade-hq/agent-client": "2610.0.0-beta.
|
|
34
|
+
"@blade-hq/agent-client": "2610.0.0-beta.29"
|
|
35
35
|
},
|
|
36
36
|
"bundledDependencies": [],
|
|
37
37
|
"peerDependencies": {
|
package/public-api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
6
|
+
共 199 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `acceptedPostChatFollowupCompletesLatestRun` (function)
|
|
9
9
|
|
|
@@ -246,6 +246,7 @@ statusText: string
|
|
|
246
246
|
auth: AuthResource
|
|
247
247
|
blob: (method: HttpMethod, path: string) => Promise<Blob>
|
|
248
248
|
buildAuthedUrl: (path: string) => string
|
|
249
|
+
computers: ComputersResource
|
|
249
250
|
fetch: (method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean) => Promise<Response>
|
|
250
251
|
formData: (method: HttpMethod, path: string, form: FormData, options?: { expectOk?: boolean; onUploadProgress?: (progress: UploadProgress) => void; }) => Promise<Response>
|
|
251
252
|
hasToken: () => boolean
|
|
@@ -298,6 +299,12 @@ client: BladeClient
|
|
|
298
299
|
buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
|
|
299
300
|
```
|
|
300
301
|
|
|
302
|
+
## `canToggleComputer` (function)
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
canToggleComputer: (computer: SessionComputer) => boolean
|
|
306
|
+
```
|
|
307
|
+
|
|
301
308
|
## `ChatCompletionTool` (interface)
|
|
302
309
|
|
|
303
310
|
```ts
|
|
@@ -421,6 +428,25 @@ tokens_before: number | null | undefined
|
|
|
421
428
|
trigger: "auto" | "manual" | "forced_retry" | null | undefined
|
|
422
429
|
```
|
|
423
430
|
|
|
431
|
+
## `ComputersResource` (class)
|
|
432
|
+
|
|
433
|
+
```ts
|
|
434
|
+
list: (sessionId: string) => Promise<SessionComputerList>
|
|
435
|
+
setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
## `computerState` (function)
|
|
439
|
+
|
|
440
|
+
```ts
|
|
441
|
+
computerState: (computer: SessionComputer) => ComputerState
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
## `ComputerState` (type)
|
|
445
|
+
|
|
446
|
+
```ts
|
|
447
|
+
export type ComputerState = "primary" | "enabled" | "offline" | "idle"
|
|
448
|
+
```
|
|
449
|
+
|
|
424
450
|
## `connectEmbedded` (function)
|
|
425
451
|
|
|
426
452
|
```ts
|
|
@@ -526,6 +552,7 @@ createInitialSessionState: (sessionId: string) => SessionState
|
|
|
526
552
|
## `CreateSessionRequest` (interface)
|
|
527
553
|
|
|
528
554
|
```ts
|
|
555
|
+
agent_runtime_id: string | null | undefined
|
|
529
556
|
biz_role_id: string | null | undefined
|
|
530
557
|
compaction_ratio: number | null | undefined
|
|
531
558
|
daemon_id: string | null | undefined
|
|
@@ -536,7 +563,7 @@ intent: string | undefined
|
|
|
536
563
|
memory_enabled: boolean | null | undefined
|
|
537
564
|
model: string | null | undefined
|
|
538
565
|
primary_skill_id: string | null | undefined
|
|
539
|
-
runtime_type: "sandbox" | "daemon" | null | undefined
|
|
566
|
+
runtime_type: "sandbox" | "daemon" | "native" | null | undefined
|
|
540
567
|
session_solution_asset_id: string | null | undefined
|
|
541
568
|
solution_id: string | undefined
|
|
542
569
|
solution_ref: PublishedSolutionRef | undefined
|
|
@@ -1304,6 +1331,7 @@ SDK_VERSION: string
|
|
|
1304
1331
|
|
|
1305
1332
|
```ts
|
|
1306
1333
|
askUserAnswer: Record<string, unknown> | undefined
|
|
1334
|
+
kbIds: number[] | undefined
|
|
1307
1335
|
mode: string | undefined
|
|
1308
1336
|
model: string | undefined
|
|
1309
1337
|
replayDecision: "keep_replay" | "continue_replay" | undefined
|
|
@@ -1311,6 +1339,33 @@ thinkingOverride: boolean | undefined
|
|
|
1311
1339
|
whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
|
|
1312
1340
|
```
|
|
1313
1341
|
|
|
1342
|
+
## `SessionComputer` (interface)
|
|
1343
|
+
|
|
1344
|
+
```ts
|
|
1345
|
+
agent_runtimes: unknown[] | undefined
|
|
1346
|
+
allowed_paths: string[] | undefined
|
|
1347
|
+
arch: string | null | undefined
|
|
1348
|
+
blade_home: string | null | undefined
|
|
1349
|
+
created_at: string
|
|
1350
|
+
daemon_version: string | null | undefined
|
|
1351
|
+
enabled: boolean
|
|
1352
|
+
home: string | null | undefined
|
|
1353
|
+
hostname: string | null | undefined
|
|
1354
|
+
id: string
|
|
1355
|
+
is_primary: boolean
|
|
1356
|
+
label: string
|
|
1357
|
+
last_seen_at: string | null | undefined
|
|
1358
|
+
online: boolean
|
|
1359
|
+
os: string | null | undefined
|
|
1360
|
+
workspace: string | null | undefined
|
|
1361
|
+
```
|
|
1362
|
+
|
|
1363
|
+
## `SessionComputerList` (interface)
|
|
1364
|
+
|
|
1365
|
+
```ts
|
|
1366
|
+
computers: SessionComputer[]
|
|
1367
|
+
```
|
|
1368
|
+
|
|
1314
1369
|
## `SessionConfig` (interface)
|
|
1315
1370
|
|
|
1316
1371
|
```ts
|
|
@@ -1342,6 +1397,7 @@ solution: SolutionDefinition | undefined
|
|
|
1342
1397
|
## `SessionDetail` (interface)
|
|
1343
1398
|
|
|
1344
1399
|
```ts
|
|
1400
|
+
agent_runtime_id: string | null | undefined
|
|
1345
1401
|
biz_role_id: string | null | undefined
|
|
1346
1402
|
bound_skill_id: string | null | undefined
|
|
1347
1403
|
created_at: string
|
|
@@ -1434,6 +1490,7 @@ SessionInfo = type({
|
|
|
1434
1490
|
"disable_tools?": "string[]",
|
|
1435
1491
|
"runtime_type?": "string | null",
|
|
1436
1492
|
"daemon_id?": "string | null",
|
|
1493
|
+
"agent_runtime_id?": "string | null",
|
|
1437
1494
|
"workspace_path?": "string | null",
|
|
1438
1495
|
"match?": "unknown",
|
|
1439
1496
|
})
|
|
@@ -1650,6 +1707,12 @@ export type SolutionDefinition =
|
|
|
1650
1707
|
export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
|
|
1651
1708
|
```
|
|
1652
1709
|
|
|
1710
|
+
## `sortComputers` (function)
|
|
1711
|
+
|
|
1712
|
+
```ts
|
|
1713
|
+
sortComputers: (computers: SessionComputer[]) => SessionComputer[]
|
|
1714
|
+
```
|
|
1715
|
+
|
|
1653
1716
|
## `Task` (type)
|
|
1654
1717
|
|
|
1655
1718
|
```ts
|