qwen-sci 0.2.2__py3-none-any.whl

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.
Files changed (549) hide show
  1. qwen_sci-0.2.2.dist-info/METADATA +492 -0
  2. qwen_sci-0.2.2.dist-info/RECORD +549 -0
  3. qwen_sci-0.2.2.dist-info/WHEEL +4 -0
  4. qwen_sci-0.2.2.dist-info/entry_points.txt +6 -0
  5. qwen_sci-0.2.2.dist-info/licenses/LICENSE +21 -0
  6. src/1.txt +1 -0
  7. src/__init__.py +1 -0
  8. src/__main__.py +5 -0
  9. src/agents/__init__.py +1 -0
  10. src/agents/experiment_design_agent/__init__.py +268 -0
  11. src/agents/experiment_design_agent/artifacts.py +747 -0
  12. src/agents/experiment_design_agent/cache.py +319 -0
  13. src/agents/experiment_design_agent/completeness.py +130 -0
  14. src/agents/experiment_design_agent/contracts.py +771 -0
  15. src/agents/experiment_design_agent/counterexample_analyzer.py +187 -0
  16. src/agents/experiment_design_agent/design_evidence_paper_screener.py +470 -0
  17. src/agents/experiment_design_agent/discipline_catalog.py +178 -0
  18. src/agents/experiment_design_agent/evidence_cards.py +338 -0
  19. src/agents/experiment_design_agent/evidence_planner.py +452 -0
  20. src/agents/experiment_design_agent/formal_reasoning_planner.py +884 -0
  21. src/agents/experiment_design_agent/fulltext_acquisition.py +863 -0
  22. src/agents/experiment_design_agent/idea_adapter.py +100 -0
  23. src/agents/experiment_design_agent/idea_intake.py +87 -0
  24. src/agents/experiment_design_agent/llm_json.py +328 -0
  25. src/agents/experiment_design_agent/orchestrator.py +1220 -0
  26. src/agents/experiment_design_agent/reasoning_context.py +183 -0
  27. src/agents/experiment_design_agent/reasoning_validation.py +546 -0
  28. src/agents/experiment_design_agent/run.py +481 -0
  29. src/agents/experiment_design_agent/run_logging.py +292 -0
  30. src/agents/experiment_design_agent/scope_gate.py +198 -0
  31. src/agents/experiment_design_agent/study_type_composer.py +1360 -0
  32. src/agents/experiment_design_agent/survey_evidence.py +1381 -0
  33. src/agents/experiment_design_agent/template_router.py +195 -0
  34. src/agents/experiment_design_agent/variable_claim_extractor.py +93 -0
  35. src/agents/idea_agent/__init__.py +1 -0
  36. src/agents/idea_agent/agent/__init__.py +6 -0
  37. src/agents/idea_agent/agent/artifacts.py +308 -0
  38. src/agents/idea_agent/agent/base.py +122 -0
  39. src/agents/idea_agent/agent/ligagent.py +488 -0
  40. src/agents/idea_agent/agent/mcts.py +2060 -0
  41. src/agents/idea_agent/agent/prompts/__init__.py +48 -0
  42. src/agents/idea_agent/agent/prompts/advanced_analysis.py +235 -0
  43. src/agents/idea_agent/agent/prompts/algorithm_alignment.py +55 -0
  44. src/agents/idea_agent/agent/prompts/algorithm_structuring.py +48 -0
  45. src/agents/idea_agent/agent/prompts/component_extraction.py +62 -0
  46. src/agents/idea_agent/agent/prompts/component_novelty_evaluation.py +54 -0
  47. src/agents/idea_agent/agent/prompts/experiment_findings_extraction.py +39 -0
  48. src/agents/idea_agent/agent/prompts/idea_fusion.py +295 -0
  49. src/agents/idea_agent/agent/prompts/idea_introduction.py +30 -0
  50. src/agents/idea_agent/agent/prompts/idea_result_alignment.py +39 -0
  51. src/agents/idea_agent/agent/prompts/input_interpreter.py +52 -0
  52. src/agents/idea_agent/agent/prompts/keynote_ops.py +78 -0
  53. src/agents/idea_agent/agent/prompts/mcts_evaluation.py +235 -0
  54. src/agents/idea_agent/agent/prompts/mcts_generation.py +140 -0
  55. src/agents/idea_agent/agent/prompts/mechanism_commit_query.py +99 -0
  56. src/agents/idea_agent/agent/prompts/memory_selection.py +0 -0
  57. src/agents/idea_agent/agent/prompts/prompt_modes.py +16 -0
  58. src/agents/idea_agent/agent/prompts/rag_query.py +34 -0
  59. src/agents/idea_agent/agent/prompts/re_analysis_replan.py +48 -0
  60. src/agents/idea_agent/agent/prompts/reference_grounding.py +34 -0
  61. src/agents/idea_agent/agent/prompts/root_domain_classification.py +32 -0
  62. src/agents/idea_agent/agent/prompts/scientific_debate.py +88 -0
  63. src/agents/idea_agent/agent/prompts/scientific_materialization.py +45 -0
  64. src/agents/idea_agent/agent/prompts/skill_instantiation.py +193 -0
  65. src/agents/idea_agent/agent/prompts/theory_transfer_query.py +93 -0
  66. src/agents/idea_agent/agent/prompts/topic_background.py +15 -0
  67. src/agents/idea_agent/agent/skills/DEFAULT_SKILL_TEMPLATES.json +263 -0
  68. src/agents/idea_agent/agent/skills/edit_operator_skills/alternative-path-contrast/SKILL.md +40 -0
  69. src/agents/idea_agent/agent/skills/edit_operator_skills/alternative-path-contrast/references/contrast_patterns.md +22 -0
  70. src/agents/idea_agent/agent/skills/edit_operator_skills/feedback-closed-loop/SKILL.md +40 -0
  71. src/agents/idea_agent/agent/skills/edit_operator_skills/feedback-closed-loop/references/mechanism_cards.md +24 -0
  72. src/agents/idea_agent/agent/skills/edit_operator_skills/hierarchical-decomposition/SKILL.md +39 -0
  73. src/agents/idea_agent/agent/skills/edit_operator_skills/hierarchical-decomposition/references/hierarchy_patterns.md +22 -0
  74. src/agents/idea_agent/agent/skills/edit_operator_skills/mechanism-commit-innovation/SKILL.md +39 -0
  75. src/agents/idea_agent/agent/skills/edit_operator_skills/mechanism-commit-innovation/references/mechanism_commit_patterns.md +24 -0
  76. src/agents/idea_agent/agent/skills/edit_operator_skills/multi-scale-coordinator/SKILL.md +39 -0
  77. src/agents/idea_agent/agent/skills/edit_operator_skills/multi-scale-coordinator/references/coordination_patterns.md +22 -0
  78. src/agents/idea_agent/agent/skills/edit_operator_skills/speculative-execution-with-repair/SKILL.md +41 -0
  79. src/agents/idea_agent/agent/skills/edit_operator_skills/speculative-execution-with-repair/references/speculation_patterns.md +22 -0
  80. src/agents/idea_agent/agent/skills/edit_operator_skills/surgical-modularity/SKILL.md +39 -0
  81. src/agents/idea_agent/agent/skills/edit_operator_skills/surgical-modularity/references/modularity_patterns.md +22 -0
  82. src/agents/idea_agent/agent/skills/edit_operator_skills/theory-transfer-injection/SKILL.md +40 -0
  83. src/agents/idea_agent/agent/skills/edit_operator_skills/theory-transfer-injection/references/transfer_patterns.md +24 -0
  84. src/agents/idea_agent/example/idea_result.json +900 -0
  85. src/agents/idea_agent/run.py +276 -0
  86. src/agents/idea_agent/tests/test_advanced_analysis_contract.py +90 -0
  87. src/agents/idea_agent/tests/test_gap_hypothesis_bridge.py +166 -0
  88. src/agents/idea_agent/tests/test_idea_debate.py +480 -0
  89. src/agents/idea_agent/tests/test_idea_result_v5.py +99 -0
  90. src/agents/idea_agent/tests/test_idea_synthesis.py +92 -0
  91. src/agents/idea_agent/tests/test_mature_idea_sources.py +27 -0
  92. src/agents/idea_agent/tests/test_multimodal_idea_integration.py +386 -0
  93. src/agents/idea_agent/tests/test_profile_materialization_and_scoring.py +219 -0
  94. src/agents/idea_agent/tests/test_profile_native_skill_rendering.py +122 -0
  95. src/agents/idea_agent/tests/test_result_persistence.py +183 -0
  96. src/agents/idea_agent/tests/test_scientific_intervention_profiles.py +241 -0
  97. src/agents/idea_agent/tests/test_scientific_rubric_and_prompts.py +559 -0
  98. src/agents/idea_agent/tests/test_strict_json_object_responses.py +48 -0
  99. src/agents/idea_agent/utils/core/__init__.py +1 -0
  100. src/agents/idea_agent/utils/core/ablation_inputs.py +60 -0
  101. src/agents/idea_agent/utils/core/chat_errors.py +95 -0
  102. src/agents/idea_agent/utils/core/chat_router.py +130 -0
  103. src/agents/idea_agent/utils/core/chat_transport.py +188 -0
  104. src/agents/idea_agent/utils/core/config_loader.py +166 -0
  105. src/agents/idea_agent/utils/core/json_utils.py +28 -0
  106. src/agents/idea_agent/utils/core/logger.py +287 -0
  107. src/agents/idea_agent/utils/core/progress.py +58 -0
  108. src/agents/idea_agent/utils/core/response_parsing.py +57 -0
  109. src/agents/idea_agent/utils/core/run_inputs.py +198 -0
  110. src/agents/idea_agent/utils/mcts/__init__.py +1 -0
  111. src/agents/idea_agent/utils/mcts/component_novelty.py +342 -0
  112. src/agents/idea_agent/utils/mcts/defect_registry.py +302 -0
  113. src/agents/idea_agent/utils/mcts/idea_routes.py +61 -0
  114. src/agents/idea_agent/utils/mcts/idea_taste_presets.py +312 -0
  115. src/agents/idea_agent/utils/mcts/mcts_helpers.py +738 -0
  116. src/agents/idea_agent/utils/mcts/mcts_runtime.py +3000 -0
  117. src/agents/idea_agent/utils/mcts/scientific_intervention_ontology.py +1561 -0
  118. src/agents/idea_agent/utils/mcts/scientific_rubric.py +211 -0
  119. src/agents/idea_agent/utils/mcts/skill_parsing.py +92 -0
  120. src/agents/idea_agent/utils/papers/__init__.py +1 -0
  121. src/agents/idea_agent/utils/papers/paper_graph_vector_store.py +499 -0
  122. src/agents/idea_agent/utils/papers/paper_repository.py +372 -0
  123. src/agents/idea_agent/utils/prompting/__init__.py +1 -0
  124. src/agents/idea_agent/utils/prompting/prompt_views.py +637 -0
  125. src/agents/idea_agent/utils/workflow/__init__.py +1 -0
  126. src/agents/idea_agent/utils/workflow/advanced_analysis_contract.py +244 -0
  127. src/agents/idea_agent/utils/workflow/gap_hypothesis_bridge.py +461 -0
  128. src/agents/idea_agent/utils/workflow/idea_contract.py +426 -0
  129. src/agents/idea_agent/utils/workflow/idea_debate.py +1238 -0
  130. src/agents/idea_agent/utils/workflow/idea_diversity.py +163 -0
  131. src/agents/idea_agent/utils/workflow/idea_fusion.py +889 -0
  132. src/agents/idea_agent/utils/workflow/idea_helpers.py +478 -0
  133. src/agents/idea_agent/utils/workflow/idea_portfolio.py +422 -0
  134. src/agents/idea_agent/utils/workflow/idea_synthesis.py +482 -0
  135. src/agents/idea_agent/utils/workflow/ligagent_flow.py +581 -0
  136. src/agents/idea_agent/utils/workflow/ligagent_handlers.py +1836 -0
  137. src/agents/idea_agent/utils/workflow/ligagent_helpers.py +1331 -0
  138. src/agents/idea_agent/utils/workflow/ligagent_utils.py +322 -0
  139. src/agents/idea_agent/utils/workflow/mature_idea_sources.py +648 -0
  140. src/agents/idea_agent/utils/workflow/multimodal_data_anchoring.py +578 -0
  141. src/agents/idea_agent/utils/workflow/result_persistence.py +774 -0
  142. src/agents/idea_agent/utils/workflow/stage_contract.py +76 -0
  143. src/agents/idea_agent/utils/workflow/workflow_runtime.py +288 -0
  144. src/agents/research_plan_author/__init__.py +50 -0
  145. src/agents/research_plan_author/artifacts.py +270 -0
  146. src/agents/research_plan_author/authoring_blueprint.py +1246 -0
  147. src/agents/research_plan_author/bibtex_renderer.py +252 -0
  148. src/agents/research_plan_author/contract_repair.py +131 -0
  149. src/agents/research_plan_author/contracts.py +745 -0
  150. src/agents/research_plan_author/cross_section_editor.py +232 -0
  151. src/agents/research_plan_author/document_quality.py +987 -0
  152. src/agents/research_plan_author/idea_evolution.py +223 -0
  153. src/agents/research_plan_author/input_loader.py +76 -0
  154. src/agents/research_plan_author/latex_compiler.py +260 -0
  155. src/agents/research_plan_author/latex_safety.py +159 -0
  156. src/agents/research_plan_author/llm_json.py +74 -0
  157. src/agents/research_plan_author/markdown_renderer.py +275 -0
  158. src/agents/research_plan_author/pdf_validator.py +149 -0
  159. src/agents/research_plan_author/render.py +166 -0
  160. src/agents/research_plan_author/render_artifacts.py +187 -0
  161. src/agents/research_plan_author/run.py +765 -0
  162. src/agents/research_plan_author/run_logging.py +209 -0
  163. src/agents/research_plan_author/section_cache.py +184 -0
  164. src/agents/research_plan_author/section_composer.py +1764 -0
  165. src/agents/research_plan_author/section_router.py +209 -0
  166. src/agents/research_plan_author/semantic_validator.py +254 -0
  167. src/agents/research_plan_author/source_bundle.py +46 -0
  168. src/agents/research_plan_author/source_registry.py +208 -0
  169. src/agents/research_plan_author/survey_source_loader.py +137 -0
  170. src/agents/research_plan_author/template_adapter.py +173 -0
  171. src/agents/research_plan_author/template_profile.py +204 -0
  172. src/agents/research_plan_author/tex_renderer.py +496 -0
  173. src/agents/research_plan_author/theory_presentation.py +134 -0
  174. src/agents/research_plan_author/theory_spine.py +703 -0
  175. src/agents/survey_agent/Dockerfile +54 -0
  176. src/agents/survey_agent/README.md +350 -0
  177. src/agents/survey_agent/config/deep_survey.yaml +217 -0
  178. src/agents/survey_agent/config/deep_survey_batch.yaml +176 -0
  179. src/agents/survey_agent/config/deep_survey_fast.yaml +183 -0
  180. src/agents/survey_agent/config/evaluate_baseline.yaml +197 -0
  181. src/agents/survey_agent/config/outcomeRAG.yaml +159 -0
  182. src/agents/survey_agent/env_report.md +348 -0
  183. src/agents/survey_agent/modules/__init__.py +0 -0
  184. src/agents/survey_agent/modules/code_collector.py +2194 -0
  185. src/agents/survey_agent/modules/code_report_generator.py +1282 -0
  186. src/agents/survey_agent/modules/data_manager.py +1713 -0
  187. src/agents/survey_agent/modules/database.py +167 -0
  188. src/agents/survey_agent/modules/fulltext_download_cache.py +462 -0
  189. src/agents/survey_agent/modules/fulltext_http.py +134 -0
  190. src/agents/survey_agent/modules/fulltext_resolution.py +749 -0
  191. src/agents/survey_agent/modules/judge.py +434 -0
  192. src/agents/survey_agent/modules/outcome_RAG.py +236 -0
  193. src/agents/survey_agent/modules/paper_graph_retriever.py +1075 -0
  194. src/agents/survey_agent/modules/pe.py +1729 -0
  195. src/agents/survey_agent/modules/pseudo_creator.py +782 -0
  196. src/agents/survey_agent/modules/pseudo_reviser.py +537 -0
  197. src/agents/survey_agent/modules/refine_agent.py +1952 -0
  198. src/agents/survey_agent/modules/survey_generator.py +5691 -0
  199. src/agents/survey_agent/modules/survey_visualizer.py +1817 -0
  200. src/agents/survey_agent/modules/visual_prompts.py +327 -0
  201. src/agents/survey_agent/modules/work_analyzer.py +2750 -0
  202. src/agents/survey_agent/modules/work_collector.py +5649 -0
  203. src/agents/survey_agent/scripts/baseline_evaluation.py +411 -0
  204. src/agents/survey_agent/scripts/run_deep_survey.py +224 -0
  205. src/agents/survey_agent/scripts/run_deep_survey_adapter.py +407 -0
  206. src/agents/survey_agent/scripts/run_deep_survey_adapter_with_input.py +409 -0
  207. src/agents/survey_agent/scripts/run_deep_survey_batch.py +228 -0
  208. src/agents/survey_agent/scripts/run_deep_survey_batch_arg.py +243 -0
  209. src/agents/survey_agent/scripts/run_deep_survey_batch_settings.py +218 -0
  210. src/agents/survey_agent/scripts/run_keynotes_gen.py +128 -0
  211. src/agents/survey_agent/scripts/run_work_clusters.py +140 -0
  212. src/agents/survey_agent/utils/__init__.py +0 -0
  213. src/agents/survey_agent/utils/ablation_utils.py +317 -0
  214. src/agents/survey_agent/utils/api_call.py +2518 -0
  215. src/agents/survey_agent/utils/chat_utils.py +82 -0
  216. src/agents/survey_agent/utils/config_utils.py +70 -0
  217. src/agents/survey_agent/utils/convert_to_md.py +29 -0
  218. src/agents/survey_agent/utils/err_info.py +24 -0
  219. src/agents/survey_agent/utils/file_utils.py +176 -0
  220. src/agents/survey_agent/utils/gpu_utils.py +145 -0
  221. src/agents/survey_agent/utils/graph_visualizer.py +279 -0
  222. src/agents/survey_agent/utils/html_utils.py +181 -0
  223. src/agents/survey_agent/utils/latex_generator_intra_cluster.py +529 -0
  224. src/agents/survey_agent/utils/latex_generator_relation_table.py +193 -0
  225. src/agents/survey_agent/utils/mineru_section_packer.py +334 -0
  226. src/agents/survey_agent/utils/mineru_utils.py +396 -0
  227. src/agents/survey_agent/utils/paper.py +144 -0
  228. src/agents/survey_agent/utils/read_yaml.py +15 -0
  229. src/agents/survey_agent/utils/repo_utils.py +167 -0
  230. src/agents/survey_agent/utils/rich_logger.py +77 -0
  231. src/agents/survey_agent/utils/step2v2.py +874 -0
  232. src/agents/survey_agent/utils/step2v2_extractor.py +856 -0
  233. src/agents/survey_agent/utils/topic_survey_storage.py +309 -0
  234. src/agents/survey_agent/utils/utils.py +118 -0
  235. src/agents/survey_agent/utils/work.py +2 -0
  236. src/cli.py +1611 -0
  237. src/config/__init__.py +213 -0
  238. src/config/default.yaml +1122 -0
  239. src/harness/LICENSE +21 -0
  240. src/harness/VENDORED.md +14 -0
  241. src/harness/src/__init__.py +0 -0
  242. src/harness/src/openharness/__init__.py +0 -0
  243. src/harness/src/openharness/__main__.py +6 -0
  244. src/harness/src/openharness/api/__init__.py +21 -0
  245. src/harness/src/openharness/api/client.py +281 -0
  246. src/harness/src/openharness/api/codex_client.py +407 -0
  247. src/harness/src/openharness/api/copilot_auth.py +240 -0
  248. src/harness/src/openharness/api/copilot_client.py +134 -0
  249. src/harness/src/openharness/api/errors.py +19 -0
  250. src/harness/src/openharness/api/openai_client.py +577 -0
  251. src/harness/src/openharness/api/provider.py +186 -0
  252. src/harness/src/openharness/api/registry.py +437 -0
  253. src/harness/src/openharness/api/usage.py +17 -0
  254. src/harness/src/openharness/auth/__init__.py +29 -0
  255. src/harness/src/openharness/auth/external.py +610 -0
  256. src/harness/src/openharness/auth/flows.py +189 -0
  257. src/harness/src/openharness/auth/manager.py +482 -0
  258. src/harness/src/openharness/auth/storage.py +269 -0
  259. src/harness/src/openharness/autopilot/__init__.py +23 -0
  260. src/harness/src/openharness/autopilot/service.py +2239 -0
  261. src/harness/src/openharness/autopilot/types.py +91 -0
  262. src/harness/src/openharness/bridge/__init__.py +20 -0
  263. src/harness/src/openharness/bridge/manager.py +106 -0
  264. src/harness/src/openharness/bridge/session_runner.py +46 -0
  265. src/harness/src/openharness/bridge/types.py +37 -0
  266. src/harness/src/openharness/bridge/work_secret.py +41 -0
  267. src/harness/src/openharness/channels/UPSTREAM +6 -0
  268. src/harness/src/openharness/channels/__init__.py +22 -0
  269. src/harness/src/openharness/channels/adapter.py +131 -0
  270. src/harness/src/openharness/channels/bus/__init__.py +6 -0
  271. src/harness/src/openharness/channels/bus/events.py +38 -0
  272. src/harness/src/openharness/channels/bus/queue.py +44 -0
  273. src/harness/src/openharness/channels/impl/__init__.py +6 -0
  274. src/harness/src/openharness/channels/impl/base.py +141 -0
  275. src/harness/src/openharness/channels/impl/dingtalk.py +445 -0
  276. src/harness/src/openharness/channels/impl/discord.py +311 -0
  277. src/harness/src/openharness/channels/impl/email.py +410 -0
  278. src/harness/src/openharness/channels/impl/feishu.py +1342 -0
  279. src/harness/src/openharness/channels/impl/manager.py +257 -0
  280. src/harness/src/openharness/channels/impl/matrix.py +700 -0
  281. src/harness/src/openharness/channels/impl/mochat.py +897 -0
  282. src/harness/src/openharness/channels/impl/qq.py +141 -0
  283. src/harness/src/openharness/channels/impl/slack.py +284 -0
  284. src/harness/src/openharness/channels/impl/telegram.py +525 -0
  285. src/harness/src/openharness/channels/impl/whatsapp.py +159 -0
  286. src/harness/src/openharness/cli.py +2551 -0
  287. src/harness/src/openharness/commands/__init__.py +21 -0
  288. src/harness/src/openharness/commands/registry.py +2783 -0
  289. src/harness/src/openharness/config/__init__.py +34 -0
  290. src/harness/src/openharness/config/paths.py +160 -0
  291. src/harness/src/openharness/config/schema.py +119 -0
  292. src/harness/src/openharness/config/settings.py +1104 -0
  293. src/harness/src/openharness/coordinator/__init__.py +12 -0
  294. src/harness/src/openharness/coordinator/agent_definitions.py +975 -0
  295. src/harness/src/openharness/coordinator/coordinator_mode.py +520 -0
  296. src/harness/src/openharness/engine/__init__.py +80 -0
  297. src/harness/src/openharness/engine/cost_tracker.py +24 -0
  298. src/harness/src/openharness/engine/messages.py +222 -0
  299. src/harness/src/openharness/engine/query.py +1188 -0
  300. src/harness/src/openharness/engine/query_engine.py +313 -0
  301. src/harness/src/openharness/engine/stream_events.py +90 -0
  302. src/harness/src/openharness/hooks/__init__.py +50 -0
  303. src/harness/src/openharness/hooks/events.py +20 -0
  304. src/harness/src/openharness/hooks/executor.py +242 -0
  305. src/harness/src/openharness/hooks/hot_reload.py +31 -0
  306. src/harness/src/openharness/hooks/loader.py +68 -0
  307. src/harness/src/openharness/hooks/schemas.py +66 -0
  308. src/harness/src/openharness/hooks/types.py +38 -0
  309. src/harness/src/openharness/keybindings/__init__.py +14 -0
  310. src/harness/src/openharness/keybindings/default_bindings.py +11 -0
  311. src/harness/src/openharness/keybindings/loader.py +22 -0
  312. src/harness/src/openharness/keybindings/parser.py +18 -0
  313. src/harness/src/openharness/keybindings/resolver.py +13 -0
  314. src/harness/src/openharness/mcp/__init__.py +79 -0
  315. src/harness/src/openharness/mcp/client.py +298 -0
  316. src/harness/src/openharness/mcp/config.py +16 -0
  317. src/harness/src/openharness/mcp/types.py +76 -0
  318. src/harness/src/openharness/memory/__init__.py +25 -0
  319. src/harness/src/openharness/memory/agent.py +91 -0
  320. src/harness/src/openharness/memory/manager.py +183 -0
  321. src/harness/src/openharness/memory/memdir.py +52 -0
  322. src/harness/src/openharness/memory/migrate.py +137 -0
  323. src/harness/src/openharness/memory/paths.py +22 -0
  324. src/harness/src/openharness/memory/relevance.py +145 -0
  325. src/harness/src/openharness/memory/scan.py +116 -0
  326. src/harness/src/openharness/memory/schema.py +443 -0
  327. src/harness/src/openharness/memory/search.py +71 -0
  328. src/harness/src/openharness/memory/team.py +90 -0
  329. src/harness/src/openharness/memory/types.py +33 -0
  330. src/harness/src/openharness/memory/usage.py +153 -0
  331. src/harness/src/openharness/output_styles/__init__.py +5 -0
  332. src/harness/src/openharness/output_styles/loader.py +42 -0
  333. src/harness/src/openharness/permissions/__init__.py +26 -0
  334. src/harness/src/openharness/permissions/checker.py +200 -0
  335. src/harness/src/openharness/permissions/modes.py +13 -0
  336. src/harness/src/openharness/personalization/__init__.py +6 -0
  337. src/harness/src/openharness/personalization/extractor.py +138 -0
  338. src/harness/src/openharness/personalization/rules.py +64 -0
  339. src/harness/src/openharness/personalization/session_hook.py +65 -0
  340. src/harness/src/openharness/platforms.py +86 -0
  341. src/harness/src/openharness/plugins/__init__.py +53 -0
  342. src/harness/src/openharness/plugins/bundled/__init__.py +0 -0
  343. src/harness/src/openharness/plugins/installer.py +39 -0
  344. src/harness/src/openharness/plugins/loader.py +730 -0
  345. src/harness/src/openharness/plugins/schemas.py +24 -0
  346. src/harness/src/openharness/plugins/types.py +59 -0
  347. src/harness/src/openharness/prompts/__init__.py +14 -0
  348. src/harness/src/openharness/prompts/claudemd.py +48 -0
  349. src/harness/src/openharness/prompts/context.py +187 -0
  350. src/harness/src/openharness/prompts/environment.py +135 -0
  351. src/harness/src/openharness/prompts/system_prompt.py +109 -0
  352. src/harness/src/openharness/sandbox/Dockerfile +6 -0
  353. src/harness/src/openharness/sandbox/__init__.py +33 -0
  354. src/harness/src/openharness/sandbox/adapter.py +148 -0
  355. src/harness/src/openharness/sandbox/docker_backend.py +232 -0
  356. src/harness/src/openharness/sandbox/docker_image.py +103 -0
  357. src/harness/src/openharness/sandbox/path_validator.py +37 -0
  358. src/harness/src/openharness/sandbox/session.py +63 -0
  359. src/harness/src/openharness/services/__init__.py +30 -0
  360. src/harness/src/openharness/services/autodream/__init__.py +34 -0
  361. src/harness/src/openharness/services/autodream/backup.py +104 -0
  362. src/harness/src/openharness/services/autodream/lock.py +138 -0
  363. src/harness/src/openharness/services/autodream/prompt.py +128 -0
  364. src/harness/src/openharness/services/autodream/service.py +313 -0
  365. src/harness/src/openharness/services/compact/__init__.py +1725 -0
  366. src/harness/src/openharness/services/cron.py +137 -0
  367. src/harness/src/openharness/services/cron_scheduler.py +595 -0
  368. src/harness/src/openharness/services/lsp/__init__.py +216 -0
  369. src/harness/src/openharness/services/memory_extract/__init__.py +261 -0
  370. src/harness/src/openharness/services/oauth/__init__.py +0 -0
  371. src/harness/src/openharness/services/session_backend.py +97 -0
  372. src/harness/src/openharness/services/session_memory/__init__.py +139 -0
  373. src/harness/src/openharness/services/session_storage.py +230 -0
  374. src/harness/src/openharness/services/token_estimation.py +15 -0
  375. src/harness/src/openharness/services/tool_outputs.py +55 -0
  376. src/harness/src/openharness/skills/__init__.py +44 -0
  377. src/harness/src/openharness/skills/_frontmatter.py +97 -0
  378. src/harness/src/openharness/skills/bundled/__init__.py +75 -0
  379. src/harness/src/openharness/skills/bundled/content/commit.md +25 -0
  380. src/harness/src/openharness/skills/bundled/content/debug.md +25 -0
  381. src/harness/src/openharness/skills/bundled/content/diagnose.md +35 -0
  382. src/harness/src/openharness/skills/bundled/content/plan.md +39 -0
  383. src/harness/src/openharness/skills/bundled/content/review.md +33 -0
  384. src/harness/src/openharness/skills/bundled/content/simplify.md +26 -0
  385. src/harness/src/openharness/skills/bundled/content/skill-creator.md +175 -0
  386. src/harness/src/openharness/skills/bundled/content/test.md +38 -0
  387. src/harness/src/openharness/skills/loader.py +229 -0
  388. src/harness/src/openharness/skills/registry.py +29 -0
  389. src/harness/src/openharness/skills/types.py +24 -0
  390. src/harness/src/openharness/state/__init__.py +6 -0
  391. src/harness/src/openharness/state/app_state.py +30 -0
  392. src/harness/src/openharness/state/store.py +40 -0
  393. src/harness/src/openharness/swarm/__init__.py +70 -0
  394. src/harness/src/openharness/swarm/in_process.py +693 -0
  395. src/harness/src/openharness/swarm/lockfile.py +24 -0
  396. src/harness/src/openharness/swarm/mailbox.py +522 -0
  397. src/harness/src/openharness/swarm/permission_sync.py +1168 -0
  398. src/harness/src/openharness/swarm/registry.py +410 -0
  399. src/harness/src/openharness/swarm/spawn_utils.py +229 -0
  400. src/harness/src/openharness/swarm/subprocess_backend.py +171 -0
  401. src/harness/src/openharness/swarm/team_lifecycle.py +910 -0
  402. src/harness/src/openharness/swarm/types.py +398 -0
  403. src/harness/src/openharness/swarm/worktree.py +315 -0
  404. src/harness/src/openharness/tasks/__init__.py +18 -0
  405. src/harness/src/openharness/tasks/local_agent_task.py +28 -0
  406. src/harness/src/openharness/tasks/local_shell_task.py +17 -0
  407. src/harness/src/openharness/tasks/manager.py +475 -0
  408. src/harness/src/openharness/tasks/stop_task.py +11 -0
  409. src/harness/src/openharness/tasks/types.py +32 -0
  410. src/harness/src/openharness/themes/__init__.py +21 -0
  411. src/harness/src/openharness/themes/builtin.py +89 -0
  412. src/harness/src/openharness/themes/loader.py +55 -0
  413. src/harness/src/openharness/themes/schema.py +54 -0
  414. src/harness/src/openharness/tools/__init__.py +107 -0
  415. src/harness/src/openharness/tools/agent_tool.py +141 -0
  416. src/harness/src/openharness/tools/ask_user_question_tool.py +46 -0
  417. src/harness/src/openharness/tools/base.py +80 -0
  418. src/harness/src/openharness/tools/bash_tool.py +259 -0
  419. src/harness/src/openharness/tools/brief_tool.py +33 -0
  420. src/harness/src/openharness/tools/config_tool.py +54 -0
  421. src/harness/src/openharness/tools/cron_create_tool.py +105 -0
  422. src/harness/src/openharness/tools/cron_delete_tool.py +32 -0
  423. src/harness/src/openharness/tools/cron_list_tool.py +69 -0
  424. src/harness/src/openharness/tools/cron_toggle_tool.py +37 -0
  425. src/harness/src/openharness/tools/enter_plan_mode_tool.py +28 -0
  426. src/harness/src/openharness/tools/enter_worktree_tool.py +80 -0
  427. src/harness/src/openharness/tools/exit_plan_mode_tool.py +28 -0
  428. src/harness/src/openharness/tools/exit_worktree_tool.py +42 -0
  429. src/harness/src/openharness/tools/file_edit_tool.py +95 -0
  430. src/harness/src/openharness/tools/file_read_tool.py +72 -0
  431. src/harness/src/openharness/tools/file_write_tool.py +87 -0
  432. src/harness/src/openharness/tools/glob_tool.py +175 -0
  433. src/harness/src/openharness/tools/grep_tool.py +374 -0
  434. src/harness/src/openharness/tools/image_generation_tool.py +447 -0
  435. src/harness/src/openharness/tools/image_to_text_tool.py +237 -0
  436. src/harness/src/openharness/tools/list_mcp_resources_tool.py +36 -0
  437. src/harness/src/openharness/tools/lsp_tool.py +154 -0
  438. src/harness/src/openharness/tools/mcp_auth_tool.py +71 -0
  439. src/harness/src/openharness/tools/mcp_tool.py +72 -0
  440. src/harness/src/openharness/tools/notebook_edit_tool.py +97 -0
  441. src/harness/src/openharness/tools/read_mcp_resource_tool.py +38 -0
  442. src/harness/src/openharness/tools/remote_trigger_tool.py +74 -0
  443. src/harness/src/openharness/tools/send_message_tool.py +58 -0
  444. src/harness/src/openharness/tools/skill_tool.py +43 -0
  445. src/harness/src/openharness/tools/sleep_tool.py +32 -0
  446. src/harness/src/openharness/tools/task_create_tool.py +56 -0
  447. src/harness/src/openharness/tools/task_get_tool.py +33 -0
  448. src/harness/src/openharness/tools/task_list_tool.py +35 -0
  449. src/harness/src/openharness/tools/task_output_tool.py +35 -0
  450. src/harness/src/openharness/tools/task_stop_tool.py +30 -0
  451. src/harness/src/openharness/tools/task_update_tool.py +50 -0
  452. src/harness/src/openharness/tools/team_create_tool.py +31 -0
  453. src/harness/src/openharness/tools/team_delete_tool.py +30 -0
  454. src/harness/src/openharness/tools/todo_write_tool.py +46 -0
  455. src/harness/src/openharness/tools/tool_search_tool.py +38 -0
  456. src/harness/src/openharness/tools/web_fetch_tool.py +117 -0
  457. src/harness/src/openharness/tools/web_search_tool.py +119 -0
  458. src/harness/src/openharness/ui/__init__.py +5 -0
  459. src/harness/src/openharness/ui/app.py +320 -0
  460. src/harness/src/openharness/ui/backend_host.py +941 -0
  461. src/harness/src/openharness/ui/coordinator_drain.py +198 -0
  462. src/harness/src/openharness/ui/input.py +32 -0
  463. src/harness/src/openharness/ui/output.py +265 -0
  464. src/harness/src/openharness/ui/permission_dialog.py +14 -0
  465. src/harness/src/openharness/ui/protocol.py +247 -0
  466. src/harness/src/openharness/ui/react_launcher.py +179 -0
  467. src/harness/src/openharness/ui/runtime.py +799 -0
  468. src/harness/src/openharness/ui/textual_app.py +495 -0
  469. src/harness/src/openharness/utils/__init__.py +0 -0
  470. src/harness/src/openharness/utils/file_lock.py +86 -0
  471. src/harness/src/openharness/utils/fs.py +98 -0
  472. src/harness/src/openharness/utils/helpers.py +77 -0
  473. src/harness/src/openharness/utils/network_guard.py +340 -0
  474. src/harness/src/openharness/utils/shell.py +147 -0
  475. src/harness/src/openharness/vim/__init__.py +5 -0
  476. src/harness/src/openharness/vim/transitions.py +8 -0
  477. src/harness/src/openharness/voice/__init__.py +7 -0
  478. src/harness/src/openharness/voice/keyterms.py +10 -0
  479. src/harness/src/openharness/voice/stream_stt.py +8 -0
  480. src/harness/src/openharness/voice/voice_mode.py +44 -0
  481. src/llm/__init__.py +29 -0
  482. src/llm/image_generation.py +402 -0
  483. src/llm/provider_registry.py +419 -0
  484. src/llm/runtime_env.py +64 -0
  485. src/llm/structured_output.py +131 -0
  486. src/llm/vision.py +198 -0
  487. src/memory/__init__.py +2 -0
  488. src/memory/api/__init__.py +1 -0
  489. src/memory/api/base_memory_system_api.py +98 -0
  490. src/memory/api/base_symbolic_memory_system_api.py +190 -0
  491. src/memory/api/base_vector_memory_system_api.py +116 -0
  492. src/memory/api/faiss_memory_system_api.py +228 -0
  493. src/memory/api/slot_process_api.py +827 -0
  494. src/memory/api/symbolic_memory_system_api.py +572 -0
  495. src/memory/memory_system/__init__.py +48 -0
  496. src/memory/memory_system/component_taxonomy.py +430 -0
  497. src/memory/memory_system/llm.py +437 -0
  498. src/memory/memory_system/models.py +168 -0
  499. src/memory/memory_system/user_prompt.py +418 -0
  500. src/memory/memory_system/utils.py +282 -0
  501. src/memory/memory_system/vectorstore.py +311 -0
  502. src/memory/memory_system/working_slot.py +99 -0
  503. src/pipeline/__init__.py +129 -0
  504. src/pipeline/contracts.py +531 -0
  505. src/pipeline/discipline_taxonomy.py +916 -0
  506. src/pipeline/evidence_coverage_ledger.py +1150 -0
  507. src/pipeline/evidence_refinement.py +620 -0
  508. src/pipeline/experiment_to_symbolic.py +137 -0
  509. src/pipeline/multimodal_evidence/__init__.py +28 -0
  510. src/pipeline/multimodal_evidence/capabilities.py +107 -0
  511. src/pipeline/multimodal_evidence/claims.py +135 -0
  512. src/pipeline/multimodal_evidence/contract.py +291 -0
  513. src/pipeline/multimodal_evidence/data_sh_compiler.py +505 -0
  514. src/pipeline/multimodal_evidence/handoff_binding.py +135 -0
  515. src/pipeline/multimodal_evidence/manifest.py +254 -0
  516. src/pipeline/multimodal_evidence/native_analysis.py +479 -0
  517. src/pipeline/multimodal_evidence/perception.py +277 -0
  518. src/pipeline/multimodal_evidence/query_binding.py +65 -0
  519. src/pipeline/multimodal_evidence/rendering.py +120 -0
  520. src/pipeline/multimodal_evidence/safety.py +42 -0
  521. src/pipeline/multimodal_evidence/sampling.py +69 -0
  522. src/pipeline/multimodal_evidence/service.py +148 -0
  523. src/pipeline/multimodal_evidence/survey_integration.py +460 -0
  524. src/pipeline/paper_identity.py +52 -0
  525. src/pipeline/research_design_inventory.py +338 -0
  526. src/pipeline/research_domain_resolution.py +669 -0
  527. src/pipeline/research_identity.py +548 -0
  528. src/pipeline/research_question_contract.py +646 -0
  529. src/pipeline/retrieval_lanes.py +889 -0
  530. src/pipeline/run_loop.py +862 -0
  531. src/pipeline/science_events.py +30 -0
  532. src/pipeline/science_manifests.py +602 -0
  533. src/pipeline/science_run.py +918 -0
  534. src/pipeline/science_stages.py +709 -0
  535. src/pipeline/science_workflow.py +807 -0
  536. src/pipeline/sh_cluster_projection.py +306 -0
  537. src/pipeline/sh_graph_provenance.py +648 -0
  538. src/pipeline/subhypothesis_decomposition.py +392 -0
  539. src/pipeline/subhypothesis_evidence.py +856 -0
  540. src/pipeline/survey_evidence_plan.py +858 -0
  541. src/pipeline/survey_gap_adjudication.py +647 -0
  542. src/pipeline/survey_gap_candidates.py +840 -0
  543. src/pipeline/survey_gap_ledger.py +683 -0
  544. src/pipeline/survey_gap_triage.py +401 -0
  545. src/pipeline/survey_handoff_persistence.py +481 -0
  546. src/pipeline/survey_handoff_projection.py +457 -0
  547. src/pipeline/survey_idea_handoff.py +1112 -0
  548. src/pipeline/survey_idea_loader.py +289 -0
  549. src/research_run_ids.py +11 -0
@@ -0,0 +1,1122 @@
1
+ # ============================================
2
+ # Qwen-Sci Unified Configuration
3
+ # ============================================
4
+
5
+ # Global settings
6
+ project:
7
+ name: "qwen-sci"
8
+ root: "${repo_root}"
9
+
10
+ # ============================================
11
+ # Workspace Configuration
12
+ # ============================================
13
+ workspace:
14
+ root: "workspace"
15
+
16
+ # ============================================
17
+ # Shared API Configuration
18
+ # ============================================
19
+ llm:
20
+ default_provider: "${oc.env:QWENSCI_LLM_PROVIDER,'qwen'}"
21
+ providers:
22
+ openai:
23
+ api_key_env: "OPENAI_API_KEY"
24
+ api_key: "${oc.env:OPENAI_API_KEY,''}"
25
+ base_url: "${oc.env:OPENAI_BASE_URL,''}"
26
+ api_style: "chat_completions"
27
+ openhands_model_prefix: "openai"
28
+ tokenizer_fallback: "o200k_base"
29
+ token_limit_parameter: ""
30
+ default_models:
31
+ survey: "gpt-5.4-mini"
32
+ judge: "gpt-5.5"
33
+ blog: "gpt-5.5"
34
+ idea: "gpt-5.5"
35
+ idea_generation: "gpt-5-mini"
36
+ idea_evaluation: "gpt-5.5"
37
+ experiment: "gpt-5.4"
38
+ experiment_design: "gpt-5.4"
39
+ author: "gpt-5.4"
40
+ planner: "gpt-5.4"
41
+ worker: "gpt-5-mini"
42
+ reviewer: "gpt-5.4"
43
+ master: "gpt-5.4"
44
+ memory_filter: "gpt-5-mini"
45
+ memory_router: "gpt-5-mini"
46
+ memory_synthesis: "gpt-5.4"
47
+ qwen:
48
+ api_key_env: "DASHSCOPE_API_KEY"
49
+ api_key: "${oc.env:DASHSCOPE_API_KEY,''}"
50
+ base_url: "${oc.env:DASHSCOPE_BASE_URL,'https://dashscope.aliyuncs.com/compatible-mode/v1'}"
51
+ api_style: "chat_completions"
52
+ openhands_model_prefix: "openai"
53
+ tokenizer_fallback: "utf8_bytes"
54
+ token_limit_parameter: "max_tokens"
55
+ default_models:
56
+ survey: "qwen3.6-flash"
57
+ judge: "qwen3.8-max"
58
+ blog: "qwen3.8-max"
59
+ idea: "qwen3.8-flash"
60
+ idea_generation: "qwen3.8-flash"
61
+ idea_evaluation: "qwen3-max-2026-01-23"
62
+ experiment: "qwen3.7-plus"
63
+ experiment_design: "qwen3.8-flash"
64
+ author: "qwen3.8-flash"
65
+ planner: "qwen3.7-plus"
66
+ worker: "qwen3.7-plus"
67
+ reviewer: "qwen3.7-plus"
68
+ master: "qwen3.7-plus"
69
+ memory_filter: "qwen3.6-flash"
70
+ memory_router: "qwen3.6-flash"
71
+ memory_synthesis: "qwen3.8-max"
72
+ models:
73
+ qwen3-max-2026-01-23:
74
+ provider: "qwen"
75
+ api_style: "responses"
76
+ capabilities:
77
+ responses: true
78
+ reasoning: true
79
+ json_schema: true
80
+ json_object: true
81
+ qwen3.7-plus:
82
+ provider: "qwen"
83
+ api_style: "chat_completions"
84
+ capabilities:
85
+ chat_completions: true
86
+ streaming: true
87
+ tools: true
88
+ streaming_tools: true
89
+ vision: true
90
+ json_object: true
91
+ qwen3.8-max:
92
+ provider: "qwen"
93
+ api_style: "chat_completions"
94
+ capabilities:
95
+ chat_completions: true
96
+ streaming: true
97
+ vision: true
98
+ json_object: true
99
+ qwen3.8-flash:
100
+ provider: "qwen"
101
+ api_style: "chat_completions"
102
+ capabilities:
103
+ chat_completions: true
104
+ streaming: true
105
+ json_object: true
106
+ max_output_tokens: 128000
107
+ qwen3.6-flash:
108
+ provider: "qwen"
109
+ api_style: "chat_completions"
110
+ capabilities:
111
+ chat_completions: true
112
+ streaming: true
113
+ json_object: true
114
+ qwen3-vl-plus:
115
+ provider: "qwen"
116
+ api_style: "chat_completions"
117
+ capabilities:
118
+ chat_completions: true
119
+ streaming: true
120
+ vision: true
121
+ json_object: true
122
+ qwen3-vl-flash:
123
+ provider: "qwen"
124
+ api_style: "chat_completions"
125
+ capabilities:
126
+ chat_completions: true
127
+ streaming: true
128
+ vision: true
129
+ json_object: true
130
+ wan2.7-image-pro:
131
+ provider: "qwen"
132
+ api_style: "images"
133
+ capabilities:
134
+ image_generation: true
135
+ qwen-image-3.0-pro:
136
+ provider: "qwen"
137
+ api_style: "images"
138
+ capabilities:
139
+ image_generation: true
140
+ z-image-turbo:
141
+ provider: "qwen"
142
+ api_style: "images"
143
+ capabilities:
144
+ image_generation: true
145
+
146
+ vision:
147
+ provider: "${oc.env:VISION_LLM_PROVIDER,'qwen'}"
148
+ quality_model: "${oc.env:VISION_QUALITY_MODEL,'qwen3-vl-plus'}"
149
+ batch_model: "${oc.env:VISION_BATCH_MODEL,'qwen3-vl-flash'}"
150
+ api_key: "${oc.env:DASHSCOPE_API_KEY,''}"
151
+ base_url: "${oc.env:DASHSCOPE_BASE_URL,'https://dashscope.aliyuncs.com/compatible-mode/v1'}"
152
+ timeout_seconds: 120
153
+ max_tokens: 2048
154
+
155
+ image_generation:
156
+ provider: "${oc.env:IMAGE_GENERATION_PROVIDER,'qwen'}"
157
+ api_key: "${oc.env:DASHSCOPE_API_KEY,''}"
158
+ base_url: "${oc.env:DASHSCOPE_IMAGE_BASE_URL,'https://dashscope.aliyuncs.com/api/v1'}"
159
+ timeout_seconds: 180
160
+ poll_interval_seconds: 1
161
+ role_models:
162
+ academic_figure: "${oc.env:IMAGE_ACADEMIC_FIGURE_MODEL,'qwen-image-3.0-pro'}"
163
+ text_rich_figure: "${oc.env:IMAGE_TEXT_RICH_FIGURE_MODEL,'qwen-image-3.0-pro'}"
164
+ draft: "${oc.env:IMAGE_DRAFT_MODEL,'z-image-turbo'}"
165
+ models:
166
+ wan2.7-image-pro:
167
+ endpoint_style: "dashscope_multimodal"
168
+ endpoint_path: "services/aigc/multimodal-generation/generation"
169
+ supports_reference: false
170
+ supports_edit: false
171
+ supports_mask: false
172
+ supports_4k: true
173
+ qwen-image-3.0-pro:
174
+ endpoint_style: "dashscope_multimodal"
175
+ endpoint_path: "services/aigc/multimodal-generation/generation"
176
+ supports_reference: false
177
+ supports_edit: false
178
+ supports_mask: false
179
+ supports_4k: false
180
+ z-image-turbo:
181
+ endpoint_style: "dashscope_multimodal"
182
+ endpoint_path: "services/aigc/multimodal-generation/generation"
183
+ supports_reference: false
184
+ supports_edit: false
185
+ supports_mask: false
186
+ supports_4k: false
187
+
188
+ api:
189
+ openai:
190
+ api_key: "${oc.env:OPENAI_API_KEY,''}"
191
+ api_base: "${oc.env:OPENAI_API_BASE,''}"
192
+ base_url: "${oc.env:OPENAI_BASE_URL,''}"
193
+ semantic_scholar:
194
+ api_key: "${oc.env:SEMANTIC_SCHOLAR_API_KEY,''}"
195
+ base_url: "https://api.semanticscholar.org"
196
+ github_ai:
197
+ token: "${oc.env:GITHUB_AI_TOKEN,''}"
198
+ serper:
199
+ api_key: "${oc.env:SERPER_API_KEY,''}"
200
+ jina:
201
+ api_key: "${oc.env:JINA_API_KEY,''}"
202
+ tavily:
203
+ api_key: "${oc.env:TAVILY_API_KEY,''}"
204
+ remote_url_template: "https://mcp.tavily.com/mcp/?tavilyApiKey={api_key}"
205
+ huggingface:
206
+ endpoint: "https://hf-mirror.com"
207
+
208
+ # ============================================
209
+ # Survey Agent Configuration
210
+ # ============================================
211
+ survey:
212
+ output:
213
+ root_dir: "${repo_root}/src/agents/survey_agent/outputs"
214
+ multimodal_evidence:
215
+ enabled: false
216
+ allow_remote_perception: false
217
+ quality_model: "qwen3-vl-plus"
218
+ max_data_anchored_sh: 3
219
+ max_vl_calls: 8
220
+ max_preview_pixels: 1600000
221
+ max_preview_bytes: 4194304
222
+ max_records_per_modality: 24
223
+ max_input_file_bytes: 52428800
224
+ max_total_input_bytes: 268435456
225
+ sampling_policy: "stratified_by_label_group_condition_timepoint_round_robin_v1"
226
+ input_spec: {}
227
+ local_input_context: {}
228
+ runtime_evidence: {}
229
+ BasicInfo:
230
+ topic: ""
231
+ research_title: ""
232
+ declared_domain: ""
233
+ research_objective: ""
234
+ research_brief: ""
235
+ research_context_path: ""
236
+ research_context_use_llm: true
237
+ research_context: {}
238
+ research_design_inventory: {}
239
+ project_context_artifact_path: ""
240
+ survey_run_id: ""
241
+ subhypotheses: []
242
+ subhypothesis_decomposition: {}
243
+ subhypothesis_decomposition_path: ""
244
+ subhypothesis_retrieval: {}
245
+ cache_path: "./database"
246
+ debug: false
247
+ error_conservatism_mode: false
248
+ skip_exist: false
249
+ adapter_mode: false
250
+ APIInfo:
251
+ llm_provider: "${oc.env:QWENSCI_LLM_PROVIDER,'qwen'}"
252
+ llm_api_key: ""
253
+ llm_api_base_url: ""
254
+ llm_model_name: "${oc.env:SURVEY_LLM_MODEL,''}"
255
+ llm_max_context_length: 880000
256
+ use_stream_mode: false
257
+ # Keep remote LLM connection pressure below the token-plan endpoint's
258
+ # stable operating range. Survey presets may not exceed this default.
259
+ batch_chat_agent_worker: 4
260
+ chat_timeout: 900
261
+ batch_chat_timeout: 1800
262
+ # OpenAlex is the primary literature-discovery provider. API keys are
263
+ # required by the current OpenAlex API; the adapter sends this value only
264
+ # as an Authorization header and never writes it to logs or cache artifacts.
265
+ openalex_base_url: "https://api.openalex.org"
266
+ openalex_api_key: "${oc.env:OPENALEX_API_KEY,''}"
267
+ # Optional contact address sent as an HTTP From header. It is no longer a
268
+ # substitute for API-key authentication or a rate-limit policy.
269
+ openalex_email: "${oc.env:OPENALEX_EMAIL,''}"
270
+ # Keep all local OpenAlex request starts below the configured service budget.
271
+ # This is a request-rate cap, not a worker-count setting.
272
+ openalex_requests_per_second: 8
273
+ # PyAlex itself does not pass a requests timeout. The OpenAlex adapter owns
274
+ # timeout and retry so every attempt is observable and rate-limited.
275
+ openalex_connect_timeout_seconds: 10
276
+ openalex_read_timeout_seconds: 30
277
+ openalex_api_max_retry: 2
278
+ openalex_retry_base_delay_seconds: 1
279
+ openalex_retry_max_delay_seconds: 60
280
+ openalex_search_per_page: 10
281
+ openalex_graph_candidate_per_page: 100
282
+ openalex_graph_recent_quota: 15
283
+ openalex_graph_high_impact_quota: 15
284
+ openalex_graph_cache_schema_version: 2
285
+ # Unpaywall resolves DOI-backed open-access PDFs before provider URLs. Its
286
+ # public API requires a contact email and is disabled when this is unset.
287
+ unpaywall_base_url: "https://api.unpaywall.org/v2"
288
+ unpaywall_email: "${oc.env:UNPAYWALL_EMAIL,''}"
289
+ unpaywall_timeout: 30
290
+ semantic_scholar_api_key: "${oc.env:SEMANTIC_SCHOLAR_API_KEY,''}"
291
+ low_flow_mode: false
292
+ low_flow_latency: 0
293
+ exponential_backoff: true
294
+ exponential_backoff_time: 1
295
+ exponential_backoff_max_time: 60
296
+ arxiv_api_max_retry: 3
297
+ semantic_scholar_api_max_retry: 3
298
+ ModuleInfo:
299
+ WorkCollector:
300
+ download_safe_mode: false
301
+ download_timeout: 60
302
+ download_in_parallel: true
303
+ download_parallel_workers: 4
304
+ pdf_parse_batch_size: 1
305
+ # Legal OA full-text acquisition is independent from paper/SH relevance.
306
+ # `access_context_generation` must change when a legitimate TDM or other
307
+ # authorized provider is introduced, so anonymous 403 caches are ignored.
308
+ fulltext_resolution_enabled: true
309
+ fulltext_unpaywall_all_locations_enabled: true
310
+ # Lower-priority public metadata routes; direct PDF URLs are byte-checked
311
+ # and non-PDF landing URLs require an explicit OA declaration.
312
+ fulltext_generic_metadata_urls_enabled: true
313
+ # Runs immediately after Unpaywall candidates, with a bounded DOI
314
+ # redirect chain; never use it to bypass subscription access controls.
315
+ fulltext_doi_landing_fallback_enabled: true
316
+ fulltext_max_candidates_per_paper: 12
317
+ fulltext_max_declared_pdf_links_per_landing_page: 8
318
+ fulltext_max_doi_landing_recovery_pdf_attempts: 4
319
+ fulltext_landing_page_timeout_seconds: 20
320
+ fulltext_landing_page_max_bytes: 1500000
321
+ fulltext_landing_page_max_redirects: 5
322
+ fulltext_pdf_max_bytes: 50000000
323
+ fulltext_per_host_concurrency: 2
324
+ # Bounded, polite retries are only for transient GET failures (429/5xx
325
+ # and transport errors), never for authentication or subscription walls.
326
+ fulltext_http_max_retries: 2
327
+ fulltext_http_retry_base_delay_seconds: 1
328
+ fulltext_http_retry_max_delay_seconds: 10
329
+ fulltext_connect_timeout_seconds: 10
330
+ fulltext_read_timeout_seconds: 60
331
+ fulltext_oa_resolution_cache_ttl_seconds: 604800
332
+ fulltext_pdf_success_cache_ttl_seconds: 2592000
333
+ fulltext_failure_404_ttl_seconds: 86400
334
+ fulltext_failure_access_denied_ttl_seconds: 1800
335
+ fulltext_failure_rate_limited_ttl_seconds: 900
336
+ fulltext_failure_non_pdf_ttl_seconds: 21600
337
+ fulltext_failure_signed_url_ttl_seconds: 300
338
+ fulltext_failure_transient_first_ttl_seconds: 60
339
+ fulltext_failure_transient_ttl_seconds: 180
340
+ fulltext_host_denial_threshold: 2
341
+ fulltext_host_denial_window_seconds: 600
342
+ fulltext_host_circuit_ttl_seconds: 3600
343
+ fulltext_access_context_generation: "anonymous-v1"
344
+ invalidate_fulltext_failure_cache: false
345
+ fulltext_provenance_enabled: true
346
+ cache_enabled: true
347
+ max_seed_paper_num: 18
348
+ use_seed_filter_LLM: true
349
+ LLM_seed_threshold: 4
350
+ auto_decompose_subhypotheses: true
351
+ subhypothesis_decomposition_provider: "qwen"
352
+ subhypothesis_decomposition_model: "qwen3.8-max"
353
+ subhypothesis_decomposition_min_count: 3
354
+ subhypothesis_decomposition_max_count: 6
355
+ subhypothesis_decomposition_temperature: 0.1
356
+ subhypothesis_decomposition_max_output_tokens: 16000
357
+ subhypothesis_decomposition_cache_enabled: true
358
+ enable_subhypothesis_retrieval: true
359
+ # Persist normalized provider results for SH slot/query-variant lanes.
360
+ # This cache avoids duplicate OpenAlex/Semantic Scholar requests only;
361
+ # every run still recomputes local merge, SH semantic assessment and seed
362
+ # selection. Empty completed requests use a short TTL, while failed
363
+ # provider calls are never written as empty scientific results.
364
+ sh_retrieval_cache_enabled: true
365
+ sh_retrieval_cache_success_ttl_seconds: 604800
366
+ sh_retrieval_cache_empty_ttl_seconds: 21600
367
+ # Set refresh=true for one run to bypass reads and update entries. Set
368
+ # invalidate=true only for an explicit one-time cache clear, then reset it.
369
+ refresh_sh_retrieval_cache: false
370
+ invalidate_sh_retrieval_cache: false
371
+ # LLM classifies a paper's semantic contribution to an SH before seed
372
+ # selection. It does not require a complete causal chain or all slots.
373
+ enable_sh_paper_semantic_assessment: true
374
+ sh_paper_semantic_assessment_cache_enabled: true
375
+ # Temporarily keep arXiv discovery lanes offline; OpenAlex remains active.
376
+ enable_arxiv_discovery: false
377
+ subhypothesis_relevance_threshold: 3
378
+ subhypothesis_max_unique_papers: 10
379
+ subhypothesis_max_slots_per_paper: 2
380
+ # A slot's query variants are alternative recall paths, never a joint
381
+ # eligibility condition for one paper. Values can only narrow the
382
+ # contract-level safety caps of 5 variants and 6 terms.
383
+ max_query_variants_per_slot: 5
384
+ max_terms_per_query_variant: 6
385
+ min_slot_candidates_before_relaxation: 5
386
+ enable_adjacent_discipline_precision_lane: true
387
+ max_adjacent_discipline_fields: 3
388
+ enable_slot_semantic_scholar_fallback: true
389
+ # Run independent slot tasks concurrently. Their OpenAlex requests still
390
+ # share the process-wide requests-per-second limiter under APIInfo.
391
+ slot_retrieval_parallel_workers: 4
392
+ reference_graph_depth: 1
393
+ # Exploration seeds are useful graph roots, but receive a bounded
394
+ # traversal budget distinct from direct evidence seeds.
395
+ exploration_seed_reference_graph_depth: 1
396
+ sentence_transformer_model: models/bge-m3
397
+ sentence_transformer_batch_size: 4
398
+ expand_in_local_paper_graph: false
399
+ advanced_filter_in_local_paper_graph_expansion: true
400
+ related_work_top_k: 30
401
+ log_related_work_num: -1
402
+ related_work_threshold: 0.5
403
+ related_work_threshold_for_llm: 4
404
+ # `related_work_top_k` is a per-seed embedding pre-filter. This is the
405
+ # run-level cap applied only after all graph candidates pass LLM
406
+ # relatedness filtering, so only the globally highest-related papers
407
+ # enter PDF download, parsing, and deep reading.
408
+ fulltext_download_max_papers: 70
409
+ # Citation expansion is only a discovery route. A selected expanded
410
+ # paper may be promoted into its own SH evidence slot only after a
411
+ # complete-section keynote and a separate SH assessment. Inspect up to
412
+ # twice an SH's remaining writing deficit, never more than this cap.
413
+ enable_fulltext_expanded_promotion: true
414
+ expanded_fulltext_promotion_candidate_multiplier: 2
415
+ expanded_fulltext_promotion_max_candidates_per_sh: 40
416
+ relatedness_temperature: 0.1
417
+ RAG_source_use_embedding_filter: true
418
+ RAG_source_use_LLM_filter: false
419
+ RAG_source_downloadable_only: false
420
+ use_ds_when_graph_fail: true
421
+ Database:
422
+ default_top_k: 20
423
+ PaperGraphRetriever:
424
+ db_path: data/processed/graph.db
425
+ WorkAnalyzer:
426
+ abstract_only_mode: false
427
+ abstract_when_full_text_fail: true
428
+ cache_enabled: true
429
+ use_local_paper_graph_keynotes: false
430
+ paper_reading_temperature: 0.3
431
+ paper_reading_max_retry: 5
432
+ llm_max_context_overhead_length_in_paper_reading: 20000
433
+ # MinerU uses one ## heading for every physical paper section. Keep
434
+ # whole sections together and split very long papers across requests
435
+ # instead of token-prefix truncating a chapter in the middle.
436
+ fulltext_section_packing_enabled: true
437
+ fulltext_section_max_tokens: 512000
438
+ fulltext_section_prompt_reserve_tokens: 24000
439
+ fulltext_section_max_output_tokens: 16000
440
+ fulltext_section_batch_worker: 10
441
+ # Keep up to 10 workers for ordinary short packets, but cap the total
442
+ # estimated input token load admitted to each request wave. This avoids
443
+ # ten near-512k contexts being sent concurrently to the provider.
444
+ fulltext_section_max_in_flight_tokens: 800000
445
+ oversized_unsplittable_section_policy: abstract
446
+ clustering_batch_size: 8
447
+ clustering_temperature: 1.0
448
+ clustering_in_steps: true
449
+ clustering_batch_size_in_creation: 6
450
+ clustering_batch_size_in_assignment: 10
451
+ cluster_assign_fast_mode: true
452
+ paper_clustering_max_retry: 10
453
+ paper_clustering_creation_max_retry: 3
454
+ paper_clustering_assignment_max_retry: 4
455
+ propose_question_temperature: 0.5
456
+ anwer_question_temperature: 0.2
457
+ intra_cluster_analysis_max_retry: 5
458
+ intra_cluster_analysis_temperature: 1.0
459
+ intra_clustering_probelm_proposing_max_retry: 10
460
+ graph_keynote_extraction_batch_retry: 7
461
+ graph_graph_keynote_extraction_temperature: 0.1
462
+ use_ds_keynotes_when_graph_fail: true
463
+ SurveyGenerator:
464
+ include_initial_analysis: false
465
+ include_relation_graph: true
466
+ include_relation_table: true
467
+ include_code_report: false
468
+ include_env_report: false
469
+ omit_error_preserve_retry_time: 2
470
+ outline_generation_in_steps: true
471
+ outline_generation_draft_max_retry: 3
472
+ outline_generation_draft_batch_size: 20
473
+ outline_generation_draft_max_iterations: 5
474
+ outline_generation_draft_empty_keynotes_iteration: 1
475
+ outline_draft_RAG_topk: 60
476
+ outline_generation_assign_max_retry: 10
477
+ outline_generation_assign_batch_size: 20
478
+ outline_assign_RAG_topk: 20
479
+ outline_assign_fast_mode: true
480
+ outline_generation_temperature: 0.5
481
+ # Preflight outline prompts against component and total input budgets.
482
+ # Full SH provenance remains in artifacts; LLM prompts receive a compact
483
+ # projection that preserves only writing-relevant evidence constraints.
484
+ outline_prompt_max_input_tokens: 240000
485
+ outline_max_output_tokens: 16000
486
+ outline_evidence_plan_max_input_tokens: 100000
487
+ outline_current_outline_max_input_tokens: 20000
488
+ outline_keynotes_max_input_tokens: 70000
489
+ outline_analysis_max_input_tokens: 12000
490
+ outline_rag_max_input_tokens: 12000
491
+ outline_repair_previous_response_max_input_tokens: 8000
492
+ outline_repair_current_outline_max_input_tokens: 8000
493
+ # Outline drafting sees SH-covering representatives; paper assignment
494
+ # still receives the full admitted set after the shape is accepted.
495
+ outline_representative_papers_per_sh: 4
496
+ outline_representative_max_papers: 30
497
+ outline_representative_include_context_papers: true
498
+ # Bound the complete survey at 30k words, then derive per-subsection
499
+ # budgets from the actual outline. The current 33.3k/40k total-survey
500
+ # contract permits up to 2k words per subsection for the target outline.
501
+ survey_target_words: 32000
502
+ survey_max_words: 40000
503
+ # Every SH gets one bounded writing whitelist. Direct/qualified/context
504
+ # non-expanded papers fill it first; complete-section-promoted citation
505
+ # expansions may fill only the remaining positions.
506
+ writing_max_papers_per_sh: 20
507
+ outline_min_sections: 5
508
+ outline_target_sections: 6
509
+ outline_max_sections: 7
510
+ outline_min_subsections_per_section: 1
511
+ outline_target_subsections_per_section: 3
512
+ outline_max_subsections_per_section: 3
513
+ subsection_target_min_words: 875
514
+ subsection_target_max_words: 2000
515
+ subsection_target_citations: 3
516
+ subsection_max_citations: 5
517
+ section_preamble_target_words: 250
518
+ section_preamble_max_words: 400
519
+ section_preamble_target_citations: 1
520
+ section_preamble_max_citations: 2
521
+ outline_generation_batch_size: 16
522
+ outline_generation_max_retry: 3
523
+ outline_generation_max_retry_in_generation_loop: 6
524
+ subsection_draft_temperature: 0.5
525
+ subsection_draft_max_retry: 5
526
+ # Temporary operational bypass: keep visible citation checks, but do not
527
+ # block drafting on LLM-generated claim-trace metadata.
528
+ claim_trace_validation_enabled: false
529
+ # A structurally invalid evidence trace repairs metadata only. It never
530
+ # regenerates an otherwise accepted long subsection.
531
+ claim_trace_repair_max_attempts: 2
532
+ claim_trace_repair_max_output_tokens: 2048
533
+ section_draft_max_retry: 3
534
+ always_omit_error_in_draft_validation: true
535
+ section_draft_temperature: 0.1
536
+ draft_refinement_temperature: 1.0
537
+ section_draft_max_error_info_length: 500
538
+ subsection_draft_max_error_info_length: 500
539
+ outline_max_error_info_length: 500
540
+ llm_max_context_overhead_length_generation: 20000
541
+ llm_max_context_overhead_length_outline_generation: 10000
542
+ # Legacy keys retained for external overrides; the dynamic total budget
543
+ # above controls new drafts instead of per-unit hard minima.
544
+ subsection_least_words: 875
545
+ subsection_least_citations: 3
546
+ section_least_words: 4250
547
+ section_least_citations: 3
548
+ section_preamable_least_words: 250
549
+ section_preamble_least_words: 250
550
+ section_preamble_least_citations: 3
551
+ draft_length_relax_ratio: 0.1
552
+ use_full_text_in_survey_generation: false
553
+ include_other_relevant_papers_RAG_in_outline: true
554
+ outline_RAG_topk: 200
555
+ include_other_relevant_papers_RAG: true
556
+ section_RAG_topk: 60
557
+ subsection_RAG_topk: 60
558
+ use_title_in_draft: true
559
+ enable_review_and_revise: true
560
+ agentic_refine_section: true
561
+ section_review_temperature: 1.0
562
+ section_review_retry: 3
563
+ # In evidence-bounded writing, run a safe, section-local quality pass
564
+ # instead of the legacy free-form review/revision agent. It never
565
+ # blocks completion: sections still below the score target are retained
566
+ # after this bounded number of accepted revisions.
567
+ evidence_bounded_section_quality_review_enabled: true
568
+ evidence_bounded_section_quality_score_threshold: 8.0
569
+ evidence_bounded_section_quality_max_improvements: 2
570
+ evidence_bounded_section_quality_review_retry: 2
571
+ evidence_bounded_section_quality_revise_retry: 2
572
+ reviewer_max_suggestions: 5
573
+ section_revision_RAG_topk: 30
574
+ section_revise_temperature: 0.5
575
+ section_revise_retry: 3
576
+ no_suggestion_run_each_iteration: 2
577
+ max_review_revise_iterations: 3
578
+ revise_section_in_parallel: 4
579
+ draft_refinement_in_parts: true
580
+ refine_in_parts_mode: 2
581
+ draft_refinement_max_retry: 7
582
+ review_and_revise_whole_survey_in_refinement: true
583
+ agentic_refine_survey: true
584
+ review_and_revise_whole_survey_max_iteration: 5
585
+ valid_title_min_similarity: 0.5
586
+ # Optional post-save visual companion. It never replaces survey.md or
587
+ # blocks the survey pipeline: provider/QC failures simply omit a figure.
588
+ SurveyVisualization:
589
+ enabled: true
590
+ output_mode: companion_markdown
591
+ write_back_to_survey_md: false
592
+ # Final image files live directly beside survey.md, not in a subfolder.
593
+ image_output_location: survey_output_directory
594
+ image_filename_template: "fig_{index:02d}_{slug}.png"
595
+ min_figures: 3
596
+ max_figures: 5
597
+ candidates_per_figure: 2
598
+ allowed_figure_types:
599
+ - overview_framework
600
+ - mechanism
601
+ - causal_pathway
602
+ - evidence_to_inference
603
+ - method_comparison
604
+ - multiscale_synthesis
605
+ - conceptual_workflow
606
+ - research_landscape
607
+ - future_roadmap
608
+ # The Qwen image role names resolve through the top-level
609
+ # image_generation.role_models configuration.
610
+ draft_image_role: draft
611
+ final_image_role: academic_figure
612
+ optional_text_rich_image_role: text_rich_figure
613
+ final_image_size: "2048x1536"
614
+ # Used automatically when the configured Qwen image model does not
615
+ # declare 4K support (for example qwen-image-3.0-pro).
616
+ compatible_image_size: "2048x1536"
617
+ # All reader-facing image prose is English. The image prompt itself asks
618
+ # Qwen not to render prose; captions are inserted in Markdown instead.
619
+ reader_facing_language: en
620
+ caption_language: en
621
+ alt_text_language: en
622
+ overlay_label_language: en
623
+ prompt_language: en
624
+ # Image-model text is unreliable; concise English concept labels are
625
+ # overlaid locally when the VisualBrief supplies them.
626
+ append_english_label_strip: true
627
+ # One LLM-generated palette is locked and reused by all figures in a run.
628
+ generate_article_style_profile: true
629
+ palette_source: llm
630
+ lock_palette_per_survey: true
631
+ palette_min_colors: 4
632
+ palette_max_colors: 6
633
+ # A section excerpt, never the whole survey, is the scientific input to
634
+ # each figure. Data charts remain out of scope for image generation.
635
+ planner_section_max_chars: 6000
636
+ planner_temperature: 0.2
637
+ require_evidence_anchor: true
638
+ require_visual_brief: true
639
+ # A rejected LLM visual brief gets one section-local JSON repair pass
640
+ # before the figure is omitted. Scientific evidence gates remain strict.
641
+ visual_brief_repair_enabled: true
642
+ visual_brief_repair_max_output_tokens: 2400
643
+ allow_unsupported_claims: false
644
+ allow_generated_numeric_charts: false
645
+ show_explicit_evidence_gaps: true
646
+ visual_qc_enabled: true
647
+ # Retry only the affected figure when QC reports a locked-palette mismatch.
648
+ regenerate_on_palette_mismatch: true
649
+ max_regeneration_attempts: 1
650
+ # Visual enhancement is non-blocking by design.
651
+ fail_open: true
652
+ Judge:
653
+ skip_evaluation: false
654
+ use_different_api_for_judge: false
655
+ provider: "${oc.env:SURVEY_JUDGE_PROVIDER,''}"
656
+ model: qwen3.7-plus
657
+ judge_llm_api_key: ""
658
+ judge_llm_api_base_url: ""
659
+ nli_temperature: 0.1
660
+ citation_quality_threshold: 0.5
661
+ remove_failed_citation_in_eval: true
662
+ rubrics_eval_10_dimensions: true
663
+ rubrics_eval_4_dimensions: false
664
+ rubrics_deep_survey_eval: false
665
+ explanation_in_rubric: false
666
+ citation_eval: false
667
+ CodeAnalysis:
668
+ PseudoCreator:
669
+ planner_temperature: 0.5
670
+ planner_max_retry: 3
671
+
672
+
673
+ # ============================================
674
+ # Idea Agent Configuration
675
+ # ============================================
676
+ idea:
677
+ enabled: true
678
+ input: ""
679
+ topic: ""
680
+ mature_idea: ""
681
+ mature_ideas: []
682
+ refinement_scope: ""
683
+
684
+ run:
685
+ LigAgent-Pro: true
686
+ route_matrix_enabled: true
687
+ idea_route_matrix_max_workers: 8
688
+ max_mature_ideas: 12
689
+ allow_problem_reframing: true
690
+ allow_unanchored_seed: true
691
+ allow_high_risk_seed: true
692
+ input: "${idea.input}"
693
+ topic: "${idea.topic}"
694
+ mature_idea: "${idea.mature_idea}"
695
+ mature_ideas: "${idea.mature_ideas}"
696
+ refinement_scope: "${idea.refinement_scope}"
697
+ survey_manifest: ""
698
+ # Optional directory containing exactly one ablation-results JSON file.
699
+ ablation_results_path: ""
700
+ input_interpreter_model: "${idea.agent.model}"
701
+ output_root: "runs"
702
+ console_logs: true
703
+ rag_config: "src/config/default.yaml"
704
+ openai_api_key: "${api.openai.api_key}"
705
+ openai_base_url: "${api.openai.base_url}"
706
+
707
+ agent:
708
+ model: "${oc.env:IDEA_LLM_MODEL,''}"
709
+ paper_keynote_keep_top_k: 10
710
+ workflow_models:
711
+ default: "${idea.agent.model}"
712
+ main:
713
+ knowledge_aquisition: "${idea.agent.model}"
714
+ advanced_analysis: "${idea.agent.model}"
715
+ re_analysis_replan: "${idea.agent.model}"
716
+ idea_generation: "${idea.agent.model}"
717
+ mature_idea_portfolio_generation: "${idea.agent.model}"
718
+ mature_idea_adjudication: "${idea.agent.model}"
719
+ route_context_preparation: "${idea.agent.model}"
720
+ diversity_adjudication: "${idea.agent.model}"
721
+ cross_seed_debate: "${idea.agent.model}"
722
+ portfolio_synthesis: "${idea.agent.model}"
723
+ primary_idea_materialization: "${idea.agent.model}"
724
+
725
+ # Nested knowledge acquisition workflow
726
+ knowledge_acquisition:
727
+ ka_query_generation: "${idea.agent.model}"
728
+ ka_paper_triage: "${idea.agent.model}"
729
+
730
+ # Optional flat overrides by stage name if a stage needs to diverge
731
+ # from its workflow bucket later.
732
+ stage_overrides:
733
+ algorithm_structuring: "${idea.agent.model}"
734
+ algorithm_alignment: "${idea.agent.model}"
735
+ chat_max_retries: 3
736
+ chat_retry_backoff: 2.0
737
+ advanced_analysis_contract_retries: 2
738
+ introduction_max_output_tokens: 25600
739
+ introduction_json_repair_attempts: 2
740
+ paper_enrichment_timeout_sec: 7200
741
+ experiment_findings_extraction:
742
+ model: "${idea.agent.model}"
743
+ temperature: 0.1
744
+ max_output_tokens: 65536
745
+
746
+ mcts:
747
+ max_iterations: 16
748
+ max_depth: 3
749
+ branching_factor: 3
750
+ exploration_constant: 1.2
751
+ idea_taste_mode: "moonshot_inventor"
752
+ # Prompt mode for MCTS generation / retrieval / evaluation.
753
+ # Options:
754
+ # - default
755
+ # - conceptual_surprise
756
+ prompt_mode: "conceptual_surprise"
757
+ generation_model: "${oc.env:IDEA_GENERATION_MODEL,''}"
758
+ evaluation_model: "${oc.env:IDEA_EVALUATION_MODEL,''}"
759
+ generation_temperature: 0.7
760
+ evaluation_temperature: 0.001
761
+ generation_max_tokens: 16384
762
+ evaluation_max_tokens: 16384
763
+ component_novelty_model_path: "${repo_root}/models/bge-m3"
764
+ component_novelty_index_dir: null
765
+ component_novelty_retrieval_top_k: 50
766
+ component_novelty_evidence_top_k: 5
767
+ component_novelty_eval_model: ""
768
+ component_novelty_eval_temperature: 0.001
769
+ component_novelty_eval_max_tokens: 16384
770
+ mechanism_commit_retrieval_top_k: 3
771
+ mechanism_commit_similarity_threshold: 0.6
772
+ theory_transfer_retrieval_top_k: 3
773
+ theory_transfer_similarity_threshold: 0.6
774
+ enable_vector_memory: true
775
+ enable_symbolic_memory: true
776
+ max_parallel_seeds: 4
777
+ max_parallel_routes: 5
778
+ exploration_budget: 24
779
+ high_risk_budget: 32
780
+
781
+ portfolio:
782
+ min_independent_ideas: 2
783
+ max_candidates_per_seed: 5
784
+ max_route_expansions_per_seed: 5
785
+ primary_selection_policy: "scientific_maturity_diversity_validation"
786
+
787
+ diversity:
788
+ enabled: true
789
+ min_route_distance: 0.35
790
+ max_same_route_ratio: 0.60
791
+ regenerate_collapsed_routes: false
792
+ preserve_high_risk_unique_candidates: true
793
+
794
+ min_confidence_for_memory: 0.6
795
+ pareto_top_k: 5
796
+ symbolic_memory_path: "output/symbolic_memory"
797
+ skill_prior_success_threshold: 0.7
798
+
799
+ debate:
800
+ enabled: true
801
+ internal_max_rounds: 2
802
+ max_parallel_internal: 6
803
+ cross_seed_max_rounds: 1
804
+ max_parallel_cross_seed: 6
805
+ prompt_char_limit: 120000
806
+ internal_debate_prompt_limit: 80000
807
+ cross_seed_debate_prompt_limit: 60000
808
+
809
+ fusion:
810
+ enabled: true
811
+ only_when_ligagent_pro: true
812
+ model: ""
813
+ temperature: 0.7
814
+ max_tokens: 16384
815
+ min_candidates: 2
816
+ repair_max_steps: 10
817
+ repair_patience: 5
818
+ repair_epsilon: 0.02
819
+
820
+ memory:
821
+ vector_store:
822
+ model_path: "${repo_root}/models/all-MiniLM-L6-v2"
823
+ llm_name: ""
824
+ llm_backend: "openai"
825
+ llm_provider: ""
826
+
827
+ # ============================================
828
+ # Experiment Agent Configuration
829
+ # ============================================
830
+ experiment:
831
+ enabled: true
832
+ backend: "openharness"
833
+
834
+ openharness:
835
+ provider: "${oc.env:EXPERIMENT_LLM_PROVIDER,''}"
836
+ default_model: "${oc.env:EXPERIMENT_LLM_MODEL,''}"
837
+ api_key: ""
838
+ base_url: ""
839
+ role_models:
840
+ planner: "${oc.env:EXPERIMENT_PLANNER_MODEL,''}"
841
+ worker: "${oc.env:EXPERIMENT_WORKER_MODEL,''}"
842
+ reviewer: "${oc.env:EXPERIMENT_REVIEWER_MODEL,''}"
843
+ master: "${oc.env:EXPERIMENT_MASTER_MODEL,''}"
844
+ timeout_seconds: 7200
845
+ request_max_retries: 6
846
+ request_retry_base_delay: 1.0
847
+ request_retry_max_delay: 60.0
848
+ structured_output_max_hook_blocks: 6
849
+ max_tokens: 16384
850
+ max_turns: 0
851
+ runtime_dir_name: ".openharness_runtime"
852
+ max_budget_usd: 0
853
+
854
+ external_tools:
855
+ huggingface_endpoint: "https://hf-mirror.com"
856
+ github_ai_token: "${oc.env:GITHUB_AI_TOKEN,''}"
857
+ serper_api_key: "${oc.env:SERPER_API_KEY,''}"
858
+ jina_api_key: "${oc.env:JINA_API_KEY,''}"
859
+
860
+ # Execution configuration
861
+ execution:
862
+ max_iterations: 20
863
+ delegate_max_children: 1
864
+ planner_max_turns: 0
865
+ worker_max_turns: 0
866
+ prepare_review_feedback_rounds: 4
867
+ code_review_feedback_rounds: 2
868
+ science_review_feedback_rounds: 2
869
+ bash_timeout_seconds: 600000
870
+ mcp_timeout_seconds: 120
871
+ slurm:
872
+ partition: "gpu_llm"
873
+ gpus: 8
874
+ gpu_type: "NVIDIA A800-80G"
875
+ cpu_cores: 60
876
+ memory: "128G"
877
+ time_limit: "24:00:00"
878
+ log_dir_template: "{workspace}/logs/slurm"
879
+ job_name_template: "{experiment_condition}_{pde_type}_{timestamp}"
880
+
881
+ # Memory configuration
882
+ memory:
883
+ enabled: true
884
+ shared_dir: "~/.researchagent/shared_memory"
885
+ embedding_model_path: "${repo_root}/models/all-MiniLM-L6-v2"
886
+ llm_provider: "${oc.env:MEMORY_LLM_PROVIDER,''}"
887
+ llm_name: "${oc.env:MEMORY_LLM_MODEL,''}"
888
+ llm_backend: "openai"
889
+ query_method: "embedding"
890
+ writeback_enabled: true
891
+ tool_logs_enabled: false
892
+ prompt_injection_enabled: true
893
+ max_slots_per_task: 100
894
+
895
+ # Workspace configuration
896
+ workspace:
897
+ root: "${workspace.root}"
898
+ prepare_clone_depth: 1
899
+ model_candidate_seed: "~/.researchagent/model_seed/"
900
+ tavily_enabled: true
901
+ tavily_api_key: "${oc.env:TAVILY_API_KEY,''}"
902
+ tavily_remote_url_template: "https://mcp.tavily.com/mcp/?tavilyApiKey={api_key}"
903
+
904
+ # ============================================
905
+ # ExperimentDesign Agent Configuration
906
+ # ============================================
907
+ experiment_design:
908
+ enabled: true
909
+ provider: "${oc.env:EXPERIMENT_DESIGN_LLM_PROVIDER,'qwen'}"
910
+ model: "${oc.env:EXPERIMENT_DESIGN_LLM_MODEL,'qwen3.8-flash'}"
911
+ execution:
912
+ allow_digital_execution: false
913
+ retrieval:
914
+ # Each slot has at most two concise query variants. Keep provider result
915
+ # pages small; the global candidate budget below bounds all subsequent LLM work.
916
+ max_results_per_query: 6
917
+ max_fulltext_papers: 15
918
+ cache:
919
+ # Immutable content-addressed snapshots plus per-run manifests. Set
920
+ # mode=read_only for offline replay; a cache miss then degrades only the
921
+ # affected query, paper, or card instead of contacting an external service.
922
+ enabled: true
923
+ root: ".science/cache/experiment_design/v1"
924
+ mode: "read_write"
925
+ paper_screening:
926
+ fulltext_budget: 15
927
+ max_candidates_before_llm: 32
928
+ parallel_workers: 8
929
+ evidence_card_extraction:
930
+ # Card extraction may use bounded LLM concurrency; full-text acquisition
931
+ # and MinerU parsing remain serial in the collector.
932
+ parallel_workers: 3
933
+ fulltext:
934
+ enabled: true
935
+ cache_dir: "workspace/experiment_design/fulltext_cache"
936
+ max_papers: 15
937
+ max_candidates_per_paper: 12
938
+ max_pdf_bytes: 50000000
939
+ timeout_seconds: 30
940
+ per_host_concurrency: 2
941
+ parser_backend: "survey_mineru"
942
+ parser_batch_size: 1
943
+ enable_landing_page_recovery: true
944
+ enable_unpaywall_resolution: false
945
+ max_landing_page_bytes: 1500000
946
+ max_declared_pdf_links_per_landing_page: 8
947
+ max_redirects: 5
948
+ failure_non_pdf_ttl_seconds: 21600
949
+ failure_access_denied_ttl_seconds: 1800
950
+ failure_rate_limited_ttl_seconds: 900
951
+ openalex:
952
+ api_key: "${oc.env:OPENALEX_API_KEY,''}"
953
+ email: "${oc.env:OPENALEX_EMAIL,''}"
954
+ base_url: "https://api.openalex.org"
955
+ semantic_scholar:
956
+ api_key: "${api.semantic_scholar.api_key}"
957
+ base_url: "https://api.semanticscholar.org/graph/v1"
958
+
959
+ # ============================================
960
+ # Research Plan Author Configuration
961
+ # ============================================
962
+ research_plan_author:
963
+ enabled: true
964
+ # Empty preserves per-run co-location; set a path to centralize Author artifacts.
965
+ output_root: ""
966
+ provider: "${oc.env:RESEARCH_PLAN_AUTHOR_LLM_PROVIDER,'qwen'}"
967
+ model: "${oc.env:RESEARCH_PLAN_AUTHOR_LLM_MODEL,'qwen3.8-flash'}"
968
+ authoring:
969
+ require_survey_manifest: true
970
+ proposal_without_observed_results: true
971
+ unsupported_claims_forbidden: true
972
+ # 0 disables generic repair; 1 permits one bounded repair for each Author section and Blueprint assignment.
973
+ max_contract_repairs_per_section: 1
974
+ composer_concurrency: 5
975
+ section_cache:
976
+ enabled: true
977
+ mode: "read_write"
978
+ root: ".science/cache/research_plan_author/v1"
979
+ temperature: 0.5
980
+ require_survey_binding: false
981
+ document_quality:
982
+ enabled: true
983
+ model: "${oc.env:RESEARCH_PLAN_AUTHOR_QUALITY_MODEL,'qwen3.7-plus'}"
984
+ judge_temperature: 0.0
985
+ revision_temperature: 0.5
986
+ judge_max_retries: 3
987
+ max_iterations: 2
988
+ score_concurrency: 3
989
+ max_revision_block_edits: 14
990
+ special_score_weight: 0.25
991
+ idea_evolution:
992
+ default_mode: "auto"
993
+ max_iterations: 3
994
+ allow_raw_internal_reasoning: false
995
+ require_source_anchors: true
996
+ rendering:
997
+ # The source template is treated as read-only. Each Author run copies it
998
+ # into its own timestamped output project before any insertion occurs.
999
+ template_dir: "${repo_root}/Conference-LaTeX-template_10-17-19"
1000
+ template_profile: "ieee_conference_v1"
1001
+ main_tex: ""
1002
+ engine: "${oc.env:SCIENCE_LATEX_ENGINE,'pdflatex'}"
1003
+ bibtex: "${oc.env:SCIENCE_BIBTEX,'bibtex'}"
1004
+ pdf_renderer: "${oc.env:SCIENCE_PDF_RENDERER,'pdftoppm'}"
1005
+ compile_timeout_seconds: 180
1006
+ pdf_validation_timeout_seconds: 60
1007
+ allow_shell_escape: false
1008
+
1009
+ # ============================================
1010
+ # Blog Agent Configuration
1011
+ # ============================================
1012
+ blog:
1013
+ source_workspace_root: "${workspace.root}"
1014
+ provider: "${oc.env:BLOG_LLM_PROVIDER,''}"
1015
+
1016
+ # Literature retrieval automatically prefers a usable local graph, then
1017
+ # Semantic Scholar, then evidence already present in the experiment workspace.
1018
+ # Set BLOG_RETRIEVAL_MODE to graph, semantic, or workspace to express a
1019
+ # preference; an unavailable dependency always falls back safely.
1020
+ retrieval:
1021
+ mode: "${oc.env:BLOG_RETRIEVAL_MODE,'auto'}"
1022
+ graph_db_path: "${oc.env:BLOG_GRAPH_DB_PATH,'data/processed/graph.db'}"
1023
+
1024
+ # OpenAI API
1025
+ openai:
1026
+ api_key: ""
1027
+ base_url: ""
1028
+
1029
+ # Google Gemini API (optional)
1030
+ gemini:
1031
+ api_key: ""
1032
+ base_url: "https://generativelanguage.googleapis.com/v1beta"
1033
+
1034
+ # GenGraph (image generation for figures)
1035
+ gengraph:
1036
+ provider: "${oc.env:IMAGE_GENERATION_PROVIDER,'qwen'}"
1037
+ api_key: "${oc.env:DASHSCOPE_API_KEY,''}"
1038
+ providers: # Default configuration for each provider, can be customized
1039
+ qwen:
1040
+ base_url: "${oc.env:DASHSCOPE_IMAGE_BASE_URL,'https://dashscope.aliyuncs.com/api/v1'}"
1041
+ model: "${oc.env:IMAGE_ACADEMIC_FIGURE_MODEL,'wan2.7-image-pro'}"
1042
+ dashscope:
1043
+ base_url: "${oc.env:DASHSCOPE_IMAGE_BASE_URL,'https://dashscope.aliyuncs.com/api/v1'}"
1044
+ model: "${oc.env:IMAGE_ACADEMIC_FIGURE_MODEL,'wan2.7-image-pro'}"
1045
+ openai:
1046
+ base_url: "https://api.openai.com/v1"
1047
+ model: "gpt-image-2"
1048
+ openrouter:
1049
+ base_url: "https://openrouter.ai/api/v1"
1050
+ model: "google/gemini-3-pro-image-preview"
1051
+ gemini:
1052
+ base_url: "https://generativelanguage.googleapis.com/v1beta"
1053
+ model: "gemini-3-pro-image-preview"
1054
+
1055
+ # DeepEraser (text removal)
1056
+ deeperaser:
1057
+ use_cuda: false # Whether to use GPU
1058
+
1059
+ # Semantic Scholar API (for paper abstract retrieval and PDF download)
1060
+ semantic_scholar:
1061
+ api_key: "${api.semantic_scholar.api_key}" # Optional: your Semantic Scholar API key
1062
+
1063
+ # Default Model settings (It is only used when you do not pass the model parameter when creating an agent.)
1064
+ model: "${oc.env:BLOG_LLM_MODEL,''}"
1065
+
1066
+ # Blog Illustrate settings
1067
+ illustrate:
1068
+ only_gen_img: true # true: only generate images, no OCR; false: generate + OCR cleanup
1069
+
1070
+ # ============================================
1071
+ # Pipeline Configuration
1072
+ # ============================================
1073
+ pipeline:
1074
+ # Blank uses the pipeline research start time; set a name explicitly to resume it.
1075
+ name: ""
1076
+
1077
+ # State file for resume
1078
+ state_file: "pipeline.yaml"
1079
+
1080
+ # Resume settings
1081
+ resume_enabled: true
1082
+
1083
+ # Skip survey if already done
1084
+ skip_survey: false
1085
+
1086
+ # Iteration settings
1087
+ iterate:
1088
+ max_iterations: 5
1089
+
1090
+ # Stop conditions
1091
+ stop_conditions:
1092
+ min_ideas_generated: 5
1093
+ max_consecutive_failures: 3
1094
+
1095
+ # Feedback from experiment to idea agent
1096
+ feedback:
1097
+ include_metrics: true
1098
+ include_errors: true
1099
+ max_feedback_length: 8192
1100
+
1101
+ # Output settings
1102
+ output:
1103
+ root: "pipeline_runs"
1104
+ idea_result_filename: "idea_result.json"
1105
+ experiment_result_filename: "experiment_result.json"
1106
+ resume_from_iteration: null
1107
+
1108
+ symbolic_memory_path: "idea_skill_priors"
1109
+ default_macro_roles:
1110
+ - "generator"
1111
+ - "encoder"
1112
+ - "decoder"
1113
+ - "loss"
1114
+ - "regularizer"
1115
+ - "optimizer"
1116
+ - "architecture"
1117
+ - "attention"
1118
+ - "embedding"
1119
+ - "representation"
1120
+ - "constraint"
1121
+ - "retrieval"
1122
+ - "augmentation"