Coverage report: 43%

Files Functions Classes

coverage.py v7.13.5, created at 2026-03-29 02:55 +0800

File function   statements missing excluded   coverage
__init__.py (no function)   1 0 0   100%
agent.py set_session   1 1 0   0%
agent.py get_session   1 1 0   0%
agent.py set_workspace   1 1 0   0%
agent.py get_workspace   1 0 0   100%
agent.py set_agent_depth   1 1 0   0%
agent.py get_agent_depth   1 1 0   0%
agent.py is_sub_agent   1 1 0   0%
agent.py _dump_assistant_msg   10 10 0   0%
agent.py run   94 94 0   0%
agent.py run_sub_agent   27 27 0   0%
agent.py (no function)   27 0 0   100%
cli.py (no function)   3 3 0   0%
cli / __init__.py (no function)   2 0 0   100%
cli / app.py main   71 71 0   0%
cli / app.py main.on_heartbeat   6 6 0   0%
cli / app.py _print_help   22 22 0   0%
cli / app.py (no function)   14 0 0   100%
cli / commands / __init__.py (no function)   0 0 0   100%
cli / commands / agent.py handle   17 17 0   0%
cli / commands / agent.py _cmd_list   13 13 0   0%
cli / commands / agent.py _cmd_new   7 7 0   0%
cli / commands / agent.py _cmd_switch   10 10 0   0%
cli / commands / agent.py _cmd_delete   13 13 0   0%
cli / commands / agent.py _switch_to   6 6 0   0%
cli / commands / agent.py _print_help   5 5 0   0%
cli / commands / agent.py (no function)   14 0 0   100%
cli / commands / session.py handle   17 17 0   0%
cli / commands / session.py _cmd_list   14 14 0   0%
cli / commands / session.py _cmd_new   4 4 0   0%
cli / commands / session.py _cmd_switch   10 10 0   0%
cli / commands / session.py _cmd_delete   10 10 0   0%
cli / commands / session.py _reinit_logger   1 1 0   0%
cli / commands / session.py _print_help   5 5 0   0%
cli / commands / session.py (no function)   13 0 0   100%
cli / commands / skill.py handle   12 12 0   0%
cli / commands / skill.py _cmd_list   14 14 0   0%
cli / commands / skill.py _cmd_import   10 10 0   0%
cli / commands / skill.py _print_help   3 3 0   0%
cli / commands / skill.py (no function)   7 0 0   100%
cli / display.py show_context_usage   14 14 0   0%
cli / display.py show_plan_progress   10 10 0   0%
cli / display.py (no function)   7 0 0   100%
cli / input.py _newline   1 1 0   0%
cli / input.py get_input   2 2 0   0%
cli / input.py (no function)   6 0 0   100%
config.py (no function)   27 0 0   100%
config_manager.py ensure_config_dir   1 0 0   100%
config_manager.py _write_config   4 4 0   0%
config_manager.py _deep_merge   6 0 0   100%
config_manager.py init_config   7 3 0   57%
config_manager.py load_config   10 3 0   70%
config_manager.py _inject_to_env   16 0 0   100%
config_manager.py get_config   5 5 0   0%
config_manager.py get   8 8 0   0%
config_manager.py set_config   9 9 0   0%
config_manager.py get_config_path   1 1 0   0%
config_manager.py get_config_dir   1 1 0   0%
config_manager.py (no function)   21 0 0   100%
heartbeat.py Heartbeat.__init__   6 6 0   0%
heartbeat.py Heartbeat.start   9 9 0   0%
heartbeat.py Heartbeat.stop   7 7 0   0%
heartbeat.py Heartbeat._run_loop   5 5 0   0%
heartbeat.py Heartbeat._do_heartbeat   7 7 0   0%
heartbeat.py get_heartbeat   1 1 0   0%
heartbeat.py start_heartbeat   6 6 0   0%
heartbeat.py stop_heartbeat   3 3 0   0%
heartbeat.py execute_heartbeat_tasks   17 17 0   0%
heartbeat.py get_default_heartbeat_content   1 1 0   0%
heartbeat.py (no function)   20 20 0   0%
llm.py chat   6 6 0   0%
llm.py (no function)   4 4 0   0%
logger / __init__.py (no function)   2 0 0   100%
logger / logger.py SensitiveInfoFilter.filter   9 9 0   0%
logger / logger.py SensitiveInfoFilter._filter_value   3 3 0   0%
logger / logger.py QRClawLogger.__init__   4 0 0   100%
logger / logger.py QRClawLogger.setup   37 37 0   0%
logger / logger.py QRClawLogger.get_logger   1 0 0   100%
logger / logger.py QRClawLogger.console   3 3 0   0%
logger / logger.py setup_logger   1 1 0   0%
logger / logger.py get_logger   1 0 0   100%
logger / logger.py get_console   1 1 0   0%
logger / logger.py (no function)   21 0 0   100%
memory / __init__.py (no function)   3 0 0   100%
memory / compressor.py count_tokens   8 8 0   0%
memory / compressor.py count_text_tokens   1 1 0   0%
memory / compressor.py _pick_recent   13 13 0   0%
memory / compressor.py summarize   42 42 0   0%
memory / compressor.py truncate   6 6 0   0%
memory / compressor.py (no function)   15 0 0   100%
memory / long_term.py LongTermMemory.__init__   3 3 0   0%
memory / long_term.py LongTermMemory._ensure_file   4 4 0   0%
memory / long_term.py LongTermMemory.load   7 7 0   0%
memory / long_term.py LongTermMemory.save   7 7 0   0%
memory / long_term.py LongTermMemory.append   14 14 0   0%
memory / long_term.py LongTermMemory.clear   7 7 0   0%
memory / long_term.py LongTermMemory.exists   1 1 0   0%
memory / long_term.py LongTermMemory.size   3 3 0   0%
memory / long_term.py (no function)   13 0 0   100%
memory / session.py list_sessions   11 2 0   82%
memory / session.py get_last_session_id   5 1 0   80%
memory / session.py delete_session   6 0 0   100%
memory / session.py count_tokens   8 0 0   100%
memory / session.py Session.__init__   22 3 0   86%
memory / session.py Session.add   3 0 0   100%
memory / session.py Session.update_tokens   4 4 0   0%
memory / session.py Session.set_plan   2 0 0   100%
memory / session.py Session.complete_step   12 1 0   92%
memory / session.py Session.clear_plan   2 0 0   100%
memory / session.py Session.clear   8 0 0   100%
memory / session.py Session._save   6 3 0   50%
memory / session.py Session._load   10 3 0   70%
memory / session.py (no function)   27 0 0   100%
prompt.py _build_tooling_section   19 19 0   0%
prompt.py _build_safety_section   1 1 0   0%
prompt.py _build_workspace_section   3 3 0   0%
prompt.py _build_behavior_section   5 5 0   0%
prompt.py _build_memory_section   7 7 0   0%
prompt.py _build_heartbeat_section   11 11 0   0%
prompt.py _build_skills_section   9 9 0   0%
prompt.py _build_plan_section   8 8 0   0%
prompt.py build_system_prompt   2 2 0   0%
prompt.py (no function)   19 0 0   100%
providers / __init__.py _load_provider   9 1 0   89%
providers / __init__.py (no function)   7 0 0   100%
providers / base.py LLMProvider.chat   0 0 1   100%
providers / base.py (no function)   20 0 0   100%
providers / openai.py OpenAIProvider.__init__   2 0 0   100%
providers / openai.py OpenAIProvider._sanitize   8 8 0   0%
providers / openai.py OpenAIProvider.chat   16 16 0   0%
providers / openai.py (no function)   10 0 0   100%
providers / vertex.py _build_vertex_tools   8 8 0   0%
providers / vertex.py VertexProvider.__init__   3 3 0   0%
providers / vertex.py VertexProvider.chat   76 76 0   0%
providers / vertex.py (no function)   15 15 0   0%
security.py _llm_check_command_safety   15 15 0   0%
security.py _get_effective_agent_id   8 2 0   75%
security.py SecurityManager.__new__   4 0 0   100%
security.py SecurityManager._load_config   13 6 0   54%
security.py SecurityManager._create_default_config   5 5 0   0%
security.py SecurityManager.get_permission   8 3 0   62%
security.py SecurityManager.check_access   11 3 0   73%
security.py SecurityManager._check_path_safety   18 2 0   89%
security.py SecurityManager._check_shell_safety   5 2 0   60%
security.py SecurityManager._is_subpath   5 0 0   100%
security.py (no function)   32 0 0   100%
skills / __init__.py (no function)   2 0 0   100%
skills / registry.py Skill.__init__   6 6 0   0%
skills / registry.py Skill.from_skill_md   16 16 0   0%
skills / registry.py Skill.get_lightweight_info   1 1 0   0%
skills / registry.py Skill.get_full_info   2 2 0   0%
skills / registry.py SkillRegistry.__init__   1 1 0   0%
skills / registry.py SkillRegistry.load_from_dir   20 20 0   0%
skills / registry.py SkillRegistry.get_skills_list   1 1 0   0%
skills / registry.py SkillRegistry.get_skill   1 1 0   0%
skills / registry.py SkillRegistry.has_skill   1 1 0   0%
skills / registry.py SkillRegistry.get_all_skills   1 1 0   0%
skills / registry.py (no function)   18 0 0   100%
tests / __init__.py (no function)   0 0 0   100%
tests / conftest.py temp_dir   2 0 0   100%
tests / conftest.py temp_file   3 3 0   0%
tests / conftest.py (no function)   7 0 0   100%
tests / test_registry.py TestTool.setup_method   1 0 0   100%
tests / test_registry.py TestTool.test_register_tool   5 0 0   100%
tests / test_registry.py TestTool.test_register_tool.test_tool   1 1 0   0%
tests / test_registry.py TestTool.test_register_tool_with_confirm   3 0 0   100%
tests / test_registry.py TestTool.test_register_tool_with_confirm.dangerous_tool   1 1 0   0%
tests / test_registry.py TestTool.test_need_confirm_default   3 0 0   100%
tests / test_registry.py TestTool.test_need_confirm_default.normal_tool   1 1 0   0%
tests / test_registry.py TestTool.test_need_confirm_nonexistent   1 0 0   100%
tests / test_registry.py TestSchema.setup_method   1 0 0   100%
tests / test_registry.py TestSchema.test_get_schemas   8 0 0   100%
tests / test_registry.py TestSchema.test_get_schemas.tool1   1 1 0   0%
tests / test_registry.py TestSchema.test_get_schemas.tool2   1 1 0   0%
tests / test_registry.py TestSchema.test_schema_structure   10 0 0   100%
tests / test_registry.py TestSchema.test_schema_structure.test_tool   1 1 0   0%
tests / test_registry.py TestSchema.test_schema_required_fields   6 0 0   100%
tests / test_registry.py TestSchema.test_schema_required_fields.test_tool   1 1 0   0%
tests / test_registry.py TestExecution.setup_method   1 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_success   4 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_success.test_tool   1 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_default_args   4 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_default_args.test_tool   1 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_invalid_json   5 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_invalid_json.test_tool   1 1 0   0%
tests / test_registry.py TestExecution.test_execute_tool_missing_required   4 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_missing_required.test_tool   1 1 0   0%
tests / test_registry.py TestExecution.test_execute_tool_wrong_type   4 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_wrong_type.test_tool   1 1 0   0%
tests / test_registry.py TestExecution.test_execute_nonexistent_tool   3 0 0   100%
tests / test_registry.py TestExecution.test_execute_no_args_tool   4 0 0   100%
tests / test_registry.py TestExecution.test_execute_no_args_tool.no_args_tool   1 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_exception   4 0 0   100%
tests / test_registry.py TestExecution.test_execute_tool_exception.error_tool   1 0 0   100%
tests / test_registry.py (no function)   30 0 0   100%
tests / test_security.py TestPermissionModel.test_agent_permission_defaults   3 0 0   100%
tests / test_security.py TestPermissionModel.test_agent_permission_full   2 0 0   100%
tests / test_security.py TestPermissionModel.test_permission_config_defaults   3 0 0   100%
tests / test_security.py TestSecurityManager.test_singleton_pattern   3 0 0   100%
tests / test_security.py TestSecurityManager.test_get_permission_default_agent   3 0 0   100%
tests / test_security.py TestSecurityManager.test_get_permission_unknown_agent   3 0 0   100%
tests / test_security.py TestPathSafety.test_check_path_in_workspace   2 0 0   100%
tests / test_security.py TestPathSafety.test_check_path_outside_workspace   4 0 0   100%
tests / test_security.py TestPathSafety.test_check_path_whitelist   3 0 0   100%
tests / test_security.py TestPathSafety.test_check_path_readonly_write_outside   5 0 0   100%
tests / test_security.py TestPathSafety.test_check_path_readonly_read   3 0 0   100%
tests / test_security.py TestPathSafety.test_check_protected_path   5 0 0   100%
tests / test_security.py TestShellSafety.test_dangerous_commands_patterns   5 0 0   100%
tests / test_security.py TestShellSafety.test_check_shell_safety_dangerous_command   4 0 0   100%
tests / test_security.py TestPermissionInheritance.test_get_effective_agent_id_no_parent   4 0 0   100%
tests / test_security.py TestPermissionInheritance.test_get_effective_agent_id_with_parent   5 0 0   100%
tests / test_security.py TestAccessCheck.test_check_access_full_permission   2 0 0   100%
tests / test_security.py TestAccessCheck.test_check_access_scoped_in_workspace   2 0 0   100%
tests / test_security.py TestAccessCheck.test_check_access_scoped_outside_workspace   3 0 0   100%
tests / test_security.py TestAccessCheck.test_check_access_no_path_arg   2 0 0   100%
tests / test_security.py (no function)   29 0 0   100%
tests / test_session.py TestSessionCreation.test_create_new_session   6 0 0   100%
tests / test_session.py TestSessionCreation.test_create_session_with_id   3 0 0   100%
tests / test_session.py TestSessionCreation.test_resume_last_session   6 0 0   100%
tests / test_session.py TestSessionCreation.test_no_resume_creates_new   5 0 0   100%
tests / test_session.py TestSessionMessages.test_add_message   8 0 0   100%
tests / test_session.py TestSessionMessages.test_message_persistence   7 0 0   100%
tests / test_session.py TestSessionMessages.test_clear_session   5 0 0   100%
tests / test_session.py TestTokenCounting.test_count_tokens_basic   3 0 0   100%
tests / test_session.py TestTokenCounting.test_count_tokens_multiple_messages   4 0 0   100%
tests / test_session.py TestTokenCounting.test_count_tokens_empty_messages   2 0 0   100%
tests / test_session.py TestSessionPlan.test_set_plan   7 0 0   100%
tests / test_session.py TestSessionPlan.test_complete_step   6 0 0   100%
tests / test_session.py TestSessionPlan.test_complete_step_partial   7 0 0   100%
tests / test_session.py TestSessionPlan.test_clear_plan   4 0 0   100%
tests / test_session.py TestSessionList.test_list_sessions   6 0 0   100%
tests / test_session.py TestSessionList.test_get_last_session_id   6 0 0   100%
tests / test_session.py TestSessionList.test_delete_session   5 0 0   100%
tests / test_session.py TestSessionList.test_delete_nonexistent_session   2 0 0   100%
tests / test_session.py (no function)   27 0 0   100%
tools / __init__.py (no function)   12 0 0   100%
tools / agent_tools.py _is_valid_name   2 2 0   0%
tools / agent_tools.py _remove_agent_permissions   13 13 0   0%
tools / agent_tools.py create_agent   22 22 0   0%
tools / agent_tools.py delete_agent   19 19 0   0%
tools / agent_tools.py (no function)   19 0 0   100%
tools / filesystem.py read_file   14 14 0   0%
tools / filesystem.py write_file   11 11 0   0%
tools / filesystem.py list_directory   19 19 0   0%
tools / filesystem.py (no function)   18 0 0   100%
tools / memory_tools.py write_memory   18 18 0   0%
tools / memory_tools.py read_memory   16 16 0   0%
tools / memory_tools.py (no function)   14 0 0   100%
tools / planning.py create_plan   6 6 0   0%
tools / planning.py complete_step   12 12 0   0%
tools / planning.py (no function)   17 0 0   100%
tools / registry.py register   2 0 0   100%
tools / registry.py register.decorator   4 0 0   100%
tools / registry.py need_confirm   1 0 0   100%
tools / registry.py _resolve_refs   15 0 0   100%
tools / registry.py _build_schema   11 0 0   100%
tools / registry.py get_schemas   3 0 0   100%
tools / registry.py execute   38 11 0   71%
tools / registry.py (no function)   12 0 0   100%
tools / review_memory.py _call_llm   5 5 0   0%
tools / review_memory.py review_memory   50 50 0   0%
tools / review_memory.py (no function)   10 0 0   100%
tools / shell.py run_shell   33 33 0   0%
tools / shell.py (no function)   10 0 0   100%
tools / skills.py get_skill_registry   10 10 0   0%
tools / skills.py use_skill   14 14 0   0%
tools / skills.py (no function)   12 0 0   100%
tools / spawn_agent.py set_console   1 1 0   0%
tools / spawn_agent.py get_task_pool   1 1 0   0%
tools / spawn_agent.py get_task_pool_lock   1 1 0   0%
tools / spawn_agent.py get_parent_agent_id   1 0 0   100%
tools / spawn_agent.py set_parent_agent   2 0 0   100%
tools / spawn_agent.py clear_parent_agent   2 0 0   100%
tools / spawn_agent.py spawn_agent   17 17 0   0%
tools / spawn_agent.py spawn_agent._run   18 18 0   0%
tools / spawn_agent.py (no function)   23 0 0   100%
tools / wait_agents.py wait_agents   34 34 0   0%
tools / wait_agents.py (no function)   8 0 0   100%
tools / web.py web_search   25 25 0   0%
tools / web.py web_fetch   19 19 0   0%
tools / web.py (no function)   14 0 0   100%
web_search / __init__.py (no function)   0 0 0   100%
web_search / provider_registry.py register_provider   1 0 0   100%
web_search / provider_registry.py list_providers   1 1 0   0%
web_search / provider_registry.py get_provider   1 1 0   0%
web_search / provider_registry.py (no function)   12 0 0   100%
web_search / providers / __init__.py (no function)   0 0 0   100%
web_search / providers / duckduckgo.py DuckDuckGoSearchProvider.id   1 0 0   100%
web_search / providers / duckduckgo.py DuckDuckGoSearchProvider.name   1 1 0   0%
web_search / providers / duckduckgo.py DuckDuckGoSearchProvider.is_available   1 1 0   0%
web_search / providers / duckduckgo.py DuckDuckGoSearchProvider.search   13 13 0   0%
web_search / providers / duckduckgo.py (no function)   13 0 0   100%
web_search / providers / google.py GoogleSearchProvider.id   1 0 0   100%
web_search / providers / google.py GoogleSearchProvider.name   1 1 0   0%
web_search / providers / google.py GoogleSearchProvider.is_available   1 1 0   0%
web_search / providers / google.py GoogleSearchProvider.search   17 17 0   0%
web_search / providers / google.py (no function)   16 0 0   100%
web_search / providers / tavily.py TavilySearchProvider.id   1 0 0   100%
web_search / providers / tavily.py TavilySearchProvider.name   1 1 0   0%
web_search / providers / tavily.py TavilySearchProvider.is_available   1 1 0   0%
web_search / providers / tavily.py TavilySearchProvider.search   22 22 0   0%
web_search / providers / tavily.py (no function)   15 0 0   100%
web_search / runtime.py resolve_web_search_provider_id   19 19 0   0%
web_search / runtime.py run_web_search   21 21 0   0%
web_search / runtime.py (no function)   12 0 0   100%
web_search / types.py WebSearchProvider.id   1 1 0   0%
web_search / types.py WebSearchProvider.name   1 1 0   0%
web_search / types.py WebSearchProvider.is_available   1 1 0   0%
web_search / types.py WebSearchProvider.search   1 1 0   0%
web_search / types.py (no function)   28 0 0   100%
workspace.py Workspace.__init__   11 11 0   0%
workspace.py Workspace.sub_agent   2 2 0   0%
workspace.py list_agents   3 3 0   0%
workspace.py (no function)   6 0 0   100%
Total     2740 1554 1   43%

No items found using the specified filter.