Wires the same server side that codeagent_app() uses – streaming with
per-turn compaction, stop / ESC interrupt, /skill commands, hooks, token
budget and per-turn session saving; the approval and question bar
(AskUserQuestion); the generative UI canvas; and Data Shield – to a
client the host built for this Shiny session. Pair it with
codeagent_chat_ui() and codeagent_head_assets(), and with
codeagent_canvas_ui() when canvas is given.
Arguments
- input, output, session
The Shiny server arguments.
- client
A
codeagent_client()built for this session.- tools
Host tools (a list of
ellmer::tool()definitions). Each must have a capability intool_meta. They are registered after the built-in tools, with codeagent's result normalization, behind the permission gate and Data Shield.- tool_meta
Named list or character vector: host tool name -> capability (
"read","write","exec"or"net").- canvas
NULL(no canvas) orcanvas_options()to enable the generative UI canvas; placecodeagent_canvas_ui()in the page. With atools=selection on the client, include"genui"in it.
Value
Invisibly, a list with state (the session reactiveValues),
stream_task (the ExtendedTask), chat and settings.