@researai/deepscientist 1.5.15 → 1.5.17

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 (202) hide show
  1. package/README.md +385 -104
  2. package/bin/ds.js +1241 -110
  3. package/docs/en/00_QUICK_START.md +100 -19
  4. package/docs/en/01_SETTINGS_REFERENCE.md +34 -1
  5. package/docs/en/02_START_RESEARCH_GUIDE.md +7 -0
  6. package/docs/en/05_TUI_GUIDE.md +6 -0
  7. package/docs/en/06_RUNTIME_AND_CANVAS.md +4 -3
  8. package/docs/en/09_DOCTOR.md +25 -8
  9. package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +63 -13
  10. package/docs/en/15_CODEX_PROVIDER_SETUP.md +37 -11
  11. package/docs/en/19_EXTERNAL_CONTROLLER_GUIDE.md +226 -0
  12. package/docs/en/19_LOCAL_BROWSER_AUTH.md +70 -0
  13. package/docs/en/20_WORKSPACE_MODES_GUIDE.md +250 -0
  14. package/docs/en/21_LOCAL_MODEL_BACKENDS_GUIDE.md +283 -0
  15. package/docs/en/91_DEVELOPMENT.md +237 -0
  16. package/docs/en/README.md +24 -2
  17. package/docs/zh/00_QUICK_START.md +89 -19
  18. package/docs/zh/01_SETTINGS_REFERENCE.md +34 -1
  19. package/docs/zh/02_START_RESEARCH_GUIDE.md +7 -0
  20. package/docs/zh/05_TUI_GUIDE.md +6 -0
  21. package/docs/zh/09_DOCTOR.md +26 -9
  22. package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +63 -13
  23. package/docs/zh/15_CODEX_PROVIDER_SETUP.md +37 -11
  24. package/docs/zh/19_EXTERNAL_CONTROLLER_GUIDE.md +226 -0
  25. package/docs/zh/19_LOCAL_BROWSER_AUTH.md +68 -0
  26. package/docs/zh/20_WORKSPACE_MODES_GUIDE.md +251 -0
  27. package/docs/zh/21_LOCAL_MODEL_BACKENDS_GUIDE.md +281 -0
  28. package/docs/zh/README.md +24 -2
  29. package/install.sh +46 -4
  30. package/package.json +2 -1
  31. package/pyproject.toml +1 -1
  32. package/src/deepscientist/__init__.py +1 -1
  33. package/src/deepscientist/acp/envelope.py +6 -0
  34. package/src/deepscientist/artifact/service.py +647 -22
  35. package/src/deepscientist/bash_exec/service.py +234 -9
  36. package/src/deepscientist/bridges/connectors.py +8 -2
  37. package/src/deepscientist/cli.py +115 -19
  38. package/src/deepscientist/codex_cli_compat.py +367 -22
  39. package/src/deepscientist/config/models.py +2 -1
  40. package/src/deepscientist/config/service.py +183 -13
  41. package/src/deepscientist/daemon/api/handlers.py +255 -31
  42. package/src/deepscientist/daemon/api/router.py +9 -0
  43. package/src/deepscientist/daemon/app.py +1146 -105
  44. package/src/deepscientist/diagnostics/__init__.py +6 -0
  45. package/src/deepscientist/diagnostics/runner_failures.py +130 -0
  46. package/src/deepscientist/doctor.py +207 -3
  47. package/src/deepscientist/gitops/__init__.py +10 -1
  48. package/src/deepscientist/gitops/diff.py +129 -0
  49. package/src/deepscientist/gitops/service.py +4 -1
  50. package/src/deepscientist/mcp/server.py +39 -0
  51. package/src/deepscientist/prompts/builder.py +275 -34
  52. package/src/deepscientist/quest/layout.py +15 -2
  53. package/src/deepscientist/quest/service.py +707 -55
  54. package/src/deepscientist/quest/stage_views.py +6 -1
  55. package/src/deepscientist/runners/codex.py +143 -43
  56. package/src/deepscientist/shared.py +19 -0
  57. package/src/deepscientist/skills/__init__.py +2 -2
  58. package/src/deepscientist/skills/installer.py +196 -5
  59. package/src/deepscientist/skills/registry.py +66 -0
  60. package/src/prompts/connectors/qq.md +18 -8
  61. package/src/prompts/connectors/weixin.md +16 -6
  62. package/src/prompts/contracts/shared_interaction.md +14 -2
  63. package/src/prompts/system.md +23 -5
  64. package/src/prompts/system_copilot.md +56 -0
  65. package/src/skills/analysis-campaign/SKILL.md +1 -0
  66. package/src/skills/baseline/SKILL.md +8 -0
  67. package/src/skills/decision/SKILL.md +8 -0
  68. package/src/skills/experiment/SKILL.md +8 -0
  69. package/src/skills/figure-polish/SKILL.md +1 -0
  70. package/src/skills/finalize/SKILL.md +1 -0
  71. package/src/skills/idea/SKILL.md +1 -0
  72. package/src/skills/intake-audit/SKILL.md +8 -0
  73. package/src/skills/mentor/SKILL.md +217 -0
  74. package/src/skills/mentor/references/correction-rules.md +210 -0
  75. package/src/skills/mentor/references/knowledge-profile.md +91 -0
  76. package/src/skills/mentor/references/persona-profile.md +138 -0
  77. package/src/skills/mentor/references/taste-profile.md +128 -0
  78. package/src/skills/mentor/references/thought-style-profile.md +138 -0
  79. package/src/skills/mentor/references/work-profile.md +289 -0
  80. package/src/skills/mentor/references/workflow-profile.md +240 -0
  81. package/src/skills/optimize/SKILL.md +1 -0
  82. package/src/skills/rebuttal/SKILL.md +1 -0
  83. package/src/skills/review/SKILL.md +1 -0
  84. package/src/skills/scout/SKILL.md +8 -0
  85. package/src/skills/write/SKILL.md +1 -0
  86. package/src/tui/dist/app/AppContainer.js +19 -11
  87. package/src/tui/dist/index.js +4 -1
  88. package/src/tui/dist/lib/api.js +33 -3
  89. package/src/tui/package.json +1 -1
  90. package/src/ui/dist/assets/AiManusChatView-Bv-Z8YpU.js +204 -0
  91. package/src/ui/dist/assets/AnalysisPlugin-BCKAfjba.js +1 -0
  92. package/src/ui/dist/assets/CliPlugin-BCKcpc35.js +109 -0
  93. package/src/ui/dist/assets/CodeEditorPlugin-DbOfSJ8K.js +2 -0
  94. package/src/ui/dist/assets/CodeViewerPlugin-CbaFRrUU.js +270 -0
  95. package/src/ui/dist/assets/DocViewerPlugin-DAjLVeQD.js +7 -0
  96. package/src/ui/dist/assets/GitCommitViewerPlugin-CIUqbUDO.js +1 -0
  97. package/src/ui/dist/assets/GitDiffViewerPlugin-CQACjoAA.js +6 -0
  98. package/src/ui/dist/assets/GitSnapshotViewer-0r4nLPke.js +30 -0
  99. package/src/ui/dist/assets/ImageViewerPlugin-nBOmI2v_.js +26 -0
  100. package/src/ui/dist/assets/LabCopilotPanel-BHxOxF4z.js +14 -0
  101. package/src/ui/dist/assets/LabPlugin-BKoZGs95.js +22 -0
  102. package/src/ui/dist/assets/LatexPlugin-ZwtV8pIp.js +25 -0
  103. package/src/ui/dist/assets/MarkdownViewerPlugin-DKqVfKyW.js +128 -0
  104. package/src/ui/dist/assets/MarketplacePlugin-BwxStZ9D.js +13 -0
  105. package/src/ui/dist/assets/NotebookEditor-BEQhaQbt.js +81 -0
  106. package/src/ui/dist/assets/{NotebookEditor-CccQYZjX.css → NotebookEditor-BHH8rdGj.css} +1 -1
  107. package/src/ui/dist/assets/NotebookEditor-BOr3x3Ej.css +1 -0
  108. package/src/ui/dist/assets/NotebookEditor-DB9N_T9q.js +361 -0
  109. package/src/ui/dist/assets/PdfLoader-Cy5jtWrr.css +1 -0
  110. package/src/ui/dist/assets/PdfLoader-eWBONbQP.js +16 -0
  111. package/src/ui/dist/assets/PdfMarkdownPlugin-D22YOZL3.js +1 -0
  112. package/src/ui/dist/assets/PdfViewerPlugin-c-RK9DLM.js +17 -0
  113. package/src/ui/dist/assets/PdfViewerPlugin-nwwE-fjJ.css +1 -0
  114. package/src/ui/dist/assets/SearchPlugin-CxF9ytAx.js +16 -0
  115. package/src/ui/dist/assets/SearchPlugin-DA4en4hK.css +1 -0
  116. package/src/ui/dist/assets/TextViewerPlugin-C5xqeeUH.js +54 -0
  117. package/src/ui/dist/assets/VNCViewer-BoLGLnHz.js +11 -0
  118. package/src/ui/dist/assets/bot-DREQOxzP.js +6 -0
  119. package/src/ui/dist/assets/browser-CTB2jwNe.js +8 -0
  120. package/src/ui/dist/assets/chevron-up-C9Qpx4DE.js +6 -0
  121. package/src/ui/dist/assets/code-WlFHE7z_.js +6 -0
  122. package/src/ui/dist/assets/file-content-BZMz3RYp.js +1 -0
  123. package/src/ui/dist/assets/file-diff-panel-CQhw0jS2.js +1 -0
  124. package/src/ui/dist/assets/file-jump-queue-DA-SdG__.js +1 -0
  125. package/src/ui/dist/assets/file-socket-CfQPKQKj.js +1 -0
  126. package/src/ui/dist/assets/git-commit-horizontal-DxZ8DCZh.js +6 -0
  127. package/src/ui/dist/assets/image-Bgl4VIyx.js +6 -0
  128. package/src/ui/dist/assets/index-BpV6lusQ.css +33 -0
  129. package/src/ui/dist/assets/index-CBNVuWcP.js +2496 -0
  130. package/src/ui/dist/assets/index-CwNu1aH4.js +11 -0
  131. package/src/ui/dist/assets/index-DrUnlf6K.js +1 -0
  132. package/src/ui/dist/assets/index-NW-h8VzN.js +1 -0
  133. package/src/ui/dist/assets/monaco-CiHMMNH_.js +1 -0
  134. package/src/ui/dist/assets/pdf-effect-queue-J8OnM0jE.js +6 -0
  135. package/src/ui/dist/assets/plugin-monaco-C8UgLomw.js +19 -0
  136. package/src/ui/dist/assets/plugin-notebook-HbW2K-1c.js +169 -0
  137. package/src/ui/dist/assets/plugin-pdf-CR8hgQBV.js +357 -0
  138. package/src/ui/dist/assets/plugin-terminal-MXFIPun8.js +227 -0
  139. package/src/ui/dist/assets/popover-CLc0pPP8.js +1 -0
  140. package/src/ui/dist/assets/project-sync-C9IdzdZW.js +1 -0
  141. package/src/ui/dist/assets/select-Cs2PmzwL.js +11 -0
  142. package/src/ui/dist/assets/sigma-ClKcHAXm.js +6 -0
  143. package/src/ui/dist/assets/trash-DwpbFr3w.js +11 -0
  144. package/src/ui/dist/assets/useCliAccess-NQ8m0Let.js +1 -0
  145. package/src/ui/dist/assets/useFileDiffOverlay-FuhcnKiw.js +1 -0
  146. package/src/ui/dist/assets/wrap-text-BC-Hltpd.js +11 -0
  147. package/src/ui/dist/assets/zoom-out-E_gaeAxL.js +11 -0
  148. package/src/ui/dist/index.html +5 -2
  149. package/src/ui/dist/assets/AiManusChatView-DDjbFnbt.js +0 -26597
  150. package/src/ui/dist/assets/AnalysisPlugin-Yb5IdmaU.js +0 -123
  151. package/src/ui/dist/assets/CliPlugin-e64sreyu.js +0 -31037
  152. package/src/ui/dist/assets/CodeEditorPlugin-C4D2TIkU.js +0 -427
  153. package/src/ui/dist/assets/CodeViewerPlugin-BVoNZIvC.js +0 -905
  154. package/src/ui/dist/assets/DocViewerPlugin-CLChbllo.js +0 -278
  155. package/src/ui/dist/assets/GitDiffViewerPlugin-C4xeFyFQ.js +0 -2661
  156. package/src/ui/dist/assets/ImageViewerPlugin-OiMUAcLi.js +0 -500
  157. package/src/ui/dist/assets/LabCopilotPanel-BjD2ThQF.js +0 -4104
  158. package/src/ui/dist/assets/LabPlugin-DQPg-NrB.js +0 -2677
  159. package/src/ui/dist/assets/LatexPlugin-CI05XAV9.js +0 -1792
  160. package/src/ui/dist/assets/MarkdownViewerPlugin-DpeBLYZf.js +0 -308
  161. package/src/ui/dist/assets/MarketplacePlugin-DolE58Q2.js +0 -413
  162. package/src/ui/dist/assets/NotebookEditor-7Qm2rSWD.js +0 -4214
  163. package/src/ui/dist/assets/NotebookEditor-C1kWaxKi.js +0 -84873
  164. package/src/ui/dist/assets/NotebookEditor-C3VQ7ylN.css +0 -1405
  165. package/src/ui/dist/assets/PdfLoader-BfOHw8Zw.js +0 -25468
  166. package/src/ui/dist/assets/PdfLoader-C-Y707R3.css +0 -49
  167. package/src/ui/dist/assets/PdfMarkdownPlugin-BulDREv1.js +0 -409
  168. package/src/ui/dist/assets/PdfViewerPlugin-C-daaOaL.js +0 -3095
  169. package/src/ui/dist/assets/PdfViewerPlugin-DQ11QcSf.css +0 -3627
  170. package/src/ui/dist/assets/SearchPlugin-CjpaiJ3A.js +0 -741
  171. package/src/ui/dist/assets/SearchPlugin-DDMrGDkh.css +0 -379
  172. package/src/ui/dist/assets/TextViewerPlugin-BxIyqPQC.js +0 -472
  173. package/src/ui/dist/assets/VNCViewer-HAg9mF7M.js +0 -18821
  174. package/src/ui/dist/assets/awareness-C0NPR2Dj.js +0 -292
  175. package/src/ui/dist/assets/bot-0DYntytV.js +0 -21
  176. package/src/ui/dist/assets/browser-BAcuE0Xj.js +0 -2895
  177. package/src/ui/dist/assets/code-B20Slj_w.js +0 -17
  178. package/src/ui/dist/assets/file-content-DT24KFma.js +0 -377
  179. package/src/ui/dist/assets/file-diff-panel-DK13YPql.js +0 -92
  180. package/src/ui/dist/assets/file-jump-queue-r5XKgJEV.js +0 -16
  181. package/src/ui/dist/assets/file-socket-B4T2o4nR.js +0 -58
  182. package/src/ui/dist/assets/function-B5QZkkHC.js +0 -1895
  183. package/src/ui/dist/assets/image-DSeR_sDS.js +0 -18
  184. package/src/ui/dist/assets/index-BrFje2Uk.js +0 -120
  185. package/src/ui/dist/assets/index-BwRJaoTl.js +0 -25
  186. package/src/ui/dist/assets/index-D_E4281X.js +0 -221322
  187. package/src/ui/dist/assets/index-DnYB3xb1.js +0 -159
  188. package/src/ui/dist/assets/index-G7AcWcMu.css +0 -12594
  189. package/src/ui/dist/assets/monaco-LExaAN3Y.js +0 -623
  190. package/src/ui/dist/assets/pdf-effect-queue-BJk5okWJ.js +0 -47
  191. package/src/ui/dist/assets/pdf_viewer-e0g1is2C.js +0 -8206
  192. package/src/ui/dist/assets/popover-D3Gg_FoV.js +0 -476
  193. package/src/ui/dist/assets/project-sync-C_ygLlVU.js +0 -297
  194. package/src/ui/dist/assets/select-CpAK6uWm.js +0 -1690
  195. package/src/ui/dist/assets/sigma-DEccaSgk.js +0 -22
  196. package/src/ui/dist/assets/square-check-big-uUfyVsbD.js +0 -17
  197. package/src/ui/dist/assets/trash-CXvwwSe8.js +0 -32
  198. package/src/ui/dist/assets/useCliAccess-Bnop4mgR.js +0 -957
  199. package/src/ui/dist/assets/useFileDiffOverlay-B8eUAX0I.js +0 -53
  200. package/src/ui/dist/assets/wrap-text-9vbOBpkW.js +0 -35
  201. package/src/ui/dist/assets/yjs-DncrqiZ8.js +0 -11243
  202. package/src/ui/dist/assets/zoom-out-BgVMmOW4.js +0 -34
@@ -2,6 +2,8 @@
2
2
 
3
3
  DeepScientist does not implement separate provider adapters for MiniMax, GLM, Volcengine Ark, or Alibaba Bailian.
4
4
 
5
+ For Qwen on Alibaba Bailian, DeepScientist only supports the **Coding Plan** path. The generic Bailian or DashScope Qwen platform API is not supported here.
6
+
5
7
  Instead, it reuses the same Codex CLI setup that already works in your terminal.
6
8
 
7
9
  The recommended order is always:
@@ -18,7 +20,7 @@ The recommended order is always:
18
20
  Use this when your Codex CLI works through the standard OpenAI login flow.
19
21
 
20
22
  ```bash
21
- codex --login
23
+ codex login
22
24
  ds doctor
23
25
  ds
24
26
  ```
@@ -61,7 +63,8 @@ codex:
61
63
  Important:
62
64
 
63
65
  - keep `model: inherit` for provider-backed Codex profiles unless you are certain the provider accepts the explicit model id you plan to send
64
- - DeepScientist will reuse the same `~/.codex/config.toml` and environment that your terminal Codex already uses
66
+ - DeepScientist now launches Codex from an isolated runtime home under `.ds/codex-home`, but that runtime copy inherits your configured `~/.codex` auth, config, skills, agents, and prompts first
67
+ - if the active provider uses `wire_api = "chat"`, DeepScientist now auto-checks that the selected Codex binary is exactly `0.57.0` during startup probe
65
68
 
66
69
  ## Provider matrix
67
70
 
@@ -71,14 +74,14 @@ Important:
71
74
  | MiniMax | [MiniMax Codex CLI](https://platform.minimaxi.com/docs/coding-plan/codex-cli) | No | your Codex profile, for example `ds --codex-profile m27` |
72
75
  | GLM | [GLM Coding Plan: Other Tools](https://docs.bigmodel.cn/cn/coding-plan/tool/others) | No | a Codex profile that targets the GLM coding endpoint |
73
76
  | Volcengine Ark | [Ark Coding Plan Overview](https://www.volcengine.com/docs/82379/1925114?lang=zh) | No | a Codex profile that targets the Ark coding endpoint |
74
- | Alibaba Bailian | [Bailian Coding Plan: Other Tools](https://help.aliyun.com/zh/model-studio/other-tools-coding-plan) | No | a Codex profile that targets the Bailian coding endpoint |
77
+ | Alibaba Bailian | [Bailian Coding Plan: Other Tools](https://help.aliyun.com/zh/model-studio/other-tools-coding-plan) | No | a Codex profile that targets the Bailian Coding Plan endpoint; do not use the generic Bailian or DashScope Qwen API |
75
78
 
76
79
  ## OpenAI
77
80
 
78
81
  ### What to prepare
79
82
 
80
83
  - a normal Codex CLI install
81
- - a successful `codex --login` or `codex` interactive first-run setup
84
+ - a successful `codex login` or `codex` interactive first-run setup
82
85
 
83
86
  ### DeepScientist commands
84
87
 
@@ -108,13 +111,13 @@ Official doc:
108
111
 
109
112
  ### Verified compatibility note
110
113
 
111
- Checked against MiniMax's current Codex CLI doc and local compatibility validation on 2026-03-25:
114
+ Checked against MiniMax's current Codex CLI doc and local compatibility validation on 2026-04-04:
112
115
 
113
116
  - MiniMax's Codex CLI page currently recommends `@openai/codex@0.57.0`
114
117
  - the Coding Plan endpoint to use is `https://api.minimaxi.com/v1`
115
118
  - MiniMax's official page uses `m21` as the profile name, but that profile name is only a local alias; this repo uses `m27` consistently in examples
116
119
  - the `codex-MiniMax-*` model names shown on MiniMax's page did not pass reliably through Codex CLI in local testing with the provided key
117
- - the locally verified working path was `MiniMax-M2.7` + `m27` + `model: inherit` + Codex CLI `0.57.0`
120
+ - the locally verified DeepScientist working paths were `MiniMax-M2.7` + `m27` + Codex CLI `0.57.0` and `MiniMax-M2.5` + `m25` + Codex CLI `0.57.0`
118
121
  - the current `@openai/codex` latest release still does not line up cleanly with MiniMax's current guide
119
122
 
120
123
  If you want the most reproducible DeepScientist + MiniMax path today, use Codex CLI `0.57.0`.
@@ -124,7 +127,7 @@ If you want the most reproducible DeepScientist + MiniMax path today, use Codex
124
127
  - Codex CLI `0.57.0`
125
128
  - a MiniMax `Coding Plan Key`
126
129
  - `MINIMAX_API_KEY` available in the shell that starts Codex and DeepScientist
127
- - the current shell cleared of `OPENAI_API_KEY` and `OPENAI_BASE_URL`
130
+ - for plain terminal `codex --profile <name>` checks, the current shell cleared of `OPENAI_API_KEY` and `OPENAI_BASE_URL`
128
131
  - a working Codex profile in `~/.codex/config.toml`
129
132
 
130
133
  ### Install Codex CLI `0.57.0`
@@ -144,6 +147,8 @@ codex-cli 0.57.0
144
147
 
145
148
  If you want to keep another Codex version elsewhere, create a small wrapper script and point `runners.codex.binary` at that absolute path.
146
149
 
150
+ When DeepScientist detects a MiniMax profile at startup and the active Codex CLI is not `0.57.0`, it now prompts to reinstall `@openai/codex@0.57.0` automatically in interactive terminal launches.
151
+
147
152
  ### Codex-side setup
148
153
 
149
154
  Use `https://api.minimaxi.com/v1`, not `https://api.minimax.io/v1`.
@@ -156,15 +161,19 @@ unset OPENAI_BASE_URL
156
161
  export MINIMAX_API_KEY="..."
157
162
  ```
158
163
 
164
+ For plain terminal validation, keep doing that exactly as shown above.
165
+ For the DeepScientist path, when the selected provider sets `requires_openai_auth = false`, DeepScientist now strips `OPENAI_API_KEY` and `OPENAI_BASE_URL` automatically during the startup probe and real runner execution.
166
+
159
167
  MiniMax's official page uses `m21` as the example profile name. Since the profile name is only a local alias, this repo rewrites that example to `m27`.
160
168
 
161
169
  The important difference is the model name:
162
170
 
163
171
  - MiniMax's page currently shows `codex-MiniMax-M2.5`
164
- - in local testing, direct MiniMax API calls worked with `MiniMax-M2.7`
165
- - with the same key, `codex-MiniMax-M2.5` and `codex-MiniMax-M2.7` both failed through Codex CLI
172
+ - in local testing, direct MiniMax API calls worked with `MiniMax-M2.7` and `MiniMax-M2.5`
173
+ - the reproducible DeepScientist paths were `MiniMax-M2.7` on profile `m27` and `MiniMax-M2.5` on profile `m25`
174
+ - for the `m25` path, use `MiniMax-M2.5`, not `codex-MiniMax-M2.5`
166
175
 
167
- So the config below is the currently recommended DeepScientist working configuration:
176
+ So the config below is the currently recommended DeepScientist configuration:
168
177
 
169
178
  ```toml
170
179
  [model_providers.minimax]
@@ -182,9 +191,20 @@ model = "MiniMax-M2.7"
182
191
  model_provider = "minimax"
183
192
  ```
184
193
 
194
+ If you want the same DeepScientist path on `m25`, keep the provider block unchanged and use:
195
+
196
+ ```toml
197
+ [profiles.m25]
198
+ model = "MiniMax-M2.5"
199
+ model_provider = "minimax"
200
+ ```
201
+
185
202
  What DeepScientist supports now:
186
203
 
187
- - if you use this profile-only MiniMax config with Codex CLI `0.57.0`, DeepScientist automatically promotes the selected profile's `model_provider` and `model` to the top level inside its probe/runtime copy of `.codex/config.toml`
204
+ - if you use this profile-only MiniMax config with Codex CLI `0.57.0`, DeepScientist automatically promotes the selected profile's `model_provider` and `model` to the top level inside its probe/runtime copy of `config.toml`
205
+ - DeepScientist forces provider-backed MiniMax runs to use `model: inherit`, so it does not accidentally override the profile with a hard-coded OpenAI model
206
+ - when `requires_openai_auth = false`, DeepScientist strips conflicting `OPENAI_API_KEY` and `OPENAI_BASE_URL` values from the probe/runtime environment
207
+ - for chat-wire provider sessions such as MiniMax on Codex CLI `0.57.0`, DeepScientist now injects a compatibility guard that tells Codex to serialize MCP tool calls one at a time instead of bundling multiple tool calls into the same response
188
208
  - this means DeepScientist can start even when plain terminal `codex --profile m27` still fails on that exact profile-only shape
189
209
 
190
210
  If you want plain terminal `codex --profile <name>` to work too, use the explicit top-level compatibility form instead:
@@ -247,6 +267,7 @@ DeepScientist now does two MiniMax-specific compatibility steps for the `0.57.0`
247
267
 
248
268
  - it downgrades `xhigh` to `high` automatically when the Codex CLI does not support `xhigh`
249
269
  - it auto-adapts MiniMax's profile-only `model_provider` / `model` shape inside the temporary DeepScientist Codex home when needed
270
+ - it removes conflicting `OPENAI_*` auth variables automatically when the provider explicitly says `requires_openai_auth = false`
250
271
 
251
272
  ## GLM
252
273
 
@@ -333,6 +354,11 @@ codex:
333
354
 
334
355
  Bailian documents Coding Plan as an OpenAI-compatible coding endpoint. It requires the Coding Plan-specific key and endpoint, not the generic platform endpoint.
335
356
 
357
+ For Qwen specifically:
358
+
359
+ - supported: Qwen through the Bailian **Coding Plan** endpoint
360
+ - not supported: the generic Bailian or DashScope Qwen platform API
361
+
336
362
  Official docs:
337
363
 
338
364
  - <https://help.aliyun.com/zh/model-studio/other-tools-coding-plan>
@@ -0,0 +1,226 @@
1
+ # 19 External Controller Guide
2
+
3
+ DeepScientist already exposes enough durable state to support an outer orchestration layer without patching core runtime code.
4
+
5
+ This guide explains the minimal public pattern for external controllers that:
6
+
7
+ - inspect recent quest state
8
+ - decide whether the current run should continue
9
+ - enqueue a routed follow-up message through the quest mailbox
10
+ - optionally stop the current run through `quest_control`
11
+ - record a durable report explaining why the guard fired
12
+
13
+ This is intentionally lighter than a plugin framework.
14
+
15
+ ## When to use an external controller
16
+
17
+ Use an external controller when the rule is:
18
+
19
+ - project-specific
20
+ - expensive to hard-code into global prompts or skills
21
+ - better treated as outer governance than as core runtime behavior
22
+
23
+ Examples:
24
+
25
+ - publishability admission rules before paper-facing writing
26
+ - repeated figure-polish loops that monopolize the frontier
27
+ - lab-specific stop / branch policies
28
+
29
+ ## Public contracts you can rely on
30
+
31
+ The safest extension surface is the existing durable runtime contract:
32
+
33
+ - quest mailbox
34
+ - queued user-facing messages are stored under `.ds/user_message_queue.json`
35
+ - recent quest state
36
+ - runtime state, artifact state, and connector-visible outputs are already durable files
37
+ - daemon quest control
38
+ - `POST /api/quests/<quest_id>/control`
39
+ - connector-visible durable reports
40
+ - write your own report under the quest tree so the next turn can cite it
41
+
42
+ Prefer these contracts over prompt patching, private monkey-patching, or editing installed package files.
43
+
44
+ ## Minimal controller loop
45
+
46
+ An external controller usually follows this sequence:
47
+
48
+ 1. Read the latest durable quest state.
49
+ 2. Decide whether a guard condition is active.
50
+ 3. Write a durable report describing:
51
+ - what was observed
52
+ - why it matters
53
+ - the recommended next route
54
+ 4. If intervention is needed:
55
+ - optionally stop the current run through `quest_control`
56
+ - enqueue one clear routed mailbox message for the next turn
57
+
58
+ The mailbox message should explain the conclusion, not dump raw logs.
59
+
60
+ ## Example control flow
61
+
62
+ ```text
63
+ read quest state
64
+ -> detect low-yield loop or route violation
65
+ -> write durable report
66
+ -> stop current run if needed
67
+ -> enqueue one mailbox message with the required next route
68
+ ```
69
+
70
+ ## Example `quest_control` request
71
+
72
+ ```bash
73
+ curl -X POST http://127.0.0.1:20999/api/quests/<quest_id>/control \
74
+ -H 'Content-Type: application/json' \
75
+ -d '{
76
+ "action": "stop",
77
+ "source": "external-controller"
78
+ }'
79
+ ```
80
+
81
+ ## Example mailbox intervention shape
82
+
83
+ The exact queue file is runtime-owned, so your controller should preserve the existing schema and only append a normal user-style message payload.
84
+
85
+ The message content should be short and actionable, for example:
86
+
87
+ ```text
88
+ Hard control message from external orchestration layer: stop the current figure loop.
89
+ Return to the main line and do one bounded route next:
90
+ 1. literature scout
91
+ 2. reference expansion
92
+ 3. manuscript body revision
93
+ ```
94
+
95
+ ## Example controllers you can adapt
96
+
97
+ ### Example 1: publishability admission guard
98
+
99
+ This controller is useful when a quest is drifting into paper-facing writing before the evidence line is ready.
100
+
101
+ Typical inputs:
102
+
103
+ - the latest verification note
104
+ - the current draft / summary state
105
+ - recent baseline or utility results
106
+
107
+ Typical stop condition:
108
+
109
+ - the claimed paper direction still has weak support
110
+ - one or more mandatory evidence items are still missing
111
+
112
+ Typical intervention:
113
+
114
+ 1. Write `reports/publishability_guard.md` explaining the missing support.
115
+ 2. Stop the current write-heavy run through `quest_control`.
116
+ 3. Enqueue one mailbox message that routes the next turn back to `idea`, `analysis`, or a bounded evidence-repair step.
117
+
118
+ Example mailbox text:
119
+
120
+ ```text
121
+ External controller: do not continue manuscript-facing writing yet.
122
+ Reason: the current evidence line does not pass the publishability admission gate.
123
+ Next route: return to one bounded evidence-building step before write resumes.
124
+ ```
125
+
126
+ ### Example 2: figure-loop guard
127
+
128
+ This controller is useful when the frontier is monopolized by repeated reopen / polish cycles on the same figure.
129
+
130
+ Typical inputs:
131
+
132
+ - recent figure artifact history
133
+ - repeated reopen events
134
+ - the latest review or summary note
135
+
136
+ Typical stop condition:
137
+
138
+ - the same figure has been reopened multiple times without improving the main claim
139
+ - the next useful action is no longer figure polish, but evidence repair or manuscript revision
140
+
141
+ Typical intervention:
142
+
143
+ 1. Write `reports/figure_loop_guard.md` summarizing the loop.
144
+ 2. Stop the current figure branch if needed.
145
+ 3. Enqueue one mailbox message that names exactly one next route.
146
+
147
+ Example mailbox text:
148
+
149
+ ```text
150
+ External controller: stop the current figure-polish loop.
151
+ Reason: repeated reopen cycles are no longer improving the main evidence line.
152
+ Next route: return to one bounded manuscript or analysis task.
153
+ ```
154
+
155
+ ## Example connector customization surface
156
+
157
+ The control logic should stay connector-agnostic. In practice, adapting the same controller to a different connector usually means changing only the message profile, not the stop logic or durable report contract.
158
+
159
+ For example:
160
+
161
+ ```yaml
162
+ connector_profiles:
163
+ weixin:
164
+ summary_style: concise
165
+ max_route_options: 2
166
+ include_report_path: true
167
+ telegram:
168
+ summary_style: concise
169
+ max_route_options: 3
170
+ include_report_path: true
171
+ studio:
172
+ summary_style: detailed
173
+ max_route_options: 4
174
+ include_report_excerpt: true
175
+ ```
176
+
177
+ The controller decision stays the same:
178
+
179
+ - read durable state
180
+ - decide whether to stop
181
+ - write a durable report
182
+ - enqueue one routed mailbox message
183
+
184
+ What changes per connector is only how much detail you surface to the human operator.
185
+
186
+ ## Durable report shape
187
+
188
+ Keep reports simple and auditable.
189
+
190
+ A good report usually includes:
191
+
192
+ - `generated_at`
193
+ - `quest_id`
194
+ - `status`
195
+ - `recommended_action`
196
+ - `blockers`
197
+ - `evidence_summary`
198
+
199
+ Markdown plus a machine-readable JSON companion is a practical pattern.
200
+
201
+ ## What not to rely on
202
+
203
+ Avoid building controllers that depend on:
204
+
205
+ - private prompt text offsets
206
+ - internal temporary logs that are not documented durable state
207
+ - patching installed package files inside `site-packages`
208
+ - undocumented frontend-only state
209
+
210
+ If a controller needs one of those, the contract is not stable enough yet.
211
+
212
+ ## Design recommendations
213
+
214
+ - keep each controller focused on one question
215
+ - prefer additive reports over hidden side effects
216
+ - stop only when the next routed action is clear
217
+ - keep domain- or lab-specific policy outside core defaults
218
+ - treat external controllers as optional governance, not as required runtime plumbing
219
+
220
+ ## Good first controllers
221
+
222
+ If you want to start small, begin with one of these:
223
+
224
+ - a publishability admission guard for paper-mode quests
225
+ - a figure-loop guard that stops repeated reopen cycles
226
+ - a route-drift guard that blocks accidental `write` transitions before evidence is ready
@@ -0,0 +1,70 @@
1
+ # Local Browser Auth
2
+
3
+ DeepScientist can optionally protect the local web workspace with a generated 16-character password.
4
+
5
+ This protection is local-first:
6
+
7
+ - it applies to the browser UI
8
+ - it also applies to `/api/*` requests from the browser
9
+ - it is disabled by default unless you launch with `ds --auth true` or set `ui.auth_enabled: true`
10
+
11
+ ## What Happens On Startup
12
+
13
+ When you run `ds --auth true`, DeepScientist starts the daemon and prints two important things in the terminal:
14
+
15
+ - the local browser URL, such as `http://127.0.0.1:20999`
16
+ - the generated local access password for that launch
17
+
18
+ The browser URL is no longer expected to carry `?token=...`.
19
+
20
+ If the browser is not already authenticated, DeepScientist shows a password modal on top of the landing page before it loads quests, docs, settings, or workspace data.
21
+
22
+ ## How To View The Password
23
+
24
+ Use either of these:
25
+
26
+ ```bash
27
+ ds --status
28
+ ```
29
+
30
+ Read the `auth_token` field from the JSON output, or look at the terminal where `ds` was started.
31
+
32
+ ## How Login Persistence Works
33
+
34
+ After the first successful login:
35
+
36
+ - the browser stores the local auth state
37
+ - later visits from the same browser usually open directly
38
+ - restarting or reusing the managed daemon can rotate the password again
39
+
40
+ If the password rotates, the browser will be asked to log in again.
41
+
42
+ ## How To Disable It
43
+
44
+ Enable the browser password gate for one launch:
45
+
46
+ ```bash
47
+ ds --auth true
48
+ ```
49
+
50
+ In that mode:
51
+
52
+ - the password modal is enabled
53
+ - browser requests to `/api/*` require the local auth token
54
+
55
+ To disable it again explicitly for one launch:
56
+
57
+ ```bash
58
+ ds --auth false
59
+ ```
60
+
61
+ In that mode:
62
+
63
+ - the password modal is disabled
64
+ - browser requests to `/api/*` do not require the local auth token
65
+
66
+ ## Practical Notes
67
+
68
+ - This is not intended as internet-grade authentication. It is a local browser gate for machines you control.
69
+ - If you share the machine or expose the port remotely, enable auth explicitly.
70
+ - If you script against the local daemon from a browser client, authenticate first or disable auth explicitly for that launch.
@@ -0,0 +1,250 @@
1
+ # 20 Workspace Modes Guide: Copilot vs Autonomous
2
+
3
+ This page explains the two normal project-start modes in DeepScientist:
4
+
5
+ - `Copilot`
6
+ - `Autonomous`
7
+
8
+ Use this when:
9
+
10
+ - you are about to create a new project
11
+ - you are unsure which launch mode to choose
12
+ - you want to understand why one project waits for you while another starts moving immediately
13
+
14
+ If you only want the shortest install-and-launch path, read [00 Quick Start](./00_QUICK_START.md) first.
15
+
16
+ If you want the exact startup payload and form field contract, read [02 Start Research Guide](./02_START_RESEARCH_GUIDE.md) after this page.
17
+
18
+ ## 1. One-sentence summary
19
+
20
+ - `Copilot`: quiet start, user-directed, stops after the current requested unit unless you ask it to continue
21
+ - `Autonomous`: standard DeepScientist, keeps pushing the quest forward on its own
22
+
23
+ ## 2. Where You Choose This
24
+
25
+ On the home / projects surface, start a new project and then choose the start style:
26
+
27
+ - `Copilot Mode`
28
+ - `Autonomous Mode`
29
+
30
+ Current UI wording may appear in two layers:
31
+
32
+ - outer launcher step: `Start Research` or `Start Experiment`
33
+ - mode picker title: `Choose the start style`
34
+
35
+ After that choice, the two flows diverge.
36
+
37
+ ## 3. Copilot Mode
38
+
39
+ ### 3.1 What it is
40
+
41
+ Copilot mode is the user-directed workspace.
42
+
43
+ It is for cases where you want DeepScientist to help actively, but you still want to steer each unit of work:
44
+
45
+ - inspect a repo
46
+ - read a paper
47
+ - debug code
48
+ - design an experiment
49
+ - check a running process
50
+ - rewrite a section
51
+ - summarize a result
52
+
53
+ The system should not assume that one request means “run the whole autonomous research loop”.
54
+
55
+ ### 3.2 What happens after creation
56
+
57
+ After you create a Copilot project:
58
+
59
+ - the project is created
60
+ - the quest stays idle
61
+ - the agent waits for your first real instruction
62
+
63
+ In practical terms:
64
+
65
+ - there is no immediate autonomous launch
66
+ - no baseline / experiment / writing loop starts just because the project exists
67
+ - the first substantial action begins when you send the first message
68
+
69
+ ### 3.3 Continuation behavior
70
+
71
+ Copilot mode is intentionally conservative about continuation.
72
+
73
+ After the current requested unit is complete, DeepScientist should normally:
74
+
75
+ - summarize what changed
76
+ - preserve context durably
77
+ - wait for your next message or `/resume`
78
+
79
+ This is the right mode when you want:
80
+
81
+ - tight human control
82
+ - short request-scoped help
83
+ - less background churn
84
+ - clearer handoff points
85
+
86
+ ### 3.4 Good fit
87
+
88
+ Choose `Copilot` when:
89
+
90
+ - you want to inspect before launching expensive work
91
+ - the task is still ambiguous
92
+ - you expect to iterate interactively
93
+ - you want DeepScientist to behave more like a strong research IDE partner than a long-running autonomous operator
94
+
95
+ ### 3.5 Bad fit
96
+
97
+ Avoid `Copilot` when:
98
+
99
+ - you already know the quest should keep running for hours
100
+ - you want detached experiments, monitoring, and follow-up routing without repeated user nudges
101
+ - the goal is full quest ownership, not request-by-request collaboration
102
+
103
+ ## 4. Autonomous Mode
104
+
105
+ ### 4.1 What it is
106
+
107
+ Autonomous mode is the standard DeepScientist path.
108
+
109
+ It is meant for quests where the system should keep making ordinary route choices on its own and continue until the next real checkpoint is reached.
110
+
111
+ This is the right mode for:
112
+
113
+ - baseline establishment
114
+ - long experiments
115
+ - analysis campaigns
116
+ - durable writing / finalize loops
117
+ - connector-facing project progress over time
118
+
119
+ ### 4.2 What happens after creation
120
+
121
+ After you create an Autonomous project:
122
+
123
+ - the quest is created
124
+ - the first turn is launched immediately
125
+ - the system begins turning the startup contract into real work
126
+
127
+ This may mean:
128
+
129
+ - reading the baseline and references
130
+ - checking environment and constraints
131
+ - preparing scripts
132
+ - selecting the next route
133
+ - launching detached `bash_exec` work
134
+
135
+ ### 4.3 Continuation behavior
136
+
137
+ Autonomous mode has two practical continuation regimes.
138
+
139
+ #### A. No real long-running external task yet
140
+
141
+ If no real long-running external task exists yet, DeepScientist should not park.
142
+
143
+ It should keep using the next turns to:
144
+
145
+ - prepare the real task
146
+ - launch the real task
147
+ - or make a durable route decision about what the real next task must be
148
+
149
+ This is the “active preparation / launch” phase.
150
+
151
+ #### B. A real long-running external task is already active
152
+
153
+ Once a real detached task is already running, continuation changes shape.
154
+
155
+ At that point, DeepScientist should not busy-loop through rapid model turns just to imitate continuous execution.
156
+
157
+ Instead:
158
+
159
+ - the real work should remain alive in detached `bash_exec` sessions or the runtime process they launched
160
+ - agent turns become lower-frequency monitoring / synthesis passes
161
+ - the current default monitoring cadence is roughly every `240` seconds
162
+
163
+ This is the “background progress monitoring” phase.
164
+
165
+ ### 4.4 Good fit
166
+
167
+ Choose `Autonomous` when:
168
+
169
+ - the quest should keep moving on its own
170
+ - you expect real long-running experiment or analysis work
171
+ - you want DeepScientist to keep routing after milestones
172
+ - you want the standard research-operating-system behavior
173
+
174
+ ### 4.5 Bad fit
175
+
176
+ Avoid `Autonomous` when:
177
+
178
+ - you only want a quiet project shell first
179
+ - you want to inspect the repo manually before any real movement
180
+ - you want every next unit to be explicitly user-directed
181
+
182
+ ## 5. The Most Important Practical Difference
183
+
184
+ The easiest way to remember the split is:
185
+
186
+ - `Copilot` asks: “What single useful unit should I help with right now?”
187
+ - `Autonomous` asks: “What is the next real quest step, and how do I keep the quest moving?”
188
+
189
+ That difference matters more than the labels themselves.
190
+
191
+ ## 6. How Resume Works
192
+
193
+ Both modes preserve context durably, but they resume differently.
194
+
195
+ On later turns, DeepScientist now carries a compact resume spine that can include:
196
+
197
+ - the latest durable user message
198
+ - the latest assistant checkpoint
199
+ - the latest run summary
200
+ - recent memory cues
201
+ - current `bash_exec` state
202
+
203
+ But the continuation policy still differs:
204
+
205
+ - `Copilot`: resume only when you speak again or explicitly resume
206
+ - `Autonomous`: keep going unless a real blocker or explicit waiting state applies
207
+
208
+ ## 7. Choosing Quickly
209
+
210
+ Use this fast rule:
211
+
212
+ 1. If you want the project to wait quietly until you tell it what to do, choose `Copilot`.
213
+ 2. If you want DeepScientist to begin turning the quest contract into real work immediately, choose `Autonomous`.
214
+ 3. If you are unsure, start with `Copilot`; you can still move into longer-running work once the route is clearer.
215
+
216
+ ## 8. Common Misunderstandings
217
+
218
+ ### “Autonomous means it should always spin rapidly”
219
+
220
+ No.
221
+
222
+ Autonomous means the quest should keep moving.
223
+
224
+ When there is no real long-running task yet, that can mean rapid preparation / launch turns.
225
+ When a real long-running task is already active, it should usually mean lower-frequency monitoring, not constant model churn.
226
+
227
+ ### “Copilot means it cannot run experiments”
228
+
229
+ Also no.
230
+
231
+ Copilot can still help launch, inspect, analyze, and write.
232
+ The difference is that it should not assume long autonomous continuation unless you ask for it.
233
+
234
+ ### “The two modes only change wording”
235
+
236
+ No.
237
+
238
+ They affect:
239
+
240
+ - initial launch behavior
241
+ - continuation policy
242
+ - when the quest parks
243
+ - how much autonomous routing is appropriate
244
+
245
+ ## 9. Related Docs
246
+
247
+ - [00 Quick Start](./00_QUICK_START.md)
248
+ - [02 Start Research Guide](./02_START_RESEARCH_GUIDE.md)
249
+ - [12 Guided Workflow Tour](./12_GUIDED_WORKFLOW_TOUR.md)
250
+ - [14 Prompt, Skills, and MCP Guide](./14_PROMPT_SKILLS_AND_MCP_GUIDE.md)