My own corner of monopam
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-claude: enable MDX on lib/control.mli

Run mdx on lib/control.mli so the two {[ ... ]} odoc blocks now
type-check. Used `open Claude` per the in-package convention,
qualified the error_detail call to its real path
(`Control.Response.error_detail`), and wrapped the
server_info-printing snippet in `let report client = ...` so the
example takes the client as input rather than referencing a free
binding. Switched Printf to Fmt.pr "%s@." for consistency.

+14 -7
+12 -6
ocaml-claude/lib/control.mli
··· 224 224 225 225 Example: 226 226 {[ 227 - error_detail ~code:`Method_not_found ~message:"Hook callback not found" () 227 + open Claude 228 + 229 + let detail = 230 + Control.Response.error_detail ~code:`Method_not_found 231 + ~message:"Hook callback not found" () 228 232 ]} *) 229 233 230 234 val error_detail_jsont : error_detail Json.codec ··· 329 333 {2 Example} 330 334 331 335 {[ 332 - let info = Client.server_info client in 333 - Printf.printf "Claude CLI version: %s\n" (Server_info.version info); 336 + open Claude 334 337 335 - if List.mem "structured-output" (Server_info.capabilities info) then 336 - Printf.printf "Structured output is supported\n" 337 - else Printf.printf "Structured output not available\n" 338 + let report client = 339 + let info = Client.server_info client in 340 + Fmt.pr "Claude CLI version: %s@." (Server_info.version info); 341 + if List.mem "structured-output" (Server_info.capabilities info) then 342 + Fmt.pr "Structured output is supported@." 343 + else Fmt.pr "Structured output not available@." 338 344 ]} *) 339 345 340 346 module Server_info : sig
+2 -1
ocaml-claude/lib/dune
··· 11 11 hooks.mli 12 12 handler.mli 13 13 tool.mli 14 - options.mli) 14 + options.mli 15 + control.mli) 15 16 (libraries claude nox-json logs fmt eio eio.core eio.unix eio_main))