@xmov/avatar 2.5.0-alpha.19 → 2.5.0-alpha.20

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.
@@ -18,7 +18,7 @@ export default class XingyunAvatarAgent {
18
18
  interruptConversation: (reason?: string) => Promise<void>;
19
19
  /**
20
20
  * 回灌设备工具执行结果,callId 必须是 `onDeviceToolCall` 下发的原值。
21
- * `options.error` 仅在执行链路异常时传递;正常/业务失败省略或传 null。
21
+ * `options.error` 仅在执行链路异常时传递;正常/业务失败传 null,上行报文与 Android 一致地显式带 `error:null`。
22
22
  * `options.latencyMs` 对应 `latency_ms`;省略时按 SDK 收到 tool_call 的时间自动计算。
23
23
  * 超过 `timeoutMs` 未回灌时 SDK 自动补 `status=timeout`;未连接时忽略。
24
24
  */
@@ -74,7 +74,8 @@ export interface AgentSemanticJudgeResult {
74
74
  export type AgentDeviceToolResultStatus = "ok" | "error" | "timeout";
75
75
  /**
76
76
  * `respondToolResult` 的附加字段。
77
- * `error` 仅用于执行链路异常;正常/业务失败省略或传 `null`,SDK 不会上行空 `error`。
77
+ * `error` 仅用于执行链路异常;正常/业务失败传 `null`,SDK 会与 Android 一致地
78
+ * 在上行报文里显式写 `error: null`。
78
79
  * `latencyMs` 对应 `tool_result.message.latency_ms`,省略时按 SDK 收到 `tool_call` 的时间自动计算。
79
80
  */
80
81
  export interface AgentDeviceToolResultOptions {
@@ -108,11 +109,16 @@ export interface AgentDeviceToolCancel {
108
109
  reason?: string;
109
110
  raw?: unknown;
110
111
  }
111
- /** 设备进度/终态上行。`failed` 且 `statusMessage` 含“阻挡/受阻/障碍”时服务端按安全事件抢占播报。 */
112
+ /**
113
+ * 设备进度/终态上行。`failed` 且 `statusMessage` 含“阻挡/受阻/障碍”时服务端按安全事件抢占播报。
114
+ * `answer` 仅用于导航 `completed`:取目标站点 `speaktext` 原文,空/无站点时省略。
115
+ */
112
116
  export interface AgentDeviceEvent {
113
117
  taskId: string;
114
118
  status: AgentDeviceEventStatus;
115
119
  statusMessage?: string;
120
+ /** 导航完成时的站点播报原文;仅 `completed` 且非空时上行。 */
121
+ answer?: string;
116
122
  }
117
123
  /** 感知置信度,协议要求严格大写。 */
118
124
  export type AgentPerceptionConfidence = "NONE" | "LOW" | "MEDIUM" | "HIGH";