@blade-hq/agent-react 2612.0.0-beta.13 → 2612.0.0-beta.14

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.
@@ -1,32 +0,0 @@
1
- export declare function isAgentComputerCommand(command: string): boolean;
2
- /** 工具调用的 JSON 参数里是不是一条 computer launch 命令。 */
3
- export declare function isAgentComputerToolCall(argumentsJson: string | null | undefined): boolean;
4
- export type AgentComputerLaunchOutcome = "pending" | "succeeded" | "failed" | "unknown";
5
- /** `computer launch` 这条 Bash 工具调用最终是不是真的启动成功了——不能只看
6
- * `isAgentComputerToolCall` 命中参数就当作成功:可执行文件缺失/不可执行、
7
- * 启动后随即退出这些 appmirrord 侧的失败,Bash 工具调用本身仍然会走完
8
- * `status: "done"`(Bash 工具的职责是"跑完这条命令",命令自己返回非零退出码
9
- * 不算工具调用失败)。
10
- *
11
- * 唯一的判据是输出里有没有出现 `LAUNCH_SUCCESS_MARKER`——launch.go 的
12
- * cmdLaunch 只要走到成功分支就一定会打印这行文本,不存在"成功了但没打印"
13
- * 的路径。标记缺失就等价于没有走到那条成功路径,不再退回看 `result.exit_code`
14
- * 当兜底:那样会给 `computer launch ... || echo failed` 这类复合命令开口子,
15
- * 让真实失败的 launch 被误判成 succeeded。
16
- *
17
- * "pending":还没跑完(status 既不是终态失败也不是 done),调用方不该现在
18
- * 就下结论,也不该把这次调用标记成"已处理"——等下一次状态更新再重新判断。
19
- *
20
- * "unknown":`status: "done"` 但 `result` 本身缺失(不是"有 result、没有标记",
21
- * 是根本没有 result 这个字段)——历史会话被整理(compaction)之后,归档的
22
- * 工具调用只保留 `arguments`/`status` 这类摘要字段,完整 `result` payload 不
23
- * 会重新序列化进历史投影,这是已知且刻意的压缩形状,不是数据丢失异常。这种
24
- * 情况下"没看到成功标记"不能说明"这次 launch 失败了",只能说明"证据被裁剪
25
- * 了"——跟"result 确实回来了、里面就是没有这行文本"是两种不同性质的证据,
26
- * 前者不能定性为 failed,接入方要按自己的场景(标签页展示可以偏宽松,自动
27
- * 跳转/替用户做决定的场景应该偏保守)自己决定怎么用。
28
- */
29
- export declare function classifyAgentComputerLaunchOutcome(toolCall: {
30
- status?: string;
31
- result?: unknown;
32
- }): AgentComputerLaunchOutcome;