Repository Analysis

agentscope-ai/agentscope

Build and run agents you can see, understand and trust.

36.1 Strong AI signal View on GitHub
36.1
Adjusted Score
36.1
Raw Score
100%
Time Factor
2026-05-28
Last Push
25,865
Stars
Python
Language
101,866
Lines of Code
479
Files
1673
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 219MEDIUM 505LOW 949

Pattern Findings

1673 matches across 14 categories. Click a row to expand file-level details.

Decorative Section Separators471 hits · 1526 pts
SeverityFileLineSnippet
MEDIUMtests/model_ollama_test.py23# ---------------------------------------------------------------------------
MEDIUMtests/model_ollama_test.py25# ---------------------------------------------------------------------------
MEDIUMtests/model_ollama_test.py112# ---------------------------------------------------------------------------
MEDIUMtests/model_ollama_test.py114# ---------------------------------------------------------------------------
MEDIUMtests/model_ollama_test.py198# ---------------------------------------------------------------------------
MEDIUMtests/model_ollama_test.py200# ---------------------------------------------------------------------------
MEDIUMtests/model_ollama_test.py311# ---------------------------------------------------------------------------
MEDIUMtests/model_ollama_test.py313# ---------------------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py46 # ---------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py49 # ---------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py110 # ---------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py115 # ---------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py205 # ---------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py211 # ---------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py283 # -------------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py285 # -------------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py485 # -------------------------------------------------------------------
MEDIUMtests/formatter_openai_chat_test.py487 # -------------------------------------------------------------------
MEDIUMtests/formatter_ollama_test.py165 # ------------------------------------------------------------------
MEDIUMtests/formatter_ollama_test.py167 # ------------------------------------------------------------------
MEDIUMtests/formatter_ollama_test.py335 # ------------------------------------------------------------------
MEDIUMtests/formatter_ollama_test.py337 # ------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py247 # -------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py249 # -------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py334 # -------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py336 # -------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py30# ---------------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py32# ---------------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py105# ---------------------------------------------------------------------------
MEDIUMtests/formatter_xai_test.py107# ---------------------------------------------------------------------------
MEDIUMtests/workspace_docker_test.py62# ── docker daemon detection ────────────────────────────────────────
MEDIUMtests/workspace_docker_test.py89# ── helper tool for agent-integration test ────────────────────────
MEDIUMtests/workspace_docker_test.py136# ── offload tests ─────────────────────────────────────────────────
MEDIUMtests/workspace_docker_test.py454# ── skill tests ────────────────────────────────────────────────────
MEDIUMtests/workspace_docker_test.py653# ── lifecycle tests ───────────────────────────────────────────────
MEDIUMtests/formatter_deepseek_test.py181 # ------------------------------------------------------------------
MEDIUMtests/formatter_deepseek_test.py183 # ------------------------------------------------------------------
MEDIUMtests/formatter_deepseek_test.py256 # ------------------------------------------------------------------
MEDIUMtests/formatter_deepseek_test.py258 # ------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py25# ---------------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py27# ---------------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py105# ---------------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py107# ---------------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py199# ---------------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py201# ---------------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py415# ---------------------------------------------------------------------------
MEDIUMtests/model_anthropic_test.py417# ---------------------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py34 # ---------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py37 # ---------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py90 # ---------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py96 # ---------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py186 # ---------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py192 # ---------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py268 # -------------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py270 # -------------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py515 # -------------------------------------------------------------------
MEDIUMtests/formatter_anthropic_test.py517 # -------------------------------------------------------------------
MEDIUMtests/tracing_test.py207 # -----------------------------------------------------------------------
MEDIUMtests/tracing_test.py209 # -----------------------------------------------------------------------
MEDIUMtests/tracing_test.py334 # -----------------------------------------------------------------------
411 more matches not shown…
Cross-File Repetition157 hits · 785 pts
SeverityFileLineSnippet
HIGHtests/model_ollama_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_anthropic_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_gemini_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_dashscope_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_deepseek_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_openai_response_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_moonshot_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_openai_chat_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_xai_test.py0non-stream text response returns a single chatresponse.
HIGHtests/model_ollama_test.py0stream text yields deltas then final with full content.
HIGHtests/model_openai_response_test.py0stream text yields deltas then final with full content.
HIGHtests/model_xai_test.py0stream text yields deltas then final with full content.
HIGHtests/formatter_openai_chat_test.py0set up shared message fixtures and expected ground-truth dicts.
HIGHtests/formatter_anthropic_test.py0set up shared message fixtures and expected ground-truth dicts.
HIGHtests/formatter_gemini_test.py0set up shared message fixtures and expected ground-truth dicts.
HIGHtests/formatter_dashscope_test.py0set up shared message fixtures and expected ground-truth dicts.
HIGHtests/formatter_moonshot_test.py0set up shared message fixtures and expected ground-truth dicts.
HIGHtests/formatter_openai_response_test.py0set up shared message fixtures and expected ground-truth dicts.
HIGHtests/formatter_openai_chat_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_ollama_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_deepseek_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_anthropic_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_gemini_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_dashscope_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_moonshot_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_openai_response_test.py0chat formatter produces exact output for various subsets.
HIGHtests/formatter_openai_chat_test.py0url images in tool results are promoted to a follow-up user message.
HIGHtests/formatter_moonshot_test.py0url images in tool results are promoted to a follow-up user message.
HIGHtests/formatter_openai_response_test.py0url images in tool results are promoted to a follow-up user message.
HIGHtests/formatter_openai_chat_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_ollama_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_deepseek_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_anthropic_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_gemini_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_dashscope_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_moonshot_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_openai_response_test.py0multiagent formatter produces exact output for various subsets.
HIGHtests/formatter_openai_chat_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_ollama_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_xai_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_deepseek_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_anthropic_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_gemini_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_moonshot_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_openai_response_test.py0complex multi-step sequence with interleaved thinking, text, tool calls, and tool results.
HIGHtests/formatter_openai_chat_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_ollama_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_xai_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_deepseek_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_anthropic_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_gemini_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_dashscope_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_moonshot_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/formatter_openai_response_test.py0hintblock flushes preceding content and becomes a user message.
HIGHtests/model_anthropic_test.py0non-stream tool call response creates toolcallblocks.
HIGHtests/model_gemini_test.py0non-stream tool call response creates toolcallblocks.
HIGHtests/model_dashscope_test.py0non-stream tool call response creates toolcallblocks.
HIGHtests/model_deepseek_test.py0non-stream tool call response creates toolcallblocks.
HIGHtests/model_moonshot_test.py0non-stream tool call response creates toolcallblocks.
HIGHtests/model_openai_chat_test.py0non-stream tool call response creates toolcallblocks.
97 more matches not shown…
Hyper-Verbose Identifiers428 hits · 405 pts
SeverityFileLineSnippet
LOWtests/agui_protocol_test.py46 async def test_reply_start_to_run_started(self) -> None:
LOWtests/agui_protocol_test.py60 async def test_reply_end_to_run_finished(self) -> None:
LOWtests/agui_protocol_test.py72 async def test_exceed_max_iters_to_run_error(self) -> None:
LOWtests/agui_protocol_test.py95 async def test_model_call_start_to_step_started(self) -> None:
LOWtests/agui_protocol_test.py106 async def test_model_call_end_to_step_finished(self) -> None:
LOWtests/agui_protocol_test.py181 async def test_thinking_block_start(self) -> None:
LOWtests/agui_protocol_test.py193 async def test_thinking_block_delta(self) -> None:
LOWtests/agui_protocol_test.py277 async def test_tool_result_end_with_buffered_content(self) -> None:
LOWtests/agui_protocol_test.py307 async def test_tool_result_end_fallback_to_state(self) -> None:
LOWtests/agui_protocol_test.py320 async def test_tool_result_start_to_custom(self) -> None:
LOWtests/agui_protocol_test.py333 async def test_tool_result_text_delta_to_custom(self) -> None:
LOWtests/agui_protocol_test.py346 async def test_tool_result_data_delta_to_custom(self) -> None:
LOWtests/agui_protocol_test.py420 async def test_require_user_confirm(self) -> None:
LOWtests/agui_protocol_test.py438 async def test_require_external_execution(self) -> None:
LOWtests/agui_protocol_test.py475 async def test_external_execution_result(self) -> None:
LOWtests/agui_protocol_test.py503 def _assert_no_snake_case_keys(self, d: dict, context: str) -> None:
LOWtests/agui_protocol_test.py514 async def test_all_standard_events_produce_camel_case(self) -> None:
LOWtests/model_ollama_test.py233 async def test_stream_thinking_and_text(
LOWtests/model_ollama_test.py349 def test_tools_forwarded_no_choice(self) -> None:
LOWtests/builtin_bash_test.py99 async def test_command_substitution_blocked(self) -> None:
LOWtests/builtin_bash_test.py115 async def test_control_flow_blocked(self) -> None:
LOWtests/builtin_bash_test.py146 async def test_injection_check_before_readonly(self) -> None:
LOWtests/builtin_bash_test.py199 async def test_match_rule_prefix_pattern(self) -> None:
LOWtests/builtin_bash_test.py225 async def test_match_rule_wildcard_pattern(self) -> None:
LOWtests/builtin_bash_test.py243 async def test_match_rule_substring_pattern(self) -> None:
LOWtests/builtin_bash_test.py261 async def test_match_rule_escaped_characters(self) -> None:
LOWtests/builtin_bash_test.py279 async def test_generate_suggestions(self) -> None:
LOWtests/builtin_bash_test.py295 async def test_generate_suggestions_single_word(self) -> None:
LOWtests/builtin_bash_test.py340 async def test_rm_root_children_blocked(self) -> None:
LOWtests/builtin_bash_test.py402 async def test_rmdir_dangerous_paths_blocked(self) -> None:
LOWtests/builtin_bash_test.py419 async def test_safe_rm_commands_pass(self) -> None:
LOWtests/builtin_bash_test.py442 async def test_compound_commands_with_dangerous_removal(self) -> None:
LOWtests/formatter_openai_chat_test.py352 async def test_chat_formatter_thinking_dropped(self) -> None:
LOWtests/formatter_openai_chat_test.py380 async def test_chat_formatter_url_image_in_tool_result(
LOWtests/formatter_openai_chat_test.py489 async def test_multiagent_formatter(self) -> None:
LOWtests/formatter_openai_chat_test.py542 async def test_chat_formatter_complex_multi_step(self) -> None:
LOWtests/formatter_openai_chat_test.py692 async def test_chat_formatter_hint_block(self) -> None:
LOWtests/permission_engine_test.py760 async def test_git_commit_is_not_read_only(self) -> None:
LOWtests/permission_engine_test.py770 async def test_compound_command_with_dangerous_path(self) -> None:
LOWtests/permission_engine_test.py783 async def test_compound_command_all_read_only(self) -> None:
LOWtests/permission_engine_test.py794 async def test_compound_command_with_write_operation(self) -> None:
LOWtests/permission_engine_test.py805 async def test_output_redirection_to_dangerous_path(self) -> None:
LOWtests/permission_engine_test.py148 async def test_bypass_mode_with_deny_rule(self) -> None:
LOWtests/permission_engine_test.py172 async def test_bypass_mode_with_dangerous_path(self) -> None:
LOWtests/permission_engine_test.py202 async def test_accept_edits_mode_within_working_directory(self) -> None:
LOWtests/permission_engine_test.py241 async def test_accept_edits_mode_resolves_symlinked_working_directory(
LOWtests/permission_engine_test.py294 async def test_accept_edits_mode_outside_working_directory(self) -> None:
LOWtests/permission_engine_test.py316 async def test_explore_mode_read_operations(self) -> None:
LOWtests/permission_engine_test.py329 async def test_explore_mode_write_operations(self) -> None:
LOWtests/permission_engine_test.py355 async def test_bash_prefix_pattern_matching(self) -> None:
LOWtests/permission_engine_test.py394 async def test_bash_substring_pattern_matching(self) -> None:
LOWtests/permission_engine_test.py473 async def test_file_glob_pattern_matching(self) -> None:
LOWtests/permission_engine_test.py498 async def test_file_directory_pattern_matching(self) -> None:
LOWtests/permission_engine_test.py558 async def test_dangerous_file_blocks_write(self) -> None:
LOWtests/permission_engine_test.py570 async def test_dangerous_file_blocks_edit(self) -> None:
LOWtests/permission_engine_test.py583 async def test_dangerous_directory_blocks_write(self) -> None:
LOWtests/permission_engine_test.py596 async def test_dangerous_path_in_bash_command(self) -> None:
LOWtests/permission_engine_test.py608 async def test_dangerous_path_bypass_immune(self) -> None:
LOWtests/permission_engine_test.py623 async def test_dangerous_path_in_accept_edits_mode(self) -> None:
LOWtests/permission_engine_test.py646 async def test_safe_file_allows_write(self) -> None:
368 more matches not shown…
Unused Imports307 hits · 300 pts
SeverityFileLineSnippet
LOWsrc/agentscope/__init__.py5
LOWsrc/agentscope/__init__.py5
LOWsrc/agentscope/__init__.py9
LOWsrc/agentscope/middleware/_base.py6
LOWsrc/agentscope/middleware/_base.py7
LOWsrc/agentscope/middleware/__init__.py4
LOWsrc/agentscope/middleware/__init__.py5
LOWsrc/agentscope/middleware/_tracing/_extractor.py15
LOWsrc/agentscope/middleware/_tracing/_extractor.py22
LOWsrc/agentscope/middleware/_tracing/_extractor.py23
LOWsrc/agentscope/middleware/_tracing/_extractor.py23
LOWsrc/agentscope/middleware/_tracing/__init__.py4
LOWsrc/agentscope/middleware/_tracing/_trace.py46
LOWsrc/agentscope/middleware/_tracing/_trace.py47
LOWsrc/agentscope/middleware/_tracing/_trace.py48
LOWsrc/agentscope/credential/_base.py9
LOWsrc/agentscope/credential/_base.py9
LOWsrc/agentscope/credential/_ollama.py10
LOWsrc/agentscope/credential/_moonshot.py10
LOWsrc/agentscope/credential/_dashscope.py10
LOWsrc/agentscope/credential/__init__.py4
LOWsrc/agentscope/credential/__init__.py5
LOWsrc/agentscope/credential/__init__.py6
LOWsrc/agentscope/credential/__init__.py7
LOWsrc/agentscope/credential/__init__.py8
LOWsrc/agentscope/credential/__init__.py9
LOWsrc/agentscope/credential/__init__.py10
LOWsrc/agentscope/credential/__init__.py11
LOWsrc/agentscope/credential/__init__.py12
LOWsrc/agentscope/credential/__init__.py13
LOWsrc/agentscope/credential/_openai.py10
LOWsrc/agentscope/credential/_xai.py10
LOWsrc/agentscope/credential/_deepseek.py10
LOWsrc/agentscope/credential/_gemini.py10
LOWsrc/agentscope/credential/_anthropic.py10
LOWsrc/agentscope/types/__init__.py4
LOWsrc/agentscope/types/__init__.py4
LOWsrc/agentscope/types/__init__.py8
LOWsrc/agentscope/types/__init__.py9
LOWsrc/agentscope/types/__init__.py9
LOWsrc/agentscope/app/__init__.py6
LOWsrc/agentscope/app/__init__.py7
LOWsrc/agentscope/app/__init__.py7
LOWsrc/agentscope/app/__init__.py7
LOWsrc/agentscope/app/__init__.py12
LOWsrc/agentscope/app/__init__.py12
LOWsrc/agentscope/app/__init__.py12
LOWsrc/agentscope/app/__init__.py12
LOWsrc/agentscope/app/__init__.py12
LOWsrc/agentscope/app/__init__.py12
LOWsrc/agentscope/app/__init__.py20
LOWsrc/agentscope/app/__init__.py20
LOWsrc/agentscope/app/__init__.py20
LOWsrc/agentscope/app/__init__.py20
LOWsrc/agentscope/app/__init__.py20
LOWsrc/agentscope/app/__init__.py20
LOWsrc/agentscope/app/__init__.py20
LOWsrc/agentscope/app/_middleware/__init__.py4
LOWsrc/agentscope/app/_middleware/__init__.py4
LOWsrc/agentscope/app/_middleware/__init__.py5
247 more matches not shown…
Cross-Language Confusion43 hits · 256 pts
SeverityFileLineSnippet
HIGHtests/builtin_bash_test.py138 cmd = "(cd /tmp && ls)"
HIGHtests/builtin_bash_test.py446 "ls && rm -rf /",
HIGHtests/builtin_bash_test.py447 "cd /tmp && rm -rf /usr",
HIGHtests/permission_engine_test.py776 {"command": "ls -la && rm ~/.bashrc"},
HIGHtests/permission_engine_test.py788 {"command": "ls -la && cat file.txt"},
HIGHtests/permission_engine_test.py799 {"command": "ls -la && git commit -m 'test'"},
HIGHtests/mcp_streamable_http_client_test.py144 "meta": null,
HIGHtests/workspace_local_test.py1084 '"finished_at":"2026-01-01T00:00:00","usage":null}'
HIGHtests/workspace_local_test.py1127 '"finished_at":null,"usage":null}'
HIGHtests/workspace_local_test.py1135 '"finished_at":"2026-01-02T00:00:00","usage":null}'
HIGHtests/permission_bash_parser_test.py86 "npm install && npm run build && npm test",
HIGHtests/permission_bash_parser_test.py100 ("npm run build || echo failed", ["npm run"]),
HIGHtests/permission_bash_parser_test.py101 ("git commit || git status", ["git commit", "git status"]),
HIGHtests/permission_bash_parser_test.py296 "ls -la && cat file.txt",
HIGHtests/permission_bash_parser_test.py297 "git status && git log",
HIGHtests/permission_bash_parser_test.py298 "pwd && ls",
HIGHtests/permission_bash_parser_test.py299 "cat file1.txt || cat file2.txt",
HIGHtests/permission_bash_parser_test.py314 "ls -la && git commit -m 'message'",
HIGHtests/permission_bash_parser_test.py315 "cat file.txt && rm file.txt",
HIGHtests/permission_bash_parser_test.py316 "git status && git push",
HIGHtests/permission_bash_parser_test.py317 "pwd || mkdir new_dir",
HIGHtests/permission_bash_parser_test.py551 "rm file1.txt && rm file2.txt",
HIGHtests/permission_bash_parser_test.py555 "touch new.txt && chmod +x new.txt",
HIGHtests/permission_bash_parser_test.py559 "cp src.txt dest.txt || mv src.txt dest.txt",
HIGHtests/permission_bash_parser_test.py705 "echo 'a' > file1.txt && echo 'b' > file2.txt",
HIGHtests/permission_bash_parser_test.py709 "cat file.txt > backup.txt || cp file.txt backup.txt",
HIGHtests/permission_bash_parser_test.py1202 "ls -la && cat file.txt",
HIGHtests/permission_bash_parser_test.py1204 "npm install || echo failed",
HIGHtests/permission_bash_parser_test.py1216 ("ls && rm $(find . -name '*.tmp')", "command_substitution"),
HIGHtests/permission_bash_parser_test.py1219 "echo start && for f in *.txt; do cat $f; done",
HIGHtests/permission_bash_parser_test.py142 "npm install && npm run build | tee log.txt",
HIGHtests/permission_bash_parser_test.py169 "npm install && npm run build && npm test && "
HIGHtests/permission_bash_parser_test.py170 "npm run lint && npm run format && npm run deploy"
HIGHtests/permission_bash_parser_test.py189 "npm run build && npm run test && npm run lint",
HIGHtests/permission_bash_parser_test.py193 "git add . && git commit && git push && git status",
HIGHtests/permission_bash_parser_test.py1108 "(cd /tmp && ls)",
HIGHtests/permission_bash_parser_test.py82 """Test compound commands with && operator."""
HIGHtests/permission_bash_parser_test.py98 """Test compound commands with || operator."""
HIGHsrc/agentscope/workspace/_local_workspace.py111 uv venv && uv pip install ...
HIGHsrc/agentscope/workspace/_e2b/_e2b_workspace.py933 f"ls -A {shlex.quote(SANDBOX_SKILLS_DIR)} 2>/dev/null || true",
HIGHsrc/agentscope/workspace/_e2b/_e2b_workspace.py300 "pkill -f _mcp_gateway_app.py || true",
HIGHsrc/agentscope/workspace/_e2b/_e2b_workspace.py430 f"2>/dev/null || true",
HIGHsrc/agentscope/workspace/_docker/_docker_workspace.py432 f"2>/dev/null || true",
Docstring Block Structure19 hits · 95 pts
SeverityFileLineSnippet
HIGHsrc/agentscope/app/_deps.py21Return the caller's user ID from the ``X-User-ID`` request header. This is a placeholder dependency. Once an auth m
HIGHsrc/agentscope/app/_deps.py81Return the application-wide workspace manager. Args: request (`Request`): The incoming FastAPI request.
HIGHsrc/agentscope/app/_middleware/_protocol/_base.py126Deserialize event dictionary to AgentEvent object. Args: event_dict: Dictionary containing event da
HIGHsrc/agentscope/app/_router/_session.py68Return all sessions belonging to the authenticated user for a given agent. Args: agent_id (`str`): Agen
HIGHsrc/agentscope/app/_router/_session.py105Create (or resume) a session for a given agent and workspace. At most one session exists per ``(user_id, agent_id,
HIGHsrc/agentscope/app/_router/_session.py192Update the model configuration of an existing session. Args: session_id (`str`): The session to update.
HIGHsrc/agentscope/app/_router/_credential.py106Replace the payload of an existing credential. Args: credential_id (`str`): The credential to update.
HIGHsrc/agentscope/app/_router/_agent.py148Partially update an existing agent configuration. Only the fields present in the request body are updated; all othe
HIGHsrc/agentscope/app/_router/_schedule.py65Create a new schedule and register it with the scheduler. Args: body (`CreateScheduleRequest`): Schedule co
HIGHsrc/agentscope/app/_router/_schedule.py123Partially update a schedule. Fields omitted from the request body keep their current values. Changing ``cron_ex
HIGHsrc/agentscope/app/_router/_schedule.py209Return all sessions triggered by a given schedule. Args: schedule_id (`str`): ID of the schedule. u
HIGHsrc/agentscope/workspace/_gateway_client.py137Invoke the upstream tool by POSTing to ``/mcps/{mcp}/tools/{tool}`` on the gateway. Args: *
HIGHsrc/agentscope/workspace/_gateway_client.py388Look up a single tool by upstream name and wrap it. Falls back to :meth:`list_raw_tools` on cache miss, then
HIGHsrc/agentscope/workspace/_docker/_docker_workspace.py1124Fetch a file from the container as raw bytes. Uses ``get_archive`` (tarfile stream) and extracts the first
HIGHsrc/agentscope/agent/_agent.py816Check if the agent is waiting for the incoming event, if no, raise error. Args: event (`Use
HIGHsrc/agentscope/agent/_agent.py1130Execute the given tool calls concurrently and yield the events. All tool calls are executed concurrently. If on
HIGHsrc/agentscope/mcp/_mcp_client.py358Get a tool by name from the MCP server. The returned MCPTool object implements ToolProtocol and can be:
HIGHsrc/agentscope/tool/_builtin/_bash_parser.py426Extract command prefixes from a bash command. Automatically handles compound commands (&&, ||, ;, |) and extrac
HIGHsrc/agentscope/tool/_builtin/_bash_parser.py812Check if command contains structures that cannot be statically analyzed. This detects command substitut
Self-Referential Comments31 hits · 89 pts
SeverityFileLineSnippet
MEDIUMtests/skill_loader_test.py18 # Create a temporary directory for testing
MEDIUMtests/skill_loader_test.py79 # Create a directory without SKILL.md
MEDIUMtests/builtin_grep_test.py21 # Create a temporary directory with test files
MEDIUMtests/builtin_file_cache_test.py143 # Create a file
MEDIUMtests/builtin_file_cache_test.py186 # Create a file
MEDIUMtests/builtin_file_cache_test.py271 # Create a file
MEDIUMtests/builtin_file_cache_test.py21 # Create a temporary directory
MEDIUMtests/builtin_file_cache_test.py34 # Create a file
MEDIUMtests/builtin_file_cache_test.py52 # Create a file
MEDIUMtests/builtin_file_cache_test.py88 # Create a file
MEDIUMtests/builtin_file_cache_test.py116 # Create a file
MEDIUMtests/builtin_file_cache_test.py250 # Create a file
MEDIUMtests/builtin_edit_test.py21 # Create a temporary file for testing
MEDIUMtests/task_tool_test.py296 # Create a task
MEDIUMtests/task_tool_test.py368 # Create a task
MEDIUMtests/task_tool_test.py421 # Create a task
MEDIUMtests/task_tool_test.py474 # Create a task
MEDIUMtests/task_tool_test.py597 # Create a task
MEDIUMtests/task_tool_test.py650 # Create a task with initial metadata
MEDIUMtests/workspace_local_test.py192 # Create a test image data (1x1 red pixel PNG)
MEDIUMtests/workspace_local_test.py626 # Create a test skill
MEDIUMtests/workspace_local_test.py670 # Create a valid skill
MEDIUMtests/workspace_local_test.py676 # Create an invalid skill without SKILL.md
MEDIUMtests/workspace_local_test.py689 # Create an invalid skill with malformed frontmatter
MEDIUMtests/toolkit_skill_test.py49 # Create a minimal SKILL.md so LocalSkillLoader can load it
MEDIUMtests/builtin_read_test.py22 # Create a temporary file for testing
MEDIUMtests/builtin_glob_test.py21 # Create a temporary directory with test files
MEDIUMsrc/agentscope/app/_middleware/_protocol/_base.py70 # Create a new StreamingResponse with the converted stream
MEDIUMsrc/agentscope/agent/_agent.py1166 # Create a queue to collect events from all concurrent workers.
MEDIUMsrc/agentscope/formatter/_formatter_base.py112 # Create an identifier for such multimodal data for
MEDIUMsrc/agentscope/tool/_utils.py91 # Create a dynamic model with the function signature
Deep Nesting87 hits · 77 pts
SeverityFileLineSnippet
LOWtests/compress_tool_result_test.py275
LOWtests/compress_tool_result_test.py405
LOWtests/compress_tool_result_test.py290
LOWtests/compress_tool_result_test.py420
LOWscripts/model_examples/run_tests.py293
LOWscripts/model_examples/_utils.py9
LOWsrc/agentscope/middleware/_tracing/_extractor.py67
LOWsrc/agentscope/middleware/_tracing/_extractor.py370
LOWsrc/agentscope/middleware/_tracing/_extractor.py432
LOWsrc/agentscope/middleware/_tracing/_extractor.py521
LOWsrc/agentscope/middleware/_tracing/_converter.py63
LOWsrc/agentscope/middleware/_tracing/_trace.py136
LOWsrc/agentscope/middleware/_tracing/_trace.py299
LOWsrc/agentscope/middleware/_tracing/_utils.py15
LOWsrc/agentscope/skill/_local_loader.py99
LOWsrc/agentscope/workspace/_local_workspace.py475
LOWsrc/agentscope/workspace/_local_workspace.py530
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py568
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py610
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py621
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py678
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py728
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py1123
LOW…gentscope/embedding/_dashscope_multimodal_embedding.py90
LOWsrc/agentscope/agent/_agent.py256
LOWsrc/agentscope/agent/_agent.py496
LOWsrc/agentscope/agent/_agent.py812
LOWsrc/agentscope/agent/_agent.py903
LOWsrc/agentscope/agent/_agent.py1223
LOWsrc/agentscope/agent/_agent.py1931
LOWsrc/agentscope/agent/_agent.py2080
LOWsrc/agentscope/agent/_agent.py2146
LOWsrc/agentscope/agent/_agent.py2275
LOWsrc/agentscope/agent/_agent.py2376
LOWsrc/agentscope/state/_state.py37
LOWsrc/agentscope/formatter/_gemini_formatter.py63
LOWsrc/agentscope/formatter/_gemini_formatter.py130
LOWsrc/agentscope/formatter/_gemini_formatter.py339
LOWsrc/agentscope/formatter/_formatter_base.py70
LOWsrc/agentscope/formatter/_formatter_base.py176
LOWsrc/agentscope/formatter/_deepseek_formatter.py33
LOWsrc/agentscope/formatter/_moonshot_formatter.py24
LOWsrc/agentscope/formatter/_moonshot_formatter.py83
LOWsrc/agentscope/formatter/_moonshot_formatter.py354
LOWsrc/agentscope/formatter/_anthropic_formatter.py31
LOWsrc/agentscope/formatter/_anthropic_formatter.py246
LOWsrc/agentscope/formatter/_anthropic_formatter.py390
LOWsrc/agentscope/formatter/_openai_formatter.py86
LOWsrc/agentscope/formatter/_openai_formatter.py212
LOWsrc/agentscope/formatter/_openai_formatter.py429
LOWsrc/agentscope/formatter/_dashscope_formatter.py122
LOWsrc/agentscope/formatter/_dashscope_formatter.py150
LOWsrc/agentscope/formatter/_dashscope_formatter.py234
LOWsrc/agentscope/formatter/_dashscope_formatter.py475
LOWsrc/agentscope/formatter/_xai_formatter.py50
LOWsrc/agentscope/formatter/_xai_formatter.py267
LOWsrc/agentscope/formatter/_openai_response_formatter.py106
LOWsrc/agentscope/formatter/_openai_response_formatter.py400
LOWsrc/agentscope/formatter/_ollama_formatter.py71
LOWsrc/agentscope/formatter/_ollama_formatter.py116
27 more matches not shown…
Excessive Try-Catch Wrapping76 hits · 68 pts
SeverityFileLineSnippet
LOWscripts/model_examples/run_tests.py87 except Exception:
LOWsrc/agentscope/_utils/_common.py68 except Exception:
LOWsrc/agentscope/_utils/_common.py174 except Exception as e:
LOWsrc/agentscope/middleware/_tracing/_extractor.py164 except Exception:
LOWsrc/agentscope/middleware/_tracing/_extractor.py297 except Exception:
LOWsrc/agentscope/middleware/_tracing/_extractor.py407 except Exception:
LOWsrc/agentscope/middleware/_tracing/_extractor.py428 except Exception:
LOW…agentscope/app/_middleware/_tool_offload_middleware.py235 except Exception as exc: # pylint: disable=broad-except
LOWsrc/agentscope/app/_router/_workspace.py102 except Exception:
LOW…c/agentscope/app/_manager/_docker_workspace_manager.py342 except Exception:
LOW…c/agentscope/app/_manager/_docker_workspace_manager.py367 except Exception:
LOWsrc/agentscope/app/_manager/_background_task_manager.py280 except Exception: # pylint: disable=broad-except
LOWsrc/agentscope/app/_manager/_workspace_manager.py246 except Exception:
LOWsrc/agentscope/app/_manager/_e2b_workspace_manager.py358 except Exception:
LOWsrc/agentscope/app/_manager/_e2b_workspace_manager.py383 except Exception:
LOW…entscope/app/_manager/_scheduler/_scheduler_manager.py264 except Exception:
LOWsrc/agentscope/skill/_local_loader.py91 except Exception as e:
LOWsrc/agentscope/skill/_local_loader.py165 except Exception as e:
LOWsrc/agentscope/workspace/_local_workspace.py270 except Exception as e:
LOWsrc/agentscope/workspace/_local_workspace.py327 except Exception as e:
LOWsrc/agentscope/workspace/_local_workspace.py346 except Exception as e:
LOWsrc/agentscope/workspace/_local_workspace.py398 except Exception as e:
LOWsrc/agentscope/workspace/_local_workspace.py616 except Exception as e:
LOWsrc/agentscope/workspace/_local_workspace.py841 except Exception as e:
LOWsrc/agentscope/workspace/_local_workspace.py865 except Exception as e:
LOWsrc/agentscope/workspace/_gateway_client.py336 except Exception:
LOWsrc/agentscope/workspace/_gateway_client.py519 except Exception:
LOWsrc/agentscope/workspace/_gateway_client.py630 except Exception:
LOWsrc/agentscope/workspace/_utils.py118 except Exception as e: # noqa: BLE001
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py379 except Exception:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py387 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py940 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py343 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py458 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py496 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py711 except Exception as e: # noqa: BLE001
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py746 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py848 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py873 except Exception as e:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py916 except Exception:
LOWsrc/agentscope/workspace/_e2b/_e2b_workspace.py983 except Exception as e: # noqa: BLE001
LOW…/agentscope/workspace/_mcp_gateway/_mcp_gateway_app.py123 except Exception as e: # noqa: BLE001
LOW…/agentscope/workspace/_mcp_gateway/_mcp_gateway_app.py168 except Exception as e: # noqa: BLE001
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py365 except Exception:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py369 except Exception:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py373 except Exception:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py380 except Exception:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py308 except Exception as e:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py344 except Exception:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py460 except Exception as e:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py521 except Exception as e:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py754 except Exception:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py905 except Exception as e:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py933 except Exception as e:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py1009 except Exception:
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py1041 except Exception as e:
LOWsrc/agentscope/agent/_agent.py385 except Exception as e:
LOWsrc/agentscope/agent/_agent.py2024 except Exception as e:
LOWsrc/agentscope/mcp/_mcp_client.py241 except Exception:
LOWsrc/agentscope/mcp/_mcp_client.py272 except Exception as e:
16 more matches not shown…
Redundant / Tautological Comments37 hits · 55 pts
SeverityFileLineSnippet
LOWtests/builtin_file_cache_test.py147 # Read the file to cache it
LOWtests/builtin_file_cache_test.py190 # Read the file to cache it
LOWtests/builtin_file_cache_test.py275 # Read the file
LOWtests/builtin_file_cache_test.py92 # Read the file first
LOWtests/builtin_file_cache_test.py120 # Read the file first
LOWtests/builtin_edit_test.py86 # Write file with duplicate content
LOWtests/builtin_edit_test.py101 # Write file with duplicate content
LOWsrc/agentscope/app/_middleware/_protocol/_base.py64 # Check if the response is a streaming response
LOWsrc/agentscope/skill/_local_loader.py44 # Check if SKILL.md exists
LOWsrc/agentscope/skill/_local_loader.py111 # Check if directory exists
LOWsrc/agentscope/workspace/_local_workspace.py367 # Check if SKILL.md exists
LOWsrc/agentscope/agent/_agent.py1263 # Check if the tool is available
LOWsrc/agentscope/agent/_agent.py736 # Check if res is an async generator (streaming response)
LOWsrc/agentscope/agent/_agent.py1702 # Check if the reserved part has tool results that don't have the
LOWsrc/agentscope/state/_state.py50 # Check if cache is still valid
LOWsrc/agentscope/formatter/_gemini_formatter.py49 # Check if media type is supported
LOWsrc/agentscope/formatter/_anthropic_formatter.py224 # Check if media type is supported
LOWsrc/agentscope/formatter/_ollama_formatter.py49 # Check if media type is supported
LOWsrc/agentscope/tool/_base.py181 # Check if filename matches dangerous files (case-insensitive)
LOWsrc/agentscope/tool/_base.py188 # Check if any path segment matches dangerous directories
LOWsrc/agentscope/tool/_types.py131 # Check if the two definitions are from the same BaseModel
LOWsrc/agentscope/tool/_response.py130 # Check if the last block is also a TextBlock
LOWsrc/agentscope/tool/_builtin/_read.py216 # Read file content with aiofiles
LOWsrc/agentscope/tool/_builtin/_write.py175 # Check if file path is in any working directory
LOWsrc/agentscope/tool/_builtin/_write.py181 # Check if file_path is inside working_dir
LOWsrc/agentscope/tool/_builtin/_write.py279 # Check if file exists, it must be read first if it exists
LOWsrc/agentscope/tool/_builtin/_bash_parser.py561 # Check if environment variables are safe
LOWsrc/agentscope/tool/_builtin/_bash_parser.py565 # Check if the command is a safe command that doesn't need permission
LOWsrc/agentscope/tool/_builtin/_bash_parser.py167 # Check if it's a compound command
LOWsrc/agentscope/tool/_builtin/_bash_parser.py202 # Check if it starts with a read-only prefix
LOWsrc/agentscope/tool/_builtin/_bash_parser.py218 # Check if base command is in safe commands
LOWsrc/agentscope/tool/_builtin/_bash_parser.py293 # Check if this is a file-manipulating command
LOWsrc/agentscope/tool/_builtin/_bash_parser.py859 # Check if this node is a dangerous type
LOWsrc/agentscope/tool/_builtin/_edit.py197 # Check if file path is in any working directory
LOWsrc/agentscope/tool/_builtin/_edit.py203 # Check if file_path is inside working_dir
LOWsrc/agentscope/tool/_builtin/_bash.py334 # Check if pattern is a prefix pattern (ends with :*)
LOWsrc/agentscope/tool/_builtin/_bash.py339 # Check if pattern has unescaped wildcards
Verbosity Indicators9 hits · 10 pts
SeverityFileLineSnippet
LOWsrc/agentscope/agent/_agent.py519 # Step 1: Checking agent input:
LOWsrc/agentscope/agent/_agent.py526 # Step 2: Handling agent event if applicable
LOWsrc/agentscope/agent/_agent.py546 # Step 3: Enter the reasoning-acting loop until reaching max_iters or
LOWsrc/agentscope/agent/_agent.py627 # Step 4: Handling the max iteration executed
LOWsrc/agentscope/agent/_agent.py1258 # Step 1: Check and parse the tool call input:
LOWsrc/agentscope/agent/_agent.py1300 # Step 2: Check permission by toolkit and permission engine
LOWsrc/agentscope/agent/_agent.py1315 # Step 3: Handle the permission and execute the tool call if allowed
LOWsrc/agentscope/agent/_agent.py1378 # Step 4: Delegate raw execution to _acting (middleware hook point)
LOWsrc/agentscope/agent/_agent.py1393 # Step 5: Truncate the tool result if exceed
Dead Code3 hits · 6 pts
SeverityFileLineSnippet
MEDIUMsrc/agentscope/middleware/_base.py87
MEDIUMsrc/agentscope/middleware/_base.py110
MEDIUMsrc/agentscope/middleware/_base.py156
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippet
LOWexamples/web_ui/frontend/src/vite-env.d.ts1/// <reference types="vite/client" />
LOWsrc/agentscope/workspace/_docker/_docker_workspace.py1081 stderr: list[bytes] = []
LOWsrc/agentscope/tool/_constants.py61 "fdisk",
LOWsrc/agentscope/tool/_constants.py101#
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippet
LOWtests/workspace_local_test.py510 {"helper.py": "def helper():\n return 42\n"},