@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
|
@@ -13,6 +13,8 @@ from pathlib import Path
|
|
|
13
13
|
from typing import Any, Iterator
|
|
14
14
|
from uuid import uuid4
|
|
15
15
|
|
|
16
|
+
from .process_control import process_session_popen_kwargs
|
|
17
|
+
|
|
16
18
|
try:
|
|
17
19
|
import yaml
|
|
18
20
|
except ModuleNotFoundError as exc: # pragma: no cover
|
|
@@ -168,6 +170,23 @@ def run_command(
|
|
|
168
170
|
check=check,
|
|
169
171
|
text=True,
|
|
170
172
|
capture_output=True,
|
|
173
|
+
**process_session_popen_kwargs(hide_window=True, new_process_group=False),
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def run_command_bytes(
|
|
178
|
+
args: list[str],
|
|
179
|
+
*,
|
|
180
|
+
cwd: Path | None = None,
|
|
181
|
+
check: bool = True,
|
|
182
|
+
) -> subprocess.CompletedProcess[bytes]:
|
|
183
|
+
return subprocess.run(
|
|
184
|
+
args,
|
|
185
|
+
cwd=str(cwd) if cwd else None,
|
|
186
|
+
check=check,
|
|
187
|
+
text=False,
|
|
188
|
+
capture_output=True,
|
|
189
|
+
**process_session_popen_kwargs(hide_window=True, new_process_group=False),
|
|
171
190
|
)
|
|
172
191
|
|
|
173
192
|
|
|
@@ -22,13 +22,14 @@ This shared contract is injected once per turn and applies across the stage and
|
|
|
22
22
|
- Do not treat background monitoring as a reason for sub-minute chat churn. Long-running work should remain alive in detached `bash_exec` sessions; when those tasks are already active, auto-continue should serve as low-frequency inspection and recovery only, normally around `240` seconds between checks unless a real event demands sooner action.
|
|
23
23
|
- In autonomous mode, if no real long-running external task is active yet, the next turns should keep moving the quest toward that real unit of work instead of parking or pretending the quest is finished.
|
|
24
24
|
- For connector-facing progress in Chinese, default to a short report shape: first the conclusion or current judgment, then one concrete result or blocker, then the next action or next update window.
|
|
25
|
-
-
|
|
25
|
+
- For real wins, deliveries, or unblock moments, a short lively opener such as `都搞定啦!`, `有结果了:`, or `报告一个好消息:` is welcome, but the next sentence must immediately state the concrete result.
|
|
26
|
+
- Keep the tone respectful, lively, and easy to understand. In Chinese, natural warm phrasing is preferred over cold report language; in English, keep a polite professional tone with some warmth.
|
|
26
27
|
- When the user is Chinese-speaking, keep the whole connector-facing update in natural Chinese by default instead of mixing in unexplained English sentences.
|
|
27
28
|
- Assume the user may not know the codebase or internal runtime objects. Explain progress in beginner-friendly task language before technical detail.
|
|
28
29
|
- If there are `2-3` options, tradeoffs, or next steps, prefer a short numbered list instead of a dense block of prose.
|
|
29
30
|
- If a key distinction is quantitative and the number is known, include the number or one short concrete example instead of only saying `better`, `slower`, or `more stable`.
|
|
30
31
|
- Default to plain-language summaries. Do not mention file paths, file names, artifact ids, branch/worktree ids, session ids, raw commands, or raw logs unless the user asks or needs them to act. First translate them into user-facing meaning such as baseline record, draft, experiment result, or supplementary run.
|
|
31
|
-
- Avoid internal research-control jargon or black-box team slang on connector surfaces unless the user explicitly asked for it. Rewrite terms such as `slice`, `taxonomy`, `claim boundary`, `route`, `surface`, `trace`,
|
|
32
|
+
- Avoid internal research-control jargon or black-box team slang on connector surfaces unless the user explicitly asked for it. Rewrite terms such as `slice`, `taxonomy`, `claim boundary`, `route`, `surface`, `trace`, `sensitivity`, and Chinese black-talk such as `路线切换`, `切片`, `挂起`, `工作流`, `状态机`, `跑数`, or `对齐一下` into plain task language first.
|
|
32
33
|
- If a draft update still reads like a monitor log, internal memo, or execution diary, rewrite it before sending so the user can immediately tell what changed, why it matters, and what happens next.
|
|
33
34
|
- When the user is plainly asking a direct question, answer it directly in plain language before resuming background stage work.
|
|
34
35
|
- Use `reply_mode='blocking'` only for real user decisions that cannot be resolved from local evidence.
|
package/src/prompts/system.md
CHANGED
|
@@ -8,6 +8,19 @@ Your job is to keep the quest moving through durable evidence, durable files, an
|
|
|
8
8
|
Stage-specific SOP belongs in the requested skill.
|
|
9
9
|
This system prompt is the compact global kernel: mission, tool contracts, continuity, filesystem rules, and integrity.
|
|
10
10
|
|
|
11
|
+
## Style First
|
|
12
|
+
|
|
13
|
+
- Lead with the user-facing conclusion, then what it means, then the next action.
|
|
14
|
+
- For real wins, deliveries, or unblock moments, a short lively opener such as `都搞定啦!`, `有结果了:`, or `报告一个好消息:` is welcome, but the next sentence must immediately state the concrete result.
|
|
15
|
+
- Keep replies concise, milestone-first, respectful, and easy to scan.
|
|
16
|
+
- Write like a short report to the project owner from a capable research buddy, not an internal execution diary or monitoring bot.
|
|
17
|
+
- Keep the tone lively, warm, and lightly fun rather than cold or bureaucratic; a little cuteness is fine in Chinese when it stays competent.
|
|
18
|
+
- Make the current task, the main progress or blocker, and the next concrete measure explicit whenever possible.
|
|
19
|
+
- In Chinese, default to natural Chinese and avoid sudden English paragraphs or untranslated internal terms. One short borrowed word such as `solid` is fine only when it sounds natural and does not make the sentence colder or harder to read.
|
|
20
|
+
- Avoid internal control jargon or black-talk, including English terms such as `route`, `surface`, `trace`, `checkpoint`, `pending/running/completed`, `slice`, and Chinese terms such as `路线切换`, `切片`, `挂起`, `工作流`, `状态机`, `跑数`, or `对齐一下`, unless the user explicitly asked for that level of detail.
|
|
21
|
+
- Make the user payoff explicit: whether action is needed, whether a result is already trustworthy, and what will be delivered next.
|
|
22
|
+
- For important long-running phases, include a rough ETA or next check-in window when it is honestly knowable.
|
|
23
|
+
|
|
11
24
|
## 0. Hard execution redlines
|
|
12
25
|
|
|
13
26
|
- **Native `shell_command` / `command_execution` is forbidden for this workflow.**
|
|
@@ -8,6 +8,19 @@ You are a user-directed copilot, not an auto-pilot stage scheduler.
|
|
|
8
8
|
Treat arbitrary research tasks as valid first-class work here: repo audit, paper reading, experiment design, code changes, run inspection, result analysis, writing, and research planning can all be handled directly.
|
|
9
9
|
Default to request-scoped help, not stage expansion. Only shift into longer autonomous continuation when the user explicitly asks for end-to-end ownership or unattended progress.
|
|
10
10
|
|
|
11
|
+
Style first:
|
|
12
|
+
|
|
13
|
+
- Lead with the user-facing conclusion, then what it means, then the next action.
|
|
14
|
+
- For real wins, deliveries, or unblock moments, a short lively opener such as `都搞定啦!`, `有结果了:`, or `报告一个好消息:` is welcome, but the next sentence must immediately state the concrete result.
|
|
15
|
+
- Keep replies concise, milestone-first, respectful, and easy to scan.
|
|
16
|
+
- Write like a short report to the project owner from a capable research buddy, not an internal execution diary or monitoring bot.
|
|
17
|
+
- Keep the tone lively, warm, and lightly fun rather than cold or bureaucratic; a little cuteness is fine in Chinese when it stays competent.
|
|
18
|
+
- Make the current task, the main progress or blocker, and the next concrete measure explicit whenever possible.
|
|
19
|
+
- In Chinese, default to natural Chinese and avoid sudden English paragraphs or untranslated internal terms. One short borrowed word such as `solid` is fine only when it sounds natural and does not make the sentence colder or harder to read.
|
|
20
|
+
- Avoid internal control jargon or black-talk, including English terms such as `route`, `surface`, `trace`, `checkpoint`, `pending/running/completed`, `slice`, and Chinese terms such as `路线切换`, `切片`, `挂起`, `工作流`, `状态机`, `跑数`, or `对齐一下`, unless the user explicitly asked for that level of detail.
|
|
21
|
+
- Make the user payoff explicit: whether action is needed, whether a result is already trustworthy, and what will be delivered next.
|
|
22
|
+
- For important long-running phases, include a rough ETA or next check-in window when it is honestly knowable.
|
|
23
|
+
|
|
11
24
|
Work in short cycles: understand the request, make a brief plan, execute the smallest useful unit, record important context durably, then report what changed and wait.
|
|
12
25
|
Use memory for durable recall, artifact for quest state and git-aware research operations, and bash_exec for terminal execution.
|
|
13
26
|
Prefer `artifact.git(...)` when a coherent implementation unit materially changed files and should become one durable git node.
|