@researai/deepscientist 1.5.15 → 1.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +385 -104
  2. package/bin/ds.js +1241 -110
  3. package/docs/en/00_QUICK_START.md +100 -19
  4. package/docs/en/01_SETTINGS_REFERENCE.md +34 -1
  5. package/docs/en/02_START_RESEARCH_GUIDE.md +7 -0
  6. package/docs/en/05_TUI_GUIDE.md +6 -0
  7. package/docs/en/06_RUNTIME_AND_CANVAS.md +4 -3
  8. package/docs/en/09_DOCTOR.md +25 -8
  9. package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +63 -13
  10. package/docs/en/15_CODEX_PROVIDER_SETUP.md +37 -11
  11. package/docs/en/19_EXTERNAL_CONTROLLER_GUIDE.md +226 -0
  12. package/docs/en/19_LOCAL_BROWSER_AUTH.md +70 -0
  13. package/docs/en/20_WORKSPACE_MODES_GUIDE.md +250 -0
  14. package/docs/en/21_LOCAL_MODEL_BACKENDS_GUIDE.md +283 -0
  15. package/docs/en/91_DEVELOPMENT.md +237 -0
  16. package/docs/en/README.md +24 -2
  17. package/docs/zh/00_QUICK_START.md +89 -19
  18. package/docs/zh/01_SETTINGS_REFERENCE.md +34 -1
  19. package/docs/zh/02_START_RESEARCH_GUIDE.md +7 -0
  20. package/docs/zh/05_TUI_GUIDE.md +6 -0
  21. package/docs/zh/09_DOCTOR.md +26 -9
  22. package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +63 -13
  23. package/docs/zh/15_CODEX_PROVIDER_SETUP.md +37 -11
  24. package/docs/zh/19_EXTERNAL_CONTROLLER_GUIDE.md +226 -0
  25. package/docs/zh/19_LOCAL_BROWSER_AUTH.md +68 -0
  26. package/docs/zh/20_WORKSPACE_MODES_GUIDE.md +251 -0
  27. package/docs/zh/21_LOCAL_MODEL_BACKENDS_GUIDE.md +281 -0
  28. package/docs/zh/README.md +24 -2
  29. package/install.sh +46 -4
  30. package/package.json +2 -1
  31. package/pyproject.toml +1 -1
  32. package/src/deepscientist/__init__.py +1 -1
  33. package/src/deepscientist/acp/envelope.py +6 -0
  34. package/src/deepscientist/artifact/service.py +647 -22
  35. package/src/deepscientist/bash_exec/service.py +234 -9
  36. package/src/deepscientist/bridges/connectors.py +8 -2
  37. package/src/deepscientist/cli.py +115 -19
  38. package/src/deepscientist/codex_cli_compat.py +367 -22
  39. package/src/deepscientist/config/models.py +2 -1
  40. package/src/deepscientist/config/service.py +183 -13
  41. package/src/deepscientist/daemon/api/handlers.py +255 -31
  42. package/src/deepscientist/daemon/api/router.py +9 -0
  43. package/src/deepscientist/daemon/app.py +1146 -105
  44. package/src/deepscientist/diagnostics/__init__.py +6 -0
  45. package/src/deepscientist/diagnostics/runner_failures.py +130 -0
  46. package/src/deepscientist/doctor.py +207 -3
  47. package/src/deepscientist/gitops/__init__.py +10 -1
  48. package/src/deepscientist/gitops/diff.py +129 -0
  49. package/src/deepscientist/gitops/service.py +4 -1
  50. package/src/deepscientist/mcp/server.py +39 -0
  51. package/src/deepscientist/prompts/builder.py +275 -34
  52. package/src/deepscientist/quest/layout.py +15 -2
  53. package/src/deepscientist/quest/service.py +707 -55
  54. package/src/deepscientist/quest/stage_views.py +6 -1
  55. package/src/deepscientist/runners/codex.py +143 -43
  56. package/src/deepscientist/shared.py +19 -0
  57. package/src/deepscientist/skills/__init__.py +2 -2
  58. package/src/deepscientist/skills/installer.py +196 -5
  59. package/src/deepscientist/skills/registry.py +66 -0
  60. package/src/prompts/connectors/qq.md +18 -8
  61. package/src/prompts/connectors/weixin.md +16 -6
  62. package/src/prompts/contracts/shared_interaction.md +14 -2
  63. package/src/prompts/system.md +23 -5
  64. package/src/prompts/system_copilot.md +56 -0
  65. package/src/skills/analysis-campaign/SKILL.md +1 -0
  66. package/src/skills/baseline/SKILL.md +8 -0
  67. package/src/skills/decision/SKILL.md +8 -0
  68. package/src/skills/experiment/SKILL.md +8 -0
  69. package/src/skills/figure-polish/SKILL.md +1 -0
  70. package/src/skills/finalize/SKILL.md +1 -0
  71. package/src/skills/idea/SKILL.md +1 -0
  72. package/src/skills/intake-audit/SKILL.md +8 -0
  73. package/src/skills/mentor/SKILL.md +217 -0
  74. package/src/skills/mentor/references/correction-rules.md +210 -0
  75. package/src/skills/mentor/references/knowledge-profile.md +91 -0
  76. package/src/skills/mentor/references/persona-profile.md +138 -0
  77. package/src/skills/mentor/references/taste-profile.md +128 -0
  78. package/src/skills/mentor/references/thought-style-profile.md +138 -0
  79. package/src/skills/mentor/references/work-profile.md +289 -0
  80. package/src/skills/mentor/references/workflow-profile.md +240 -0
  81. package/src/skills/optimize/SKILL.md +1 -0
  82. package/src/skills/rebuttal/SKILL.md +1 -0
  83. package/src/skills/review/SKILL.md +1 -0
  84. package/src/skills/scout/SKILL.md +8 -0
  85. package/src/skills/write/SKILL.md +1 -0
  86. package/src/tui/dist/app/AppContainer.js +19 -11
  87. package/src/tui/dist/index.js +4 -1
  88. package/src/tui/dist/lib/api.js +33 -3
  89. package/src/tui/package.json +1 -1
  90. package/src/ui/dist/assets/AiManusChatView-Bv-Z8YpU.js +204 -0
  91. package/src/ui/dist/assets/AnalysisPlugin-BCKAfjba.js +1 -0
  92. package/src/ui/dist/assets/CliPlugin-BCKcpc35.js +109 -0
  93. package/src/ui/dist/assets/CodeEditorPlugin-DbOfSJ8K.js +2 -0
  94. package/src/ui/dist/assets/CodeViewerPlugin-CbaFRrUU.js +270 -0
  95. package/src/ui/dist/assets/DocViewerPlugin-DAjLVeQD.js +7 -0
  96. package/src/ui/dist/assets/GitCommitViewerPlugin-CIUqbUDO.js +1 -0
  97. package/src/ui/dist/assets/GitDiffViewerPlugin-CQACjoAA.js +6 -0
  98. package/src/ui/dist/assets/GitSnapshotViewer-0r4nLPke.js +30 -0
  99. package/src/ui/dist/assets/ImageViewerPlugin-nBOmI2v_.js +26 -0
  100. package/src/ui/dist/assets/LabCopilotPanel-BHxOxF4z.js +14 -0
  101. package/src/ui/dist/assets/LabPlugin-BKoZGs95.js +22 -0
  102. package/src/ui/dist/assets/LatexPlugin-ZwtV8pIp.js +25 -0
  103. package/src/ui/dist/assets/MarkdownViewerPlugin-DKqVfKyW.js +128 -0
  104. package/src/ui/dist/assets/MarketplacePlugin-BwxStZ9D.js +13 -0
  105. package/src/ui/dist/assets/NotebookEditor-BEQhaQbt.js +81 -0
  106. package/src/ui/dist/assets/{NotebookEditor-CccQYZjX.css → NotebookEditor-BHH8rdGj.css} +1 -1
  107. package/src/ui/dist/assets/NotebookEditor-BOr3x3Ej.css +1 -0
  108. package/src/ui/dist/assets/NotebookEditor-DB9N_T9q.js +361 -0
  109. package/src/ui/dist/assets/PdfLoader-Cy5jtWrr.css +1 -0
  110. package/src/ui/dist/assets/PdfLoader-eWBONbQP.js +16 -0
  111. package/src/ui/dist/assets/PdfMarkdownPlugin-D22YOZL3.js +1 -0
  112. package/src/ui/dist/assets/PdfViewerPlugin-c-RK9DLM.js +17 -0
  113. package/src/ui/dist/assets/PdfViewerPlugin-nwwE-fjJ.css +1 -0
  114. package/src/ui/dist/assets/SearchPlugin-CxF9ytAx.js +16 -0
  115. package/src/ui/dist/assets/SearchPlugin-DA4en4hK.css +1 -0
  116. package/src/ui/dist/assets/TextViewerPlugin-C5xqeeUH.js +54 -0
  117. package/src/ui/dist/assets/VNCViewer-BoLGLnHz.js +11 -0
  118. package/src/ui/dist/assets/bot-DREQOxzP.js +6 -0
  119. package/src/ui/dist/assets/browser-CTB2jwNe.js +8 -0
  120. package/src/ui/dist/assets/chevron-up-C9Qpx4DE.js +6 -0
  121. package/src/ui/dist/assets/code-WlFHE7z_.js +6 -0
  122. package/src/ui/dist/assets/file-content-BZMz3RYp.js +1 -0
  123. package/src/ui/dist/assets/file-diff-panel-CQhw0jS2.js +1 -0
  124. package/src/ui/dist/assets/file-jump-queue-DA-SdG__.js +1 -0
  125. package/src/ui/dist/assets/file-socket-CfQPKQKj.js +1 -0
  126. package/src/ui/dist/assets/git-commit-horizontal-DxZ8DCZh.js +6 -0
  127. package/src/ui/dist/assets/image-Bgl4VIyx.js +6 -0
  128. package/src/ui/dist/assets/index-BpV6lusQ.css +33 -0
  129. package/src/ui/dist/assets/index-CBNVuWcP.js +2496 -0
  130. package/src/ui/dist/assets/index-CwNu1aH4.js +11 -0
  131. package/src/ui/dist/assets/index-DrUnlf6K.js +1 -0
  132. package/src/ui/dist/assets/index-NW-h8VzN.js +1 -0
  133. package/src/ui/dist/assets/monaco-CiHMMNH_.js +1 -0
  134. package/src/ui/dist/assets/pdf-effect-queue-J8OnM0jE.js +6 -0
  135. package/src/ui/dist/assets/plugin-monaco-C8UgLomw.js +19 -0
  136. package/src/ui/dist/assets/plugin-notebook-HbW2K-1c.js +169 -0
  137. package/src/ui/dist/assets/plugin-pdf-CR8hgQBV.js +357 -0
  138. package/src/ui/dist/assets/plugin-terminal-MXFIPun8.js +227 -0
  139. package/src/ui/dist/assets/popover-CLc0pPP8.js +1 -0
  140. package/src/ui/dist/assets/project-sync-C9IdzdZW.js +1 -0
  141. package/src/ui/dist/assets/select-Cs2PmzwL.js +11 -0
  142. package/src/ui/dist/assets/sigma-ClKcHAXm.js +6 -0
  143. package/src/ui/dist/assets/trash-DwpbFr3w.js +11 -0
  144. package/src/ui/dist/assets/useCliAccess-NQ8m0Let.js +1 -0
  145. package/src/ui/dist/assets/useFileDiffOverlay-FuhcnKiw.js +1 -0
  146. package/src/ui/dist/assets/wrap-text-BC-Hltpd.js +11 -0
  147. package/src/ui/dist/assets/zoom-out-E_gaeAxL.js +11 -0
  148. package/src/ui/dist/index.html +5 -2
  149. package/src/ui/dist/assets/AiManusChatView-DDjbFnbt.js +0 -26597
  150. package/src/ui/dist/assets/AnalysisPlugin-Yb5IdmaU.js +0 -123
  151. package/src/ui/dist/assets/CliPlugin-e64sreyu.js +0 -31037
  152. package/src/ui/dist/assets/CodeEditorPlugin-C4D2TIkU.js +0 -427
  153. package/src/ui/dist/assets/CodeViewerPlugin-BVoNZIvC.js +0 -905
  154. package/src/ui/dist/assets/DocViewerPlugin-CLChbllo.js +0 -278
  155. package/src/ui/dist/assets/GitDiffViewerPlugin-C4xeFyFQ.js +0 -2661
  156. package/src/ui/dist/assets/ImageViewerPlugin-OiMUAcLi.js +0 -500
  157. package/src/ui/dist/assets/LabCopilotPanel-BjD2ThQF.js +0 -4104
  158. package/src/ui/dist/assets/LabPlugin-DQPg-NrB.js +0 -2677
  159. package/src/ui/dist/assets/LatexPlugin-CI05XAV9.js +0 -1792
  160. package/src/ui/dist/assets/MarkdownViewerPlugin-DpeBLYZf.js +0 -308
  161. package/src/ui/dist/assets/MarketplacePlugin-DolE58Q2.js +0 -413
  162. package/src/ui/dist/assets/NotebookEditor-7Qm2rSWD.js +0 -4214
  163. package/src/ui/dist/assets/NotebookEditor-C1kWaxKi.js +0 -84873
  164. package/src/ui/dist/assets/NotebookEditor-C3VQ7ylN.css +0 -1405
  165. package/src/ui/dist/assets/PdfLoader-BfOHw8Zw.js +0 -25468
  166. package/src/ui/dist/assets/PdfLoader-C-Y707R3.css +0 -49
  167. package/src/ui/dist/assets/PdfMarkdownPlugin-BulDREv1.js +0 -409
  168. package/src/ui/dist/assets/PdfViewerPlugin-C-daaOaL.js +0 -3095
  169. package/src/ui/dist/assets/PdfViewerPlugin-DQ11QcSf.css +0 -3627
  170. package/src/ui/dist/assets/SearchPlugin-CjpaiJ3A.js +0 -741
  171. package/src/ui/dist/assets/SearchPlugin-DDMrGDkh.css +0 -379
  172. package/src/ui/dist/assets/TextViewerPlugin-BxIyqPQC.js +0 -472
  173. package/src/ui/dist/assets/VNCViewer-HAg9mF7M.js +0 -18821
  174. package/src/ui/dist/assets/awareness-C0NPR2Dj.js +0 -292
  175. package/src/ui/dist/assets/bot-0DYntytV.js +0 -21
  176. package/src/ui/dist/assets/browser-BAcuE0Xj.js +0 -2895
  177. package/src/ui/dist/assets/code-B20Slj_w.js +0 -17
  178. package/src/ui/dist/assets/file-content-DT24KFma.js +0 -377
  179. package/src/ui/dist/assets/file-diff-panel-DK13YPql.js +0 -92
  180. package/src/ui/dist/assets/file-jump-queue-r5XKgJEV.js +0 -16
  181. package/src/ui/dist/assets/file-socket-B4T2o4nR.js +0 -58
  182. package/src/ui/dist/assets/function-B5QZkkHC.js +0 -1895
  183. package/src/ui/dist/assets/image-DSeR_sDS.js +0 -18
  184. package/src/ui/dist/assets/index-BrFje2Uk.js +0 -120
  185. package/src/ui/dist/assets/index-BwRJaoTl.js +0 -25
  186. package/src/ui/dist/assets/index-D_E4281X.js +0 -221322
  187. package/src/ui/dist/assets/index-DnYB3xb1.js +0 -159
  188. package/src/ui/dist/assets/index-G7AcWcMu.css +0 -12594
  189. package/src/ui/dist/assets/monaco-LExaAN3Y.js +0 -623
  190. package/src/ui/dist/assets/pdf-effect-queue-BJk5okWJ.js +0 -47
  191. package/src/ui/dist/assets/pdf_viewer-e0g1is2C.js +0 -8206
  192. package/src/ui/dist/assets/popover-D3Gg_FoV.js +0 -476
  193. package/src/ui/dist/assets/project-sync-C_ygLlVU.js +0 -297
  194. package/src/ui/dist/assets/select-CpAK6uWm.js +0 -1690
  195. package/src/ui/dist/assets/sigma-DEccaSgk.js +0 -22
  196. package/src/ui/dist/assets/square-check-big-uUfyVsbD.js +0 -17
  197. package/src/ui/dist/assets/trash-CXvwwSe8.js +0 -32
  198. package/src/ui/dist/assets/useCliAccess-Bnop4mgR.js +0 -957
  199. package/src/ui/dist/assets/useFileDiffOverlay-B8eUAX0I.js +0 -53
  200. package/src/ui/dist/assets/wrap-text-9vbOBpkW.js +0 -35
  201. package/src/ui/dist/assets/yjs-DncrqiZ8.js +0 -11243
  202. package/src/ui/dist/assets/zoom-out-BgVMmOW4.js +0 -34
@@ -0,0 +1,240 @@
1
+ # Mentor Workflow Profile
2
+
3
+ This file captures the user's preferred working routines and technical norms.
4
+
5
+ ## General technical workflow
6
+
7
+ ### A. When the user asks for planning first
8
+
9
+ Preferred sequence:
10
+
11
+ 1. inspect the relevant code and current state
12
+ 2. identify the real contract and leverage points
13
+ 3. propose one clear route
14
+ 4. name risks and open questions
15
+ 5. wait for approval before edits
16
+
17
+ If the task is an audit, the preferred output is structured rather than vague prose.
18
+ Typical audit format:
19
+
20
+ - feature or component name
21
+ - intended contract or plan statement
22
+ - current implementation status
23
+ - missing part or risk
24
+ - exact file path
25
+ - optional line-level evidence
26
+
27
+ Preferred status vocabulary:
28
+
29
+ - completed
30
+ - partially completed
31
+ - missing or not implemented
32
+
33
+ Preferred audit behavior:
34
+
35
+ - keep the same item order as the governing plan
36
+ - do not hide missing items inside a prose paragraph
37
+ - make the missing part directly scannable
38
+
39
+ For larger codebase audits, the preferred process is:
40
+
41
+ 1. read the governing plan or contract first
42
+ 2. inspect only the named directories or modules
43
+ 3. map each planned feature to real implementation evidence
44
+ 4. report missing pieces in the same order as the plan
45
+
46
+ ### B. When the user wants immediate implementation
47
+
48
+ Preferred sequence:
49
+
50
+ 1. inspect the current state quickly but concretely
51
+ 2. identify the acceptance gate
52
+ 3. back up or preserve safety when the change is risky
53
+ 4. implement in the smallest coherent slice
54
+ 5. run targeted verification
55
+ 6. report what changed and what still needs checking
56
+
57
+ If the user explicitly rejected simplification, do not silently swap to a weaker surrogate architecture.
58
+ State the heavier route and implement it honestly unless blocked.
59
+
60
+ ### C. When the user reports that nothing changed
61
+
62
+ Preferred sequence:
63
+
64
+ 1. verify the actual rendered source of truth
65
+ 2. check build, cache, route, variant, and runtime wiring
66
+ 3. confirm the modified file is really the live one
67
+ 4. only then claim the change is present
68
+
69
+ This pattern appears repeatedly in historical interactive coding sessions.
70
+
71
+ Typical hidden causes the mentor should check early:
72
+
73
+ - editing the wrong component variant
74
+ - editing source while the app serves a compiled or standalone copy
75
+ - frontend not rebuilt or not restarted
76
+ - route points to a different dashboard, enhanced component, or plugin entry
77
+ - cache or generated asset mismatch
78
+
79
+ And when the user says "the change is not visible", do not stop at source inspection.
80
+ Check:
81
+
82
+ - the actual entry component
83
+ - the actual loaded variant
84
+ - the actual served bundle
85
+ - whether the edited code path is the one the runtime is using
86
+
87
+ ## Research-task workflow
88
+
89
+ ### A. For baseline or experiment work
90
+
91
+ The user consistently wants:
92
+
93
+ - explicit runtime configuration
94
+ - explicit throughput or concurrency validation when performance matters
95
+ - real smoke tests before broad runs
96
+ - measured checkpoints instead of vague monitor messages
97
+
98
+ Preferred reporting format:
99
+
100
+ - baseline / run status
101
+ - current completed tasks or examples
102
+ - current quantitative gate
103
+ - current blocker or uncertainty
104
+ - next checkpoint
105
+
106
+ When the user questions runtime quality, also add:
107
+
108
+ - the exact runtime parameter under suspicion
109
+ - the currently measured value
110
+ - whether that value satisfies the requested target
111
+
112
+ ### B. For analysis and supplementary experiments
113
+
114
+ The user prefers:
115
+
116
+ - preserve usable old experiments if still relevant
117
+ - inventory them explicitly
118
+ - map them into outline / evidence ledger / appendix or reject them honestly
119
+ - only run new supplementary experiments when a real gap remains
120
+
121
+ When the user asks "what can be kept?" or "what is still missing?", prefer:
122
+
123
+ - explicit retained experiment list
124
+ - explicit rejected or historical-only list
125
+ - explicit missing-evidence list
126
+ - explicit next-experiment list only if the gap is real
127
+
128
+ ### C. For writing and paper work
129
+
130
+ The user expects:
131
+
132
+ - real page-count awareness
133
+ - main paper vs appendix distinction
134
+ - evidence actually mapped into the paper contract
135
+ - a complete paper, not just a compile-clean draft
136
+
137
+ When reporting paper progress, separate:
138
+
139
+ - compile status
140
+ - page-count status
141
+ - evidence-mapping status
142
+ - appendix status
143
+ - remaining scientific gaps
144
+
145
+ If the user asks for more experiments before the final paper, treat that as an active scope expansion, not as confusion.
146
+
147
+ ## Product and frontend workflow
148
+
149
+ ### A. UI redesign tasks
150
+
151
+ The user usually wants:
152
+
153
+ - visual improvement
154
+ - but with real product coherence
155
+ - and without random component dumping
156
+
157
+ Preferred workflow:
158
+
159
+ 1. understand actual page structure and rendered source
160
+ 2. define visual direction
161
+ 3. preserve or improve contract clarity
162
+ 4. implement
163
+ 5. verify the result is actually visible in the running app
164
+
165
+ Preferred visual direction from history:
166
+
167
+ - light background
168
+ - controlled motion
169
+ - "good-looking" but not cluttered
170
+ - not random component dumping
171
+ - preserve the product's own identity
172
+
173
+ When the user asks for beauty improvements, the workflow should still include:
174
+
175
+ - why this component is being added
176
+ - which existing contract it supports
177
+ - what visual clutter it replaces or avoids
178
+
179
+ ### B. Admin / settings / auth flows
180
+
181
+ The user expects:
182
+
183
+ - frontend and backend to stay consistent
184
+ - validation errors to be surfaced clearly
185
+ - actual user-visible behavior to match database rules
186
+ - if a token or invitation flow exists, it must be functionally and visually coherent
187
+
188
+ When the task spans frontend plus backend:
189
+
190
+ - verify request payloads and backend validation agree
191
+ - verify saved state is visible in the real admin surface
192
+ - verify user-facing success and error states match backend semantics
193
+
194
+ When the task spans more than one subsystem, the user often expects an explicit coordination list.
195
+ Typical shape:
196
+
197
+ - frontend files
198
+ - backend files
199
+ - data model or API contract
200
+ - migration or bootstrap implications
201
+ - verification steps
202
+
203
+ ## Verification norms
204
+
205
+ The user strongly prefers:
206
+
207
+ - unit tests when logic changes
208
+ - live smoke or e2e checks when runtime behavior matters
209
+ - explicit statement when a test was not possible
210
+ - explicit statement of what was verified vs only reasoned about
211
+
212
+ Additional norm from historical interactive coding sessions:
213
+
214
+ - after implementation, verify the user can actually see or trigger the changed behavior
215
+ - do not treat code edits alone as proof
216
+ - when the task asked for exhaustive or comprehensive coverage, return to the checklist and verify each requested item was addressed
217
+
218
+ ## Working-style markers from history
219
+
220
+ Repeated user-side signals across historical coding sessions point to these workflow contracts:
221
+
222
+ - think carefully when planning
223
+ - be careful when changing
224
+ - keep cross-layer consistency
225
+ - maintain momentum when continuation is requested
226
+ - preserve safety on risky edits
227
+ - back up when the user explicitly asks for it or when the edit surface is brittle
228
+ - produce todo lists or checklists when the change spans many coupled files
229
+ - for explorer or subagent-style work, keep each subtask narrow and return a directly usable summary
230
+
231
+ ## Workflow anti-patterns
232
+
233
+ Avoid:
234
+
235
+ - editing before identifying the real live code path
236
+ - claiming completion without testing the actual acceptance gate
237
+ - treating a control-file rewrite as equivalent to experiment or paper progress
238
+ - continuing to narrate health after the user has asked for exact verification
239
+ - giving an audit without a structured feature-to-file status table when the user explicitly asked for a comprehensive audit
240
+ - silently simplifying a requested integration after the user has explicitly rejected simplification
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: optimize
3
3
  description: Use when an algorithm-first quest should manage candidate briefs, optimization frontier, branch promotion, or fusion-aware search instead of the paper-oriented default loop.
4
+ skill_role: stage
4
5
  ---
5
6
 
6
7
  # Optimize
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: rebuttal
3
3
  description: Use when a quest already has a paper, draft, or review package and the task is to map reviewer feedback into experiments, manuscript deltas, and a durable rebuttal / revision response.
4
+ skill_role: companion
4
5
  ---
5
6
 
6
7
  # Rebuttal
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: review
3
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
+ skill_role: companion
4
5
  ---
5
6
 
6
7
  # Review
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: scout
3
3
  description: Use when a quest needs problem framing, literature scouting, dataset or metric clarification, or baseline discovery before deeper work.
4
+ skill_role: stage
4
5
  ---
5
6
 
6
7
  # Scout
@@ -15,6 +16,13 @@ Use this skill when the quest does not yet have a stable research frame.
15
16
  - If a threaded user reply arrives, interpret it relative to the latest scout progress update before assuming the task changed completely.
16
17
  - 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.
17
18
 
19
+ ## Tool discipline
20
+
21
+ - **Do not use native `shell_command` / `command_execution` in this skill.**
22
+ - **Any shell, CLI, Python, bash, node, git, npm, uv, or repo-inspection execution must go through `bash_exec(...)`.**
23
+ - **For git inspection inside the current quest repository or worktree, prefer `artifact.git(...)` before raw shell git commands.**
24
+ - **If scouting only needs durable quest context, prefer `artifact.read_quest_documents(...)`, `artifact.get_quest_state(...)`, and `memory.*` instead of shelling out.**
25
+
18
26
  ## Stage purpose
19
27
 
20
28
  The scout stage exists to answer the smallest set of framing questions required to make the rest of the quest efficient:
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: write
3
3
  description: Use when a quest has enough evidence to draft or refine a paper, report, or research summary without inventing missing support.
4
+ skill_role: stage
4
5
  ---
5
6
 
6
7
  # Write
@@ -93,16 +93,18 @@ const buildQuestConfigItems = (questId, questRoot) => {
93
93
  documentId: 'path::quest.yaml',
94
94
  },
95
95
  ];
96
- const codexPath = `${questRoot}/.codex/config.toml`;
97
- if (fs.existsSync(codexPath)) {
96
+ const codexCandidates = [`${questRoot}/.ds/codex-home/config.toml`, `${questRoot}/.codex/config.toml`];
97
+ const codexPath = codexCandidates.find((candidate) => fs.existsSync(candidate));
98
+ if (codexPath) {
99
+ const relativeCodexPath = codexPath.replace(`${questRoot}/`, '');
98
100
  items.push({
99
- id: `quest:${questId}:.codex/config.toml`,
101
+ id: `quest:${questId}:${relativeCodexPath}`,
100
102
  scope: 'quest',
101
- name: '.codex/config.toml',
102
- title: '.codex/config.toml',
103
+ name: relativeCodexPath,
104
+ title: relativeCodexPath,
103
105
  path: codexPath,
104
106
  writable: true,
105
- documentId: 'path::.codex/config.toml',
107
+ documentId: `path::${relativeCodexPath}`,
106
108
  });
107
109
  }
108
110
  return items;
@@ -480,18 +482,21 @@ function openBrowser(url) {
480
482
  }
481
483
  spawn('xdg-open', [url], { detached: true, stdio: 'ignore' }).unref();
482
484
  }
483
- function buildProjectsUrl(baseUrl) {
485
+ function buildProjectsUrl(baseUrl, authToken) {
484
486
  const target = new URL(baseUrl);
485
487
  if (target.hostname === '0.0.0.0') {
486
488
  target.hostname = '127.0.0.1';
487
489
  }
488
490
  target.pathname = '/projects';
489
491
  target.search = '';
492
+ if (authToken) {
493
+ target.searchParams.set('token', authToken);
494
+ }
490
495
  return target.toString();
491
496
  }
492
- function buildProjectUrl(baseUrl, questId) {
497
+ function buildProjectUrl(baseUrl, questId, authToken) {
493
498
  if (!questId) {
494
- return buildProjectsUrl(baseUrl);
499
+ return buildProjectsUrl(baseUrl, authToken);
495
500
  }
496
501
  const target = new URL(baseUrl);
497
502
  if (target.hostname === '0.0.0.0') {
@@ -499,9 +504,12 @@ function buildProjectUrl(baseUrl, questId) {
499
504
  }
500
505
  target.pathname = `/projects/${questId}`;
501
506
  target.search = '';
507
+ if (authToken) {
508
+ target.searchParams.set('token', authToken);
509
+ }
502
510
  return target.toString();
503
511
  }
504
- export const AppContainer = ({ baseUrl, initialQuestId = null, }) => {
512
+ export const AppContainer = ({ baseUrl, initialQuestId = null, authToken = null, }) => {
505
513
  const { exit } = useApp();
506
514
  const [quests, setQuests] = useState([]);
507
515
  const [connectors, setConnectors] = useState([]);
@@ -2540,7 +2548,7 @@ export const AppContainer = ({ baseUrl, initialQuestId = null, }) => {
2540
2548
  return;
2541
2549
  }
2542
2550
  if (key.ctrl && value.toLowerCase() === 'o') {
2543
- openBrowser(buildProjectUrl(baseUrl, activeQuestId || browseQuestId));
2551
+ openBrowser(buildProjectUrl(baseUrl, activeQuestId || browseQuestId, authToken));
2544
2552
  return;
2545
2553
  }
2546
2554
  if (key.ctrl && value.toLowerCase() === 'g') {
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { render } from 'ink';
3
3
  import { AppContainer } from './app/AppContainer.js';
4
+ import { setDaemonAuthToken } from './lib/api.js';
4
5
  import { isAlternateBufferEnabled, isIncrementalRenderingEnabled } from './utils/terminal.js';
5
6
  const CLEAR_TO_END = '\x1b[0K';
6
7
  const BRACKETED_PASTE_ENABLE = '\x1b[?2004h';
@@ -31,6 +32,8 @@ function parseArg(name) {
31
32
  }
32
33
  const baseUrl = parseArg('--base-url') ?? 'http://0.0.0.0:20999';
33
34
  const questId = parseArg('--quest-id');
35
+ const authToken = parseArg('--auth-token');
36
+ setDaemonAuthToken(authToken);
34
37
  const useAlternateBuffer = isAlternateBufferEnabled();
35
38
  const useIncrementalRendering = isIncrementalRenderingEnabled();
36
39
  const setBracketedPasteMode = (enabled) => {
@@ -54,7 +57,7 @@ const closeBracketedPasteMode = () => {
54
57
  };
55
58
  setBracketedPasteMode(true);
56
59
  process.once('exit', closeBracketedPasteMode);
57
- const instance = render(React.createElement(AppContainer, { baseUrl: baseUrl, initialQuestId: questId }), {
60
+ const instance = render(React.createElement(AppContainer, { baseUrl: baseUrl, initialQuestId: questId, authToken: authToken }), {
58
61
  stdout: withLineClearing(process.stdout),
59
62
  stderr: process.stderr,
60
63
  stdin: process.stdin,
@@ -1,3 +1,29 @@
1
+ let daemonAuthToken = null;
2
+ function toHeaderRecord(headers) {
3
+ if (!headers)
4
+ return {};
5
+ if (headers instanceof Headers) {
6
+ return Object.fromEntries(headers.entries());
7
+ }
8
+ if (Array.isArray(headers)) {
9
+ return Object.fromEntries(headers);
10
+ }
11
+ return { ...headers };
12
+ }
13
+ function authHeaders(headers) {
14
+ const normalizedToken = typeof daemonAuthToken === 'string' ? daemonAuthToken.trim() : '';
15
+ if (!normalizedToken) {
16
+ return toHeaderRecord(headers);
17
+ }
18
+ return {
19
+ ...toHeaderRecord(headers),
20
+ Authorization: `Bearer ${normalizedToken}`,
21
+ };
22
+ }
23
+ export function setDaemonAuthToken(value) {
24
+ const normalized = typeof value === 'string' ? value.trim() : '';
25
+ daemonAuthToken = normalized || null;
26
+ }
1
27
  async function parseResponse(response) {
2
28
  if (!response.ok) {
3
29
  throw new Error(await response.text());
@@ -6,10 +32,11 @@ async function parseResponse(response) {
6
32
  }
7
33
  export async function api(baseUrl, path, init) {
8
34
  const response = await fetch(`${baseUrl}${path}`, {
35
+ ...init,
9
36
  headers: {
10
37
  'Content-Type': 'application/json',
38
+ ...authHeaders(init?.headers),
11
39
  },
12
- ...init,
13
40
  });
14
41
  return parseResponse(response);
15
42
  }
@@ -68,6 +95,7 @@ export const client = {
68
95
  const response = await fetch(client.eventsStreamUrl(baseUrl, questId, cursor), {
69
96
  headers: {
70
97
  Accept: 'text/event-stream',
98
+ ...authHeaders(),
71
99
  },
72
100
  signal: callbacks.signal,
73
101
  });
@@ -128,7 +156,9 @@ export const client = {
128
156
  search.set('order', params.order);
129
157
  }
130
158
  const suffix = search.toString() ? `?${search.toString()}` : '';
131
- const response = await fetch(`${baseUrl}/api/quests/${questId}/bash/sessions/${bashId}/logs${suffix}`);
159
+ const response = await fetch(`${baseUrl}/api/quests/${questId}/bash/sessions/${bashId}/logs${suffix}`, {
160
+ headers: authHeaders(),
161
+ });
132
162
  if (!response.ok) {
133
163
  throw new Error(await response.text());
134
164
  }
@@ -151,7 +181,7 @@ export const client = {
151
181
  }
152
182
  const response = await fetch(`${baseUrl}/api/quests/${questId}/bash/sessions/${bashId}/stream`, {
153
183
  method: 'GET',
154
- headers,
184
+ headers: authHeaders(headers),
155
185
  signal: callbacks.signal,
156
186
  });
157
187
  if (!response.ok || !response.body) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepscientist-tui",
3
- "version": "1.5.15",
3
+ "version": "1.5.17",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",