elicitation_callback

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Example elicitation_callback demonstrates the agent-initiated elicitation path: WithOnElicitation receives elicitation/create requests from the agent and returns an Accept / Decline / Cancel response. This is the mirror of the tool-side Elicit helper shown in examples/elicitation (which goes tool → opencode MCP client → user). Here the agent asks the SDK user directly via ACP's unstable elicitation/create method.

opencode 1.14.20 does NOT currently emit elicitation/create over ACP — the schema reserves this method under the unstable namespace. Wiring the callback is forward-compatible: when opencode (or another ACP agent) starts emitting it, this handler will receive the requests. Until then the callback never fires.

Run:

go run ./examples/elicitation_callback

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL