deepcode-hku 1.1.0__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deepcode_hku-1.1.0/deepcode_hku.egg-info → deepcode_hku-1.3.0}/PKG-INFO +273 -238
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/README.md +263 -234
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/__init__.py +3 -3
- deepcode_hku-1.3.0/cli/__init__.py +15 -0
- deepcode_hku-1.3.0/cli/config_errors.py +30 -0
- deepcode_hku-1.3.0/cli/exec_cli.py +113 -0
- deepcode_hku-1.3.0/cli/init_config.py +154 -0
- deepcode_hku-1.3.0/cli/loop_cli.py +112 -0
- deepcode_hku-1.3.0/cli/mcp_server.py +178 -0
- deepcode_hku-1.3.0/cli/schedule_cli.py +132 -0
- deepcode_hku-1.3.0/cli/tui/__init__.py +1 -0
- deepcode_hku-1.3.0/cli/tui/__main__.py +6 -0
- deepcode_hku-1.3.0/cli/tui/app.py +228 -0
- deepcode_hku-1.3.0/cli/tui/commands.py +120 -0
- deepcode_hku-1.3.0/cli/tui/input.py +128 -0
- deepcode_hku-1.3.0/cli/tui/renderer.py +113 -0
- deepcode_hku-1.3.0/cli/tui/session_bridge.py +131 -0
- deepcode_hku-1.3.0/cli/tui/theme.py +41 -0
- deepcode_hku-1.3.0/core/__init__.py +6 -0
- deepcode_hku-1.3.0/core/agent_runtime/__init__.py +37 -0
- deepcode_hku-1.3.0/core/agent_runtime/helpers.py +317 -0
- deepcode_hku-1.3.0/core/agent_runtime/hook.py +106 -0
- deepcode_hku-1.3.0/core/agent_runtime/runner.py +1463 -0
- deepcode_hku-1.3.0/core/agent_runtime/runtime.py +92 -0
- deepcode_hku-1.3.0/core/agent_runtime/tools/__init__.py +21 -0
- deepcode_hku-1.3.0/core/agent_runtime/tools/alias.py +96 -0
- deepcode_hku-1.3.0/core/agent_runtime/tools/base.py +253 -0
- deepcode_hku-1.3.0/core/agent_runtime/tools/mcp.py +677 -0
- deepcode_hku-1.3.0/core/agent_runtime/tools/registry.py +206 -0
- deepcode_hku-1.3.0/core/agent_setup.py +199 -0
- deepcode_hku-1.3.0/core/compat/__init__.py +54 -0
- deepcode_hku-1.3.0/core/compat/agent.py +612 -0
- deepcode_hku-1.3.0/core/compat/mcp_app.py +75 -0
- deepcode_hku-1.3.0/core/compat/parallel.py +90 -0
- deepcode_hku-1.3.0/core/compat/request_params.py +149 -0
- deepcode_hku-1.3.0/core/compat/runtime.py +130 -0
- deepcode_hku-1.3.0/core/config.py +717 -0
- deepcode_hku-1.3.0/core/events/__init__.py +97 -0
- deepcode_hku-1.3.0/core/events/llm_events.py +152 -0
- deepcode_hku-1.3.0/core/events/parts.py +179 -0
- deepcode_hku-1.3.0/core/events/protocol.py +184 -0
- deepcode_hku-1.3.0/core/events/session.py +371 -0
- deepcode_hku-1.3.0/core/harness/__init__.py +39 -0
- deepcode_hku-1.3.0/core/harness/agents/__init__.py +10 -0
- deepcode_hku-1.3.0/core/harness/agents/control.py +361 -0
- deepcode_hku-1.3.0/core/harness/approval.py +122 -0
- deepcode_hku-1.3.0/core/harness/code_mode/__init__.py +12 -0
- deepcode_hku-1.3.0/core/harness/code_mode/_runner.py +114 -0
- deepcode_hku-1.3.0/core/harness/code_mode/tool.py +233 -0
- deepcode_hku-1.3.0/core/harness/collaboration.py +43 -0
- deepcode_hku-1.3.0/core/harness/hooks/__init__.py +33 -0
- deepcode_hku-1.3.0/core/harness/hooks/discovery.py +175 -0
- deepcode_hku-1.3.0/core/harness/hooks/engine.py +341 -0
- deepcode_hku-1.3.0/core/harness/hooks/events.py +95 -0
- deepcode_hku-1.3.0/core/harness/hooks/execution.py +337 -0
- deepcode_hku-1.3.0/core/harness/memory.py +238 -0
- deepcode_hku-1.3.0/core/harness/permissions.py +336 -0
- deepcode_hku-1.3.0/core/harness/policy.py +54 -0
- deepcode_hku-1.3.0/core/harness/sandbox.py +381 -0
- deepcode_hku-1.3.0/core/harness/skills.py +254 -0
- deepcode_hku-1.3.0/core/harness/snapshot.py +145 -0
- deepcode_hku-1.3.0/core/harness/tools/__init__.py +110 -0
- deepcode_hku-1.3.0/core/harness/tools/diagnostics.py +207 -0
- deepcode_hku-1.3.0/core/harness/tools/files.py +250 -0
- deepcode_hku-1.3.0/core/harness/tools/patch.py +355 -0
- deepcode_hku-1.3.0/core/harness/tools/plan.py +116 -0
- deepcode_hku-1.3.0/core/harness/tools/replace.py +384 -0
- deepcode_hku-1.3.0/core/harness/tools/search.py +210 -0
- deepcode_hku-1.3.0/core/harness/tools/shell.py +121 -0
- deepcode_hku-1.3.0/core/harness/tools/spawn_agent.py +268 -0
- deepcode_hku-1.3.0/core/harness/tools/user_input.py +108 -0
- deepcode_hku-1.3.0/core/llm_runtime.py +97 -0
- deepcode_hku-1.3.0/core/loop/__init__.py +29 -0
- deepcode_hku-1.3.0/core/loop/autodream.py +76 -0
- deepcode_hku-1.3.0/core/loop/backpressure.py +120 -0
- deepcode_hku-1.3.0/core/loop/policy.py +70 -0
- deepcode_hku-1.3.0/core/loop/state.py +103 -0
- deepcode_hku-1.3.0/core/loop/task.py +244 -0
- deepcode_hku-1.3.0/core/observability/__init__.py +65 -0
- deepcode_hku-1.3.0/core/observability/bus.py +399 -0
- deepcode_hku-1.3.0/core/observability/context.py +86 -0
- deepcode_hku-1.3.0/core/observability/records.py +187 -0
- deepcode_hku-1.3.0/core/platform_compat.py +114 -0
- deepcode_hku-1.3.0/core/providers/__init__.py +34 -0
- deepcode_hku-1.3.0/core/providers/anthropic.py +692 -0
- deepcode_hku-1.3.0/core/providers/base.py +786 -0
- deepcode_hku-1.3.0/core/providers/catalog.py +236 -0
- deepcode_hku-1.3.0/core/providers/model_compat.py +187 -0
- deepcode_hku-1.3.0/core/providers/openai_compat.py +1244 -0
- deepcode_hku-1.3.0/core/providers/openai_responses/__init__.py +29 -0
- deepcode_hku-1.3.0/core/providers/openai_responses/converters.py +132 -0
- deepcode_hku-1.3.0/core/providers/openai_responses/parsing.py +319 -0
- deepcode_hku-1.3.0/core/providers/registry.py +201 -0
- deepcode_hku-1.3.0/core/schedule/__init__.py +18 -0
- deepcode_hku-1.3.0/core/schedule/keepalive.py +37 -0
- deepcode_hku-1.3.0/core/schedule/scheduler.py +66 -0
- deepcode_hku-1.3.0/core/sessions/__init__.py +44 -0
- deepcode_hku-1.3.0/core/sessions/index.py +243 -0
- deepcode_hku-1.3.0/core/sessions/models.py +242 -0
- deepcode_hku-1.3.0/core/sessions/store.py +680 -0
- deepcode_hku-1.3.0/core/team/__init__.py +13 -0
- deepcode_hku-1.3.0/core/team/worktree.py +250 -0
- deepcode_hku-1.3.0/deepcode.py +640 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0/deepcode_hku.egg-info}/PKG-INFO +273 -238
- deepcode_hku-1.3.0/deepcode_hku.egg-info/SOURCES.txt +197 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/deepcode_hku.egg-info/requires.txt +9 -3
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/deepcode_hku.egg-info/top_level.txt +2 -1
- deepcode_hku-1.3.0/eval/__init__.py +1 -0
- deepcode_hku-1.3.0/eval/swebench/__init__.py +28 -0
- deepcode_hku-1.3.0/eval/swebench/dataset.py +82 -0
- deepcode_hku-1.3.0/eval/swebench/evaluate.py +104 -0
- deepcode_hku-1.3.0/eval/swebench/instance.py +210 -0
- deepcode_hku-1.3.0/eval/swebench/predict.py +152 -0
- deepcode_hku-1.3.0/eval/swebench/report.py +59 -0
- deepcode_hku-1.3.0/eval/swebench/run.py +123 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/prompts/code_prompts.py +0 -108
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/requirements.txt +11 -3
- deepcode_hku-1.3.0/tests/test_agent_chat_service.py +222 -0
- deepcode_hku-1.3.0/tests/test_agent_fs.py +61 -0
- deepcode_hku-1.3.0/tests/test_agent_runner_kernel.py +279 -0
- deepcode_hku-1.3.0/tests/test_agent_session.py +189 -0
- deepcode_hku-1.3.0/tests/test_apply_patch.py +173 -0
- deepcode_hku-1.3.0/tests/test_autodream.py +66 -0
- deepcode_hku-1.3.0/tests/test_catalog.py +85 -0
- deepcode_hku-1.3.0/tests/test_code_mode.py +176 -0
- deepcode_hku-1.3.0/tests/test_collaboration.py +33 -0
- deepcode_hku-1.3.0/tests/test_config_errors.py +59 -0
- deepcode_hku-1.3.0/tests/test_config_layering.py +149 -0
- deepcode_hku-1.3.0/tests/test_diagnostics.py +136 -0
- deepcode_hku-1.3.0/tests/test_exec_cli.py +106 -0
- deepcode_hku-1.3.0/tests/test_exec_sandbox_wiring.py +142 -0
- deepcode_hku-1.3.0/tests/test_fuzzy_replace.py +141 -0
- deepcode_hku-1.3.0/tests/test_harness_approval.py +80 -0
- deepcode_hku-1.3.0/tests/test_harness_permissions.py +144 -0
- deepcode_hku-1.3.0/tests/test_harness_policy.py +85 -0
- deepcode_hku-1.3.0/tests/test_harness_sandbox.py +124 -0
- deepcode_hku-1.3.0/tests/test_hooks.py +893 -0
- deepcode_hku-1.3.0/tests/test_init_config.py +115 -0
- deepcode_hku-1.3.0/tests/test_llm_events.py +85 -0
- deepcode_hku-1.3.0/tests/test_loop.py +261 -0
- deepcode_hku-1.3.0/tests/test_loop_cli.py +99 -0
- deepcode_hku-1.3.0/tests/test_mcp_server.py +131 -0
- deepcode_hku-1.3.0/tests/test_memory.py +153 -0
- deepcode_hku-1.3.0/tests/test_model_compat.py +120 -0
- deepcode_hku-1.3.0/tests/test_native_file_tools.py +121 -0
- deepcode_hku-1.3.0/tests/test_parts.py +152 -0
- deepcode_hku-1.3.0/tests/test_plan_tool.py +87 -0
- deepcode_hku-1.3.0/tests/test_schedule.py +103 -0
- deepcode_hku-1.3.0/tests/test_session_compaction.py +212 -0
- deepcode_hku-1.3.0/tests/test_session_index.py +142 -0
- deepcode_hku-1.3.0/tests/test_shell_search_tools.py +129 -0
- deepcode_hku-1.3.0/tests/test_skills.py +181 -0
- deepcode_hku-1.3.0/tests/test_snapshot.py +84 -0
- deepcode_hku-1.3.0/tests/test_spawn_agent.py +350 -0
- deepcode_hku-1.3.0/tests/test_swebench_harness.py +184 -0
- deepcode_hku-1.3.0/tests/test_team_worktree.py +121 -0
- deepcode_hku-1.3.0/tests/test_tui.py +230 -0
- deepcode_hku-1.3.0/tests/test_unified_impl_workflow.py +330 -0
- deepcode_hku-1.3.0/tests/test_user_input_tool.py +80 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/code_implementation_server.py +55 -30
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/code_indexer.py +38 -137
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/code_reference_indexer.py +4 -0
- deepcode_hku-1.3.0/tools/command_executor.py +475 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/document_segmentation_server.py +39 -14
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/git_command.py +14 -1
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/pdf_converter.py +156 -46
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/pdf_downloader.py +16 -16
- deepcode_hku-1.3.0/utils/__init__.py +13 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/utils/file_processor.py +26 -11
- deepcode_hku-1.3.0/utils/llm_utils.py +173 -0
- deepcode_hku-1.3.0/utils/loop_detector.py +253 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/__init__.py +2 -4
- deepcode_hku-1.3.0/workflows/agent_orchestration_engine.py +2308 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/agents/document_segmentation_agent.py +11 -6
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/agents/memory_agent_concise.py +124 -74
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/agents/requirement_analysis_agent.py +6 -9
- deepcode_hku-1.3.0/workflows/code_implementation_workflow.py +1062 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/codebase_index_workflow.py +0 -6
- deepcode_hku-1.3.0/workflows/environment.py +434 -0
- deepcode_hku-1.3.0/workflows/plan_review_runtime.py +569 -0
- deepcode_hku-1.3.0/workflows/planning_runtime.py +263 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/plugins/integration.py +8 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/plugins/plan_review.py +47 -13
- deepcode_hku-1.3.0/workflows/workflow_context.py +168 -0
- deepcode_hku-1.1.0/cli/__init__.py +0 -18
- deepcode_hku-1.1.0/cli/cli_app.py +0 -500
- deepcode_hku-1.1.0/cli/cli_interface.py +0 -1053
- deepcode_hku-1.1.0/cli/cli_launcher.py +0 -155
- deepcode_hku-1.1.0/cli/main_cli.py +0 -337
- deepcode_hku-1.1.0/cli/workflows/__init__.py +0 -11
- deepcode_hku-1.1.0/cli/workflows/cli_workflow_adapter.py +0 -457
- deepcode_hku-1.1.0/deepcode.py +0 -755
- deepcode_hku-1.1.0/deepcode_hku.egg-info/SOURCES.txt +0 -68
- deepcode_hku-1.1.0/mcp_agent.config.yaml +0 -134
- deepcode_hku-1.1.0/mcp_agent.secrets.yaml +0 -14
- deepcode_hku-1.1.0/tools/bocha_search_server.py +0 -219
- deepcode_hku-1.1.0/tools/command_executor.py +0 -324
- deepcode_hku-1.1.0/ui/__init__.py +0 -43
- deepcode_hku-1.1.0/ui/app.py +0 -13
- deepcode_hku-1.1.0/ui/components.py +0 -970
- deepcode_hku-1.1.0/ui/handlers.py +0 -1189
- deepcode_hku-1.1.0/ui/layout.py +0 -142
- deepcode_hku-1.1.0/ui/sidebar_feed.py +0 -91
- deepcode_hku-1.1.0/ui/streamlit_app.py +0 -38
- deepcode_hku-1.1.0/ui/styles.py +0 -356
- deepcode_hku-1.1.0/utils/__init__.py +0 -17
- deepcode_hku-1.1.0/utils/cli_interface.py +0 -459
- deepcode_hku-1.1.0/utils/cross_platform_file_handler.py +0 -475
- deepcode_hku-1.1.0/utils/dialogue_logger.py +0 -671
- deepcode_hku-1.1.0/utils/llm_utils.py +0 -437
- deepcode_hku-1.1.0/utils/simple_llm_logger.py +0 -198
- deepcode_hku-1.1.0/workflows/agent_orchestration_engine.py +0 -2028
- deepcode_hku-1.1.0/workflows/agents/memory_agent_concise_index.py +0 -2157
- deepcode_hku-1.1.0/workflows/agents/memory_agent_concise_multi.py +0 -1708
- deepcode_hku-1.1.0/workflows/code_implementation_workflow.py +0 -1500
- deepcode_hku-1.1.0/workflows/code_implementation_workflow_index.py +0 -1522
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/.pre-commit-config.yaml +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/LICENSE +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/MANIFEST.in +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/deepcode_hku.egg-info/dependency_links.txt +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/deepcode_hku.egg-info/entry_points.txt +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/schema/mcp-agent.config.schema.json +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/setup.cfg +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/setup.py +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/__init__.py +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/tools/pdf_utils.py +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/agents/__init__.py +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/agents/code_implementation_agent.py +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/plugins/__init__.py +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/plugins/base.py +0 -0
- {deepcode_hku-1.1.0 → deepcode_hku-1.3.0}/workflows/plugins/requirement_analysis.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepcode-hku
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: AI Research Engine - Transform research papers into working code automatically
|
|
5
5
|
Home-page: https://github.com/HKUDS/DeepCode
|
|
6
6
|
Author: DeepCodeTeam
|
|
@@ -21,21 +21,27 @@ Description-Content-Type: text/markdown
|
|
|
21
21
|
License-File: LICENSE
|
|
22
22
|
Requires-Dist: aiofiles>=0.8.0
|
|
23
23
|
Requires-Dist: aiohttp>=3.8.0
|
|
24
|
-
Requires-Dist: anthropic
|
|
24
|
+
Requires-Dist: anthropic>=0.40.0
|
|
25
25
|
Requires-Dist: asyncio-mqtt
|
|
26
26
|
Requires-Dist: docling
|
|
27
27
|
Requires-Dist: fastapi>=0.104.0
|
|
28
28
|
Requires-Dist: google-genai
|
|
29
|
-
Requires-Dist:
|
|
29
|
+
Requires-Dist: httpx>=0.27.0
|
|
30
|
+
Requires-Dist: json-repair>=0.30.0
|
|
31
|
+
Requires-Dist: loguru>=0.7.0
|
|
32
|
+
Requires-Dist: mcp>=1.0.0
|
|
30
33
|
Requires-Dist: mcp-server-git
|
|
31
34
|
Requires-Dist: nest_asyncio
|
|
32
|
-
Requires-Dist: openai
|
|
35
|
+
Requires-Dist: openai>=1.55.0
|
|
36
|
+
Requires-Dist: openapi
|
|
33
37
|
Requires-Dist: pathlib2
|
|
38
|
+
Requires-Dist: prompt_toolkit>=3.0.0
|
|
34
39
|
Requires-Dist: pydantic-settings>=2.0.0
|
|
35
40
|
Requires-Dist: PyPDF2>=2.0.0
|
|
36
41
|
Requires-Dist: python-multipart>=0.0.6
|
|
37
42
|
Requires-Dist: PyYAML>=6.0
|
|
38
43
|
Requires-Dist: reportlab>=3.5.0
|
|
44
|
+
Requires-Dist: rich>=13.0.0
|
|
39
45
|
Requires-Dist: streamlit
|
|
40
46
|
Requires-Dist: uvicorn>=0.24.0
|
|
41
47
|
Requires-Dist: websockets>=12.0
|
|
@@ -92,8 +98,8 @@ Dynamic: summary
|
|
|
92
98
|
<!-- <a href="https://pypi.org/project/deepcode-hku/"><img src="https://img.shields.io/pypi/v/deepcode-hku.svg?style=for-the-badge&logo=pypi&logoColor=white&labelColor=1a1a2e&color=ff6b6b"></a> -->
|
|
93
99
|
</p>
|
|
94
100
|
<p>
|
|
95
|
-
<a href="https://
|
|
96
|
-
<a href="https://github.com/HKUDS/
|
|
101
|
+
<a href="https://github.com/HKUDS/.github/blob/main/profile/README.md"><img src="https://img.shields.io/badge/Feishu-Group-E9DBFC?style=flat&logo=feishu&logoColor=white" alt="Feishu"></a>
|
|
102
|
+
<a href="https://github.com/HKUDS/.github/blob/main/profile/README.md"><img src="https://img.shields.io/badge/WeChat-Group-C5EAB4?style=flat&logo=wechat&logoColor=white" alt="WeChat"></a>
|
|
97
103
|
</p>
|
|
98
104
|
<div align="center">
|
|
99
105
|
<div style="width: 100%; height: 2px; margin: 20px 0; background: linear-gradient(90deg, transparent, #00d9ff, transparent);"></div>
|
|
@@ -210,7 +216,96 @@ Dynamic: summary
|
|
|
210
216
|
|
|
211
217
|
## 📰 News
|
|
212
218
|
|
|
213
|
-
|
|
219
|
+
**[2026-07-17] Extensible agents: reusable Skills, lifecycle Hooks & model-driven delegation**
|
|
220
|
+
|
|
221
|
+
- **The agent chooses how to work.** DeepCode can maintain a plan, ask a focused question when genuinely blocked, and load reusable `SKILL.md` playbooks only when needed. Project and user skills under `.deepcode/skills/` — plus existing `.claude/skills/` packages — work across the CLI, web chat, and headless runs.
|
|
222
|
+
- **Complex tasks delegate themselves.** The model can spawn bounded subagents with focused context, track their progress, and bring the results back into the parent task — without a special team command or a fixed workflow.
|
|
223
|
+
- **Plug in your own guardrails and automation.** External command hooks cover session start, prompt submission, tool use, permission decisions, stopping, and subagent lifecycle events. DeepCode reads native hook files as well as compatible `.claude/settings.json` configurations, with timeouts and validated outputs so a broken hook cannot hang the agent.
|
|
224
|
+
- **Run DeepCode from any folder.** `deepcode init` creates a user-level base under `~/.deepcode`; user configuration, instructions, and memory are layered with project overrides, so credentials stay global while repository-specific behavior follows the workspace. Configuration failures now show a clear setup hint instead of a traceback.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
**[2026-07-10] Team mode: split a big feature across parallel workers**
|
|
229
|
+
|
|
230
|
+
- **A team, not just one agent.** Hand DeepCode a larger feature and it breaks the work into pieces, builds them at the same time, and combines the results — each piece checked against your tests as it goes.
|
|
231
|
+
- **Parallel work that never collides.** Every worker builds on its own isolated copy of your project, so simultaneous changes can't corrupt each other; when two pieces touch the same code, the overlap is flagged instead of silently overwritten.
|
|
232
|
+
- **Only ships when the tests pass.** Once everything is combined, the whole feature runs against your test command — the team reports success only when the tests are actually green.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
**[2026-07-10] Loop engineering: give it a goal, it works until the tests pass**
|
|
237
|
+
|
|
238
|
+
- **Autonomous coding loops.** Hand DeepCode a goal and a test command — it works, runs your tests, and keeps fixing until they pass, on its own.
|
|
239
|
+
- **Self-tidying memory.** The agent periodically cleans up its own notes, so its memory stays sharp across sessions.
|
|
240
|
+
- **Run it on a schedule.** Kick off a loop or a memory tidy-up on an interval, with sensible stop conditions so it never runs away.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
**[2026-07-08] Agent Chat, polished: memory, folder picker, session management**
|
|
245
|
+
|
|
246
|
+
- **The agent remembers across sessions.** Drop an `AGENTS.md` (or `DEEPCODE.md`) at your project root for standing instructions, and the agent keeps its own persistent notes under `.deepcode/memory/` — so a fact it learned yesterday is there today. Works the same in the CLI, the web chat, and headless runs.
|
|
247
|
+
- **Point it at a real project folder.** New chats get a workspace picker — browse and choose the directory the agent works in (fenced to your home), instead of typing a path blind.
|
|
248
|
+
- **Manage your conversations.** Rename or delete any chat from the sidebar; a new chat stays a draft until you send the first message, so the list no longer fills with empty sessions. Each chat's folder is shown and remembered across restarts.
|
|
249
|
+
- **Replies you can actually read.** Assistant messages render as markdown (code blocks, lists, tables); every tool call is an expandable card showing what it did (e.g. "Wrote 163 bytes to plan.md"); errors read as errors, not as a fake answer.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
**[2026-07-08] General coding agent: interactive CLI, web Agent Chat & native tools**
|
|
254
|
+
|
|
255
|
+
- **Talk to DeepCode in your terminal.** `python -m cli.tui` (or just `deepcode`) opens a free-form, multi-turn coding conversation — describe any task in natural language and watch the agent stream its reply, edit files, and run commands with live progress cards. Steer with `/new`, `/resume`, `/model`, `/clear`, `/help`, and attach files with `@path`. (Replaces the previous menu-driven CLI.)
|
|
256
|
+
- **Chat with the agent in your browser.** The new "Agent Chat" page keeps continuous conversations: a sidebar of past chats, one-click New chat, streamed replies with tool progress, and mid-run interrupt. Every chat persists, reopens any time, and works in its own workspace under `deepcode_lab/chats/`.
|
|
257
|
+
- **Edits that land on the first try.** First-class `read` / `write` / `edit` / `apply_patch` / `bash` / `grep` / `glob` tools: whitespace-tolerant fuzzy edits, multi-file atomic patches, and automatic post-edit diagnostics the agent fixes on the spot.
|
|
258
|
+
- **Script any task.** `python -m cli.exec_cli "task" --json` runs one task end-to-end and emits a machine-readable event stream — drop it straight into CI or your own pipelines.
|
|
259
|
+
- **Long conversations stay fast and stable.** Context windows resolve per model with automatic history compaction, and sessions are SQLite-indexed so listing and resume are instant.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
**[2026-07-04] V2 foundation: unified agent kernel, security sandbox & event protocol**
|
|
264
|
+
|
|
265
|
+
- **Every coding phase behaves the same.** All phases now run on one shared agent runtime, with tool definitions sourced straight from the MCP servers as the single source of truth — Paper2Code results unchanged.
|
|
266
|
+
- **Your credentials stay yours.** Every tool call passes a three-valued permission engine (allow / ask / deny) with a non-overridable credential denylist (`.ssh`, `.aws/credentials`, `.env`, `*.pem`, ...), and shell/Python execution runs inside a platform sandbox (macOS seatbelt / Linux bubblewrap) fenced to the workspace. Tune it via `DEEPCODE_SANDBOX` / `DEEPCODE_PERMISSION_MODE` or the `security` block in `deepcode_config.json`.
|
|
267
|
+
- **Build any frontend on one contract.** Declarative per-model provider settings, a normalized model-event stream, a structured message model, and an `AgentSession` event protocol back the CLI, the web UI, and headless runs alike.
|
|
268
|
+
- **Web chat planning just runs.** It now proceeds autonomously by default (requirements -> plan -> implementation) instead of stalling on a clarifying-questions step.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
<details>
|
|
273
|
+
<summary><strong>Earlier news</strong></summary>
|
|
274
|
+
|
|
275
|
+
🧭 **[2026-05-01] OpenRouter model selector, session cleanup & workflow UX hardening**
|
|
276
|
+
|
|
277
|
+
- 🧠 **OpenRouter model catalog in Settings.** The new UI can now fetch OpenRouter model metadata from `https://openrouter.ai/api/v1/models`, cache it locally, and expose searchable model selectors for the Default, Planning, and Implementation phases. Use exact OpenRouter model ids such as `z-ai/glm-5.1` without editing JSON by hand.
|
|
278
|
+
- 🔄 **Runtime model switching.** Saving model choices from Settings updates `deepcode_config.json` and reloads the in-process LLM runtime so newly started workflows pick up the selected provider/model combination immediately.
|
|
279
|
+
- 🗑️ **Session deletion now performs safe cascade cleanup.** Deleting a session from the UI removes its persistent session store and associated `deepcode_lab/tasks/<task_id>/` workspaces, while preserving shared `uploads/` source files. Sessions with `pending`, `running`, or `waiting_for_input` tasks are blocked with a clear `409 Conflict`.
|
|
280
|
+
- 📊 **More accurate Paper2Code progress.** The frontend now shows backend stage messages and avoids marking intermediate phases as fully "Done" while long LLM work is still running.
|
|
281
|
+
- 🛡️ **Workflow robustness fixes.** Uploads now reject Git LFS pointer files, cancelled tasks stop backend work promptly, stale browser session ids recover cleanly, planner retries fall back to a minimal valid plan when a model defers/tool-calls incorrectly, and document segmentation skips an extra validation LLM call that could stall progress.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
🗂️ **[2026-04-28] Persistent sessions & dual-layer logging**
|
|
286
|
+
|
|
287
|
+
- 🆕 **Sessions are now persistent.** Every CLI / UI run is automatically attached to a session under `~/.deepcode/sessions/<id>/` (override with `DEEPCODE_SESSIONS_DIR`). Sessions are JSONL — `tail -f session.jsonl` works out of the box. List / inspect / branch them with `python cli/main_cli.py session list|show <id>|new|resume <id>|delete <id>`, or via `GET /api/v1/sessions` from the backend.
|
|
288
|
+
- 🔄 **Resume a previous run** by passing `--session <id>` to the CLI or `session_id` to `POST /api/v1/workflows/paper-to-code` (or `chat-planning`). Backend restarts no longer drop task history; running tasks left over from a crash are surfaced as `interrupted`.
|
|
289
|
+
- 💻 **CLI session UX.** The interactive CLI now supports Cursor-style slash commands: `/resume` opens a numbered session picker, `/new [title]` creates and switches sessions, `/session` shows the active session, and `/help` lists commands. You can also paste inline inputs directly at the menu prompt with `@/path/to/paper.pdf`, `@"C:\path with spaces\paper.pdf"`, or `@https://...`.
|
|
290
|
+
- 📜 **Two-layer structured logging.** A global rotating JSONL lives at `logs/server-YYYYMMDD.jsonl`; per-task logs at `deepcode_lab/tasks/<task_id>/logs/{system,llm,mcp}.jsonl`. Every `loguru.logger` call automatically picks up the active `task_id` via a contextvar — business code did not have to change. Configure via the new `logger.{globalFile,taskFile,llm}` block in `deepcode_config.json`.
|
|
291
|
+
- 📡 **WebSocket log streaming.** Tail one task with `/ws/tasks/{task_id}/logs?channel=llm`, or merge every task in a session via `/ws/sessions/{session_id}/logs`. The legacy `/ws/logs/{session_id}` endpoint that silently ignored its parameter has been removed.
|
|
292
|
+
- 🧹 **Dead code removed.** `utils/simple_llm_logger.py`, `utils/dialogue_logger.py`, and the in-memory `services/session_service.py` implementation are gone (the latter is now a thin re-export of `core.sessions.SessionStore`).
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
🛠️ **[2026-04-17] Stability, Windows compatibility & secrets hygiene update**
|
|
297
|
+
|
|
298
|
+
- 🐛 **Code Implementation no longer crashes** with `name 'LoopDetector' is not defined` — added the missing `LoopDetector`/`ProgressTracker` imports in both `workflows/code_implementation_workflow.py` and `workflows/code_implementation_workflow_index.py`.
|
|
299
|
+
- 🪟 **Windows: `mkdir -p` / `touch` / `rm -rf` / `cp -r` / `mv` now work natively.** `tools/command_executor.py` translates these common Unix file-tree commands via `pathlib`/`shutil` on every platform, eliminating the bug where `cmd.exe` would create a literal `-p` directory and stall the workflow.
|
|
300
|
+
- 🚀 **Removed Brave Search end-to-end.** All Python code, MCP server config, and docs are scrubbed of `brave`/`BRAVE_API_KEY`/`WebSearchTool`. Web fetching now relies entirely on the built-in `fetch` MCP server.
|
|
301
|
+
- 🔌 **OpenAI-compatible providers documented.** New `Quick Start → Configuration` snippet shows how to point the `openai`/`openrouter` blocks at Poe (`https://api.poe.com/v1`), OpenRouter, or Alibaba DashScope, plus how to set `agents.defaults.model` / `agents.planning.model` / `agents.implementation.model` (e.g. `openai/gpt-5.4`).
|
|
302
|
+
- 🔐 **Secrets hygiene.** All YAML config has been collapsed into a single `deepcode_config.json`, and `.gitignore` now ignores it alongside `secrets.json`, `*credentials*.json`, `.env`, `.env.*` (with `*.env.example` whitelisted).
|
|
303
|
+
- 📝 **Launch table fixed.** The README now documents `deepcode --local` for the web UI path and adds explicit Troubleshooting rows for Windows GBK encoding and the issues fixed above.
|
|
304
|
+
- 🧹 **Misc:** auto-create `logs/` directory so JSONL logging never fails on a fresh checkout, replace bare `except:` with `except Exception:` in `agent_orchestration_engine.py` (Ruff E722), `command_executor` MCP tool descriptions now embed the host OS so the LLM picks compatible commands.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
🎉 **[2026-02] New Web UI Experience Upgrade!**
|
|
214
309
|
|
|
215
310
|
- 🔄 **User-in-Loop Interaction**: Support real-time user interaction during workflows - AI asks clarifying questions directly in the chat
|
|
216
311
|
- 💬 **Inline Interaction Design**: Interaction prompts appear naturally within the chat flow for a seamless experience
|
|
@@ -226,7 +321,7 @@ Dynamic: summary
|
|
|
226
321
|
|
|
227
322
|
---
|
|
228
323
|
|
|
229
|
-
🎉 **[2025-10
|
|
324
|
+
🎉 **[2025-10-28] DeepCode Achieves SOTA on PaperBench!**
|
|
230
325
|
|
|
231
326
|
DeepCode sets new benchmarks on OpenAI's PaperBench Code-Dev across all categories:
|
|
232
327
|
|
|
@@ -235,6 +330,8 @@ DeepCode sets new benchmarks on OpenAI's PaperBench Code-Dev across all categori
|
|
|
235
330
|
- 🔬 **Advances Scientific Coding**: **73.5%** (DeepCode) vs PaperCoder 51.1% (+22.4%).
|
|
236
331
|
- 🚀 **Beats LLM Agents**: **73.5%** (DeepCode) vs best LLM frameworks 43.3% (+30.2%).
|
|
237
332
|
|
|
333
|
+
</details>
|
|
334
|
+
|
|
238
335
|
---
|
|
239
336
|
|
|
240
337
|
## 🚀 Key Features
|
|
@@ -455,8 +552,6 @@ DeepCode leverages the **Model Context Protocol (MCP)** standard to seamlessly i
|
|
|
455
552
|
|
|
456
553
|
| 🛠️ **MCP Server** | 🔧 **Primary Function** | 💡 **Purpose & Capabilities** |
|
|
457
554
|
|-------------------|-------------------------|-------------------------------|
|
|
458
|
-
| **🔍 brave** | Web Search Engine | Real-time information retrieval via Brave Search API |
|
|
459
|
-
| **🌐 bocha-mcp** | Alternative Search | Secondary search option with independent API access |
|
|
460
555
|
| **📂 filesystem** | File System Operations | Local file and directory management, read/write operations |
|
|
461
556
|
| **🌐 fetch** | Web Content Retrieval | Fetch and extract content from URLs and web resources |
|
|
462
557
|
| **📥 github-downloader** | Repository Management | Clone and download GitHub repositories for analysis |
|
|
@@ -637,9 +732,8 @@ Choose one of the following installation methods:
|
|
|
637
732
|
# 🚀 Install DeepCode package directly
|
|
638
733
|
pip install deepcode-hku
|
|
639
734
|
|
|
640
|
-
# 🔑
|
|
641
|
-
|
|
642
|
-
curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.secrets.yaml
|
|
735
|
+
# 🔑 One-time setup: create ~/.deepcode/deepcode_config.json (then add a key)
|
|
736
|
+
deepcode init
|
|
643
737
|
```
|
|
644
738
|
|
|
645
739
|
#### 🔧 **Development Installation (From Source)**
|
|
@@ -674,257 +768,243 @@ pip install -r requirements.txt
|
|
|
674
768
|
npm install --prefix new_ui/frontend
|
|
675
769
|
```
|
|
676
770
|
|
|
771
|
+
##### 🧪 **Editable install (lets `deepcode` always run THIS checkout)**
|
|
772
|
+
|
|
773
|
+
If you want the global `deepcode` command to launch the source tree you are
|
|
774
|
+
hacking on, install the project in editable mode after the steps above:
|
|
775
|
+
|
|
776
|
+
```bash
|
|
777
|
+
pip install -e .
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
This registers a `deepcode-hku` package (current version 1.2.0) and exposes
|
|
781
|
+
the `deepcode` CLI entry point. Any local code change is picked up
|
|
782
|
+
immediately on next launch — no reinstall needed.
|
|
783
|
+
|
|
784
|
+
> If you maintain multiple DeepCode checkouts, only one of them can own the
|
|
785
|
+
> `deepcode` command at a time (the most recent `pip install -e .` wins).
|
|
786
|
+
> Reinstall in the checkout you currently want to be active.
|
|
787
|
+
|
|
677
788
|
</details>
|
|
678
789
|
|
|
679
790
|
### 🔧 **Step 2: Configuration**
|
|
680
791
|
|
|
681
|
-
> The following configuration applies to **all installation methods** (pip, UV, source
|
|
792
|
+
> The following configuration applies to **all installation methods** (pip, UV, source). Everything lives in a single `deepcode_config.json` file.
|
|
682
793
|
|
|
683
|
-
####
|
|
794
|
+
#### 🌍 Run `deepcode` from any directory
|
|
684
795
|
|
|
685
|
-
|
|
796
|
+
DeepCode resolves its config in two layers, the same way Codex and Claude Code do:
|
|
686
797
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
base_url: "https://openrouter.ai/api/v1" # Optional: for OpenRouter or custom endpoints
|
|
798
|
+
| Layer | Location | Role |
|
|
799
|
+
|-------|----------|------|
|
|
800
|
+
| **User base** | `~/.deepcode/deepcode_config.json` (or `$DEEPCODE_HOME`) | Read from **any** working directory. Keep your provider keys here. |
|
|
801
|
+
| **Project override** | `deepcode_config.json` in the current directory (or any parent) | Optional. Deep-merged on top of the base, overriding it key by key. |
|
|
692
802
|
|
|
693
|
-
|
|
694
|
-
api_key: "your_anthropic_api_key" # For Claude models
|
|
803
|
+
Run the one-time setup and you can launch `deepcode` anywhere:
|
|
695
804
|
|
|
696
|
-
|
|
697
|
-
|
|
805
|
+
```bash
|
|
806
|
+
deepcode init # creates ~/.deepcode/deepcode_config.json
|
|
698
807
|
```
|
|
699
808
|
|
|
700
|
-
|
|
809
|
+
`deepcode init` is a single cross-platform command (Windows, macOS, Linux). Run
|
|
810
|
+
from a checkout that already has a `deepcode_config.json`, it lifts that config —
|
|
811
|
+
keys and all — into the user base; run elsewhere, it drops the template there for
|
|
812
|
+
you to fill in. It never overwrites an existing base (use `--force` to reseed,
|
|
813
|
+
which keeps a `.bak`), and on Unix it locks the file to `600`. To relocate the
|
|
814
|
+
base, set `DEEPCODE_HOME` (`export DEEPCODE_HOME=...` on macOS/Linux,
|
|
815
|
+
`setx DEEPCODE_HOME ...` on Windows).
|
|
816
|
+
|
|
817
|
+
> If you prefer to keep the config only next to a specific project, skip
|
|
818
|
+
> `deepcode init` and just create `deepcode_config.json` in that directory — it
|
|
819
|
+
> is picked up whenever you launch from there.
|
|
820
|
+
|
|
821
|
+
#### 🔑 API Keys *(required)*
|
|
822
|
+
|
|
823
|
+
Edit `deepcode_config.json` and fill in at least one provider key. Inline strings work, and `${ENV_VAR}` references are resolved at load time.
|
|
701
824
|
|
|
702
|
-
|
|
825
|
+
```json
|
|
826
|
+
{
|
|
827
|
+
"providers": {
|
|
828
|
+
"openai": { "apiKey": "your_openai_api_key" },
|
|
829
|
+
"anthropic": { "apiKey": "${ANTHROPIC_API_KEY}" },
|
|
830
|
+
"gemini": { "apiKey": "" }
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
```
|
|
703
834
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
835
|
+
<details>
|
|
836
|
+
<summary><strong>🔌 Using OpenAI-compatible providers (OpenRouter / Poe / DashScope / etc.)</strong></summary>
|
|
837
|
+
|
|
838
|
+
Any OpenAI-compatible endpoint is supported by overriding `apiBase` on the matching provider entry. Then set the model name on the `agents` block (using `provider/model` slugs):
|
|
839
|
+
|
|
840
|
+
```json
|
|
841
|
+
{
|
|
842
|
+
"agents": {
|
|
843
|
+
"defaults": {
|
|
844
|
+
"provider": "openrouter",
|
|
845
|
+
"model": "z-ai/glm-5.1"
|
|
846
|
+
},
|
|
847
|
+
"planning": { "provider": "openrouter", "model": "z-ai/glm-5.1" },
|
|
848
|
+
"implementation": { "provider": "openrouter", "model": "z-ai/glm-5.1" }
|
|
849
|
+
},
|
|
850
|
+
"providers": {
|
|
851
|
+
"openai": { "apiKey": "your_openai_api_key" },
|
|
852
|
+
"openrouter": { "apiKey": "your_openrouter_key", "apiBase": "https://openrouter.ai/api/v1" }
|
|
853
|
+
}
|
|
854
|
+
}
|
|
708
855
|
```
|
|
709
856
|
|
|
710
|
-
|
|
857
|
+
OpenRouter model ids must use the exact `id` returned by OpenRouter, for example
|
|
858
|
+
`z-ai/glm-5.1`, `anthropic/claude-sonnet-4.5`, or
|
|
859
|
+
`google/gemini-2.5-pro`. In the new UI, open **Settings → OpenRouter Models**
|
|
860
|
+
to search the live OpenRouter catalog and update the Default, Planning, and
|
|
861
|
+
Implementation models without editing this file manually. Saving from the UI
|
|
862
|
+
reloads the runtime for newly started workflows.
|
|
863
|
+
|
|
864
|
+
> **🔐 Never commit `deepcode_config.json`.** It is already in `.gitignore`.
|
|
865
|
+
|
|
866
|
+
</details>
|
|
711
867
|
|
|
712
|
-
|
|
868
|
+
#### 🤖 LLM Provider *(optional)*
|
|
713
869
|
|
|
714
|
-
|
|
715
|
-
# For Brave Search (default) — set in brave.env section (line ~28)
|
|
716
|
-
brave:
|
|
717
|
-
env:
|
|
718
|
-
BRAVE_API_KEY: "your_brave_api_key_here"
|
|
870
|
+
The provider is inferred from the `model` slug (`openai/...`, `anthropic/...`, `gemini/...`, etc.). To force a specific backend, set `agents.defaults.provider`:
|
|
719
871
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
872
|
+
```json
|
|
873
|
+
{
|
|
874
|
+
"agents": {
|
|
875
|
+
"defaults": { "provider": "openai" }
|
|
876
|
+
}
|
|
877
|
+
}
|
|
724
878
|
```
|
|
725
879
|
|
|
726
880
|
#### 📄 Document Segmentation *(optional)*
|
|
727
881
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
882
|
+
```json
|
|
883
|
+
{
|
|
884
|
+
"documentSegmentation": {
|
|
885
|
+
"enabled": true,
|
|
886
|
+
"sizeThresholdChars": 50000
|
|
887
|
+
}
|
|
888
|
+
}
|
|
734
889
|
```
|
|
735
890
|
|
|
736
891
|
<details>
|
|
737
892
|
<summary><strong>🪟 Windows Users: Additional MCP Server Configuration</strong></summary>
|
|
738
893
|
|
|
739
|
-
|
|
894
|
+
On Windows you may need to configure MCP servers manually in `deepcode_config.json` (`tools.mcpServers`):
|
|
740
895
|
|
|
741
896
|
```bash
|
|
742
897
|
# 1. Install MCP servers globally
|
|
743
|
-
npm i -g @modelcontextprotocol/server-brave-search
|
|
744
898
|
npm i -g @modelcontextprotocol/server-filesystem
|
|
745
899
|
|
|
746
900
|
# 2. Find your global node_modules path
|
|
747
901
|
npm -g root
|
|
748
902
|
```
|
|
749
903
|
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
904
|
+
```json
|
|
905
|
+
{
|
|
906
|
+
"tools": {
|
|
907
|
+
"mcpServers": {
|
|
908
|
+
"filesystem": {
|
|
909
|
+
"type": "stdio",
|
|
910
|
+
"command": "node",
|
|
911
|
+
"args": ["C:/Program Files/nodejs/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js", "."]
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
761
916
|
```
|
|
762
917
|
|
|
763
|
-
>
|
|
918
|
+
> Replace the path with the actual global `node_modules` path from step 2.
|
|
764
919
|
|
|
765
920
|
</details>
|
|
766
921
|
|
|
767
922
|
<details>
|
|
768
|
-
<summary><strong>🔍 Search
|
|
923
|
+
<summary><strong>🔍 Web Search Configuration</strong></summary>
|
|
769
924
|
|
|
770
|
-
DeepCode
|
|
771
|
-
|
|
772
|
-
```yaml
|
|
773
|
-
# Default search server configuration
|
|
774
|
-
# Options: "brave" or "bocha-mcp"
|
|
775
|
-
default_search_server: "brave"
|
|
776
|
-
```
|
|
925
|
+
DeepCode performs web content retrieval through the built-in `fetch` MCP server (no API key required) and reads local files via `filesystem`. The auxiliary search server defaults to `filesystem`:
|
|
777
926
|
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
**Full MCP server configuration in mcp_agent.config.yaml:**
|
|
783
|
-
```yaml
|
|
784
|
-
# For Brave Search (default) - around line 28
|
|
785
|
-
brave:
|
|
786
|
-
command: "npx"
|
|
787
|
-
args: ["-y", "@modelcontextprotocol/server-brave-search"]
|
|
788
|
-
env:
|
|
789
|
-
BRAVE_API_KEY: "your_brave_api_key_here"
|
|
790
|
-
|
|
791
|
-
# For Bocha-MCP (alternative) - around line 74
|
|
792
|
-
bocha-mcp:
|
|
793
|
-
command: "python"
|
|
794
|
-
args: ["tools/bocha_search_server.py"]
|
|
795
|
-
env:
|
|
796
|
-
PYTHONPATH: "."
|
|
797
|
-
BOCHA_API_KEY: "your_bocha_api_key_here"
|
|
927
|
+
```json
|
|
928
|
+
{
|
|
929
|
+
"tools": { "defaultSearchServer": "filesystem" }
|
|
930
|
+
}
|
|
798
931
|
```
|
|
799
932
|
|
|
800
|
-
> **💡 Tip**:
|
|
933
|
+
> **💡 Tip**: To plug in another search backend, add it under `tools.mcpServers` in `deepcode_config.json` and set `tools.defaultSearchServer` to its name.
|
|
801
934
|
|
|
802
935
|
</details>
|
|
803
936
|
|
|
804
937
|
### ⚡ **Step 3: Launch Application**
|
|
805
938
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
No need to install Python, Node.js, or any dependencies — everything runs inside the container.
|
|
939
|
+
DeepCode runs three ways, all on the same agent core:
|
|
809
940
|
|
|
810
|
-
|
|
941
|
+
**🖥️ Interactive agent (default).** A multi-turn coding conversation in your terminal:
|
|
811
942
|
|
|
812
943
|
```bash
|
|
813
|
-
#
|
|
814
|
-
git clone https://github.com/HKUDS/DeepCode.git
|
|
815
|
-
cd DeepCode/
|
|
816
|
-
|
|
817
|
-
# 2. Configure your API keys (see Step 2: Configuration above)
|
|
818
|
-
cp mcp_agent.secrets.yaml.example mcp_agent.secrets.yaml
|
|
819
|
-
# Edit mcp_agent.secrets.yaml with your API keys
|
|
820
|
-
|
|
821
|
-
# 3. Start with one command
|
|
822
|
-
./deepcode_docker/run_docker.sh # Build & start (auto-builds on first run)
|
|
823
|
-
|
|
824
|
-
# Access at http://localhost:8000
|
|
944
|
+
deepcode # equivalent to: python -m cli.tui
|
|
825
945
|
```
|
|
826
946
|
|
|
827
|
-
|
|
828
|
-
```bash
|
|
829
|
-
./deepcode_docker/run_docker.sh stop # Stop the service
|
|
830
|
-
./deepcode_docker/run_docker.sh restart # Restart (after config changes, no rebuild needed)
|
|
831
|
-
./deepcode_docker/run_docker.sh --build # Rebuild (after code changes)
|
|
832
|
-
./deepcode_docker/run_docker.sh logs # View real-time logs
|
|
833
|
-
./deepcode_docker/run_docker.sh status # Check service status
|
|
834
|
-
./deepcode_docker/run_docker.sh clean # Remove containers and images
|
|
835
|
-
```
|
|
947
|
+
**🌐 Local web UI.** React frontend + FastAPI backend on your host:
|
|
836
948
|
|
|
837
|
-
Or use Docker Compose directly:
|
|
838
949
|
```bash
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
docker compose -f deepcode_docker/docker-compose.yml down # Stop
|
|
842
|
-
docker compose -f deepcode_docker/docker-compose.yml logs -f # View logs
|
|
950
|
+
deepcode --local
|
|
951
|
+
# Frontend → http://localhost:5173 Backend → http://localhost:8000
|
|
843
952
|
```
|
|
844
953
|
|
|
845
|
-
|
|
846
|
-
>
|
|
847
|
-
> **💡 Windows users**: Run `docker compose -f deepcode_docker/docker-compose.yml up --build` directly if the shell script is not available.
|
|
848
|
-
|
|
849
|
-
#### 🚀 **Using `deepcode` Command** (Local Installation)
|
|
954
|
+
**🤖 Headless (scripting / CI).** One task, machine-readable output:
|
|
850
955
|
|
|
851
956
|
```bash
|
|
852
|
-
|
|
853
|
-
deepcode
|
|
854
|
-
|
|
855
|
-
# Frontend: http://localhost:5173
|
|
856
|
-
# Backend API: http://localhost:8000
|
|
857
|
-
# Press Ctrl+C to stop all services
|
|
957
|
+
python -m cli.exec_cli "fix the failing test in mathlib.py" --json
|
|
858
958
|
```
|
|
859
|
-
<div align="center">
|
|
860
|
-
<img src="https://img.shields.io/badge/Frontend-localhost:5173-00d4ff?style=flat-square&logo=react&logoColor=white" alt="Frontend" />
|
|
861
|
-
<img src="https://img.shields.io/badge/Backend-localhost:8000-4ecdc4?style=flat-square&logo=fastapi&logoColor=white" alt="Backend" />
|
|
862
|
-
</div>
|
|
863
|
-
|
|
864
|
-
> **📦 Auto Install**: On first run, dependencies are automatically installed (`pip install` for backend, `npm install` for frontend)
|
|
865
959
|
|
|
866
|
-
|
|
960
|
+
#### 💻 **Interactive CLI (multi-turn coding agent)**
|
|
867
961
|
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
<tr>
|
|
872
|
-
<td><strong>🍎 macOS / 🐧 Linux</strong></td>
|
|
873
|
-
<td><strong>🪟 Windows</strong></td>
|
|
874
|
-
</tr>
|
|
875
|
-
<tr>
|
|
876
|
-
<td>
|
|
962
|
+
`python -m cli.tui` opens a Claude Code-style conversation in your terminal:
|
|
963
|
+
describe any coding task in natural language, watch the agent stream its
|
|
964
|
+
reply and tool progress live, and keep the conversation going across turns.
|
|
877
965
|
|
|
878
966
|
```bash
|
|
879
|
-
#
|
|
880
|
-
./
|
|
881
|
-
|
|
882
|
-
#
|
|
883
|
-
python deepcode.py
|
|
967
|
+
python -m cli.tui # converse in the current directory
|
|
968
|
+
python -m cli.tui -w ./my-project # explicit workspace
|
|
969
|
+
python -m cli.tui -m gpt-5.4 # explicit model
|
|
970
|
+
python -m cli.tui --resume <session_id> # pick up a stored conversation
|
|
884
971
|
```
|
|
885
972
|
|
|
886
|
-
|
|
887
|
-
<td>
|
|
888
|
-
|
|
889
|
-
```cmd
|
|
890
|
-
# Using run.bat
|
|
891
|
-
run.bat
|
|
973
|
+
Inside the conversation:
|
|
892
974
|
|
|
893
|
-
|
|
894
|
-
|
|
975
|
+
```text
|
|
976
|
+
/help # list all commands
|
|
977
|
+
/new [title] # start a fresh conversation
|
|
978
|
+
/resume # list THIS directory's sessions; /resume <id> restores one
|
|
979
|
+
/resume all # list sessions from every directory (origins shown)
|
|
980
|
+
/model [id] # show or switch the model (history preserved)
|
|
981
|
+
/clear # clear the conversation context
|
|
982
|
+
@src/main.py # attach a file's content to your message
|
|
895
983
|
```
|
|
896
984
|
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
985
|
+
Conversations persist under `~/.deepcode/sessions/<id>/` (JSONL, with a SQLite
|
|
986
|
+
index for instant listing) and are titled automatically from your first
|
|
987
|
+
message.
|
|
900
988
|
|
|
901
|
-
|
|
902
|
-
# Classic Streamlit UI (all platforms)
|
|
903
|
-
deepcode --classic
|
|
904
|
-
```
|
|
905
|
-
<div align="center">
|
|
906
|
-
<img src="https://img.shields.io/badge/Classic_UI-localhost:8501-00d4ff?style=flat-square&logo=streamlit&logoColor=white" alt="Classic UI" />
|
|
907
|
-
</div>
|
|
989
|
+
For scripting and CI there is a headless one-shot entry:
|
|
908
990
|
|
|
909
|
-
##### 🖥️ **CLI Interface** (Advanced Users)
|
|
910
991
|
```bash
|
|
911
|
-
|
|
912
|
-
|
|
992
|
+
python -m cli.exec_cli "fix the failing test in mathlib.py" --json
|
|
993
|
+
```
|
|
913
994
|
|
|
914
|
-
|
|
995
|
+
which streams machine-readable events (NDJSON) and exits 0 on completion.
|
|
915
996
|
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
</div>
|
|
997
|
+
In the web UI, use the **Sessions** menu in the header to resume or delete a
|
|
998
|
+
session. Deleting a session removes its JSONL session record and associated task
|
|
999
|
+
workspace under `deepcode_lab/tasks/`, but keeps original files in `uploads/`.
|
|
1000
|
+
If the session still has `pending`, `running`, or `waiting_for_input` tasks, the
|
|
1001
|
+
backend rejects the deletion until the task is cancelled or completed.
|
|
922
1002
|
|
|
923
1003
|
### 🎯 **Step 4: Generate Code**
|
|
924
1004
|
|
|
925
|
-
1. **📄 Input
|
|
926
|
-
2. **🤖 Processing
|
|
927
|
-
3. **⚡ Output
|
|
1005
|
+
1. **📄 Input** — Upload a research paper, type requirements, or paste a URL
|
|
1006
|
+
2. **🤖 Processing** — The multi-agent system analyzes, plans, and generates
|
|
1007
|
+
3. **⚡ Output** — Receive production-ready code with tests and documentation
|
|
928
1008
|
|
|
929
1009
|
---
|
|
930
1010
|
|
|
@@ -933,60 +1013,15 @@ python cli/main_cli.py
|
|
|
933
1013
|
<details>
|
|
934
1014
|
<summary><strong>❓ Common Issues & Solutions</strong></summary>
|
|
935
1015
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
```bash
|
|
946
|
-
docker builder prune -f
|
|
947
|
-
docker compose -f deepcode_docker/docker-compose.yml build --no-cache
|
|
948
|
-
docker compose -f deepcode_docker/docker-compose.yml up -d
|
|
949
|
-
```
|
|
950
|
-
|
|
951
|
-
#### 🐳 Docker command returns `error during connect` / `cannot find the file specified`
|
|
952
|
-
|
|
953
|
-
**Cause**: Docker Desktop is not running.
|
|
954
|
-
|
|
955
|
-
**Fix**: Start **Docker Desktop** from the Start menu (Windows) or Applications (macOS), wait until it's fully ready, then retry.
|
|
956
|
-
|
|
957
|
-
#### 🌐 Frontend displays abnormally or shows a blank page
|
|
958
|
-
|
|
959
|
-
**Cause**: Corrupted `node_modules` — frontend dependencies are incomplete.
|
|
960
|
-
|
|
961
|
-
**Fix**: Reinstall frontend dependencies:
|
|
962
|
-
```bash
|
|
963
|
-
cd new_ui/frontend
|
|
964
|
-
rm -rf node_modules
|
|
965
|
-
npm install
|
|
966
|
-
```
|
|
967
|
-
|
|
968
|
-
Then rebuild (for Docker) or restart (for local mode).
|
|
969
|
-
|
|
970
|
-
#### 🌐 Browser shows `ERR_CONNECTION_REFUSED` or JSON response instead of UI
|
|
971
|
-
|
|
972
|
-
**Cause**: Accessing the wrong port or backend not running.
|
|
973
|
-
|
|
974
|
-
**Fix**:
|
|
975
|
-
- **Docker mode** (`deepcode`): Access **http://localhost:8000**. Make sure the container is running: `docker ps`
|
|
976
|
-
- **Local mode** (`deepcode --local`): Access **http://localhost:5173** (not 8000). Port 5173 is the frontend dev server.
|
|
977
|
-
|
|
978
|
-
#### 📦 `npm install` fails with `Could not read package.json`
|
|
979
|
-
|
|
980
|
-
**Cause**: Running `npm install` in the project root instead of the frontend directory.
|
|
981
|
-
|
|
982
|
-
**Fix**: Run it in the correct directory:
|
|
983
|
-
```bash
|
|
984
|
-
npm install --prefix new_ui/frontend
|
|
985
|
-
```
|
|
986
|
-
|
|
987
|
-
#### 🪟 Windows: MCP servers not working
|
|
988
|
-
|
|
989
|
-
See the [Windows MCP Server Configuration](#-step-2-configuration) section above for setting up absolute paths.
|
|
1016
|
+
| Problem | Cause | Fix |
|
|
1017
|
+
|---|---|---|
|
|
1018
|
+
| Frontend blank page | Corrupted `node_modules` | `cd new_ui/frontend && rm -rf node_modules && npm install` |
|
|
1019
|
+
| `ERR_CONNECTION_REFUSED` | Wrong port / backend not running | With `--local`: frontend `http://localhost:5173`, backend `http://localhost:8000` |
|
|
1020
|
+
| `npm install` → `Could not read package.json` | Wrong directory | Use `npm install --prefix new_ui/frontend` |
|
|
1021
|
+
| Windows: MCP servers not working | Need absolute paths | See [Windows MCP Configuration](#-step-2-configuration) above |
|
|
1022
|
+
| Windows: `UnicodeEncodeError: 'gbk' codec can't encode...` on launch | Default GBK console can't render emoji in startup banner | Set UTF-8 first: `set PYTHONIOENCODING=utf-8 && set PYTHONUTF8=1` (cmd) or `$env:PYTHONIOENCODING="utf-8"; $env:PYTHONUTF8="1"` (PowerShell) |
|
|
1023
|
+
| Windows: code-implementation stage hangs / produces a `-p` directory | LLM emitted `mkdir -p ...` and `cmd.exe` treated `-p` as a folder name | Already fixed in `tools/command_executor.py` — common Unix commands (`mkdir -p`, `touch`, `rm -rf`, `cp -r`, `mv`) are now executed natively via `pathlib`/`shutil`, no shell needed |
|
|
1024
|
+
| `name 'LoopDetector' is not defined` during code implementation | Missing import in workflow modules | Already fixed — `LoopDetector` and `ProgressTracker` are now imported from `utils.loop_detector` in both `workflows/code_implementation_workflow.py` and `workflows/code_implementation_workflow_index.py` |
|
|
990
1025
|
|
|
991
1026
|
</details>
|
|
992
1027
|
|