@blade-hq/agent-client 2612.0.0-beta.75 → 2612.0.0-beta.77

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
@@ -1070,3 +1070,11 @@ session.prepareSend("继续处理", {
1070
1070
  (`update_format: "snapshot"` 或 `"diff"`)。可靠请求重试应复用原 `requestId`,不能换 ID 重发。
1071
1071
 
1072
1072
  BA 默认提供内置定时任务。应用自行管理定时安排时,可在声明式会话的 `config.disableTools`(或 SDK profile 的 `disableTools`)传入 `["platform:schedule"]`;底层创建与配置更新请求使用 `disable_tools: ["platform:schedule"]`。该配置隐藏 BA 定时工具并阻止调用,不影响应用自己的定时安排,也不会停止已有 BA 任务。
1073
+
1074
+ ### 连接器说明书与使用规则
1075
+
1076
+ `client.connectors.guide(name)` 读取当前可用连接器的说明书;传第二参数 `"first-connection"` 读取首次引导小节。可传第三参数 `{signal}` 取消读取。断开后不可读。
1077
+
1078
+ `client.connectors.rules(name)` 返回 `ConnectorRules`,其中 `groups` 为 `ConnectorRuleGroup[]`;`ConnectorRuleValue` 为 `"allow" | "ask" | "off"`。使用 `client.connectors.updateRules(name, {send: "off"})` 按组部分更新,返回最新完整视图;恢复默认时提交该组的 `default`。设置按当前用户跨会话保存,不改变服务授权。
1079
+
1080
+ 关闭后调用立即被拒绝,本轮搜索缓存允许保留,下一轮执行反映新设置。“问我”由工具描述提示先征得用户同意,不产生平台审批暂停。未知组或无效值会拒绝整个更新。
@@ -227,7 +227,7 @@ var ToolProvider = class {
227
227
 
228
228
  // src/version.ts
229
229
  var SDK_NAME = "agent-client";
230
- var SDK_VERSION = true ? "2612.0.0-beta.75" : "1.1.1";
230
+ var SDK_VERSION = true ? "2612.0.0-beta.77" : "1.1.1";
231
231
 
232
232
  // src/auth-login.ts
233
233
  function isAuthCallbackMessage(value) {
@@ -3390,6 +3390,15 @@ var ConnectorsResource = class {
3390
3390
  this.client = client;
3391
3391
  }
3392
3392
  client;
3393
+ rules(name) {
3394
+ return this.client.json("GET", `/api/connectors/${encodeURIComponent(name)}/rules`);
3395
+ }
3396
+ updateRules(name, set) {
3397
+ return this.client.json("PUT", `/api/connectors/${encodeURIComponent(name)}/rules`, { set });
3398
+ }
3399
+ guide(name, section, init) {
3400
+ return this.client.jsonFromInit(`/api/connectors/${encodeURIComponent(name)}/guide${section ? `?section=${encodeURIComponent(section)}` : ""}`, init);
3401
+ }
3393
3402
  /** Stage an explicit attachment in the current user's SW connection. Reuse requestId on retry. */
3394
3403
  async uploadFile(name, file, fileName, requestId) {
3395
3404
  const form = new FormData();
@@ -3982,7 +3991,19 @@ var SessionsResource = class {
3982
3991
  items: index.items.map((item) => ({
3983
3992
  entryId: item.entry_id,
3984
3993
  preview: item.preview,
3985
- createdAt: item.created_at
3994
+ recaption: item.recaption,
3995
+ artifacts: item.artifacts?.map((artifact) => ({
3996
+ kind: artifact.kind === "link" ? "link" : "file",
3997
+ target: artifact.target,
3998
+ label: artifact.label
3999
+ })),
4000
+ createdAt: item.created_at,
4001
+ entries: item.entries?.map((entry) => ({
4002
+ entryId: entry.entry_id,
4003
+ preview: entry.preview,
4004
+ createdAt: entry.created_at,
4005
+ answer: entry.answer
4006
+ }))
3986
4007
  }))
3987
4008
  };
3988
4009
  }
@@ -9442,4 +9463,4 @@ export {
9442
9463
  parseAskUserQuestion,
9443
9464
  formatAskUserAnswer
9444
9465
  };
9445
- //# sourceMappingURL=chunk-AAY2NLEC.js.map
9466
+ //# sourceMappingURL=chunk-4QJ7JUBB.js.map