@zvada/agent-server 0.3.5 → 0.3.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.6
4
+
5
+ - Unsupported Codex app-server requests now receive an explicit protocol error.
6
+ Previously, requests such as MCP elicitations were treated as file-edit
7
+ approvals and could leave a turn waiting in the permission broker. Command
8
+ and file approvals and host-managed credential refresh keep their existing behavior.
9
+
3
10
  ## 0.3.5
4
11
 
5
12
  - Switching Codex ChatGPT accounts or API keys now recreates the native process
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zvada/agent-server",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Harness-agnostic agent execution engine: run Claude Code, Codex (SDK/CLI + app-server), and any ACP agent behind one interface with a normalized event stream, multi-turn sessions, and resume. Root export is the wire contract; /core, /server, /client are the seats.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -395,6 +395,16 @@ export class CodexAppServerAgent extends BaseAgent {
395
395
  chatgptPlanType: tokens.chatgptPlanType ?? null,
396
396
  };
397
397
  }
398
+ // Elicitations and other server requests have their own response shapes.
399
+ // Sending them to the approval broker can leave a turn waiting forever.
400
+ if (
401
+ method !== "item/commandExecution/requestApproval" &&
402
+ method !== "item/fileChange/requestApproval" &&
403
+ method !== "execCommandApproval" &&
404
+ method !== "applyPatchApproval"
405
+ ) {
406
+ throw new Error(`Unsupported Codex server request: ${method}`);
407
+ }
398
408
  const requestThread = params.threadId ?? params.conversationId;
399
409
  const v2 = method.startsWith("item/");
400
410
  const decline = v2 ? { decision: "decline" } : { decision: "denied" };