@blade-hq/agent-client 2612.0.0-beta.43 → 2612.0.0-beta.44

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
@@ -843,7 +843,7 @@ const delivery = await session.getDelivery(request.requestId)
843
843
 
844
844
  同一保存请求可重试,BA 不重复入队;同 ID 改变正文或参数会拒绝。接收结果 `accepted` 表示输入已持久化,不表示任务完成。`unknown` 表示无法确认,`not_found` 是查询未找到;不得因此生成新 ID。查询可返回队列项、队列状态和执行 ID;记录保留至会话删除。
845
845
 
846
- 此接口复用后端等待队列:空闲时自动开始,运行中等待,暂停时保留。可靠请求不能编辑或作为立即补充,但可以取消、重排和继续。支持普通文本、模式、模型、思考与推理强度;AskUser 作答、多模态、whatif 和 replay 继续使用 `send()`。需要支持 `prepared_options` 及 `chat:queue:request` 的 BA;旧服务的普通队列确认不算可靠请求回执。
846
+ 此接口复用后端持久化投递:空闲时自动开始,默认在运行中等待,暂停时保留。设置 `queueWhenRunning: false` 时补充当前运行,PA 使用此模式。可靠请求不能编辑,但可以立即补充、取消、重排和继续。支持普通文本、模式、模型、思考与推理强度;AskUser 作答、多模态、whatif 和 replay 继续使用 `send()`。需要支持 `prepared_options` 及 `chat:queue:request` 的 BA;旧服务的普通队列确认不算可靠请求回执。
847
847
 
848
848
  公开类型:`PreparedSend` 是可持久化的请求快照,`PreparedSendOptions` 是普通输入的执行参数,`DeliveryReceipt` 是接受或查询结果。
849
849
 
@@ -869,7 +869,7 @@ await persist(request)
869
869
  await session.sendPrepared(request)
870
870
  ```
871
871
 
872
- 每条消息最多 20 份资料,ID 不重复,每份正文最多 64000 个 Unicode 字符,整个资料 JSON 最多 256 KiB,超限拒绝。文件沿用指定会话的鉴权与路径解析,不接受外部 URL;仅有 `name` 的文件显示不可用。带资料的可靠消息作为独立一轮排队,不能走只传正文的「立即补充」。原生智能体目前不支持此通道。
872
+ 每条消息最多 20 份资料,ID 不重复,每份正文最多 64000 个 Unicode 字符,整个资料 JSON 最多 256 KiB,超限拒绝。文件沿用指定会话的鉴权与路径解析,不接受外部 URL;仅有 `name` 的文件显示不可用。带资料的可靠消息支持 `queueWhenRunning: false` 或「立即补充」;正文和资料一起交给当前运行,资料仍通过标准 Context 注入。原生智能体目前不支持此通道。
873
873
 
874
874
  ## 连接器管理
875
875
 
@@ -224,7 +224,7 @@ var ToolProvider = class {
224
224
 
225
225
  // src/version.ts
226
226
  var SDK_NAME = "agent-client";
227
- var SDK_VERSION = true ? "2612.0.0-beta.43" : "1.1.1";
227
+ var SDK_VERSION = true ? "2612.0.0-beta.44" : "1.1.1";
228
228
 
229
229
  // src/auth-login.ts
230
230
  function isAuthCallbackMessage(value) {
@@ -6027,14 +6027,14 @@ var AgentSession = class _AgentSession {
6027
6027
  /** Prepare a durable text input without sending any network request. */
6028
6028
  prepareSend(content, options = {}) {
6029
6029
  if (!content.trim()) throw new Error("\u6D88\u606F\u4E0D\u80FD\u4E3A\u7A7A");
6030
- if (Object.keys(options).some((key) => !["mode", "model", "thinkingOverride", "reasoningLevel", "contextAttachments"].includes(key))) {
6030
+ if (Object.keys(options).some((key) => !["mode", "model", "thinkingOverride", "reasoningLevel", "contextAttachments", "queueWhenRunning"].includes(key))) {
6031
6031
  throw new Error("\u53EF\u9760\u6587\u672C\u53D1\u9001\u4E0D\u652F\u6301\u8FD9\u4E9B\u53C2\u6570\uFF0C\u8BF7\u4F7F\u7528 send()");
6032
6032
  }
6033
6033
  const snapshot2 = JSON.parse(JSON.stringify(options));
6034
6034
  if (snapshot2.contextAttachments) snapshot2.contextAttachments = snapshotContextAttachments(snapshot2.contextAttachments);
6035
6035
  return { sessionId: this.sessionId, requestId: createClientRequestId(), content, options: snapshot2 };
6036
6036
  }
6037
- /** Durably enqueue an ordinary text input. Retries must reuse the saved request. */
6037
+ /** Durably send a text input with its saved delivery intent. Retries must reuse the saved request. */
6038
6038
  async sendPrepared(request) {
6039
6039
  if (request.sessionId !== this.sessionId) throw new Error("\u53D1\u9001\u8BF7\u6C42\u4E0D\u5C5E\u4E8E\u5F53\u524D\u4F1A\u8BDD");
6040
6040
  try {
@@ -6046,6 +6046,7 @@ var AgentSession = class _AgentSession {
6046
6046
  prepared_options: {
6047
6047
  mode: request.options.mode,
6048
6048
  model: request.options.model,
6049
+ ...request.options.queueWhenRunning !== void 0 ? { queue_when_running: request.options.queueWhenRunning } : {},
6049
6050
  thinking_override: request.options.thinkingOverride,
6050
6051
  reasoning_level: request.options.reasoningLevel,
6051
6052
  ...request.options.contextAttachments ? { context_attachments: request.options.contextAttachments } : {}
@@ -9131,4 +9132,4 @@ export {
9131
9132
  BladeClient,
9132
9133
  BladeApplicationClient
9133
9134
  };
9134
- //# sourceMappingURL=chunk-XAXUPUD2.js.map
9135
+ //# sourceMappingURL=chunk-WSXAKVX6.js.map