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

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 CHANGED
@@ -171,6 +171,9 @@ const page = await client.sessions.getSessionTurnsPage(id) // 聊天首屏 recen
171
171
  await client.sessions.getSessionTurnsPage(id, { before: page.nextBefore! })
172
172
  ```
173
173
 
174
+ 会话插件可通过 `client.sessions.listSessionPlugins(id)` 查询,并用
175
+ `client.sessions.setSessionPluginActivation(id, name, active)` 切换当前会话;返回项类型为公开的 `SessionPlugin`。
176
+
174
177
  ### 会话回放(演示 / 彩排)
175
178
 
176
179
  拿一个已经聊完的会话当素材,重现当时的回复和工具调用,**完全不调用模型**。
package/dist/index.d.ts CHANGED
@@ -27,6 +27,7 @@ export type { ComputerOS, ComputerState, SessionComputer, SessionComputerList, }
27
27
  export { ModelsResource } from "./resources/models";
28
28
  export type { ModelCatalog, ModelOption } from "./resources/models";
29
29
  export type { SessionsResource } from "./resources/sessions";
30
+ export type { SessionPlugin } from "./resources/sessions";
30
31
  export { ChatProjectsResource } from "./resources/chat-projects";
31
32
  export type { ChatProject } from "./resources/chat-projects";
32
33
  export { hasChatRunEvent } from "./shared/projection";
package/dist/index.js CHANGED
@@ -2547,6 +2547,12 @@ var SessionsResource = class {
2547
2547
  connect(sessionId) {
2548
2548
  return this.client.hub.connect(sessionId);
2549
2549
  }
2550
+ listSessionPlugins(sessionId, init) {
2551
+ return this.client.jsonFromInit(`/api/sessions/${encodeURIComponent(sessionId)}/plugins`, init);
2552
+ }
2553
+ setSessionPluginActivation(sessionId, name, active, init) {
2554
+ return this.client.jsonFromInit(`/api/sessions/${encodeURIComponent(sessionId)}/plugins/${encodeURIComponent(name)}:activation`, { method: "POST", body: JSON.stringify({ active }), ...init });
2555
+ }
2550
2556
  /** 创建新会话并直接连接,返回可收发消息的 AgentSession。 */
2551
2557
  async create(request = {}) {
2552
2558
  if (isSessionDefinition(request)) {
@@ -5918,7 +5924,7 @@ function resolveServiceUrl(endpoints, name, path = "") {
5918
5924
 
5919
5925
  // src/version.ts
5920
5926
  var SDK_NAME = "agent-client";
5921
- var SDK_VERSION = true ? "2610.0.0-beta.45" : "1.1.1";
5927
+ var SDK_VERSION = true ? "2610.0.0-beta.47" : "1.1.1";
5922
5928
 
5923
5929
  // src/commands/protocol.ts
5924
5930
  function isCommandEnvelope(value) {