@agent-proxy/agy 0.20.2 → 0.20.3

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.
Files changed (2) hide show
  1. package/dist/request.js +12 -1
  2. package/package.json +2 -2
package/dist/request.js CHANGED
@@ -706,7 +706,18 @@ export function translateAgyRequest(body, upstreamModel, to = "responses") {
706
706
  continue;
707
707
  }
708
708
  if (item.type === "function_call_output" || item.type === "custom_tool_call_output") {
709
- const callId = string(item.call_id, `${item.type}.call_id`);
709
+ if (typeof item.call_id !== "string" || !item.call_id) {
710
+ // Codex Desktop 注入无 call_id 的 function_call_output(codex_app 跨线程
711
+ // delegation 通知),没有可配对的调用;Gemini 形状无法表达无调用的
712
+ // functionResponse,按原位 user 文本通知降级回放(与公共桥接转换同合同)。
713
+ const identity = [item.namespace, item.name]
714
+ .filter((entry) => typeof entry === "string" && entry.length > 0)
715
+ .join(".");
716
+ const summary = toolResultParts(item.output ?? item.content, `${item.type}.output`);
717
+ userContent().parts.push({ text: `[客户端注入的 ${String(item.type)} 通知${identity ? ` ${identity}` : ""}(无 call_id,非工具调用结果)]\n${summary.text}` });
718
+ continue;
719
+ }
720
+ const callId = item.call_id;
710
721
  const call = callNames.get(callId);
711
722
  if (!call || (item.type === "function_call_output") === call.custom) {
712
723
  fail(`${item.type} 未关联到同一 input 中匹配的工具调用 ${callId}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-proxy/agy",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "Agent Proxy agy 插件;保留基线转换行为。",
5
5
  "type": "module",
6
6
  "exports": {
@@ -40,5 +40,5 @@
40
40
  "dependencies": {
41
41
  "@agent-proxy/plugin-api": "0.20.2"
42
42
  },
43
- "gitHead": "da33f92fc5cb05404b8f7ef7a91eb6321382cfc1"
43
+ "gitHead": "b5922449d4fc9c2952b324031aee4f254e1b4d14"
44
44
  }