@researai/deepscientist 1.5.12 → 1.5.14

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 (99) hide show
  1. package/bin/ds.js +20 -3
  2. package/docs/en/00_QUICK_START.md +24 -5
  3. package/docs/en/01_SETTINGS_REFERENCE.md +4 -0
  4. package/docs/en/05_TUI_GUIDE.md +466 -96
  5. package/docs/en/09_DOCTOR.md +24 -5
  6. package/docs/en/15_CODEX_PROVIDER_SETUP.md +113 -15
  7. package/docs/en/README.md +2 -0
  8. package/docs/zh/00_QUICK_START.md +24 -5
  9. package/docs/zh/01_SETTINGS_REFERENCE.md +4 -0
  10. package/docs/zh/05_TUI_GUIDE.md +465 -82
  11. package/docs/zh/09_DOCTOR.md +24 -5
  12. package/docs/zh/15_CODEX_PROVIDER_SETUP.md +113 -15
  13. package/docs/zh/README.md +2 -0
  14. package/package.json +2 -1
  15. package/pyproject.toml +1 -1
  16. package/src/deepscientist/__init__.py +1 -1
  17. package/src/deepscientist/artifact/service.py +125 -2
  18. package/src/deepscientist/cli.py +3 -0
  19. package/src/deepscientist/codex_cli_compat.py +117 -0
  20. package/src/deepscientist/config/service.py +53 -6
  21. package/src/deepscientist/connector/lingzhu_support.py +23 -4
  22. package/src/deepscientist/daemon/app.py +111 -30
  23. package/src/deepscientist/mcp/server.py +161 -19
  24. package/src/deepscientist/prompts/builder.py +13 -54
  25. package/src/deepscientist/quest/service.py +99 -0
  26. package/src/deepscientist/quest/stage_views.py +134 -29
  27. package/src/deepscientist/runners/codex.py +11 -2
  28. package/src/deepscientist/runners/runtime_overrides.py +3 -0
  29. package/src/deepscientist/shared.py +6 -1
  30. package/src/prompts/system.md +220 -2065
  31. package/src/skills/baseline/SKILL.md +265 -994
  32. package/src/skills/baseline/references/artifact-payload-examples.md +39 -0
  33. package/src/skills/baseline/references/baseline-checklist-template.md +21 -32
  34. package/src/skills/baseline/references/baseline-plan-template.md +41 -57
  35. package/src/tui/dist/app/AppContainer.js +1442 -52
  36. package/src/tui/dist/components/Composer.js +1 -1
  37. package/src/tui/dist/components/ConfigScreen.js +190 -36
  38. package/src/tui/dist/components/GradientStatusText.js +1 -20
  39. package/src/tui/dist/components/InputPrompt.js +41 -32
  40. package/src/tui/dist/components/LoadingIndicator.js +1 -1
  41. package/src/tui/dist/components/Logo.js +61 -38
  42. package/src/tui/dist/components/MainContent.js +10 -3
  43. package/src/tui/dist/components/WelcomePanel.js +4 -12
  44. package/src/tui/dist/components/messages/AssistantMessage.js +1 -1
  45. package/src/tui/dist/components/messages/BashExecOperationMessage.js +3 -3
  46. package/src/tui/dist/components/messages/OperationMessage.js +1 -1
  47. package/src/tui/dist/index.js +28 -1
  48. package/src/tui/dist/layouts/DefaultAppLayout.js +3 -3
  49. package/src/tui/dist/lib/api.js +17 -0
  50. package/src/tui/dist/lib/connectorConfig.js +90 -0
  51. package/src/tui/dist/lib/connectors.js +261 -0
  52. package/src/tui/dist/lib/qr.js +21 -0
  53. package/src/tui/dist/semantic-colors.js +29 -19
  54. package/src/tui/package.json +2 -1
  55. package/src/ui/dist/assets/{AiManusChatView-CnJcXynW.js → AiManusChatView-DaF9Nge_.js} +12 -12
  56. package/src/ui/dist/assets/{AnalysisPlugin-DeyzPEhV.js → AnalysisPlugin-BSVx6dXE.js} +1 -1
  57. package/src/ui/dist/assets/{CliPlugin-CB1YODQn.js → CliPlugin-C9gzJX41.js} +9 -9
  58. package/src/ui/dist/assets/{CodeEditorPlugin-B-xicq1e.js → CodeEditorPlugin-DU9G0Tox.js} +8 -8
  59. package/src/ui/dist/assets/{CodeViewerPlugin-DT54ysXa.js → CodeViewerPlugin-DoX_fI9l.js} +5 -5
  60. package/src/ui/dist/assets/{DocViewerPlugin-DQtKT-VD.js → DocViewerPlugin-C4FWIXuU.js} +3 -3
  61. package/src/ui/dist/assets/{GitDiffViewerPlugin-hqHbCfnv.js → GitDiffViewerPlugin-BgfFMgtf.js} +20 -20
  62. package/src/ui/dist/assets/{ImageViewerPlugin-OcVo33jV.js → ImageViewerPlugin-tcPkfY_x.js} +5 -5
  63. package/src/ui/dist/assets/{LabCopilotPanel-DdGwhEUV.js → LabCopilotPanel-_dKV60Bf.js} +11 -11
  64. package/src/ui/dist/assets/{LabPlugin-Ciz1gDaX.js → LabPlugin-Bje0ayoC.js} +2 -2
  65. package/src/ui/dist/assets/{LatexPlugin-BhmjNQRC.js → LatexPlugin-CVsBzAln.js} +7 -7
  66. package/src/ui/dist/assets/{MarkdownViewerPlugin-BzdVH9Bx.js → MarkdownViewerPlugin-xjmrqv_8.js} +4 -4
  67. package/src/ui/dist/assets/{MarketplacePlugin-DmyHspXt.js → MarketplacePlugin-mMM2A8wP.js} +3 -3
  68. package/src/ui/dist/assets/{NotebookEditor-BTVYRGkm.js → NotebookEditor-3kVDSOBo.js} +11 -11
  69. package/src/ui/dist/assets/{NotebookEditor-BMXKrDRk.js → NotebookEditor-SoJ8X-MO.js} +1 -1
  70. package/src/ui/dist/assets/{PdfLoader-CvcjJHXv.js → PdfLoader-DElVuHl9.js} +1 -1
  71. package/src/ui/dist/assets/{PdfMarkdownPlugin-DW2ej8Vk.js → PdfMarkdownPlugin-Bq88XT4G.js} +2 -2
  72. package/src/ui/dist/assets/{PdfViewerPlugin-CmlDxbhU.js → PdfViewerPlugin-CsCXMo9S.js} +10 -10
  73. package/src/ui/dist/assets/{SearchPlugin-DAjQZPSv.js → SearchPlugin-oUPvy19k.js} +1 -1
  74. package/src/ui/dist/assets/{TextViewerPlugin-C-nVAZb_.js → TextViewerPlugin-CRkT9yNy.js} +5 -5
  75. package/src/ui/dist/assets/{VNCViewer-D7-dIYon.js → VNCViewer-BgbuvWhR.js} +10 -10
  76. package/src/ui/dist/assets/{bot-C_G4WtNI.js → bot-v_RASACv.js} +1 -1
  77. package/src/ui/dist/assets/{code-Cd7WfiWq.js → code-5hC9d0VH.js} +1 -1
  78. package/src/ui/dist/assets/{file-content-B57zsL9y.js → file-content-D1PxfOrp.js} +1 -1
  79. package/src/ui/dist/assets/{file-diff-panel-DVoheLFq.js → file-diff-panel-DG1oT_Hj.js} +1 -1
  80. package/src/ui/dist/assets/{file-socket-B5kXFxZP.js → file-socket-BmdFYQlk.js} +1 -1
  81. package/src/ui/dist/assets/{image-LLOjkMHF.js → image-Dqe2X2tW.js} +1 -1
  82. package/src/ui/dist/assets/{index-Dxa2eYMY.js → index-DVsMKK_y.js} +1 -1
  83. package/src/ui/dist/assets/{index-C3r2iGrp.js → index-Duvz8Ip0.js} +12 -12
  84. package/src/ui/dist/assets/{index-CLQauncb.js → index-Nt9hS4ck.js} +470 -165
  85. package/src/ui/dist/assets/{index-hOUOWbW2.js → index-RDlNXXx1.js} +2 -2
  86. package/src/ui/dist/assets/{monaco-BGGAEii3.js → monaco-DIXge1CP.js} +1 -1
  87. package/src/ui/dist/assets/{pdf-effect-queue-DlEr1_y5.js → pdf-effect-queue-BBTTQaO-.js} +1 -1
  88. package/src/ui/dist/assets/{popover-CWJbJuYY.js → popover-BWlolyxo.js} +1 -1
  89. package/src/ui/dist/assets/{project-sync-CRJiucYO.js → project-sync-BM5PkFH4.js} +1 -1
  90. package/src/ui/dist/assets/{select-CoHB7pvH.js → select-D4dAtrA8.js} +2 -2
  91. package/src/ui/dist/assets/{sigma-D5aJWR8J.js → sigma-CKbE5jJT.js} +1 -1
  92. package/src/ui/dist/assets/{square-check-big-DUK_mnkS.js → square-check-big-CZNGMgiB.js} +1 -1
  93. package/src/ui/dist/assets/{trash-ChU3SEE3.js → trash-DaB37xAz.js} +1 -1
  94. package/src/ui/dist/assets/{useCliAccess-BrJBV3tY.js → useCliAccess-C2OmAcWe.js} +1 -1
  95. package/src/ui/dist/assets/{useFileDiffOverlay-C2OQaVWc.js → useFileDiffOverlay-Dowd1Ij4.js} +1 -1
  96. package/src/ui/dist/assets/{wrap-text-C7Qqh-om.js → wrap-text-BGjAhAUq.js} +1 -1
  97. package/src/ui/dist/assets/{zoom-out-rtX0FKya.js → zoom-out-dMZQMXzc.js} +1 -1
  98. package/src/ui/dist/index.html +1 -1
  99. package/uv.lock +1 -1
package/bin/ds.js CHANGED
@@ -36,11 +36,15 @@ const pythonCommands = new Set([
36
36
  const UPDATE_PACKAGE_NAME = String(packageJson.name || '@researai/deepscientist').trim() || '@researai/deepscientist';
37
37
  const UPDATE_CHECK_TTL_MS = 12 * 60 * 60 * 1000;
38
38
 
39
- const optionsWithValues = new Set(['--home', '--host', '--port', '--quest-id', '--mode', '--proxy', '--codex-profile']);
39
+ const optionsWithValues = new Set(['--home', '--host', '--port', '--quest-id', '--mode', '--proxy', '--codex-profile', '--codex']);
40
40
 
41
- function buildCodexOverrideEnv({ yolo = false, profile = null } = {}) {
41
+ function buildCodexOverrideEnv({ yolo = false, profile = null, binary = null } = {}) {
42
42
  const normalizedProfile = typeof profile === 'string' ? profile.trim() : '';
43
+ const normalizedBinary = typeof binary === 'string' ? binary.trim() : '';
43
44
  const overrides = {};
45
+ if (normalizedBinary) {
46
+ overrides.DEEPSCIENTIST_CODEX_BINARY = normalizedBinary;
47
+ }
44
48
  if (!yolo) {
45
49
  if (normalizedProfile) {
46
50
  overrides.DEEPSCIENTIST_CODEX_PROFILE = normalizedProfile;
@@ -103,6 +107,7 @@ Launcher flags:
103
107
  --proxy <url> Use an outbound HTTP/WS proxy for npm and Python runtime traffic
104
108
  --yolo Run Codex in YOLO mode: approval_policy=never and sandbox_mode=danger-full-access
105
109
  --codex-profile <id> Run DeepScientist with a specific Codex profile, for example \`m27\`
110
+ --codex <path> Run DeepScientist with a specific Codex executable path for this launch
106
111
  --quest-id <id> Open the TUI on one quest directly
107
112
 
108
113
  Update:
@@ -981,6 +986,7 @@ function parseLauncherArgs(argv) {
981
986
  let skipUpdateCheck = false;
982
987
  let yolo = false;
983
988
  let codexProfile = null;
989
+ let codexBinary = null;
984
990
 
985
991
  if (args[0] === 'ui') {
986
992
  args.shift();
@@ -1001,6 +1007,7 @@ function parseLauncherArgs(argv) {
1001
1007
  else if (arg === '--skip-update-check') skipUpdateCheck = true;
1002
1008
  else if (arg === '--yolo') yolo = true;
1003
1009
  else if (arg === '--codex-profile' && args[index + 1]) codexProfile = args[++index];
1010
+ else if (arg === '--codex' && args[index + 1]) codexBinary = args[++index];
1004
1011
  else if (arg === '--host' && args[index + 1]) host = args[++index];
1005
1012
  else if (arg === '--port' && args[index + 1]) port = Number(args[++index]);
1006
1013
  else if (arg === '--home' && args[index + 1]) home = path.resolve(args[++index]);
@@ -1027,6 +1034,7 @@ function parseLauncherArgs(argv) {
1027
1034
  skipUpdateCheck,
1028
1035
  yolo,
1029
1036
  codexProfile,
1037
+ codexBinary,
1030
1038
  };
1031
1039
  }
1032
1040
 
@@ -2321,6 +2329,10 @@ function normalizePythonCliArgs(args, home) {
2321
2329
  index += 1;
2322
2330
  continue;
2323
2331
  }
2332
+ if (arg === '--codex') {
2333
+ index += 1;
2334
+ continue;
2335
+ }
2324
2336
  normalized.push(arg);
2325
2337
  }
2326
2338
  return ['--home', home, ...normalized];
@@ -4002,7 +4014,11 @@ async function launcherMain(rawArgs) {
4002
4014
 
4003
4015
  const pythonRuntime = ensurePythonRuntime(home);
4004
4016
  const runtimePython = pythonRuntime.runtimePython;
4005
- const codexOverrideEnv = buildCodexOverrideEnv({ yolo: options.yolo, profile: options.codexProfile });
4017
+ const codexOverrideEnv = buildCodexOverrideEnv({
4018
+ yolo: options.yolo,
4019
+ profile: options.codexProfile,
4020
+ binary: options.codexBinary,
4021
+ });
4006
4022
  ensureInitialized(home, runtimePython);
4007
4023
  if (await maybeHandleStartupUpdate(home, rawArgs, options)) {
4008
4024
  return true;
@@ -4083,6 +4099,7 @@ async function main() {
4083
4099
  const codexOverrideEnv = buildCodexOverrideEnv({
4084
4100
  yolo: args.includes('--yolo'),
4085
4101
  profile: readOptionValue(args, '--codex-profile'),
4102
+ binary: readOptionValue(args, '--codex'),
4086
4103
  });
4087
4104
  if (positional.value === 'run' || positional.value === 'daemon') {
4088
4105
  maybePrintOptionalLatexNotice(home);
@@ -79,7 +79,7 @@ npm install -g @researai/deepscientist
79
79
 
80
80
  This installs the `ds` command globally.
81
81
 
82
- DeepScientist depends on a working Codex CLI. The npm package tries to bring the bundled Codex dependency with it, but if `codex` is still missing afterward, repair it explicitly:
82
+ DeepScientist depends on a working Codex CLI. It prefers the `codex` already available on your machine and only falls back to the bundled npm dependency when no local Codex path is available. If `codex` is still missing afterward, repair it explicitly:
83
83
 
84
84
  ```bash
85
85
  npm install -g @openai/codex
@@ -124,25 +124,44 @@ ds doctor
124
124
  If you already use a named Codex profile for MiniMax, GLM, Volcengine Ark, Alibaba Bailian, or another provider-backed path, verify that profile first in a terminal:
125
125
 
126
126
  ```bash
127
- codex --profile minimax
127
+ codex --profile m27
128
128
  ```
129
129
 
130
130
  Then run DeepScientist through the same profile:
131
131
 
132
132
  ```bash
133
- ds doctor --codex-profile minimax
133
+ ds doctor --codex-profile m27
134
134
  ```
135
135
 
136
136
  and later:
137
137
 
138
138
  ```bash
139
- ds --codex-profile minimax
139
+ ds --codex-profile m27
140
140
  ```
141
141
 
142
- Replace `minimax` with the real profile name you created, such as `m27`, `glm`, `ark`, or `bailian`.
142
+ If you need one specific Codex binary for this run, add `--codex` too:
143
+
144
+ ```bash
145
+ ds doctor --codex /absolute/path/to/codex --codex-profile m27
146
+ ds --codex /absolute/path/to/codex --codex-profile m27
147
+ ```
148
+
149
+ `m27` is the MiniMax profile name used consistently in this repo. MiniMax's own page currently uses `m21`, but the profile name is only a local alias; if you created a different name, use that same name in all commands.
143
150
 
144
151
  DeepScientist blocks startup until Codex can pass a real hello probe. By default, the runner model in `~/DeepScientist/config/runners.yaml` is `gpt-5.4`. If your profile expects the model to come from the profile itself, use `model: inherit` in `runners.yaml`, or simply launch with `--codex-profile <name>` and let that session inherit the profile-defined model.
145
152
 
153
+ MiniMax note:
154
+
155
+ - if the current `@openai/codex` latest does not work with MiniMax, install `npm install -g @openai/codex@0.57.0`
156
+ - create a MiniMax `Coding Plan Key` first
157
+ - clear `OPENAI_API_KEY` and `OPENAI_BASE_URL` in the current shell before exporting `MINIMAX_API_KEY`
158
+ - use `https://api.minimaxi.com/v1`
159
+ - the `codex-MiniMax-*` model names shown on MiniMax's current Codex CLI page did not pass reliably through Codex CLI in local testing with the provided key
160
+ - the locally verified working model name is `MiniMax-M2.7`
161
+ - DeepScientist can auto-adapt MiniMax's profile-only `model_provider` / `model` config shape during probe and runtime
162
+ - if you also want plain terminal `codex --profile <name>` to work directly, add `model_provider = "minimax"` and `model = "MiniMax-M2.7"` at the top level of `~/.codex/config.toml`
163
+ - DeepScientist automatically downgrades `xhigh` to `high` when it detects an older Codex CLI that does not support `xhigh`
164
+
146
165
  ## 3. Start the Local Runtime
147
166
 
148
167
  Run:
@@ -430,6 +430,8 @@ claude:
430
430
  - UI label: `Binary`
431
431
  - Meaning: command name or absolute path used to launch the runner.
432
432
  - `Test` behavior: checks whether the binary is on `PATH`.
433
+ - Resolution order for `codex`: env override, explicit path, local `PATH`, then bundled fallback.
434
+ - One-off note: you can temporarily override this with `ds --codex /absolute/path/to/codex`.
433
435
  - First-run note: DeepScientist does not finish Codex authentication for you. Before the first `ds`, make sure `codex --login` (or `codex`) has completed successfully.
434
436
  - Repair note: if the bundled dependency is missing after `npm install -g @researai/deepscientist`, install Codex explicitly with `npm install -g @openai/codex`.
435
437
 
@@ -448,6 +450,7 @@ claude:
448
450
  - Meaning: optional Codex profile name passed through as `codex --profile <name>`.
449
451
  - Use this when your Codex CLI is already configured for a provider-backed setup such as MiniMax, GLM, Volcengine Ark, or Alibaba Bailian.
450
452
  - One-off note: you can also leave this field empty and launch with `ds --codex-profile <name>`.
453
+ - Combined note: one-off profile and binary overrides can be combined as `ds --codex /absolute/path/to/codex --codex-profile <name>`.
451
454
 
452
455
  **`model`**
453
456
 
@@ -465,6 +468,7 @@ claude:
465
468
  - UI label: `Reasoning effort`
466
469
  - Allowed values: `""`, `minimal`, `low`, `medium`, `high`, `xhigh`
467
470
  - Meaning: default reasoning intensity.
471
+ - Compatibility note: when DeepScientist detects a Codex CLI older than `0.63.0`, it automatically downgrades `xhigh` to `high` for the startup probe and runner command. This covers MiniMax's currently recommended `@openai/codex@0.57.0` path.
468
472
 
469
473
  **`approval_policy`**
470
474