@researai/deepscientist 1.5.16 → 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.
- package/README.md +66 -23
- package/bin/ds.js +550 -19
- package/docs/en/00_QUICK_START.md +65 -5
- package/docs/en/01_SETTINGS_REFERENCE.md +1 -1
- package/docs/en/09_DOCTOR.md +14 -3
- package/docs/en/15_CODEX_PROVIDER_SETUP.md +12 -3
- package/docs/en/21_LOCAL_MODEL_BACKENDS_GUIDE.md +283 -0
- package/docs/en/91_DEVELOPMENT.md +237 -0
- package/docs/en/README.md +7 -3
- package/docs/zh/00_QUICK_START.md +54 -5
- package/docs/zh/01_SETTINGS_REFERENCE.md +1 -1
- package/docs/zh/09_DOCTOR.md +15 -4
- package/docs/zh/15_CODEX_PROVIDER_SETUP.md +12 -3
- package/docs/zh/21_LOCAL_MODEL_BACKENDS_GUIDE.md +281 -0
- package/docs/zh/README.md +7 -3
- package/install.sh +46 -4
- package/package.json +2 -1
- package/pyproject.toml +1 -1
- package/src/deepscientist/__init__.py +1 -1
- package/src/deepscientist/bridges/connectors.py +8 -2
- package/src/deepscientist/codex_cli_compat.py +185 -72
- package/src/deepscientist/config/service.py +154 -6
- package/src/deepscientist/daemon/api/handlers.py +130 -25
- package/src/deepscientist/daemon/api/router.py +5 -0
- package/src/deepscientist/daemon/app.py +446 -22
- package/src/deepscientist/diagnostics/__init__.py +6 -0
- package/src/deepscientist/diagnostics/runner_failures.py +130 -0
- package/src/deepscientist/doctor.py +207 -3
- package/src/deepscientist/prompts/builder.py +22 -4
- package/src/deepscientist/quest/service.py +413 -13
- package/src/deepscientist/runners/codex.py +59 -14
- package/src/deepscientist/shared.py +19 -0
- package/src/prompts/contracts/shared_interaction.md +3 -2
- package/src/prompts/system.md +13 -0
- package/src/prompts/system_copilot.md +13 -0
- package/src/tui/package.json +1 -1
- package/src/ui/dist/assets/{AiManusChatView-COFACy7V.js → AiManusChatView-Bv-Z8YpU.js} +44 -44
- package/src/ui/dist/assets/{AnalysisPlugin-DnSm0GZn.js → AnalysisPlugin-BCKAfjba.js} +1 -1
- package/src/ui/dist/assets/{CliPlugin-CvwCmDQ5.js → CliPlugin-BCKcpc35.js} +4 -4
- package/src/ui/dist/assets/{CodeEditorPlugin-cOqSa0xq.js → CodeEditorPlugin-DbOfSJ8K.js} +1 -1
- package/src/ui/dist/assets/{CodeViewerPlugin-itb0tltR.js → CodeViewerPlugin-CbaFRrUU.js} +3 -3
- package/src/ui/dist/assets/{DocViewerPlugin-DqKkiCI6.js → DocViewerPlugin-DAjLVeQD.js} +3 -3
- package/src/ui/dist/assets/{GitCommitViewerPlugin-DVgNHBCS.js → GitCommitViewerPlugin-CIUqbUDO.js} +1 -1
- package/src/ui/dist/assets/{GitDiffViewerPlugin-DxL2ezFG.js → GitDiffViewerPlugin-CQACjoAA.js} +1 -1
- package/src/ui/dist/assets/{GitSnapshotViewer-B_RQm1YZ.js → GitSnapshotViewer-0r4nLPke.js} +1 -1
- package/src/ui/dist/assets/{ImageViewerPlugin-tHqlXY3n.js → ImageViewerPlugin-nBOmI2v_.js} +3 -3
- package/src/ui/dist/assets/{LabCopilotPanel-ClMbq5Yu.js → LabCopilotPanel-BHxOxF4z.js} +1 -1
- package/src/ui/dist/assets/{LabPlugin-L_SuE8ow.js → LabPlugin-BKoZGs95.js} +1 -1
- package/src/ui/dist/assets/{LatexPlugin-B495DTXC.js → LatexPlugin-ZwtV8pIp.js} +1 -1
- package/src/ui/dist/assets/{MarkdownViewerPlugin-DG28-61B.js → MarkdownViewerPlugin-DKqVfKyW.js} +3 -3
- package/src/ui/dist/assets/{MarketplacePlugin-BiOGT-Kj.js → MarketplacePlugin-BwxStZ9D.js} +1 -1
- package/src/ui/dist/assets/{NotebookEditor-C-4Kt1p9.js → NotebookEditor-BEQhaQbt.js} +1 -1
- package/src/ui/dist/assets/{NotebookEditor-CVsj8h_T.js → NotebookEditor-DB9N_T9q.js} +23 -23
- package/src/ui/dist/assets/{PdfLoader-CASDQmxJ.js → PdfLoader-eWBONbQP.js} +1 -1
- package/src/ui/dist/assets/{PdfMarkdownPlugin-BFhwoKsY.js → PdfMarkdownPlugin-D22YOZL3.js} +1 -1
- package/src/ui/dist/assets/{PdfViewerPlugin-DcOzU9vd.js → PdfViewerPlugin-c-RK9DLM.js} +3 -3
- package/src/ui/dist/assets/{SearchPlugin-CHj7M58O.js → SearchPlugin-CxF9ytAx.js} +1 -1
- package/src/ui/dist/assets/{TextViewerPlugin-CB4DYfWO.js → TextViewerPlugin-C5xqeeUH.js} +2 -2
- package/src/ui/dist/assets/{VNCViewer-CjlbyCB3.js → VNCViewer-BoLGLnHz.js} +1 -1
- package/src/ui/dist/assets/{bot-CFkZY-JP.js → bot-DREQOxzP.js} +1 -1
- package/src/ui/dist/assets/{chevron-up-Dq5ofbht.js → chevron-up-C9Qpx4DE.js} +1 -1
- package/src/ui/dist/assets/{code-DLC6G24T.js → code-WlFHE7z_.js} +1 -1
- package/src/ui/dist/assets/{file-content-Dv4LoZec.js → file-content-BZMz3RYp.js} +1 -1
- package/src/ui/dist/assets/{file-diff-panel-Denq-lC3.js → file-diff-panel-CQhw0jS2.js} +1 -1
- package/src/ui/dist/assets/{file-socket-Cu4Qln7Y.js → file-socket-CfQPKQKj.js} +1 -1
- package/src/ui/dist/assets/{git-commit-horizontal-BUh6G52n.js → git-commit-horizontal-DxZ8DCZh.js} +1 -1
- package/src/ui/dist/assets/{image-B9HUUddG.js → image-Bgl4VIyx.js} +1 -1
- package/src/ui/dist/assets/{index-Cgla8biy.css → index-BpV6lusQ.css} +1 -1
- package/src/ui/dist/assets/{index-Gbl53BNp.js → index-CBNVuWcP.js} +363 -363
- package/src/ui/dist/assets/{index-wQ7RIIRd.js → index-CwNu1aH4.js} +1 -1
- package/src/ui/dist/assets/{index-B2B1sg-M.js → index-DrUnlf6K.js} +1 -1
- package/src/ui/dist/assets/{index-DRyx7vAc.js → index-NW-h8VzN.js} +1 -1
- package/src/ui/dist/assets/{pdf-effect-queue-ZtnHFCAi.js → pdf-effect-queue-J8OnM0jE.js} +1 -1
- package/src/ui/dist/assets/{popover-DL6h35vr.js → popover-CLc0pPP8.js} +1 -1
- package/src/ui/dist/assets/{project-sync-CsX08Qno.js → project-sync-C9IdzdZW.js} +1 -1
- package/src/ui/dist/assets/{select-DvmXt1yY.js → select-Cs2PmzwL.js} +1 -1
- package/src/ui/dist/assets/{sigma-7jpXazui.js → sigma-ClKcHAXm.js} +1 -1
- package/src/ui/dist/assets/{trash-xA7kFt8i.js → trash-DwpbFr3w.js} +1 -1
- package/src/ui/dist/assets/{useCliAccess-DsMwDjOp.js → useCliAccess-NQ8m0Let.js} +1 -1
- package/src/ui/dist/assets/{wrap-text-CwMn-iqb.js → wrap-text-BC-Hltpd.js} +1 -1
- package/src/ui/dist/assets/{zoom-out-R-GWEhzS.js → zoom-out-E_gaeAxL.js} +1 -1
- package/src/ui/dist/index.html +2 -2
|
@@ -179,6 +179,243 @@ match = service.resolve_binary("example-binary", preferred_tools=("example",))
|
|
|
179
179
|
- keep clear source reporting such as `tinytex` versus `path`
|
|
180
180
|
- add tests for registration, status, and binary resolution
|
|
181
181
|
|
|
182
|
+
## Extending Core Runtime
|
|
183
|
+
|
|
184
|
+
This section is the maintainer checklist for adding one new built-in MCP tool, one new skill, or one new connector.
|
|
185
|
+
|
|
186
|
+
Keep the extension shape close to the repository's existing registries and contracts. Do not invent a parallel path when the current registry or prompt system already covers the need.
|
|
187
|
+
|
|
188
|
+
### Add a built-in MCP tool
|
|
189
|
+
|
|
190
|
+
Public MCP surface must stay limited to:
|
|
191
|
+
|
|
192
|
+
- `memory`
|
|
193
|
+
- `artifact`
|
|
194
|
+
- `bash_exec`
|
|
195
|
+
|
|
196
|
+
Do not add a new public namespace such as `git`, `connector`, or `runtime_tool`.
|
|
197
|
+
|
|
198
|
+
If you need new Git behavior, add it under `artifact`.
|
|
199
|
+
If you need new durable shell behavior, add it under `bash_exec`.
|
|
200
|
+
|
|
201
|
+
#### Files to change
|
|
202
|
+
|
|
203
|
+
- `src/deepscientist/mcp/server.py`
|
|
204
|
+
- add the new `@server.tool(...)` handler under `build_memory_server(...)`, `build_artifact_server(...)`, or `build_bash_exec_server(...)`
|
|
205
|
+
- `src/deepscientist/mcp/context.py`
|
|
206
|
+
- only if the new tool needs extra quest/runtime context wiring
|
|
207
|
+
- `src/deepscientist/runners/codex.py`
|
|
208
|
+
- if the tool should appear in built-in MCP approval policy defaults, add it under `_BUILTIN_MCP_TOOL_APPROVALS`
|
|
209
|
+
- `docs/en/07_MEMORY_AND_MCP.md`
|
|
210
|
+
- update user-visible semantics if the tool changes how the namespace should be used
|
|
211
|
+
- `docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md`
|
|
212
|
+
- update the built-in MCP description if the tool meaning materially changes
|
|
213
|
+
|
|
214
|
+
#### Implementation rules
|
|
215
|
+
|
|
216
|
+
1. Keep the handler thin. Put durable state changes in the underlying service layer such as `ArtifactService`, `MemoryService`, or `BashExecService`.
|
|
217
|
+
2. Use `McpContext` for quest-local paths instead of reconstructing runtime state ad hoc.
|
|
218
|
+
3. Use read-only annotations for non-mutating tools.
|
|
219
|
+
4. If the tool changes durable quest state but does not itself send a user-visible message, follow the existing artifact watchdog pattern in `mcp/server.py`.
|
|
220
|
+
5. Do not bypass the current namespace meaning. Example: do not hide shell execution inside `artifact`.
|
|
221
|
+
|
|
222
|
+
#### Minimum test checklist
|
|
223
|
+
|
|
224
|
+
- `tests/test_mcp_servers.py`
|
|
225
|
+
- namespace wiring and tool call behavior
|
|
226
|
+
- `tests/test_memory_and_artifact.py`
|
|
227
|
+
- if the tool changes artifact or memory semantics
|
|
228
|
+
- `tests/test_daemon_api.py`
|
|
229
|
+
- if API payloads or quest projections depend on the new tool's outputs
|
|
230
|
+
|
|
231
|
+
### Add a skill
|
|
232
|
+
|
|
233
|
+
Skills are discovered from disk. The canonical location is:
|
|
234
|
+
|
|
235
|
+
- `src/skills/<skill_id>/SKILL.md`
|
|
236
|
+
|
|
237
|
+
The runtime discovers skills through:
|
|
238
|
+
|
|
239
|
+
- `src/deepscientist/skills/registry.py`
|
|
240
|
+
|
|
241
|
+
The prompt builder projects them through:
|
|
242
|
+
|
|
243
|
+
- `src/deepscientist/prompts/builder.py`
|
|
244
|
+
- `src/deepscientist/skills/installer.py`
|
|
245
|
+
|
|
246
|
+
#### Minimal skill shape
|
|
247
|
+
|
|
248
|
+
Create a directory:
|
|
249
|
+
|
|
250
|
+
```text
|
|
251
|
+
src/skills/<skill_id>/
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
and add:
|
|
255
|
+
|
|
256
|
+
```md
|
|
257
|
+
---
|
|
258
|
+
name: my-skill
|
|
259
|
+
description: One-line purpose statement.
|
|
260
|
+
skill_role: stage
|
|
261
|
+
skill_order: 60
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
# My Skill
|
|
265
|
+
...
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Supported `skill_role` values are:
|
|
269
|
+
|
|
270
|
+
- `stage`
|
|
271
|
+
- `companion`
|
|
272
|
+
- `custom`
|
|
273
|
+
|
|
274
|
+
Optional projected agent files:
|
|
275
|
+
|
|
276
|
+
- `src/skills/<skill_id>/agents/openai.yaml`
|
|
277
|
+
- `src/skills/<skill_id>/agents/claude.md`
|
|
278
|
+
|
|
279
|
+
#### Files to change
|
|
280
|
+
|
|
281
|
+
- `src/skills/<skill_id>/SKILL.md`
|
|
282
|
+
- required
|
|
283
|
+
- `src/deepscientist/skills/registry.py`
|
|
284
|
+
- update `_DEFAULT_STAGE_SKILLS` or `_DEFAULT_COMPANION_SKILLS` if this is a canonical built-in stage or companion skill rather than an ad hoc custom one
|
|
285
|
+
- `src/deepscientist/prompts/builder.py`
|
|
286
|
+
- update `STAGE_MEMORY_PLAN` if the skill is a real stage that needs a first-class memory retrieval plan
|
|
287
|
+
- `docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md`
|
|
288
|
+
- update the skill guide if the public workflow shape changed
|
|
289
|
+
|
|
290
|
+
#### Skill rules
|
|
291
|
+
|
|
292
|
+
1. Put execution discipline inside `SKILL.md`, not inside a central Python stage scheduler.
|
|
293
|
+
2. Reuse the existing prompt contract language:
|
|
294
|
+
- interaction discipline
|
|
295
|
+
- tool discipline
|
|
296
|
+
- stage purpose
|
|
297
|
+
- completion or handoff rules
|
|
298
|
+
3. If the skill is a canonical stage, give it a stable place in the stage order and memory plan.
|
|
299
|
+
4. If the skill is only auxiliary, prefer `skill_role: companion` or `custom` rather than bloating the canonical stage chain.
|
|
300
|
+
5. Remember that `SkillInstaller` mirrors skills into the active Codex/Claude projection trees. Keep paths and file names stable.
|
|
301
|
+
|
|
302
|
+
#### Minimum test checklist
|
|
303
|
+
|
|
304
|
+
- `tests/test_stage_skills.py`
|
|
305
|
+
- stage ordering and canonical skill availability
|
|
306
|
+
- `tests/test_skill_contracts.py`
|
|
307
|
+
- frontmatter and skill contract expectations
|
|
308
|
+
- `tests/test_prompt_builder.py`
|
|
309
|
+
- prompt builder output and visible skill path blocks
|
|
310
|
+
|
|
311
|
+
### Add a connector
|
|
312
|
+
|
|
313
|
+
Connectors have three distinct layers:
|
|
314
|
+
|
|
315
|
+
1. config and validation
|
|
316
|
+
2. inbound / outbound transport adaptation
|
|
317
|
+
3. optional background runtime lifecycle
|
|
318
|
+
|
|
319
|
+
For a simple connector, changing only one layer is usually not enough.
|
|
320
|
+
|
|
321
|
+
#### Core files to inspect first
|
|
322
|
+
|
|
323
|
+
- config defaults:
|
|
324
|
+
- `src/deepscientist/config/models.py`
|
|
325
|
+
- config validation and live test behavior:
|
|
326
|
+
- `src/deepscientist/config/service.py`
|
|
327
|
+
- connector profile support:
|
|
328
|
+
- `src/deepscientist/connector/connector_profiles.py`
|
|
329
|
+
- inbound/outbound adaptation:
|
|
330
|
+
- `src/deepscientist/bridges/base.py`
|
|
331
|
+
- `src/deepscientist/bridges/connectors.py`
|
|
332
|
+
- `src/deepscientist/bridges/builtins.py`
|
|
333
|
+
- channel delivery:
|
|
334
|
+
- `src/deepscientist/channels/base.py`
|
|
335
|
+
- `src/deepscientist/channels/builtins.py`
|
|
336
|
+
- daemon lifecycle:
|
|
337
|
+
- `src/deepscientist/daemon/app.py`
|
|
338
|
+
- API endpoints:
|
|
339
|
+
- `src/deepscientist/daemon/api/router.py`
|
|
340
|
+
- `src/deepscientist/daemon/api/handlers.py`
|
|
341
|
+
- optional prompt fragment:
|
|
342
|
+
- `src/prompts/connectors/<connector>.md`
|
|
343
|
+
|
|
344
|
+
#### Step-by-step connector checklist
|
|
345
|
+
|
|
346
|
+
1. Add default config in `src/deepscientist/config/models.py`.
|
|
347
|
+
- If it is a system connector, add it to `SYSTEM_CONNECTOR_NAMES`.
|
|
348
|
+
- Add its default payload under `default_connectors()`.
|
|
349
|
+
2. Add validation and config test behavior in `src/deepscientist/config/service.py`.
|
|
350
|
+
- validate required tokens, ids, transport, and live probe behavior
|
|
351
|
+
3. Decide whether it is profileable.
|
|
352
|
+
- If yes, add a spec in `src/deepscientist/connector/connector_profiles.py`
|
|
353
|
+
4. Add or extend a bridge in `src/deepscientist/bridges/connectors.py`.
|
|
354
|
+
- subclass `BaseConnectorBridge`
|
|
355
|
+
- implement inbound parsing and outbound formatting / delivery as needed
|
|
356
|
+
5. Register the bridge in `src/deepscientist/bridges/builtins.py`.
|
|
357
|
+
6. Register a channel in `src/deepscientist/channels/builtins.py`.
|
|
358
|
+
- use `GenericRelayChannel` when the standard relay flow is enough
|
|
359
|
+
- add a dedicated channel class only when the connector needs special outbound behavior
|
|
360
|
+
7. If the connector needs a long-running runtime such as polling, gateway, QR session, or long connection:
|
|
361
|
+
- add the service class under `src/deepscientist/channels/`
|
|
362
|
+
- add daemon state fields in `DaemonApp.__init__`
|
|
363
|
+
- wire startup in `DaemonApp._start_background_connectors()`
|
|
364
|
+
- wire shutdown in `DaemonApp._stop_background_connectors()`
|
|
365
|
+
8. If the connector needs custom web/API flows beyond the generic inbound route:
|
|
366
|
+
- update `src/deepscientist/daemon/api/router.py`
|
|
367
|
+
- update `src/deepscientist/daemon/api/handlers.py`
|
|
368
|
+
9. If the connector needs connector-specific prompt behavior:
|
|
369
|
+
- add `src/prompts/connectors/<connector>.md`
|
|
370
|
+
- the prompt builder will load it automatically when the connector is active or bound
|
|
371
|
+
10. Add user docs if it is a public connector.
|
|
372
|
+
|
|
373
|
+
#### Connector rules
|
|
374
|
+
|
|
375
|
+
1. Prefer the generic bridge/channel model. Do not special-case a connector inside unrelated quest logic.
|
|
376
|
+
2. Keep transport adaptation in bridges and delivery/runtime behavior in channels.
|
|
377
|
+
3. Do not add a connector-specific public MCP namespace.
|
|
378
|
+
4. If the connector is public, keep route and status behavior consistent with the existing `/api/connectors/...` surface.
|
|
379
|
+
5. If it is only a relay connector, try `GenericRelayChannel` first before writing a bespoke channel class.
|
|
380
|
+
|
|
381
|
+
#### Minimum test checklist
|
|
382
|
+
|
|
383
|
+
- `tests/test_connector_config_validation.py`
|
|
384
|
+
- config shape and required fields
|
|
385
|
+
- `tests/test_connector_bridges.py`
|
|
386
|
+
- inbound parse and outbound formatting
|
|
387
|
+
- connector-specific tests such as:
|
|
388
|
+
- `tests/test_telegram_connector.py`
|
|
389
|
+
- `tests/test_weixin_connector.py`
|
|
390
|
+
- `tests/test_qq_connector.py`
|
|
391
|
+
- `tests/test_whatsapp_local_session.py`
|
|
392
|
+
- or a new connector-specific test file
|
|
393
|
+
- `tests/test_daemon_api.py`
|
|
394
|
+
- if new routes, status payloads, or connector availability behavior changed
|
|
395
|
+
|
|
396
|
+
### Quick extension map
|
|
397
|
+
|
|
398
|
+
Use this when you only need the shortest file-level reminder:
|
|
399
|
+
|
|
400
|
+
- new MCP tool:
|
|
401
|
+
- `src/deepscientist/mcp/server.py`
|
|
402
|
+
- maybe `src/deepscientist/runners/codex.py`
|
|
403
|
+
- tests: `test_mcp_servers.py`
|
|
404
|
+
- new skill:
|
|
405
|
+
- `src/skills/<skill_id>/SKILL.md`
|
|
406
|
+
- maybe `src/deepscientist/skills/registry.py`
|
|
407
|
+
- maybe `src/deepscientist/prompts/builder.py`
|
|
408
|
+
- tests: `test_stage_skills.py`, `test_skill_contracts.py`, `test_prompt_builder.py`
|
|
409
|
+
- new connector:
|
|
410
|
+
- `src/deepscientist/config/models.py`
|
|
411
|
+
- `src/deepscientist/config/service.py`
|
|
412
|
+
- maybe `src/deepscientist/connector/connector_profiles.py`
|
|
413
|
+
- `src/deepscientist/bridges/*`
|
|
414
|
+
- `src/deepscientist/channels/*`
|
|
415
|
+
- maybe `src/deepscientist/daemon/app.py`
|
|
416
|
+
- maybe `src/prompts/connectors/<connector>.md`
|
|
417
|
+
- tests: connector validation + bridge + daemon/API coverage
|
|
418
|
+
|
|
182
419
|
## Documentation Rules
|
|
183
420
|
|
|
184
421
|
When behavior changes:
|
package/docs/en/README.md
CHANGED
|
@@ -39,7 +39,9 @@ This page is the shortest path to the right document.
|
|
|
39
39
|
- [05 TUI Guide](./05_TUI_GUIDE.md)
|
|
40
40
|
Read this if your main surface is the terminal and you want one end-to-end path through `ds --tui`, quests, connectors, and cross-surface work.
|
|
41
41
|
- [15 Codex Provider Setup](./15_CODEX_PROVIDER_SETUP.md)
|
|
42
|
-
Read this when you want to run DeepScientist through MiniMax, GLM, Volcengine Ark, Alibaba Bailian, or another Codex profile.
|
|
42
|
+
Read this when you want to run DeepScientist through MiniMax, GLM, Volcengine Ark, Alibaba Bailian Coding Plan, or another Codex profile.
|
|
43
|
+
- [21 Local Model Backends Guide](./21_LOCAL_MODEL_BACKENDS_GUIDE.md)
|
|
44
|
+
Read this if you want to run DeepScientist through local OpenAI-compatible backends such as vLLM, Ollama, or SGLang.
|
|
43
45
|
- [12 Guided Workflow Tour](./12_GUIDED_WORKFLOW_TOUR.md)
|
|
44
46
|
Follow the real product flow from landing page to workspace, step by step.
|
|
45
47
|
- [02 Start Research Guide](./02_START_RESEARCH_GUIDE.md)
|
|
@@ -90,6 +92,8 @@ This page is the shortest path to the right document.
|
|
|
90
92
|
Start here for diagnostics and common runtime problems.
|
|
91
93
|
- [15 Codex Provider Setup](./15_CODEX_PROVIDER_SETUP.md)
|
|
92
94
|
Check this if the problem is likely in your Codex profile, provider endpoint, API key, or model configuration.
|
|
95
|
+
- [21 Local Model Backends Guide](./21_LOCAL_MODEL_BACKENDS_GUIDE.md)
|
|
96
|
+
Check this if the problem is specifically about local OpenAI-compatible backends and whether they support `/v1/responses`.
|
|
93
97
|
- [01 Settings Reference](./01_SETTINGS_REFERENCE.md)
|
|
94
98
|
Check this if the problem is likely caused by config, credentials, or connector setup.
|
|
95
99
|
|
|
@@ -98,12 +102,12 @@ This page is the shortest path to the right document.
|
|
|
98
102
|
- [90 Architecture](./90_ARCHITECTURE.md)
|
|
99
103
|
High-level system contracts and repository structure.
|
|
100
104
|
- [91 Development](./91_DEVELOPMENT.md)
|
|
101
|
-
Maintainer-facing workflow and
|
|
105
|
+
Maintainer-facing workflow, implementation notes, and the concrete checklists for adding MCP tools, skills, and connectors.
|
|
102
106
|
|
|
103
107
|
## Community
|
|
104
108
|
|
|
105
109
|
Welcome to join the WeChat group for discussion.
|
|
106
110
|
|
|
107
111
|
<p align="center">
|
|
108
|
-
<img src="../../assets/readme/
|
|
112
|
+
<img src="../../assets/readme/wechat4.jpg" alt="DeepScientist WeChat group" width="360" />
|
|
109
113
|
</p>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
- 安装好 Node.js `>=18.18` 和 npm `>=9`;请优先参考官方页面安装:https://nodejs.org/en/download
|
|
39
39
|
- 一条已经可用的 Codex 路径:
|
|
40
|
-
- 默认 OpenAI 登录路径:`codex
|
|
40
|
+
- 默认 OpenAI 登录路径:`codex login`(或直接运行 `codex`)
|
|
41
41
|
- provider-backed 路径:一个已经可用的 Codex profile,例如 `minimax`、`glm`、`ark`、`bailian`
|
|
42
42
|
- 模型或 API 凭证
|
|
43
43
|
- 如果任务比较重,准备好 GPU 或远程服务器
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
如果你还在选择合适的 Coding Plan / 订阅方案,可以先看这些官方页面:
|
|
49
49
|
|
|
50
|
+
- 如果你只是想先有一个简单直接的推荐起点,优先从 GPT-5.4 + `xhigh` reasoning effort 开始;如果你更偏向 Google 路线,可以使用 Gemini 3 Pro,对应模型名 `gemini-3-pro-preview`。
|
|
50
51
|
- ChatGPT 定价:https://openai.com/chatgpt/pricing/
|
|
51
52
|
- ChatGPT Plus 帮助页:https://help.openai.com/en/articles/6950777-what-is-chatgpt-plus%3F.eps
|
|
52
53
|
- MiniMax Coding Plan:https://platform.minimaxi.com/docs/guides/pricing-codingplan
|
|
@@ -54,6 +55,8 @@
|
|
|
54
55
|
- 阿里百炼 Coding Plan:https://help.aliyun.com/zh/model-studio/coding-plan
|
|
55
56
|
- 火山引擎 Ark Coding Plan:https://www.volcengine.com/docs/82379/1925115?lang=zh
|
|
56
57
|
|
|
58
|
+
如果你要通过阿里百炼使用 Qwen,请只使用百炼 **Coding Plan** endpoint。普通百炼 / DashScope 平台的 Qwen API,不在当前 Codex-backed DeepScientist 支持范围内。
|
|
59
|
+
|
|
57
60
|
如果你准备使用 provider-backed 的 Codex profile,而不是默认 OpenAI 登录流,请继续看:
|
|
58
61
|
|
|
59
62
|
- [15 Codex Provider 配置](./15_CODEX_PROVIDER_SETUP.md)
|
|
@@ -89,7 +92,7 @@ npm install -g @openai/codex
|
|
|
89
92
|
|
|
90
93
|
```bash
|
|
91
94
|
which codex
|
|
92
|
-
codex
|
|
95
|
+
codex login
|
|
93
96
|
```
|
|
94
97
|
|
|
95
98
|
如果 `which codex` 没有输出,问题通常不是 DeepScientist 本身,而是 npm 全局 bin 目录没有正确进入 shell 的 PATH。先修复 PATH,再重新执行 `npm install -g @openai/codex`。
|
|
@@ -111,10 +114,10 @@ ds latex install-runtime
|
|
|
111
114
|
运行:
|
|
112
115
|
|
|
113
116
|
```bash
|
|
114
|
-
codex
|
|
117
|
+
codex login
|
|
115
118
|
```
|
|
116
119
|
|
|
117
|
-
|
|
120
|
+
如果你更喜欢交互式首次配置,就运行:
|
|
118
121
|
|
|
119
122
|
```bash
|
|
120
123
|
codex
|
|
@@ -130,7 +133,7 @@ ds doctor
|
|
|
130
133
|
|
|
131
134
|
### 2.2 provider-backed 的 Codex profile 路径
|
|
132
135
|
|
|
133
|
-
如果你已经在 MiniMax、GLM
|
|
136
|
+
如果你已经在 MiniMax、GLM、火山方舟、阿里百炼 Coding Plan 或其他 provider 上配置了一个命名的 Codex profile,请先在终端里确认这个 profile 本身可用:
|
|
134
137
|
|
|
135
138
|
```bash
|
|
136
139
|
codex --profile m27
|
|
@@ -204,6 +207,19 @@ ds --here
|
|
|
204
207
|
|
|
205
208
|
它等价于 `ds --home "$PWD/DeepScientist"`。
|
|
206
209
|
|
|
210
|
+
重要提醒:
|
|
211
|
+
|
|
212
|
+
- 如果你是通过 `ds --here` 或显式的 `--home <path>` 启动 DeepScientist,后续像 `ds --status`、`ds --stop` 这样的管理命令,也应该使用同一个 DeepScientist home
|
|
213
|
+
- 如果你是通过 `DEEPSCIENTIST_HOME` 或 `DS_HOME` 环境变量固定 home,只要后续命令继续使用同一个环境变量配置,也可以
|
|
214
|
+
- 否则 CLI 可能会回退到默认的 `~/DeepScientist`,从而把一个实际上可访问的 daemon 误判成“不是当前 home 下的受管 daemon”
|
|
215
|
+
|
|
216
|
+
例如,当你使用的是非默认 home 时,应这样执行:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
ds --status --home /path/to/DeepScientist
|
|
220
|
+
ds --stop --home /path/to/DeepScientist
|
|
221
|
+
```
|
|
222
|
+
|
|
207
223
|
如果你想换一个端口,可以运行:
|
|
208
224
|
|
|
209
225
|
```bash
|
|
@@ -434,6 +450,39 @@ ds --stop
|
|
|
434
450
|
|
|
435
451
|
这会停止当前本地 DeepScientist daemon。
|
|
436
452
|
|
|
453
|
+
卸载代码和运行时,但保留本地数据:
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
ds uninstall
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
如果你使用的是非默认 home,可以显式指定:
|
|
460
|
+
|
|
461
|
+
```bash
|
|
462
|
+
ds uninstall --home /path/to/DeepScientist --yes
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
这会删除 launcher wrapper、本地运行时代码,以及 install-local 安装树,但会保留:
|
|
466
|
+
|
|
467
|
+
- `quests/`
|
|
468
|
+
- `memory/`
|
|
469
|
+
- `config/`
|
|
470
|
+
- `logs/`
|
|
471
|
+
- `plugins/`
|
|
472
|
+
- `cache/`
|
|
473
|
+
|
|
474
|
+
如果你是通过 npm 安装的,并且还想把全局 npm 包本体一起移除,请在 `ds uninstall` 之后再执行:
|
|
475
|
+
|
|
476
|
+
```bash
|
|
477
|
+
npm uninstall -g @researai/deepscientist
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
如果你真的想把本地数据一起删掉,请在卸载后手动删除 DeepScientist home:
|
|
481
|
+
|
|
482
|
+
```bash
|
|
483
|
+
rm -rf /path/to/DeepScientist
|
|
484
|
+
```
|
|
485
|
+
|
|
437
486
|
运行诊断:
|
|
438
487
|
|
|
439
488
|
```bash
|
|
@@ -479,7 +479,7 @@ claude:
|
|
|
479
479
|
- `Test` 行为:检查该二进制是否在 `PATH` 上。
|
|
480
480
|
- `codex` 的解析顺序:环境变量覆盖、显式路径、本机 `PATH`、最后才是 bundled fallback。
|
|
481
481
|
- 临时使用说明:你也可以直接用 `ds --codex /absolute/path/to/codex` 临时覆盖这里的设置。
|
|
482
|
-
- 首次使用说明:DeepScientist 不会替你完成 Codex 认证。第一次运行 `ds` 前,必须先确保 `codex
|
|
482
|
+
- 首次使用说明:DeepScientist 不会替你完成 Codex 认证。第一次运行 `ds` 前,必须先确保 `codex login`(或直接运行 `codex`)已经成功完成。
|
|
483
483
|
- 修复说明:如果执行 `npm install -g @researai/deepscientist` 之后 bundled Codex 依赖仍然缺失,请显式安装 `npm install -g @openai/codex`。
|
|
484
484
|
|
|
485
485
|
**`config_dir`**
|
package/docs/zh/09_DOCTOR.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
默认 OpenAI 路径:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
codex
|
|
18
|
+
codex login
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
provider-backed profile 路径:
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
npm install -g @openai/codex
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
如果你更喜欢交互式首次配置,就运行 `codex` 并在交互式界面里完成认证。
|
|
34
34
|
|
|
35
35
|
3. 先直接尝试启动:
|
|
36
36
|
|
|
@@ -57,10 +57,18 @@
|
|
|
57
57
|
- 必需配置文件是否有效
|
|
58
58
|
- 当前开源版本是否仍然使用 `codex` 作为可运行 runner
|
|
59
59
|
- Codex CLI 是否存在并通过启动探测
|
|
60
|
+
- 最近一次 quest 真实运行失败是否已经能指向已知的 provider / 协议 / retry 问题
|
|
60
61
|
- 是否已经具备可选的本地 `pdflatex` 运行时,以便编译论文 PDF
|
|
61
62
|
- Web / TUI bundle 是否存在
|
|
62
63
|
- 当前 Web 端口是否空闲,或者是否已运行正确的 daemon
|
|
63
64
|
|
|
65
|
+
现在 `ds doctor` 会尽量把失败项渲染成更可执行的结构:
|
|
66
|
+
|
|
67
|
+
- `Problem`:出了什么问题
|
|
68
|
+
- `Why`:为什么系统认为它是这个问题
|
|
69
|
+
- `Fix`:现在应该先做什么修复动作
|
|
70
|
+
- `Evidence`:命中的 quest/run/request 线索
|
|
71
|
+
|
|
64
72
|
## 常见修复方式
|
|
65
73
|
|
|
66
74
|
### 没有安装 Codex
|
|
@@ -82,10 +90,10 @@ npm install -g @openai/codex
|
|
|
82
90
|
运行:
|
|
83
91
|
|
|
84
92
|
```bash
|
|
85
|
-
codex
|
|
93
|
+
codex login
|
|
86
94
|
```
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
如果你更喜欢交互式首次配置,就运行 `codex` 并在交互式界面里完成认证。
|
|
89
97
|
|
|
90
98
|
先完成一次登录,再重新执行 `ds doctor`。
|
|
91
99
|
|
|
@@ -111,6 +119,7 @@ ds --codex /absolute/path/to/codex --codex-profile m27
|
|
|
111
119
|
|
|
112
120
|
- 启动 DeepScientist 的这个 shell 中,provider API key 仍然可见
|
|
113
121
|
- 该 profile 指向的是 provider 的 Coding Plan endpoint,而不是普通通用 API endpoint
|
|
122
|
+
- 如果你走的是阿里百炼上的 Qwen,只能使用百炼 Coding Plan endpoint;普通百炼 / DashScope 平台的 Qwen API 这里不支持
|
|
114
123
|
- 如果模型应该由 profile 自己决定,请在 `~/DeepScientist/config/runners.yaml` 中使用 `model: inherit`
|
|
115
124
|
|
|
116
125
|
MiniMax 补充说明:
|
|
@@ -127,6 +136,8 @@ MiniMax 补充说明:
|
|
|
127
136
|
- 当 provider 设置了 `requires_openai_auth = false` 时,DeepScientist 也会自动移除冲突的 `OPENAI_*` 认证环境变量
|
|
128
137
|
- 如果你还希望终端里的 `codex --profile <name>` 也直接可用,再在 `~/.codex/config.toml` 顶层补上 `model_provider = "minimax"`,以及对应的顶层 `model`,例如 `MiniMax-M2.7` 或 `MiniMax-M2.5`
|
|
129
138
|
- 当 DeepScientist 检测到 Codex CLI 版本低于 `0.63.0` 时,会自动把 `xhigh` 降级成 `high`
|
|
139
|
+
- 如果 provider 返回 `tool call result does not follow tool call (2013)`,应优先把它当作 tool call / tool result 顺序错误,而不是普通网络抖动
|
|
140
|
+
- 如果 provider 返回 `invalid function arguments json string` 或 `failed to parse tool call arguments` 这类错误,应该先修正 tool 调用串行化/参数编码路径,再继续重试
|
|
130
141
|
|
|
131
142
|
### 当前配置的 Codex 模型不可用
|
|
132
143
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
DeepScientist 不会为 MiniMax、GLM、火山方舟、阿里百炼单独实现一套 provider 适配器。
|
|
4
4
|
|
|
5
|
+
如果你要使用阿里百炼上的 Qwen,需要特别注意:DeepScientist 只支持 **Coding Plan** 这条路径,不支持普通百炼 / DashScope 平台的 Qwen API。
|
|
6
|
+
|
|
5
7
|
它复用的是你本机已经能正常工作的 Codex CLI 配置。
|
|
6
8
|
|
|
7
9
|
推荐顺序始终是:
|
|
@@ -18,7 +20,7 @@ DeepScientist 不会为 MiniMax、GLM、火山方舟、阿里百炼单独实现
|
|
|
18
20
|
如果你的 Codex CLI 走的是标准 OpenAI 登录流,就用这一条。
|
|
19
21
|
|
|
20
22
|
```bash
|
|
21
|
-
codex
|
|
23
|
+
codex login
|
|
22
24
|
ds doctor
|
|
23
25
|
ds
|
|
24
26
|
```
|
|
@@ -63,6 +65,7 @@ codex:
|
|
|
63
65
|
- 对 provider-backed 的 Codex profile,建议优先使用 `model: inherit`
|
|
64
66
|
- 除非你非常确定该 provider 接受你要显式传入的模型名,否则不要再额外硬写一个模型
|
|
65
67
|
- DeepScientist 现在会在 `.ds/codex-home` 下启动一个隔离的运行时 home,但会先继承你配置的 `~/.codex` 里的 auth、config、skills、agents 与 prompts
|
|
68
|
+
- 如果当前生效 provider 使用的是 `wire_api = "chat"`,DeepScientist 现在会在启动探测时自动检查所选 Codex binary 是否正好是 `0.57.0`
|
|
66
69
|
|
|
67
70
|
## Provider 一览
|
|
68
71
|
|
|
@@ -72,14 +75,14 @@ codex:
|
|
|
72
75
|
| MiniMax | [MiniMax Codex CLI](https://platform.minimaxi.com/docs/coding-plan/codex-cli) | 否 | 使用你自己的 Codex profile,例如 `ds --codex-profile m27` |
|
|
73
76
|
| GLM | [GLM Coding Plan:其他工具](https://docs.bigmodel.cn/cn/coding-plan/tool/others) | 否 | 使用一个指向 GLM coding endpoint 的 Codex profile |
|
|
74
77
|
| 火山方舟 | [Ark Coding Plan 总览](https://www.volcengine.com/docs/82379/1925114?lang=zh) | 否 | 使用一个指向 Ark coding endpoint 的 Codex profile |
|
|
75
|
-
| 阿里百炼 | [百炼 Coding Plan:其他工具](https://help.aliyun.com/zh/model-studio/other-tools-coding-plan) | 否 | 使用一个指向 Bailian
|
|
78
|
+
| 阿里百炼 | [百炼 Coding Plan:其他工具](https://help.aliyun.com/zh/model-studio/other-tools-coding-plan) | 否 | 使用一个指向 Bailian Coding Plan endpoint 的 Codex profile;不要使用普通百炼 / DashScope Qwen API |
|
|
76
79
|
|
|
77
80
|
## OpenAI
|
|
78
81
|
|
|
79
82
|
### 需要准备什么
|
|
80
83
|
|
|
81
84
|
- 正常安装的 Codex CLI
|
|
82
|
-
- 已成功执行过一次 `codex
|
|
85
|
+
- 已成功执行过一次 `codex login`,或者在 `codex` 交互界面里完成首次认证
|
|
83
86
|
|
|
84
87
|
### DeepScientist 命令
|
|
85
88
|
|
|
@@ -202,6 +205,7 @@ DeepScientist 现在对它的支持方式是:
|
|
|
202
205
|
- 如果你使用的是这类 profile-only MiniMax 配置,再配合 Codex CLI `0.57.0`,DeepScientist 会在自己的 probe / 运行时临时 `config.toml` 副本里,把所选 profile 的 `model_provider` 和 `model` 自动提升到顶层
|
|
203
206
|
- 对 provider-backed 的 MiniMax profile,DeepScientist 会强制使用 `model: inherit`,避免再被硬编码的 OpenAI 模型覆盖
|
|
204
207
|
- 当 `requires_openai_auth = false` 时,DeepScientist 会自动移除冲突的 `OPENAI_API_KEY` 和 `OPENAI_BASE_URL`
|
|
208
|
+
- 对 MiniMax 这类 `Codex CLI 0.57.0 + wire_api = \"chat\"` 的会话,DeepScientist 现在会额外注入一个兼容约束,明确要求 Codex 把 MCP 工具调用串行化,一次只发一个 tool call,而不是把多个 tool call 打包进同一轮回复
|
|
205
209
|
- 这意味着即使终端里原样执行 `codex --profile m27` 还会失败,DeepScientist 也可以先兼容跑起来
|
|
206
210
|
|
|
207
211
|
如果你还希望终端里的 `codex --profile <name>` 也直接可用,请使用显式顶层兼容写法:
|
|
@@ -351,6 +355,11 @@ codex:
|
|
|
351
355
|
|
|
352
356
|
阿里百炼的 Coding Plan 官方文档也是 OpenAI-compatible endpoint 路径。它特别强调:必须使用 Coding Plan 专属 key 和 endpoint,而不是普通平台 endpoint。
|
|
353
357
|
|
|
358
|
+
对 Qwen 这条路径,需要额外记住:
|
|
359
|
+
|
|
360
|
+
- 支持:走百炼 **Coding Plan** 的 Qwen
|
|
361
|
+
- 不支持:普通百炼 / DashScope 平台的 Qwen API
|
|
362
|
+
|
|
354
363
|
官方文档:
|
|
355
364
|
|
|
356
365
|
- <https://help.aliyun.com/zh/model-studio/other-tools-coding-plan>
|