Proto.OptionsWire format for Claude configuration options.
This module provides the protocol-level wire format encoding/decoding for configuration options used in JSON configuration files. It handles JSON serialization and deserialization with proper field name mappings (camelCase).
This is the protocol-level module without Eio types or logging.
The type of configuration options.
This represents all configurable options for Claude interactions, encoded in JSON format.
jsont is the Jsont codec for configuration options.
Wire format uses camelCase field names:
Unknown fields are preserved for forward compatibility.
val empty : tempty is an empty configuration with all fields set to their default values.
Default values:
maxThinkingTokens defaults to 8000continueConversation defaults to falseNoneval allowed_tools : t -> string listallowed_tools t returns the list of allowed tool names. Empty list means all tools are allowed (unless explicitly disallowed).
val disallowed_tools : t -> string listdisallowed_tools t returns the list of disallowed tool names.
val max_thinking_tokens : t -> int optionmax_thinking_tokens t returns the maximum number of tokens Claude can use for internal thinking.
val system_prompt : t -> string optionsystem_prompt t returns the system prompt to use for Claude.
val append_system_prompt : t -> string optionappend_system_prompt t returns additional text to append to the system prompt.
val permission_mode : t -> Permissions.Mode.t optionpermission_mode t returns the permission mode controlling how tool invocations are authorized.
val continue_conversation : t -> boolcontinue_conversation t returns whether to continue from a previous conversation.
val resume : t -> string optionresume t returns the session ID to resume from.
val max_turns : t -> int optionmax_turns t returns the maximum number of conversation turns to allow.
val permission_prompt_tool_name : t -> string optionpermission_prompt_tool_name t returns the tool name to use for permission prompts.
val settings : t -> string optionsettings t returns the path to the settings file.
val add_dirs : t -> string listadd_dirs t returns additional directories to include in the context.
val max_budget_usd : t -> float optionmax_budget_usd t returns the maximum budget in USD for API calls.
fallback_model t returns the fallback model to use if the primary model fails.
val setting_sources : t -> setting_source list optionsetting_sources t returns the list of setting sources to load from.
val max_buffer_size : t -> int optionmax_buffer_size t returns the maximum buffer size for I/O operations.
val user : t -> string optionuser t returns the user identifier for the session.
val output_format : t -> Structured_output.t optionoutput_format t returns the structured output format configuration.
with_disallowed_tools tools t sets the disallowed tools.
with_max_thinking_tokens tokens t sets the maximum thinking tokens.
with_append_system_prompt prompt t sets the text to append to the system prompt.
val with_permission_mode : Permissions.Mode.t -> t -> twith_permission_mode mode t sets the permission mode.
with_continue_conversation continue t sets whether to continue conversation.
with_permission_prompt_tool_name tool t sets the permission prompt tool name.
val with_setting_sources : setting_source list -> t -> twith_setting_sources sources t sets the setting sources.
val with_output_format : Structured_output.t -> t -> twith_output_format format t sets the structured output format.