Skip to main content

Module classify

Module classify 

Source

Functions§

builtin_tool_behavior
canonical_command_session_tool_name
classify_tool_intent
is_command_run_tool
Returns true if tool_name is a direct command-run tool whose output is rendered inline as a terminal panel and whose raw process output (including ANSI) should be preserved rather than stripped/line-styled.
is_command_run_tool_call
is_command_session_tool
Returns true if tool_name is any alias of the unified command-session tool.
is_command_tool
Returns true if tool_name refers to a command/PTY execution tool.
is_edited_file_conflict_guarded_call
is_exec_session_cleanup_call
Cleanup stops or releases an owned execution session, never starts work.
is_parallel_safe_call
is_parallel_safe_call_with_intent
is_parallel_safe_call for a call whose ToolIntent was already computed on the same args. The non-command branches reuse intent.mutating (identical to re-classifying: builtin_tool_behavior.classify(args) IS classify_tool_intent), so preflight paths avoid re-classifying the same args — a second tree-sitter parse for command payloads. The command-run branch still re-parses: parallel safety for command sessions is a separate predicate from the read-only intent.
is_turn_budget_exempt_call
Returns true for control-plane exec calls that should be exempt from the per-turn tool-call budget.
planning_allowed_actions
Returns the subset of actions that are allowed for a multi-action tool when planning mode is active. Returns None for tools that are not multi-action or have no action-level restrictions.
remap_file_operation_command_args_to_command_session
should_use_spool_reference_only