Skip to content

fix(effect-acp): elicitation method name and response shape drift from official ACP SDK #9048

Description

@Neon-Wang

Summary

packages/effect-acp's generated client binds the elicitation request handler to method name session/elicitation (src/_generated/meta.gen.ts), but the official @agent-client-protocol SDK (used by e.g. oh-my-pi 18.x) sends elicitation/create (and elicitation/complete for URL mode). An official-SDK agent that elicits therefore gets -32601 Method not found, and its prompt silently resolves as if the user declined.

Discovered while integrating omp (#9038): omp's approval wrapper calls uiContext.select(...), which over ACP becomes a form elicitation; T3 never saw it, and the tool call auto-denied. #9038 works around this at the adapter boundary via handleUnknownExtRequest.

There is a second drift on the response shape: effect-acp's ElicitationResponse types action as a nested union ({ action: { action: "accept", content? } | { action: "decline" } | { action: "cancel" } }), while the official SDK reads a flat response.action === "accept" string with content beside it. Fixing the method name without flattening the response would still leave official-SDK agents reading "not accepted".

Suggested direction

  • Regenerate or hand-patch the client method table to accept elicitation/create (ideally as an alias keeping session/elicitation for older agents), and align ElicitationResponse with the flat official shape.
  • The generator script is packages/effect-acp/scripts/generate.ts; worth checking which spec revision it pins against.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions