@blade-hq/agent-react 2610.0.0-beta.28 → 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.
@@ -32,6 +32,10 @@ declare const BladeAgent: {
32
32
  connectEmbedded: typeof agentClient.connectEmbedded;
33
33
  isCommandEnvelope: typeof agentClient.isCommandEnvelope;
34
34
  isInboundEnvelope: typeof agentClient.isInboundEnvelope;
35
+ ComputersResource: typeof agentClient.ComputersResource;
36
+ canToggleComputer: typeof agentClient.canToggleComputer;
37
+ computerState: typeof agentClient.computerState;
38
+ sortComputers: typeof agentClient.sortComputers;
35
39
  ModelsResource: typeof agentClient.ModelsResource;
36
40
  buildMessageContent: typeof agentClient.buildMessageContent;
37
41
  contentPreview: typeof agentClient.contentPreview;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-react",
3
- "version": "2610.0.0-beta.28",
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.28"
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
- 192 个公开声明。
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
@@ -1313,6 +1339,33 @@ thinkingOverride: boolean | undefined
1313
1339
  whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
1314
1340
  ```
1315
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
+
1316
1369
  ## `SessionConfig` (interface)
1317
1370
 
1318
1371
  ```ts
@@ -1654,6 +1707,12 @@ export type SolutionDefinition =
1654
1707
  export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
1655
1708
  ```
1656
1709
 
1710
+ ## `sortComputers` (function)
1711
+
1712
+ ```ts
1713
+ sortComputers: (computers: SessionComputer[]) => SessionComputer[]
1714
+ ```
1715
+
1657
1716
  ## `Task` (type)
1658
1717
 
1659
1718
  ```ts