@blade-hq/agent-client 2610.0.0-beta.45 → 2610.0.0-beta.46

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.
@@ -6,6 +6,15 @@ import type { BladeClient, UploadProgress } from "../blade-client";
6
6
  import type { AgentSession } from "../session/agent-session";
7
7
  import { type SessionDefinition } from "../session/definition";
8
8
  import type { SessionProfile } from "../types/sdk-profile";
9
+ export interface SessionPlugin {
10
+ name: string;
11
+ installed: boolean;
12
+ active: boolean;
13
+ projected: boolean;
14
+ projection_source?: string | null;
15
+ status: string;
16
+ reason?: string | null;
17
+ }
9
18
  export interface CreateSessionRequest {
10
19
  intent?: string;
11
20
  template_id?: TemplateId;
@@ -214,6 +223,15 @@ export declare class SessionsResource {
214
223
  * (自动完成历史加载、Socket.IO 订阅、断线重连补数)。
215
224
  */
216
225
  connect(sessionId: string): Promise<AgentSession>;
226
+ listSessionPlugins(sessionId: string, init?: RequestInit): Promise<{
227
+ plugins: SessionPlugin[];
228
+ sync_version: number;
229
+ sync_pending: boolean;
230
+ }>;
231
+ setSessionPluginActivation(sessionId: string, name: string, active: boolean, init?: RequestInit): Promise<{
232
+ plugin: SessionPlugin;
233
+ sync_version: number;
234
+ }>;
217
235
  /** 创建新会话并直接连接,返回可收发消息的 AgentSession。 */
218
236
  create(request?: CreateSessionRequest | SessionDefinition): Promise<AgentSession>;
219
237
  private createDeclared;
@@ -250,6 +268,7 @@ export declare class SessionsResource {
250
268
  getSession(sessionId: string, init?: RequestInit): Promise<SessionDetail>;
251
269
  updateSession(sessionId: string, payload: {
252
270
  intent?: string;
271
+ chat_project_id?: string | null;
253
272
  }): Promise<SessionDetail>;
254
273
  setSessionEnv(sessionId: string, env: Record<string, string>): Promise<SessionDetail>;
255
274
  pinSession(sessionId: string, pinned: boolean): Promise<SessionInfo>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-client",
3
- "version": "2610.0.0-beta.45",
3
+ "version": "2610.0.0-beta.46",
4
4
  "description": "Blade Agent 框架无关客户端:会话实时状态机、REST 通道、弹窗登录、页面协作。浏览器与 Node.js 通用。",
5
5
  "repository": {
6
6
  "type": "git",
package/public-api.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
4
4
  > 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
5
5
 
6
- 共 176 个公开声明。
6
+ 共 177 个公开声明。
7
7
 
8
8
  ## `acceptedPostChatFollowupCompletesLatestRun` (function)
9
9
 
@@ -1326,6 +1326,18 @@ SessionInfo = type({
1326
1326
  })
1327
1327
  ```
1328
1328
 
1329
+ ## `SessionPlugin` (interface)
1330
+
1331
+ ```ts
1332
+ active: boolean
1333
+ installed: boolean
1334
+ name: string
1335
+ projected: boolean
1336
+ projection_source: string | null | undefined
1337
+ reason: string | null | undefined
1338
+ status: string
1339
+ ```
1340
+
1329
1341
  ## `SessionPortMapping` (interface)
1330
1342
 
1331
1343
  ```ts
@@ -1395,6 +1407,7 @@ importSession: (file: File, name?: string, solutionOverride?: string | null | Im
1395
1407
  listBackgroundTasks: (sessionId: string, init?: RequestInit) => Promise<BackgroundTask[]>
1396
1408
  listDir: (sessionId: string, dirPath: string) => Promise<FileEntry[]>
1397
1409
  listResultFeedback: (sessionId: string) => Promise<ResultFeedback[]>
1410
+ listSessionPlugins: (sessionId: string, init?: RequestInit) => Promise<{ plugins: SessionPlugin[]; sync_version: number; sync_pending: boolean; }>
1398
1411
  listSessions: (template_id_prefix?: string, solution_id?: string) => Promise<SessionInfo[]>
1399
1412
  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>
1400
1413
  listSessionsWithSkillData: () => Promise<SkillDevSession[]>
@@ -1407,6 +1420,7 @@ revokeShare: (sessionId: string, token: string) => Promise<{ revoked: boolean; }
1407
1420
  rewindSession: (sessionId: string, checkpointId: string) => Promise<{ id: string; content: string; }>
1408
1421
  searchOwnedContent: (params: { q: string; limit?: number; }) => Promise<GlobalSearchResult>
1409
1422
  setSessionEnv: (sessionId: string, env: Record<string, string>) => Promise<SessionDetail>
1423
+ setSessionPluginActivation: (sessionId: string, name: string, active: boolean, init?: RequestInit) => Promise<{ plugin: SessionPlugin; sync_version: number; }>
1410
1424
  shareFile: (sessionId: string, sourcePath: string, linkName?: string, shareFolder?: string) => Promise<{ path: string; target: string; }>
1411
1425
  startReplaySession: (sourceSessionId: string, speed?: ReplaySpeed) => Promise<{ session_id: string; }>
1412
1426
  stopBackgroundTask: (sessionId: string, taskId: string) => Promise<BackgroundTaskStopResult>
@@ -1414,7 +1428,7 @@ switchBranch: (sessionId: string, checkpointId: string) => Promise<{ id: string;
1414
1428
  tokenizeMessages: (messages: Array<Record<string, unknown>>, options?: { model?: string; add_generation_prompt?: boolean; enable_thinking?: boolean | null; tools?: Array<Record<string, unknown>>; }) => Promise<TokenizeResult>
1415
1429
  tokenizePrompt: (prompt: string, model?: string) => Promise<TokenizeResult>
1416
1430
  updateReplaySession: (sessionId: string, payload: { speed?: ReplaySpeed; status?: "autonomous"; }) => Promise<{ replay_state: SessionInfo["replay_state"]; }>
1417
- updateSession: (sessionId: string, payload: { intent?: string; }) => Promise<SessionDetail>
1431
+ updateSession: (sessionId: string, payload: { intent?: string; chat_project_id?: string | null; }) => Promise<SessionDetail>
1418
1432
  updateSessionMemory: (sessionId: string, memoryEnabled: boolean) => Promise<{ memory_enabled: boolean; }>
1419
1433
  updateSharing: (sessionId: string, shared: boolean) => Promise<{ shared: boolean; }>
1420
1434
  uploadFiles: (sessionId: string, dirPath: string, files: FileList | File[] | UploadFileEntry[], options?: UploadFilesOptions) => Promise<{ uploaded: string[]; failed: string[]; }>