@researai/deepscientist 1.5.0 → 1.5.2
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/AGENTS.md +26 -0
- package/README.md +47 -161
- package/assets/connectors/lingzhu/openclaw-bridge/README.md +124 -0
- package/assets/connectors/lingzhu/openclaw-bridge/index.ts +162 -0
- package/assets/connectors/lingzhu/openclaw-bridge/openclaw.plugin.json +145 -0
- package/assets/connectors/lingzhu/openclaw-bridge/package.json +35 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/cli.ts +180 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/config.ts +196 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/debug-log.ts +111 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/events.ts +4 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/http-handler.ts +1133 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/image-cache.ts +75 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/lingzhu-tools.ts +246 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/transform.ts +541 -0
- package/assets/connectors/lingzhu/openclaw-bridge/src/types.ts +131 -0
- package/assets/connectors/lingzhu/openclaw-bridge/tsconfig.json +14 -0
- package/assets/connectors/lingzhu/openclaw.lingzhu.config.template.json +39 -0
- package/bin/ds.js +2048 -166
- package/docs/en/00_QUICK_START.md +152 -0
- package/docs/en/01_SETTINGS_REFERENCE.md +1104 -0
- package/docs/en/02_START_RESEARCH_GUIDE.md +404 -0
- package/docs/en/03_QQ_CONNECTOR_GUIDE.md +325 -0
- package/docs/en/04_LINGZHU_CONNECTOR_GUIDE.md +216 -0
- package/docs/en/05_TUI_GUIDE.md +141 -0
- package/docs/en/06_RUNTIME_AND_CANVAS.md +679 -0
- package/docs/en/07_MEMORY_AND_MCP.md +253 -0
- package/docs/en/08_FIGURE_STYLE_GUIDE.md +97 -0
- package/docs/en/09_DOCTOR.md +152 -0
- package/docs/en/90_ARCHITECTURE.md +247 -0
- package/docs/en/91_DEVELOPMENT.md +195 -0
- package/docs/en/99_ACKNOWLEDGEMENTS.md +29 -0
- package/docs/zh/00_QUICK_START.md +152 -0
- package/docs/zh/01_SETTINGS_REFERENCE.md +1137 -0
- package/docs/zh/02_START_RESEARCH_GUIDE.md +414 -0
- package/docs/zh/03_QQ_CONNECTOR_GUIDE.md +324 -0
- package/docs/zh/04_LINGZHU_CONNECTOR_GUIDE.md +230 -0
- package/docs/zh/05_TUI_GUIDE.md +128 -0
- package/docs/zh/06_RUNTIME_AND_CANVAS.md +271 -0
- package/docs/zh/07_MEMORY_AND_MCP.md +235 -0
- package/docs/zh/08_FIGURE_STYLE_GUIDE.md +97 -0
- package/docs/zh/09_DOCTOR.md +154 -0
- package/docs/zh/99_ACKNOWLEDGEMENTS.md +29 -0
- package/install.sh +41 -16
- package/package.json +5 -2
- package/pyproject.toml +1 -1
- package/src/deepscientist/__init__.py +6 -1
- package/src/deepscientist/artifact/guidance.py +9 -2
- package/src/deepscientist/artifact/service.py +1026 -39
- package/src/deepscientist/bash_exec/monitor.py +27 -5
- package/src/deepscientist/bash_exec/runtime.py +639 -0
- package/src/deepscientist/bash_exec/service.py +99 -16
- package/src/deepscientist/bridges/base.py +3 -0
- package/src/deepscientist/bridges/connectors.py +292 -13
- package/src/deepscientist/channels/qq.py +19 -2
- package/src/deepscientist/channels/relay.py +1 -0
- package/src/deepscientist/cli.py +32 -25
- package/src/deepscientist/config/models.py +28 -2
- package/src/deepscientist/config/service.py +202 -7
- package/src/deepscientist/connector_runtime.py +2 -0
- package/src/deepscientist/daemon/api/handlers.py +68 -6
- package/src/deepscientist/daemon/api/router.py +3 -0
- package/src/deepscientist/daemon/app.py +531 -15
- package/src/deepscientist/doctor.py +511 -0
- package/src/deepscientist/gitops/diff.py +3 -0
- package/src/deepscientist/home.py +26 -2
- package/src/deepscientist/latex_runtime.py +17 -4
- package/src/deepscientist/lingzhu_support.py +182 -0
- package/src/deepscientist/mcp/context.py +3 -1
- package/src/deepscientist/mcp/server.py +55 -2
- package/src/deepscientist/prompts/builder.py +222 -58
- package/src/deepscientist/quest/layout.py +2 -0
- package/src/deepscientist/quest/service.py +133 -14
- package/src/deepscientist/quest/stage_views.py +65 -1
- package/src/deepscientist/runners/codex.py +2 -0
- package/src/deepscientist/runtime_tools/__init__.py +16 -0
- package/src/deepscientist/runtime_tools/builtins.py +19 -0
- package/src/deepscientist/runtime_tools/models.py +29 -0
- package/src/deepscientist/runtime_tools/registry.py +40 -0
- package/src/deepscientist/runtime_tools/service.py +59 -0
- package/src/deepscientist/runtime_tools/tinytex.py +25 -0
- package/src/deepscientist/shared.py +44 -17
- package/src/deepscientist/tinytex.py +276 -0
- package/src/prompts/connectors/lingzhu.md +15 -0
- package/src/prompts/connectors/qq.md +121 -0
- package/src/prompts/system.md +214 -37
- package/src/skills/analysis-campaign/SKILL.md +46 -7
- package/src/skills/baseline/SKILL.md +12 -5
- package/src/skills/decision/SKILL.md +7 -5
- package/src/skills/experiment/SKILL.md +22 -5
- package/src/skills/finalize/SKILL.md +9 -5
- package/src/skills/idea/SKILL.md +6 -5
- package/src/skills/intake-audit/SKILL.md +277 -0
- package/src/skills/intake-audit/references/state-audit-template.md +41 -0
- package/src/skills/rebuttal/SKILL.md +409 -0
- package/src/skills/rebuttal/references/action-plan-template.md +63 -0
- package/src/skills/rebuttal/references/evidence-update-template.md +30 -0
- package/src/skills/rebuttal/references/response-letter-template.md +113 -0
- package/src/skills/rebuttal/references/review-matrix-template.md +55 -0
- package/src/skills/review/SKILL.md +295 -0
- package/src/skills/review/references/experiment-todo-template.md +29 -0
- package/src/skills/review/references/review-report-template.md +83 -0
- package/src/skills/review/references/revision-log-template.md +40 -0
- package/src/skills/scout/SKILL.md +6 -5
- package/src/skills/write/SKILL.md +8 -4
- package/src/tui/dist/components/WelcomePanel.js +17 -43
- package/src/tui/dist/components/messages/BashExecOperationMessage.js +3 -2
- package/src/tui/package.json +1 -1
- package/src/ui/dist/assets/{AiManusChatView-7v-dHngU.js → AiManusChatView-CZpg376x.js} +127 -597
- package/src/ui/dist/assets/{AnalysisPlugin-B_Xmz-KE.js → AnalysisPlugin-CtHA22g3.js} +1 -1
- package/src/ui/dist/assets/{AutoFigurePlugin-Cko-0tm1.js → AutoFigurePlugin-BSWmLMmF.js} +63 -8
- package/src/ui/dist/assets/{CliPlugin-BsU0ht7q.js → CliPlugin-CJ7jdm_s.js} +43 -609
- package/src/ui/dist/assets/{CodeEditorPlugin-DcMMP0Rt.js → CodeEditorPlugin-DhInVGFf.js} +8 -8
- package/src/ui/dist/assets/{CodeViewerPlugin-BqoQ5QyY.js → CodeViewerPlugin-D1n8S9r5.js} +5 -5
- package/src/ui/dist/assets/{DocViewerPlugin-D7eHNhU6.js → DocViewerPlugin-C4XM_kqk.js} +3 -3
- package/src/ui/dist/assets/{GitDiffViewerPlugin-DLJN42T5.js → GitDiffViewerPlugin-W6kS9r6v.js} +1 -1
- package/src/ui/dist/assets/{ImageViewerPlugin-gJMV7MOu.js → ImageViewerPlugin-DPeUx_Oz.js} +5 -6
- package/src/ui/dist/assets/{LabCopilotPanel-B857sfxP.js → LabCopilotPanel-eAelUaub.js} +12 -15
- package/src/ui/dist/assets/LabPlugin-BbOrBxKY.js +2676 -0
- package/src/ui/dist/assets/{LatexPlugin-DWKEo-Wj.js → LatexPlugin-C-HhkVXY.js} +16 -16
- package/src/ui/dist/assets/{MarkdownViewerPlugin-DBzoEmhv.js → MarkdownViewerPlugin-BDIzIBfh.js} +4 -4
- package/src/ui/dist/assets/{MarketplacePlugin-DoHc-8vo.js → MarketplacePlugin-DAOJphwr.js} +3 -3
- package/src/ui/dist/assets/{NotebookEditor-CKjKH-yS.js → NotebookEditor-BsoMvDoU.js} +3 -3
- package/src/ui/dist/assets/{PdfLoader-zFoL0VPo.js → PdfLoader-fiC7RtHf.js} +1 -1
- package/src/ui/dist/assets/{PdfMarkdownPlugin-DXPaL9Nt.js → PdfMarkdownPlugin-C5OxZBFK.js} +3 -3
- package/src/ui/dist/assets/{PdfViewerPlugin-DhK8qCFp.js → PdfViewerPlugin-CAbxQebk.js} +10 -10
- package/src/ui/dist/assets/{SearchPlugin-CdSi6krf.js → SearchPlugin-SE33Lb9B.js} +1 -1
- package/src/ui/dist/assets/{Stepper-V-WiDQJl.js → Stepper-0Av7GfV7.js} +1 -1
- package/src/ui/dist/assets/{TextViewerPlugin-hIs1Efiu.js → TextViewerPlugin-Daf2gJDI.js} +4 -4
- package/src/ui/dist/assets/{VNCViewer-DG8b0q2X.js → VNCViewer-BKrMUIOX.js} +9 -10
- package/src/ui/dist/assets/{bibtex-HDac6fVW.js → bibtex-JBdOEe45.js} +1 -1
- package/src/ui/dist/assets/{code-BnBeNxBc.js → code-B0TDFCZz.js} +1 -1
- package/src/ui/dist/assets/{file-content-IRQ3jHb8.js → file-content-3YtrSacz.js} +1 -1
- package/src/ui/dist/assets/{file-diff-panel-DZoQ9I6r.js → file-diff-panel-CJEg5OG1.js} +1 -1
- package/src/ui/dist/assets/{file-socket-BMCdLc-P.js → file-socket-CYQYdmB1.js} +1 -1
- package/src/ui/dist/assets/{file-utils-CltILB3w.js → file-utils-Cd1C9Ppl.js} +1 -1
- package/src/ui/dist/assets/{image-Boe6ffhu.js → image-B33ctrvC.js} +1 -1
- package/src/ui/dist/assets/{index-2Zf65FZt.js → index-9CLPVeZh.js} +1 -1
- package/src/ui/dist/assets/{index-DZqJ-qAM.js → index-BNQWqmJ2.js} +60 -2154
- package/src/ui/dist/assets/{index-DO43pFZP.js → index-BVXsmS7V.js} +84086 -84365
- package/src/ui/dist/assets/{index-BlplpvE1.js → index-Buw_N1VQ.js} +2 -2
- package/src/ui/dist/assets/{index-Bq2bvfkl.css → index-SwmFAld3.css} +2622 -2619
- package/src/ui/dist/assets/{message-square-mUHn_Ssb.js → message-square-D0cUJ9yU.js} +1 -1
- package/src/ui/dist/assets/{monaco-fe0arNEU.js → monaco-UZLYkp2n.js} +1 -1
- package/src/ui/dist/assets/{popover-D_7i19qU.js → popover-CTeiY-dK.js} +1 -1
- package/src/ui/dist/assets/{project-sync-DyVGrU7H.js → project-sync-Dbs01Xky.js} +2 -8
- package/src/ui/dist/assets/{sigma-BzazRyxQ.js → sigma-CM08S-xT.js} +1 -1
- package/src/ui/dist/assets/{tooltip-DN_yjHFH.js → tooltip-pDtzvU9p.js} +1 -1
- package/src/ui/dist/assets/trash-YvPCP-da.js +32 -0
- package/src/ui/dist/assets/{useCliAccess-DV2L2Qxy.js → useCliAccess-Bavi74Ac.js} +12 -42
- package/src/ui/dist/assets/{useFileDiffOverlay-DyTj-p_V.js → useFileDiffOverlay-CVXY6oeg.js} +1 -1
- package/src/ui/dist/assets/{wrap-text-ozYHtUwq.js → wrap-text-Cf4flRW7.js} +1 -1
- package/src/ui/dist/assets/{zoom-out-BN9MUyCQ.js → zoom-out-Hb0Z1YpT.js} +1 -1
- package/src/ui/dist/index.html +2 -2
- package/uv.lock +1155 -0
- package/assets/fonts/Inter-Variable.ttf +0 -0
- package/assets/fonts/NotoSerifSC-Regular-C94HN_ZN.ttf +0 -0
- package/assets/fonts/NunitoSans-Variable.ttf +0 -0
- package/assets/fonts/Satoshi-Medium-ByP-Zb-9.woff2 +0 -0
- package/assets/fonts/SourceSans3-Variable.ttf +0 -0
- package/assets/fonts/ds-fonts.css +0 -83
- package/src/ui/dist/assets/Inter-Variable-VF2RPR_K.ttf +0 -0
- package/src/ui/dist/assets/LabPlugin-bL7rpic8.js +0 -43
- package/src/ui/dist/assets/NotoSerifSC-Regular-C94HN_ZN-C94HN_ZN.ttf +0 -0
- package/src/ui/dist/assets/NunitoSans-Variable-B_ZymHAd.ttf +0 -0
- package/src/ui/dist/assets/Satoshi-Medium-ByP-Zb-9-GkA34YXu.woff2 +0 -0
- package/src/ui/dist/assets/SourceSans3-Variable-CD-WOsSK.ttf +0 -0
- package/src/ui/dist/assets/info-CcsK_htA.js +0 -18
- package/src/ui/dist/assets/user-plus-BusDx-hF.js +0 -79
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Use when a draft, paper, or paper-like report is substantial enough for an independent skeptical audit before finalization, rebuttal, or revision routing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review
|
|
7
|
+
|
|
8
|
+
Use this skill when the quest already has a substantial draft, paper, or paper-like report and now needs an independent, skeptical, evidence-grounded audit.
|
|
9
|
+
|
|
10
|
+
This is not the same as ordinary `write`.
|
|
11
|
+
It is also not the same as `rebuttal`.
|
|
12
|
+
|
|
13
|
+
- `write` turns accepted evidence into a narrative.
|
|
14
|
+
- `review` audits that narrative like a harsh but constructive expert reviewer.
|
|
15
|
+
- `rebuttal` responds to concrete external reviewer pressure that already exists.
|
|
16
|
+
|
|
17
|
+
## Interaction discipline
|
|
18
|
+
|
|
19
|
+
- Treat `artifact.interact(...)` as the main long-lived communication thread across TUI, web, and bound connectors.
|
|
20
|
+
- If `artifact.interact(...)` returns queued user requirements, treat them as the highest-priority user instruction bundle before continuing the review pass.
|
|
21
|
+
- Immediately follow any non-empty mailbox poll with another `artifact.interact(...)` update that confirms receipt; if the request is directly answerable, answer there, otherwise say the current subtask is paused, give a short plan plus nearest report-back point, and handle that request first.
|
|
22
|
+
- Emit `artifact.interact(kind='progress', reply_mode='threaded', ...)` only when there is real user-visible progress: the first meaningful signal of the review pass, a meaningful checkpoint, or an occasional keepalive during truly long work. Do not update by tool-call cadence.
|
|
23
|
+
- Keep progress updates chat-like and easy to understand: say what changed, what it means, and what happens next.
|
|
24
|
+
- Default to plain-language summaries. Do not mention file paths, artifact ids, branch/worktree ids, session ids, raw commands, or raw logs unless the user asks or needs them to act.
|
|
25
|
+
- Use `reply_mode='blocking'` only for real user decisions that cannot be resolved from local evidence.
|
|
26
|
+
- For any blocking decision request, provide 1 to 3 concrete options, put the recommended option first, explain each option's actual content plus pros and cons, and wait up to 1 day when feasible. If the blocker is a missing external credential or secret that only the user can provide, keep the quest waiting, ask the user to supply it or choose an alternative, and do not self-resolve; if resumed without that credential and no other work is possible, a long low-frequency wait such as `bash_exec(command='sleep 3600', mode='await', timeout_seconds=3700)` is acceptable. Otherwise choose the best option yourself and notify the user of the chosen option if the timeout expires.
|
|
27
|
+
- When the review report, revision plan, or follow-up experiment TODO list becomes durable, send a richer `artifact.interact(kind='milestone', reply_mode='threaded', ...)` update that says what the main risks are, what should be fixed next, and whether the next route is writing, experiment, or claim downgrade.
|
|
28
|
+
|
|
29
|
+
## Purpose
|
|
30
|
+
|
|
31
|
+
`review` is an auxiliary audit skill for paper-like deliverables.
|
|
32
|
+
|
|
33
|
+
It should convert “the draft feels almost done” into a durable, skeptical, technically grounded review workflow:
|
|
34
|
+
|
|
35
|
+
1. identify the core claims and likely rejection reasons
|
|
36
|
+
2. audit novelty, value, rigor, clarity, and evidence sufficiency
|
|
37
|
+
3. write a reliable review note, not vague prose
|
|
38
|
+
4. produce a concrete revision plan
|
|
39
|
+
5. produce a follow-up experiment TODO list only when the paper truly needs more evidence
|
|
40
|
+
6. route the next step cleanly to `write`, `analysis-campaign`, `baseline`, `scout`, or `decision`
|
|
41
|
+
|
|
42
|
+
Default review stance: independent audit before celebration.
|
|
43
|
+
Do not treat “looks polished” as “is defensible”.
|
|
44
|
+
|
|
45
|
+
## Use when
|
|
46
|
+
|
|
47
|
+
- a substantial `paper/draft.md`, report draft, or paper-like manuscript already exists
|
|
48
|
+
- the quest has enough evidence to support a real audit rather than just speculative comments
|
|
49
|
+
- the user asks for:
|
|
50
|
+
- a harsh review
|
|
51
|
+
- a reliable paper audit
|
|
52
|
+
- revision advice before submission
|
|
53
|
+
- a decision about whether more experiments are still needed
|
|
54
|
+
- the writing line feels close to done and you need a skeptical gate before stopping
|
|
55
|
+
|
|
56
|
+
## Do not use when
|
|
57
|
+
|
|
58
|
+
- the quest still lacks a meaningful draft or report
|
|
59
|
+
- the task is ordinary drafting from evidence
|
|
60
|
+
- concrete external reviewer comments already exist and the real task is response / revision
|
|
61
|
+
- in that case use `rebuttal`
|
|
62
|
+
|
|
63
|
+
## Non-negotiable rules
|
|
64
|
+
|
|
65
|
+
- Review independently. Do not simply mirror previous self-review notes.
|
|
66
|
+
- Do not fabricate praise, flaws, citations, novelty overlaps, or fatal defects.
|
|
67
|
+
- Keep every serious criticism evidence-grounded.
|
|
68
|
+
- Do not recommend more experiments when the real problem is wording, positioning, or claim scope.
|
|
69
|
+
- Do not recommend rhetoric when the real problem is missing evidence.
|
|
70
|
+
- If novelty or positioning is uncertain, treat that as a literature-audit question first, not an automatic experiment request.
|
|
71
|
+
- If a claim is too broad for the evidence, prefer narrowing or downgrading the claim over defending it with style.
|
|
72
|
+
|
|
73
|
+
## Primary inputs
|
|
74
|
+
|
|
75
|
+
Use, in roughly this order:
|
|
76
|
+
|
|
77
|
+
- the current paper or report draft
|
|
78
|
+
- the selected outline if one exists
|
|
79
|
+
- the claim-evidence map if one exists
|
|
80
|
+
- the six-field `evaluation_summary` blocks from recent main experiments and analysis slices
|
|
81
|
+
- recent main and analysis experiment results
|
|
82
|
+
- figures, tables, and captions
|
|
83
|
+
- prior self-review or reviewer-first notes as low-trust auxiliary input
|
|
84
|
+
- nearby papers when novelty or comparison is unclear
|
|
85
|
+
|
|
86
|
+
If the draft/result state is still unclear, open `intake-audit` first before continuing the review workflow.
|
|
87
|
+
Before proposing extra experiments, read those structured `evaluation_summary` blocks first so you do not request work that the recorded evidence already resolved.
|
|
88
|
+
|
|
89
|
+
## Core outputs
|
|
90
|
+
|
|
91
|
+
The review pass should usually leave behind:
|
|
92
|
+
|
|
93
|
+
- `paper/review/review.md`
|
|
94
|
+
- `paper/review/revision_log.md`
|
|
95
|
+
- `paper/review/experiment_todo.md`
|
|
96
|
+
|
|
97
|
+
Use the templates in `references/` when needed:
|
|
98
|
+
|
|
99
|
+
- `review-report-template.md`
|
|
100
|
+
- `revision-log-template.md`
|
|
101
|
+
- `experiment-todo-template.md`
|
|
102
|
+
|
|
103
|
+
## Review dimensions
|
|
104
|
+
|
|
105
|
+
Audit at least these dimensions:
|
|
106
|
+
|
|
107
|
+
- research question and value
|
|
108
|
+
- novelty and positioning
|
|
109
|
+
- method-to-problem fit
|
|
110
|
+
- evidence sufficiency
|
|
111
|
+
- experimental validity and baseline comparability
|
|
112
|
+
- claim scope and over-claiming risk
|
|
113
|
+
- writing defensibility and logical flow
|
|
114
|
+
- figure / table usefulness
|
|
115
|
+
- submission readiness
|
|
116
|
+
|
|
117
|
+
## Workflow
|
|
118
|
+
|
|
119
|
+
### 1. Plan the audit
|
|
120
|
+
|
|
121
|
+
Before writing the review itself, make the audit explicit.
|
|
122
|
+
|
|
123
|
+
Identify:
|
|
124
|
+
|
|
125
|
+
- 1 to 3 core claims such as `C1`, `C2`, `C3`
|
|
126
|
+
- the strongest current evidence
|
|
127
|
+
- the weakest current evidence
|
|
128
|
+
- the top 3 likely rejection reasons
|
|
129
|
+
- whether the likely next route is:
|
|
130
|
+
- text revision
|
|
131
|
+
- literature / novelty audit
|
|
132
|
+
- baseline recovery
|
|
133
|
+
- supplementary experiment
|
|
134
|
+
- claim downgrade
|
|
135
|
+
|
|
136
|
+
### 2. Check novelty and positioning only when needed
|
|
137
|
+
|
|
138
|
+
If novelty, related-work coverage, or field positioning is unclear:
|
|
139
|
+
|
|
140
|
+
1. open `scout`
|
|
141
|
+
2. run a focused literature / comparison audit
|
|
142
|
+
3. record what is genuinely overlapping, what remains novel, and what is merely better positioned writing
|
|
143
|
+
|
|
144
|
+
Do not request new experiments just to answer a literature-positioning question.
|
|
145
|
+
|
|
146
|
+
### 3. Write a reliable review report
|
|
147
|
+
|
|
148
|
+
Write `paper/review/review.md` using `references/review-report-template.md`.
|
|
149
|
+
|
|
150
|
+
The review should be:
|
|
151
|
+
|
|
152
|
+
- independent
|
|
153
|
+
- skeptical but constructive
|
|
154
|
+
- technically specific
|
|
155
|
+
- reader-aware
|
|
156
|
+
- evidence-grounded
|
|
157
|
+
|
|
158
|
+
At minimum, the review report should cover:
|
|
159
|
+
|
|
160
|
+
- summary
|
|
161
|
+
- strengths
|
|
162
|
+
- weaknesses
|
|
163
|
+
- key issues
|
|
164
|
+
- actionable suggestions
|
|
165
|
+
- storyline / outline advice
|
|
166
|
+
- priority revision plan
|
|
167
|
+
- experiment inventory and research experiment plan
|
|
168
|
+
- novelty verification and related-work matrix
|
|
169
|
+
- references
|
|
170
|
+
|
|
171
|
+
If helpful, include an internal conservative overall judgment or score, but do not pretend numerical precision when evidence is still unstable.
|
|
172
|
+
|
|
173
|
+
### 4. Produce the revision log
|
|
174
|
+
|
|
175
|
+
Write `paper/review/revision_log.md` using `references/revision-log-template.md`.
|
|
176
|
+
|
|
177
|
+
For each serious issue, record:
|
|
178
|
+
|
|
179
|
+
- issue id
|
|
180
|
+
- why it matters
|
|
181
|
+
- what should change
|
|
182
|
+
- whether the fix is writing-only, evidence-only, or experiment-dependent
|
|
183
|
+
- whether the issue blocks `finalize`
|
|
184
|
+
|
|
185
|
+
### 5. Produce the follow-up experiment TODO list
|
|
186
|
+
|
|
187
|
+
Only if more evidence is truly needed, write `paper/review/experiment_todo.md` using `references/experiment-todo-template.md`.
|
|
188
|
+
|
|
189
|
+
Each TODO item should include:
|
|
190
|
+
|
|
191
|
+
- the review issue it answers
|
|
192
|
+
- why existing evidence is still insufficient
|
|
193
|
+
- the minimum experiment or analysis needed
|
|
194
|
+
- required metric(s)
|
|
195
|
+
- minimal success criterion
|
|
196
|
+
- whether this is:
|
|
197
|
+
- analysis of existing results
|
|
198
|
+
- new comparator baseline
|
|
199
|
+
- supplementary experiment
|
|
200
|
+
- figure / table regeneration only
|
|
201
|
+
|
|
202
|
+
Do not write a vague “run more ablations” list.
|
|
203
|
+
Each TODO item should be concrete enough to turn into `analysis-campaign` slices or a `baseline` recovery task.
|
|
204
|
+
When extra evidence is truly needed, use the shared supplementary-experiment protocol:
|
|
205
|
+
|
|
206
|
+
- recover ids / refs first if needed
|
|
207
|
+
- create one `artifact.create_analysis_campaign(...)`
|
|
208
|
+
- represent even one extra run as a one-slice campaign
|
|
209
|
+
- record each completed slice with `artifact.record_analysis_slice(...)`
|
|
210
|
+
|
|
211
|
+
Do not invent a separate review-only experiment workflow.
|
|
212
|
+
|
|
213
|
+
### 6. Route the next step
|
|
214
|
+
|
|
215
|
+
After the review artifacts are durable:
|
|
216
|
+
|
|
217
|
+
- if the issues are mostly narrative or claim-scope fixes, route to `write`
|
|
218
|
+
- if novelty / positioning is still unclear, route to `scout`
|
|
219
|
+
- if a requested comparator baseline is missing, route to `baseline`
|
|
220
|
+
- if new evidence is truly required, route to `analysis-campaign`
|
|
221
|
+
- if the route is costly or non-obvious, record a `decision`
|
|
222
|
+
|
|
223
|
+
Do not stop immediately after writing the review if the next route is already clear.
|
|
224
|
+
|
|
225
|
+
## Companion skill routing
|
|
226
|
+
|
|
227
|
+
Open additional skills only when the review workflow requires them:
|
|
228
|
+
|
|
229
|
+
- `intake-audit`
|
|
230
|
+
- when the current draft/result/bundle state is still unclear
|
|
231
|
+
- `scout`
|
|
232
|
+
- when novelty, positioning, or related-work coverage is genuinely uncertain
|
|
233
|
+
- `baseline`
|
|
234
|
+
- when a missing comparator baseline blocks fair review
|
|
235
|
+
- `analysis-campaign`
|
|
236
|
+
- when the review identifies concrete evidence gaps that need supplementary runs
|
|
237
|
+
- `write`
|
|
238
|
+
- when the review identifies text, outline, claim-scope, or figure revisions
|
|
239
|
+
- `figure-polish`
|
|
240
|
+
- when the review identifies figure/table quality as a real weakness
|
|
241
|
+
- `decision`
|
|
242
|
+
- when route choice, cost, or claim downgrade is non-trivial
|
|
243
|
+
|
|
244
|
+
## Artifact routing guidance
|
|
245
|
+
|
|
246
|
+
Use these tools deliberately:
|
|
247
|
+
|
|
248
|
+
- `artifact.record(kind='decision', ...)`
|
|
249
|
+
- review conclusion, claim downgrade recommendation, route choice, stop/go recommendation
|
|
250
|
+
- `artifact.create_analysis_campaign(...)`
|
|
251
|
+
- when the experiment TODO list should become concrete follow-up slices
|
|
252
|
+
- `artifact.record_analysis_slice(...)`
|
|
253
|
+
- one completed review-driven slice
|
|
254
|
+
- `artifact.submit_paper_outline(mode='revise', ...)`
|
|
255
|
+
- when the review materially changes the narrative blueprint
|
|
256
|
+
- `artifact.submit_paper_bundle(...)`
|
|
257
|
+
- only when the revised manuscript package is genuinely ready
|
|
258
|
+
- `artifact.interact(...)`
|
|
259
|
+
- user-visible progress and review milestones
|
|
260
|
+
|
|
261
|
+
## Memory discipline
|
|
262
|
+
|
|
263
|
+
Stage-start requirement:
|
|
264
|
+
|
|
265
|
+
- run `memory.list_recent(scope='quest', limit=5)`
|
|
266
|
+
- run at least one `memory.search(...)` for:
|
|
267
|
+
- paper title
|
|
268
|
+
- main method name
|
|
269
|
+
- review or self-review
|
|
270
|
+
- key claim or strongest figure
|
|
271
|
+
|
|
272
|
+
Stage-end requirement:
|
|
273
|
+
|
|
274
|
+
- if the review produced a durable lesson, claim downgrade, revision rule, or experiment-gap judgment, write at least one `memory.write(...)`
|
|
275
|
+
|
|
276
|
+
Useful tags include:
|
|
277
|
+
|
|
278
|
+
- `stage:review`
|
|
279
|
+
- `type:paper-review`
|
|
280
|
+
- `type:revision-plan`
|
|
281
|
+
- `type:experiment-gap`
|
|
282
|
+
- `type:claim-downgrade`
|
|
283
|
+
|
|
284
|
+
## Success condition
|
|
285
|
+
|
|
286
|
+
`review` is successful when:
|
|
287
|
+
|
|
288
|
+
- a reliable skeptical review note exists
|
|
289
|
+
- the highest-risk issues are explicit
|
|
290
|
+
- the next revision route is unambiguous
|
|
291
|
+
- any needed experiments are captured as a concrete TODO list
|
|
292
|
+
- the quest can continue into `write`, `analysis-campaign`, `baseline`, `scout`, or `finalize` without ambiguity
|
|
293
|
+
|
|
294
|
+
The goal is not to sound severe.
|
|
295
|
+
The goal is to make the next revision step technically clear and evidence-bound.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Review Experiment TODO Template
|
|
2
|
+
|
|
3
|
+
## Follow-up experiment / analysis TODOs
|
|
4
|
+
|
|
5
|
+
### TODO EXP-001
|
|
6
|
+
|
|
7
|
+
- source review issue:
|
|
8
|
+
- why current evidence is insufficient:
|
|
9
|
+
- route type:
|
|
10
|
+
- existing-result analysis
|
|
11
|
+
- comparator baseline
|
|
12
|
+
- supplementary experiment
|
|
13
|
+
- figure / table regeneration
|
|
14
|
+
- minimum task:
|
|
15
|
+
- required metric(s):
|
|
16
|
+
- minimal success criterion:
|
|
17
|
+
- expected manuscript impact:
|
|
18
|
+
- owner / next step:
|
|
19
|
+
|
|
20
|
+
### TODO EXP-002
|
|
21
|
+
|
|
22
|
+
- source review issue:
|
|
23
|
+
- why current evidence is insufficient:
|
|
24
|
+
- route type:
|
|
25
|
+
- minimum task:
|
|
26
|
+
- required metric(s):
|
|
27
|
+
- minimal success criterion:
|
|
28
|
+
- expected manuscript impact:
|
|
29
|
+
- owner / next step:
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Review Report Template
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
- paper / draft:
|
|
6
|
+
- overall judgment:
|
|
7
|
+
- top 3 highest-risk issues:
|
|
8
|
+
|
|
9
|
+
## Strengths
|
|
10
|
+
|
|
11
|
+
-
|
|
12
|
+
|
|
13
|
+
## Weaknesses
|
|
14
|
+
|
|
15
|
+
-
|
|
16
|
+
|
|
17
|
+
## Key Issues
|
|
18
|
+
|
|
19
|
+
### Issue 1
|
|
20
|
+
|
|
21
|
+
- why it matters:
|
|
22
|
+
- evidence anchor:
|
|
23
|
+
- risk level:
|
|
24
|
+
- likely route:
|
|
25
|
+
|
|
26
|
+
### Issue 2
|
|
27
|
+
|
|
28
|
+
- why it matters:
|
|
29
|
+
- evidence anchor:
|
|
30
|
+
- risk level:
|
|
31
|
+
- likely route:
|
|
32
|
+
|
|
33
|
+
## Actionable Suggestions
|
|
34
|
+
|
|
35
|
+
- problem:
|
|
36
|
+
- cause:
|
|
37
|
+
- actionable fix:
|
|
38
|
+
- acceptance criterion:
|
|
39
|
+
|
|
40
|
+
## Storyline Options + Writing Outlines
|
|
41
|
+
|
|
42
|
+
- current narrative weakness:
|
|
43
|
+
- stronger storyline option:
|
|
44
|
+
- outline change needed:
|
|
45
|
+
|
|
46
|
+
## Priority Revision Plan
|
|
47
|
+
|
|
48
|
+
1.
|
|
49
|
+
2.
|
|
50
|
+
3.
|
|
51
|
+
|
|
52
|
+
## Experiment Inventory & Research Experiment Plan
|
|
53
|
+
|
|
54
|
+
- what existing experiments already cover:
|
|
55
|
+
- what still lacks evidence:
|
|
56
|
+
- which gaps are text-only rather than experiment-only:
|
|
57
|
+
|
|
58
|
+
## Novelty Verification & Related-Work Matrix
|
|
59
|
+
|
|
60
|
+
### Taxonomy
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Root
|
|
64
|
+
├── Branch A
|
|
65
|
+
│ └── Leaf A1
|
|
66
|
+
└── Branch B
|
|
67
|
+
└── Leaf B1
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Comparison Matrix
|
|
71
|
+
|
|
72
|
+
| Topic | This paper | Closest prior work | Overlap | Residual novelty / value |
|
|
73
|
+
| --- | --- | --- | --- | --- |
|
|
74
|
+
| | | | | |
|
|
75
|
+
|
|
76
|
+
## References
|
|
77
|
+
|
|
78
|
+
-
|
|
79
|
+
|
|
80
|
+
## Optional Internal Score
|
|
81
|
+
|
|
82
|
+
- overall score:
|
|
83
|
+
- post-revision target:
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Revision Log Template
|
|
2
|
+
|
|
3
|
+
## Revision Summary
|
|
4
|
+
|
|
5
|
+
- current draft state:
|
|
6
|
+
- highest-priority fixes:
|
|
7
|
+
- blockers:
|
|
8
|
+
|
|
9
|
+
## Issue-by-issue log
|
|
10
|
+
|
|
11
|
+
### Issue REV-001
|
|
12
|
+
|
|
13
|
+
- source issue:
|
|
14
|
+
- severity:
|
|
15
|
+
- why it matters:
|
|
16
|
+
- fix type:
|
|
17
|
+
- text revision
|
|
18
|
+
- literature positioning
|
|
19
|
+
- baseline recovery
|
|
20
|
+
- supplementary experiment
|
|
21
|
+
- claim downgrade
|
|
22
|
+
- concrete change:
|
|
23
|
+
- status:
|
|
24
|
+
- blocks finalize:
|
|
25
|
+
|
|
26
|
+
### Issue REV-002
|
|
27
|
+
|
|
28
|
+
- source issue:
|
|
29
|
+
- severity:
|
|
30
|
+
- why it matters:
|
|
31
|
+
- fix type:
|
|
32
|
+
- concrete change:
|
|
33
|
+
- status:
|
|
34
|
+
- blocks finalize:
|
|
35
|
+
|
|
36
|
+
## Deferred / downgraded items
|
|
37
|
+
|
|
38
|
+
- item:
|
|
39
|
+
- reason:
|
|
40
|
+
- how the manuscript should reflect the limitation:
|
|
@@ -12,13 +12,14 @@ Use this skill when the quest does not yet have a stable research frame.
|
|
|
12
12
|
- Treat `artifact.interact(...)` as the main long-lived communication thread across TUI, web, and bound connectors.
|
|
13
13
|
- If `artifact.interact(...)` returns queued user requirements, treat them as the highest-priority user instruction bundle before continuing scouting.
|
|
14
14
|
- Immediately follow any non-empty mailbox poll with another `artifact.interact(...)` update that confirms receipt; if the request is directly answerable, answer there, otherwise say the current subtask is paused, give a short plan plus nearest report-back point, and handle that request first.
|
|
15
|
-
- Emit `artifact.interact(kind='progress', reply_mode='threaded', ...)` only
|
|
16
|
-
-
|
|
17
|
-
-
|
|
15
|
+
- Emit `artifact.interact(kind='progress', reply_mode='threaded', ...)` only when there is real user-visible progress: the first meaningful signal of long work, a meaningful checkpoint, or an occasional keepalive during truly long work. Do not update by tool-call cadence.
|
|
16
|
+
- Keep progress updates chat-like and easy to understand: say what changed, what it means, and what happens next.
|
|
17
|
+
- Default to plain-language summaries. Do not mention file paths, artifact ids, branch/worktree ids, session ids, raw commands, or raw logs unless the user asks or needs them to act.
|
|
18
|
+
- Message templates are references only. Adapt to the actual context and vary wording so updates feel natural and non-robotic.
|
|
18
19
|
- Use `reply_mode='blocking'` only for real user decisions that cannot be resolved from local evidence.
|
|
19
|
-
- For any blocking decision request, provide 1 to 3 concrete options, put the recommended option first, explain each option's actual content plus pros and cons, wait up to 1 day when feasible,
|
|
20
|
+
- For any blocking decision request, provide 1 to 3 concrete options, put the recommended option first, explain each option's actual content plus pros and cons, and wait up to 1 day when feasible. If the blocker is a missing external credential or secret that only the user can provide, keep the quest waiting, ask the user to supply it or choose an alternative, and do not self-resolve; if resumed without that credential and no other work is possible, a long low-frequency wait such as `bash_exec(command='sleep 3600', mode='await', timeout_seconds=3700)` is acceptable. Otherwise choose the best option yourself and notify the user of the chosen option if the timeout expires.
|
|
20
21
|
- If a threaded user reply arrives, interpret it relative to the latest scout progress update before assuming the task changed completely.
|
|
21
|
-
- When scouting actually resolves the framing ambiguity, locks the evaluation contract, or makes the next anchor obvious, send one richer `artifact.interact(kind='milestone', reply_mode='threaded', ...)` update that
|
|
22
|
+
- When scouting actually resolves the framing ambiguity, locks the evaluation contract, or makes the next anchor obvious, send one richer `artifact.interact(kind='milestone', reply_mode='threaded', ...)` update that says what is now clear, why it matters, and which stage should come next.
|
|
22
23
|
|
|
23
24
|
## Stage purpose
|
|
24
25
|
|
|
@@ -22,11 +22,12 @@ This skill intentionally absorbs the strongest old DeepScientist writing discipl
|
|
|
22
22
|
- Treat `artifact.interact(...)` as the main long-lived communication thread across TUI, web, and bound connectors.
|
|
23
23
|
- If `artifact.interact(...)` returns queued user requirements, treat them as the highest-priority user instruction bundle before continuing drafting or revision.
|
|
24
24
|
- Immediately follow any non-empty mailbox poll with another `artifact.interact(...)` update that confirms receipt; if the request is directly answerable, answer there, otherwise say the current subtask is paused, give a short plan plus nearest report-back point, and handle that request first.
|
|
25
|
-
- Emit `artifact.interact(kind='progress', reply_mode='threaded', ...)` only
|
|
25
|
+
- Emit `artifact.interact(kind='progress', reply_mode='threaded', ...)` only when there is real user-visible progress: the first meaningful signal of long work, a meaningful checkpoint, or an occasional keepalive during truly long work. Do not update by tool-call cadence.
|
|
26
26
|
- Prefer `bash_exec` for durable document-build commands such as LaTeX compilation, figure regeneration, and scripted export steps so logs remain quest-local and reviewable.
|
|
27
|
-
-
|
|
27
|
+
- Keep progress updates chat-like and easy to understand: say what changed, what it means, and what happens next.
|
|
28
|
+
- Default to plain-language summaries. Do not mention file paths, artifact ids, branch/worktree ids, session ids, raw commands, or raw logs unless the user asks or needs them to act.
|
|
28
29
|
- Keep ordinary subtask completions concise. When a paper/draft milestone is actually completed, upgrade to a richer `artifact.interact(kind='milestone', reply_mode='threaded', ...)` report instead of another short progress update.
|
|
29
|
-
- That richer writing-stage milestone report should normally cover: which draft
|
|
30
|
+
- That richer writing-stage milestone report should normally cover: which draft, section, or outline milestone finished, what is now supportable, what is still missing, and the exact recommended next revision or route decision.
|
|
30
31
|
- That richer milestone report is still normally non-blocking. If the next writing or return-to-experiment step is already clear, continue automatically after reporting instead of pausing by default.
|
|
31
32
|
- If the active communication surface is QQ, keep writing milestones text-first unless a final paper PDF or one clearly useful summary artifact already exists.
|
|
32
33
|
- Treat connector-facing report charts separately from paper-facing figures; do not auto-send draft paper figures to QQ.
|
|
@@ -55,7 +56,7 @@ This skill intentionally absorbs the strongest old DeepScientist writing discipl
|
|
|
55
56
|
- If the runtime starts an auto-continue turn with no new user message, keep drafting or verifying from the durable state and active requirements instead of replaying the previous user turn.
|
|
56
57
|
- Message templates are references only. Adapt to the actual context and vary wording so updates feel respectful, human, and non-robotic.
|
|
57
58
|
- Use `reply_mode='blocking'` only for real user decisions that cannot be resolved from local evidence.
|
|
58
|
-
- For any blocking decision request, provide 1 to 3 concrete options, put the recommended option first, explain each option's actual content plus pros and cons, wait up to 1 day when feasible,
|
|
59
|
+
- For any blocking decision request, provide 1 to 3 concrete options, put the recommended option first, explain each option's actual content plus pros and cons, and wait up to 1 day when feasible. If the blocker is a missing external credential or secret that only the user can provide, keep the quest waiting, ask the user to supply it or choose an alternative, and do not self-resolve; if resumed without that credential and no other work is possible, a long low-frequency wait such as `bash_exec(command='sleep 3600', mode='await', timeout_seconds=3700)` is acceptable. Otherwise choose the best option yourself and notify the user of the chosen option if the timeout expires.
|
|
59
60
|
- If a threaded user reply arrives, interpret it relative to the latest writing progress update before assuming the task changed completely.
|
|
60
61
|
- Use milestone updates deliberately when outline selection, claim downgrades, proofing completion, bundle readiness, or route-back-to-experiment decisions become durably true.
|
|
61
62
|
|
|
@@ -604,6 +605,9 @@ Run that review with an adversarial mindset:
|
|
|
604
605
|
- prefer deleting or downgrading an attractive but weak claim over defending it with rhetoric
|
|
605
606
|
- if a neutral outsider could not trace a claim back to concrete evidence, treat that as a writing failure, not as a presentation problem
|
|
606
607
|
|
|
608
|
+
When the draft is substantial enough to judge rather than merely sketch, open `review/SKILL.md` for an independent skeptical audit before you call the paper task done.
|
|
609
|
+
Use that review pass to decide whether the next route is further writing, a claim downgrade, a literature audit, a baseline recovery step, or a reviewer-linked follow-up experiment campaign.
|
|
610
|
+
|
|
607
611
|
### Phase 7.5. Revision loop
|
|
608
612
|
|
|
609
613
|
Do not stop after a single self-review pass.
|
|
@@ -4,42 +4,13 @@ import Gradient from 'ink-gradient';
|
|
|
4
4
|
import stringWidth from 'string-width';
|
|
5
5
|
import { Logo } from './Logo.js';
|
|
6
6
|
import { theme } from '../semantic-colors.js';
|
|
7
|
-
import { robotAsciiData } from './AsciiArt.js';
|
|
8
7
|
import { useTerminalSize } from '../hooks/useTerminalSize.js';
|
|
9
8
|
// Colors matching AsciiArt
|
|
10
9
|
const COLORS = {
|
|
11
10
|
blue: '#4796E4',
|
|
12
11
|
red: '#F38BA8',
|
|
13
12
|
gradient: ['#9B59B6', '#8E44AD', '#C471ED', '#F64F9C'],
|
|
14
|
-
|
|
15
|
-
const SegmentedLine = ({ line, segments }) => {
|
|
16
|
-
const parts = [];
|
|
17
|
-
const sortedSegments = [...segments].sort((a, b) => a.start - b.start);
|
|
18
|
-
let lastEnd = 0;
|
|
19
|
-
sortedSegments.forEach((segment, idx) => {
|
|
20
|
-
if (segment.start > lastEnd) {
|
|
21
|
-
parts.push(React.createElement(Text, { key: `gap-${idx}` }, line.slice(lastEnd, segment.start)));
|
|
22
|
-
}
|
|
23
|
-
const text = line.slice(segment.start, segment.end);
|
|
24
|
-
if (segment.type === 'gradient') {
|
|
25
|
-
parts.push(React.createElement(Gradient, { key: `seg-${idx}`, colors: COLORS.gradient },
|
|
26
|
-
React.createElement(Text, null, text)));
|
|
27
|
-
}
|
|
28
|
-
else if (segment.type === 'blue') {
|
|
29
|
-
parts.push(React.createElement(Text, { key: `seg-${idx}`, color: COLORS.blue }, text));
|
|
30
|
-
}
|
|
31
|
-
else if (segment.type === 'red') {
|
|
32
|
-
parts.push(React.createElement(Text, { key: `seg-${idx}`, color: COLORS.red }, text));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
parts.push(React.createElement(Text, { key: `seg-${idx}` }, text));
|
|
36
|
-
}
|
|
37
|
-
lastEnd = segment.end;
|
|
38
|
-
});
|
|
39
|
-
if (lastEnd < line.length) {
|
|
40
|
-
parts.push(React.createElement(Text, { key: "tail" }, line.slice(lastEnd)));
|
|
41
|
-
}
|
|
42
|
-
return React.createElement(Text, null, parts);
|
|
13
|
+
gold: '#B69B4A',
|
|
43
14
|
};
|
|
44
15
|
const clipText = (value, maxWidth) => {
|
|
45
16
|
const safeWidth = Math.max(4, maxWidth);
|
|
@@ -75,10 +46,6 @@ export const WelcomePanel = ({ quests, browseQuestId, connectors, baseUrl, conne
|
|
|
75
46
|
const compactConnectorSummary = connectors.length > 0
|
|
76
47
|
? `${connectors.length} connectors configured`
|
|
77
48
|
: 'No connectors configured';
|
|
78
|
-
const robotLines = robotAsciiData.lines;
|
|
79
|
-
const robotSegments = robotAsciiData.segments;
|
|
80
|
-
const showRobot = columns >= 100;
|
|
81
|
-
const showHeaderSideBySide = columns >= 140;
|
|
82
49
|
const showApiLine = columns >= 120;
|
|
83
50
|
const resolvedBaseUrl = (() => {
|
|
84
51
|
try {
|
|
@@ -105,7 +72,6 @@ export const WelcomePanel = ({ quests, browseQuestId, connectors, baseUrl, conne
|
|
|
105
72
|
{ label: '', value: 'Research operating system', style: 'title' },
|
|
106
73
|
{ label: 'Mode', value: selectedQuest ? 'quest mode' : 'request mode', style: 'normal' },
|
|
107
74
|
{ label: 'Server', value: connectionText, style: 'connection' },
|
|
108
|
-
{ label: 'Frontend', value: frontendUrl, style: 'normal' },
|
|
109
75
|
...(showApiLine ? [{ label: 'API', value: apiUrl, style: 'normal' }] : []),
|
|
110
76
|
{
|
|
111
77
|
label: 'Quests',
|
|
@@ -126,17 +92,25 @@ export const WelcomePanel = ({ quests, browseQuestId, connectors, baseUrl, conne
|
|
|
126
92
|
? clipText(`${selectedQuest.status} · ${selectedQuest.active_anchor} · ${selectedQuest.branch || 'main'}`, columns - 2)
|
|
127
93
|
: null;
|
|
128
94
|
const emptyQuestLine = clipText('No quest selected yet. Use /new <goal> to create one or /use <quest_id> to bind one.', columns - 2);
|
|
95
|
+
const urlBannerText = clipText(frontendUrl, Math.max(24, columns - 6));
|
|
96
|
+
const urlHint = columns >= 108
|
|
97
|
+
? 'Press Ctrl+O to open the web workspace if auto-open is unavailable.'
|
|
98
|
+
: 'Ctrl+O opens the web workspace.';
|
|
129
99
|
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
130
|
-
React.createElement(Box, { flexDirection:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
": ")),
|
|
137
|
-
React.createElement(Text, { color: info.style === 'connection' ? connectionColor : theme.text.primary }, info.value)))))))),
|
|
100
|
+
React.createElement(Box, { flexDirection: "column" }, infoLines.map((info, idx) => (React.createElement(Box, { key: idx }, info.style === 'title' ? (React.createElement(Gradient, { colors: COLORS.gradient },
|
|
101
|
+
React.createElement(Text, { bold: true }, info.value))) : (React.createElement(React.Fragment, null,
|
|
102
|
+
info.label && (React.createElement(Text, { color: theme.text.secondary },
|
|
103
|
+
info.label,
|
|
104
|
+
": ")),
|
|
105
|
+
React.createElement(Text, { color: info.style === 'connection' ? connectionColor : theme.text.primary }, info.value))))))),
|
|
138
106
|
React.createElement(Box, { marginTop: 1 },
|
|
139
107
|
React.createElement(Logo, null)),
|
|
108
|
+
React.createElement(Box, { marginTop: 1, width: columns, justifyContent: "center" },
|
|
109
|
+
React.createElement(Text, { color: COLORS.gold }, "Web Workspace")),
|
|
110
|
+
React.createElement(Box, { width: columns, justifyContent: "center" },
|
|
111
|
+
React.createElement(Text, { bold: true, color: COLORS.blue }, urlBannerText)),
|
|
112
|
+
React.createElement(Box, { width: columns, justifyContent: "center" },
|
|
113
|
+
React.createElement(Text, { color: theme.text.secondary }, clipText(urlHint, Math.max(20, columns - 4)))),
|
|
140
114
|
React.createElement(Box, { marginTop: 1 },
|
|
141
115
|
React.createElement(Text, { color: theme.text.secondary }, commandLine)),
|
|
142
116
|
React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
@@ -9,6 +9,7 @@ const MAX_VISIBLE_LOG_LINES = 18;
|
|
|
9
9
|
const BASH_CARRIAGE_RETURN_PREFIX = '__DS_BASH_CR__';
|
|
10
10
|
const BASH_PROGRESS_PREFIX = '__DS_PROGRESS__';
|
|
11
11
|
const BASH_STATUS_MARKER_PREFIX = '__DS_BASH_STATUS__';
|
|
12
|
+
const EMPTY_RESULT_PAYLOAD = Object.freeze({});
|
|
12
13
|
const stripAnsi = (value) => value.replace(/\u001b\[[0-9;?]*[ -/]*[@-~]/g, '').replace(/\u001b[@-_]/g, '');
|
|
13
14
|
const parseJsonRecord = (value) => {
|
|
14
15
|
const text = String(value || '').trim();
|
|
@@ -216,7 +217,7 @@ function buildListLines(payload) {
|
|
|
216
217
|
export const BashExecOperationMessage = ({ label, content, toolName, toolCallId, status, args, output, mcpServer, mcpTool, metadata, width = 80, baseUrl, questId, live = false, }) => {
|
|
217
218
|
const argsPayload = useMemo(() => parseJsonRecord(args), [args]);
|
|
218
219
|
const outputPayload = useMemo(() => parseJsonRecord(output), [output]);
|
|
219
|
-
const resultPayload = outputPayload ??
|
|
220
|
+
const resultPayload = outputPayload ?? EMPTY_RESULT_PAYLOAD;
|
|
220
221
|
const mode = String(argsPayload?.mode || metadata?.mode || 'detach').trim().toLowerCase() || 'detach';
|
|
221
222
|
const command = String(argsPayload?.command || metadata?.command || resultPayload.command || '').trim();
|
|
222
223
|
const workdir = normalizeWorkdir(typeof argsPayload?.workdir === 'string'
|
|
@@ -244,7 +245,7 @@ export const BashExecOperationMessage = ({ label, content, toolName, toolCallId,
|
|
|
244
245
|
const initialProgress = resultPayload.last_progress && typeof resultPayload.last_progress === 'object'
|
|
245
246
|
? resultPayload.last_progress
|
|
246
247
|
: null;
|
|
247
|
-
const listLines = useMemo(() => buildListLines(resultPayload), [
|
|
248
|
+
const listLines = useMemo(() => buildListLines(resultPayload), [outputPayload]);
|
|
248
249
|
const [bashId, setBashId] = useState(initialBashId);
|
|
249
250
|
const [sessionStatus, setSessionStatus] = useState(initialStatus);
|
|
250
251
|
const [exitCode, setExitCode] = useState(typeof resultPayload.exit_code === 'number' ? resultPayload.exit_code : null);
|