@researai/deepscientist 1.5.16 → 1.6.0
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 +309 -130
- package/AISB/catalog/aisb.b1.agentic_coding.yaml +244 -0
- package/AISB/catalog/aisb.b10.climate_earth.yaml +235 -0
- package/AISB/catalog/aisb.b11.model_efficiency.yaml +231 -0
- package/AISB/catalog/aisb.b12.embodied_ai.yaml +238 -0
- package/AISB/catalog/aisb.b2.agent_systems.yaml +229 -0
- package/AISB/catalog/aisb.b3.self_evolving_rl.yaml +237 -0
- package/AISB/catalog/aisb.b4.lm_reasoning.yaml +240 -0
- package/AISB/catalog/aisb.b5.math_proof.yaml +235 -0
- package/AISB/catalog/aisb.b6.research_process.yaml +243 -0
- package/AISB/catalog/aisb.b7.multimodal_fusion.yaml +232 -0
- package/AISB/catalog/aisb.b8.lifesci_drug.yaml +275 -0
- package/AISB/catalog/aisb.b9.material_science.yaml +237 -0
- package/AISB/catalog/aisb.t3.001_savvy.yaml +159 -0
- package/AISB/catalog/aisb.t3.001_savvy.zh.yaml +121 -0
- package/AISB/catalog/aisb.t3.002_pinet.yaml +189 -0
- package/AISB/catalog/aisb.t3.002_pinet.zh.yaml +130 -0
- package/AISB/catalog/aisb.t3.004_decentralattn.yaml +184 -0
- package/AISB/catalog/aisb.t3.004_decentralattn.zh.yaml +153 -0
- package/AISB/catalog/aisb.t3.005_tsae.yaml +193 -0
- package/AISB/catalog/aisb.t3.005_tsae.zh.yaml +139 -0
- package/AISB/catalog/aisb.t3.006_physense.yaml +194 -0
- package/AISB/catalog/aisb.t3.006_physense.zh.yaml +118 -0
- package/AISB/catalog/aisb.t3.007_reasoningiqa.yaml +169 -0
- package/AISB/catalog/aisb.t3.007_reasoningiqa.zh.yaml +133 -0
- package/AISB/catalog/aisb.t3.008_meanflows.yaml +188 -0
- package/AISB/catalog/aisb.t3.008_meanflows.zh.yaml +140 -0
- package/AISB/catalog/aisb.t3.009_scoremissing.yaml +179 -0
- package/AISB/catalog/aisb.t3.009_scoremissing.zh.yaml +119 -0
- package/AISB/catalog/aisb.t3.010_suitabilityfilter.yaml +221 -0
- package/AISB/catalog/aisb.t3.010_suitabilityfilter.zh.yaml +141 -0
- package/AISB/catalog/aisb.t3.011_osd.yaml +206 -0
- package/AISB/catalog/aisb.t3.011_osd.zh.yaml +163 -0
- package/AISB/catalog/aisb.t3.012_efficientqat.yaml +206 -0
- package/AISB/catalog/aisb.t3.012_efficientqat.zh.yaml +159 -0
- package/AISB/catalog/aisb.t3.013_appl.yaml +152 -0
- package/AISB/catalog/aisb.t3.013_appl.zh.yaml +126 -0
- package/AISB/catalog/aisb.t3.014_piguard.yaml +207 -0
- package/AISB/catalog/aisb.t3.014_piguard.zh.yaml +164 -0
- package/AISB/catalog/aisb.t3.015_frspec.yaml +209 -0
- package/AISB/catalog/aisb.t3.015_frspec.zh.yaml +163 -0
- package/AISB/catalog/aisb.t3.016_mathfusion.yaml +166 -0
- package/AISB/catalog/aisb.t3.016_mathfusion.zh.yaml +145 -0
- package/AISB/catalog/aisb.t3.017_multimodalglp.yaml +171 -0
- package/AISB/catalog/aisb.t3.017_multimodalglp.zh.yaml +122 -0
- package/AISB/catalog/aisb.t3.018_cotsynth.yaml +206 -0
- package/AISB/catalog/aisb.t3.018_cotsynth.zh.yaml +162 -0
- package/AISB/catalog/aisb.t3.019_dyscaleut.yaml +211 -0
- package/AISB/catalog/aisb.t3.019_dyscaleut.zh.yaml +148 -0
- package/AISB/catalog/aisb.t3.020_aristotle.yaml +173 -0
- package/AISB/catalog/aisb.t3.020_aristotle.zh.yaml +119 -0
- package/AISB/catalog/aisb.t3.021_tokenrecycling.yaml +160 -0
- package/AISB/catalog/aisb.t3.021_tokenrecycling.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.022_chainofreasoning.yaml +204 -0
- package/AISB/catalog/aisb.t3.022_chainofreasoning.zh.yaml +161 -0
- package/AISB/catalog/aisb.t3.023_guidedembed.yaml +211 -0
- package/AISB/catalog/aisb.t3.023_guidedembed.zh.yaml +189 -0
- package/AISB/catalog/aisb.t3.024_outputcentric.yaml +148 -0
- package/AISB/catalog/aisb.t3.024_outputcentric.zh.yaml +131 -0
- package/AISB/catalog/aisb.t3.025_deeper.yaml +143 -0
- package/AISB/catalog/aisb.t3.025_deeper.zh.yaml +116 -0
- package/AISB/catalog/aisb.t3.026_gartkg.yaml +195 -0
- package/AISB/catalog/aisb.t3.026_gartkg.zh.yaml +127 -0
- package/AISB/catalog/aisb.t3.027_citeeval.yaml +182 -0
- package/AISB/catalog/aisb.t3.027_citeeval.zh.yaml +135 -0
- package/AISB/catalog/aisb.t3.028_sbam.yaml +206 -0
- package/AISB/catalog/aisb.t3.028_sbam.zh.yaml +166 -0
- package/AISB/catalog/aisb.t3.029_cdqgeoembed.yaml +224 -0
- package/AISB/catalog/aisb.t3.029_cdqgeoembed.zh.yaml +142 -0
- package/AISB/catalog/aisb.t3.030_processrm.yaml +211 -0
- package/AISB/catalog/aisb.t3.030_processrm.zh.yaml +166 -0
- package/AISB/catalog/aisb.t3.031_circuitstability.yaml +172 -0
- package/AISB/catalog/aisb.t3.031_circuitstability.zh.yaml +134 -0
- package/AISB/catalog/aisb.t3.032_ptsolver.yaml +169 -0
- package/AISB/catalog/aisb.t3.032_ptsolver.zh.yaml +135 -0
- package/AISB/catalog/aisb.t3.033_gcse.yaml +144 -0
- package/AISB/catalog/aisb.t3.033_gcse.zh.yaml +126 -0
- package/AISB/catalog/aisb.t3.034_ensemblewm.yaml +183 -0
- package/AISB/catalog/aisb.t3.034_ensemblewm.zh.yaml +146 -0
- package/AISB/catalog/aisb.t3.035_moralvalueswa.yaml +207 -0
- package/AISB/catalog/aisb.t3.035_moralvalueswa.zh.yaml +165 -0
- package/AISB/catalog/aisb.t3.036_weakstrongpref.yaml +210 -0
- package/AISB/catalog/aisb.t3.036_weakstrongpref.zh.yaml +194 -0
- package/AISB/catalog/aisb.t3.037_dementiamask.yaml +172 -0
- package/AISB/catalog/aisb.t3.037_dementiamask.zh.yaml +132 -0
- package/AISB/catalog/aisb.t3.038_tinysam.yaml +284 -0
- package/AISB/catalog/aisb.t3.038_tinysam.zh.yaml +240 -0
- package/AISB/catalog/aisb.t3.039_calf.yaml +224 -0
- package/AISB/catalog/aisb.t3.039_calf.zh.yaml +194 -0
- package/AISB/catalog/aisb.t3.040_graniteguardian.yaml +199 -0
- package/AISB/catalog/aisb.t3.040_graniteguardian.zh.yaml +174 -0
- package/AISB/catalog/aisb.t3.041_amdm.yaml +149 -0
- package/AISB/catalog/aisb.t3.041_amdm.zh.yaml +137 -0
- package/AISB/catalog/aisb.t3.042_xpatch.yaml +216 -0
- package/AISB/catalog/aisb.t3.042_xpatch.zh.yaml +182 -0
- package/AISB/catalog/aisb.t3.043_vhm.yaml +268 -0
- package/AISB/catalog/aisb.t3.043_vhm.zh.yaml +193 -0
- package/AISB/catalog/aisb.t3.044_rgvi.yaml +224 -0
- package/AISB/catalog/aisb.t3.044_rgvi.zh.yaml +176 -0
- package/AISB/catalog/aisb.t3.045_pslstm.yaml +203 -0
- package/AISB/catalog/aisb.t3.045_pslstm.zh.yaml +179 -0
- package/AISB/catalog/aisb.t3.046_nonstatts.yaml +208 -0
- package/AISB/catalog/aisb.t3.046_nonstatts.zh.yaml +194 -0
- package/AISB/catalog/aisb.t3.047_timepfn.yaml +156 -0
- package/AISB/catalog/aisb.t3.047_timepfn.zh.yaml +124 -0
- package/AISB/catalog/aisb.t3.048_proxyspex.yaml +148 -0
- package/AISB/catalog/aisb.t3.048_proxyspex.zh.yaml +125 -0
- package/AISB/catalog/aisb.t3.049_hogwildinference.yaml +183 -0
- package/AISB/catalog/aisb.t3.049_hogwildinference.zh.yaml +138 -0
- package/AISB/catalog/aisb.t3.050_causalpfn.yaml +214 -0
- package/AISB/catalog/aisb.t3.050_causalpfn.zh.yaml +190 -0
- package/AISB/catalog/aisb.t3.051_flashtp.yaml +169 -0
- package/AISB/catalog/aisb.t3.051_flashtp.zh.yaml +124 -0
- package/AISB/catalog/aisb.t3.052_nsdiff.yaml +155 -0
- package/AISB/catalog/aisb.t3.052_nsdiff.zh.yaml +138 -0
- package/AISB/catalog/aisb.t3.053_k2vae.yaml +158 -0
- package/AISB/catalog/aisb.t3.053_k2vae.zh.yaml +132 -0
- package/AISB/catalog/aisb.t3.054_timebase.yaml +178 -0
- package/AISB/catalog/aisb.t3.054_timebase.zh.yaml +158 -0
- package/AISB/catalog/aisb.t3.055_csbrain.yaml +238 -0
- package/AISB/catalog/aisb.t3.055_csbrain.zh.yaml +184 -0
- package/AISB/catalog/aisb.t3.056_infosam.yaml +224 -0
- package/AISB/catalog/aisb.t3.056_infosam.zh.yaml +189 -0
- package/AISB/catalog/aisb.t3.057_mdreid.yaml +129 -0
- package/AISB/catalog/aisb.t3.057_mdreid.zh.yaml +117 -0
- package/AISB/catalog/aisb.t3.058_mindglitch.yaml +171 -0
- package/AISB/catalog/aisb.t3.058_mindglitch.zh.yaml +145 -0
- package/AISB/catalog/aisb.t3.059_selfsupervised.yaml +154 -0
- package/AISB/catalog/aisb.t3.059_selfsupervised.zh.yaml +125 -0
- package/AISB/catalog/aisb.t3.060_iaggad.yaml +121 -0
- package/AISB/catalog/aisb.t3.060_iaggad.zh.yaml +100 -0
- package/AISB/catalog/aisb.t3.061_hsgkn.yaml +136 -0
- package/AISB/catalog/aisb.t3.061_hsgkn.zh.yaml +113 -0
- package/AISB/catalog/aisb.t3.062_visionts.yaml +237 -0
- package/AISB/catalog/aisb.t3.062_visionts.zh.yaml +216 -0
- package/AISB/catalog/aisb.t3.063_tsrag.yaml +162 -0
- package/AISB/catalog/aisb.t3.063_tsrag.zh.yaml +138 -0
- package/AISB/catalog/aisb.t3.064_pir.yaml +221 -0
- package/AISB/catalog/aisb.t3.064_pir.zh.yaml +197 -0
- package/AISB/catalog/aisb.t3.065_proteinbinding.yaml +234 -0
- package/AISB/catalog/aisb.t3.065_proteinbinding.zh.yaml +167 -0
- package/AISB/catalog/aisb.t3.066_tropicalattention.yaml +267 -0
- package/AISB/catalog/aisb.t3.066_tropicalattention.zh.yaml +229 -0
- package/AISB/catalog/aisb.t3.067_kanad.yaml +193 -0
- package/AISB/catalog/aisb.t3.067_kanad.zh.yaml +167 -0
- package/AISB/catalog/aisb.t3.068_sempo.yaml +187 -0
- package/AISB/catalog/aisb.t3.068_sempo.zh.yaml +148 -0
- package/AISB/catalog/aisb.t3.069_treehfd.yaml +129 -0
- package/AISB/catalog/aisb.t3.069_treehfd.zh.yaml +111 -0
- package/AISB/catalog/aisb.t3.070_certifiedunlearning.yaml +224 -0
- package/AISB/catalog/aisb.t3.070_certifiedunlearning.zh.yaml +171 -0
- package/AISB/catalog/aisb.t3.071_neuralmjd.yaml +142 -0
- package/AISB/catalog/aisb.t3.071_neuralmjd.zh.yaml +120 -0
- package/AISB/catalog/aisb.t3.072_fedgmt.yaml +181 -0
- package/AISB/catalog/aisb.t3.072_fedgmt.zh.yaml +158 -0
- package/AISB/catalog/aisb.t3.073_rld.yaml +161 -0
- package/AISB/catalog/aisb.t3.073_rld.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.074_lsvi.yaml +163 -0
- package/AISB/catalog/aisb.t3.074_lsvi.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.075_treeslicedentropy.yaml +201 -0
- package/AISB/catalog/aisb.t3.075_treeslicedentropy.zh.yaml +148 -0
- package/AISB/catalog/aisb.t3.076_aanet.yaml +169 -0
- package/AISB/catalog/aisb.t3.076_aanet.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.077_cmnn.yaml +199 -0
- package/AISB/catalog/aisb.t3.077_cmnn.zh.yaml +165 -0
- package/AISB/catalog/aisb.t3.078_conformalanomaly.yaml +146 -0
- package/AISB/catalog/aisb.t3.078_conformalanomaly.zh.yaml +117 -0
- package/AISB/catalog/aisb.t3.079_dpfkmeans.yaml +131 -0
- package/AISB/catalog/aisb.t3.079_dpfkmeans.zh.yaml +104 -0
- package/AISB/catalog/aisb.t3.080_latentscorereweight.yaml +169 -0
- package/AISB/catalog/aisb.t3.080_latentscorereweight.zh.yaml +123 -0
- package/AISB/catalog/aisb.t3.081_qmamba.yaml +150 -0
- package/AISB/catalog/aisb.t3.081_qmamba.zh.yaml +117 -0
- package/AISB/catalog/aisb.t3.082_onlinellmrouting.yaml +160 -0
- package/AISB/catalog/aisb.t3.082_onlinellmrouting.zh.yaml +133 -0
- package/AISB/catalog/aisb.t3.083_starformer.yaml +178 -0
- package/AISB/catalog/aisb.t3.083_starformer.zh.yaml +140 -0
- package/AISB/catalog/aisb.t3.084_ift.yaml +139 -0
- package/AISB/catalog/aisb.t3.084_ift.zh.yaml +111 -0
- package/AISB/catalog/aisb.t3.085_neuralsurv.yaml +183 -0
- package/AISB/catalog/aisb.t3.085_neuralsurv.zh.yaml +143 -0
- package/AISB/catalog/aisb.t3.086_stella.yaml +197 -0
- package/AISB/catalog/aisb.t3.086_stella.zh.yaml +142 -0
- package/AISB/catalog/aisb.t3.087_moses.yaml +167 -0
- package/AISB/catalog/aisb.t3.087_moses.zh.yaml +132 -0
- package/AISB/catalog/aisb.t3.088_channelnorm.yaml +140 -0
- package/AISB/catalog/aisb.t3.088_channelnorm.zh.yaml +109 -0
- package/AISB/catalog/aisb.t3.089_causalvelocity.yaml +730 -0
- package/AISB/catalog/aisb.t3.089_causalvelocity.zh.yaml +668 -0
- package/AISB/catalog/aisb.t3.090_rstib.yaml +144 -0
- package/AISB/catalog/aisb.t3.090_rstib.zh.yaml +109 -0
- package/AISB/catalog/aisb.t3.091_timeawarecausal.yaml +132 -0
- package/AISB/catalog/aisb.t3.091_timeawarecausal.zh.yaml +107 -0
- package/AISB/catalog/aisb.t3.092_kmeanslocalopt.yaml +138 -0
- package/AISB/catalog/aisb.t3.092_kmeanslocalopt.zh.yaml +110 -0
- package/AISB/catalog/aisb.t3.093_fedwmsam.yaml +134 -0
- package/AISB/catalog/aisb.t3.093_fedwmsam.zh.yaml +106 -0
- package/AISB/catalog/aisb.t3.094_boundre.yaml +147 -0
- package/AISB/catalog/aisb.t3.094_boundre.zh.yaml +114 -0
- package/AISB/catalog/aisb.t3.095_fastfeaturecp.yaml +153 -0
- package/AISB/catalog/aisb.t3.095_fastfeaturecp.zh.yaml +118 -0
- package/AISB/catalog/aisb.t3.096_m3svm.yaml +189 -0
- package/AISB/catalog/aisb.t3.096_m3svm.zh.yaml +149 -0
- package/AISB/catalog/aisb.t3.097_wassersteintl.yaml +212 -0
- package/AISB/catalog/aisb.t3.097_wassersteintl.zh.yaml +169 -0
- package/AISB/catalog/aisb.t3.098_xmahalanobis.yaml +171 -0
- package/AISB/catalog/aisb.t3.098_xmahalanobis.zh.yaml +127 -0
- package/AISB/catalog/aisb.t3.099_ollalanding.yaml +248 -0
- package/AISB/catalog/aisb.t3.099_ollalanding.zh.yaml +182 -0
- package/AISB/catalog/aisb.t3.100_invmissingdata.yaml +179 -0
- package/AISB/catalog/aisb.t3.100_invmissingdata.zh.yaml +150 -0
- package/AISB/catalog/aisb.t3.101_acia.yaml +164 -0
- package/AISB/catalog/aisb.t3.101_acia.zh.yaml +109 -0
- package/AISB/catalog/aisb.t3.102_stochasticff.yaml +178 -0
- package/AISB/catalog/aisb.t3.102_stochasticff.zh.yaml +130 -0
- package/AISB/catalog/aisb.t3.103_qdcp.yaml +150 -0
- package/AISB/catalog/aisb.t3.103_qdcp.zh.yaml +116 -0
- package/AISB/catalog/aisb.t3.104_balancedactiveinf.yaml +137 -0
- package/AISB/catalog/aisb.t3.104_balancedactiveinf.zh.yaml +104 -0
- package/AISB/catalog/aisb.t3.105_binaryclasseval.yaml +161 -0
- package/AISB/catalog/aisb.t3.105_binaryclasseval.zh.yaml +130 -0
- package/AISB/image/001_aisb.t3.001_savvy.jpg +0 -0
- package/AISB/image/002_aisb.t3.002_pinet.jpg +0 -0
- package/AISB/image/003_aisb.t3.003_dmsqd.jpg +0 -0
- package/AISB/image/004_aisb.t3.004_decentralattn.jpg +0 -0
- package/AISB/image/005_aisb.t3.005_tsae.jpg +0 -0
- package/AISB/image/006_aisb.t3.006_physense.jpg +0 -0
- package/AISB/image/007_aisb.t3.007_reasoningiqa.jpg +0 -0
- package/AISB/image/008_aisb.t3.008_meanflows.jpg +0 -0
- package/AISB/image/009_aisb.t3.009_scoremissing.jpg +0 -0
- package/AISB/image/010_aisb.t3.010_suitabilityfilter.jpg +0 -0
- package/AISB/image/011_aisb.t3.011_osd.jpg +0 -0
- package/AISB/image/012_aisb.t3.012_efficientqat.jpg +0 -0
- package/AISB/image/013_aisb.t3.013_appl.jpg +0 -0
- package/AISB/image/014_aisb.t3.014_piguard.jpg +0 -0
- package/AISB/image/015_aisb.t3.015_frspec.jpg +0 -0
- package/AISB/image/016_aisb.t3.016_mathfusion.jpg +0 -0
- package/AISB/image/017_aisb.t3.017_multimodalglp.jpg +0 -0
- package/AISB/image/018_aisb.t3.018_cotsynth.jpg +0 -0
- package/AISB/image/019_aisb.t3.019_dyscaleut.jpg +0 -0
- package/AISB/image/020_aisb.t3.020_aristotle.jpg +0 -0
- package/AISB/image/021_aisb.t3.021_tokenrecycling.jpg +0 -0
- package/AISB/image/022_aisb.t3.022_chainofreasoning.jpg +0 -0
- package/AISB/image/023_aisb.t3.023_guidedembed.jpg +0 -0
- package/AISB/image/024_aisb.t3.024_outputcentric.jpg +0 -0
- package/AISB/image/025_aisb.t3.025_deeper.jpg +0 -0
- package/AISB/image/026_aisb.t3.026_gartkg.jpg +0 -0
- package/AISB/image/027_aisb.t3.027_citeeval.jpg +0 -0
- package/AISB/image/028_aisb.t3.028_sbam.jpg +0 -0
- package/AISB/image/029_aisb.t3.029_cdqgeoembed.jpg +0 -0
- package/AISB/image/030_aisb.t3.030_processrm.jpg +0 -0
- package/AISB/image/031_aisb.t3.031_circuitstability.jpg +0 -0
- package/AISB/image/032_aisb.t3.032_ptsolver.jpg +0 -0
- package/AISB/image/033_aisb.t3.033_gcse.jpg +0 -0
- package/AISB/image/034_aisb.t3.034_ensemblewm.jpg +0 -0
- package/AISB/image/035_aisb.t3.035_moralvalueswa.jpg +0 -0
- package/AISB/image/036_aisb.t3.036_weakstrongpref.jpg +0 -0
- package/AISB/image/037_aisb.t3.037_dementiamask.jpg +0 -0
- package/AISB/image/038_aisb.t3.038_tinysam.jpg +0 -0
- package/AISB/image/039_aisb.t3.039_calf.jpg +0 -0
- package/AISB/image/040_aisb.t3.040_graniteguardian.jpg +0 -0
- package/AISB/image/041_aisb.t3.041_amdm.jpg +0 -0
- package/AISB/image/042_aisb.t3.042_xpatch.jpg +0 -0
- package/AISB/image/043_aisb.t3.043_vhm.jpg +0 -0
- package/AISB/image/044_aisb.t3.044_rgvi.jpg +0 -0
- package/AISB/image/045_aisb.t3.045_pslstm.jpg +0 -0
- package/AISB/image/046_aisb.t3.046_nonstatts.jpg +0 -0
- package/AISB/image/047_aisb.t3.047_timepfn.jpg +0 -0
- package/AISB/image/048_aisb.t3.048_proxyspex.jpg +0 -0
- package/AISB/image/049_aisb.t3.049_hogwildinference.jpg +0 -0
- package/AISB/image/050_aisb.t3.050_causalpfn.jpg +0 -0
- package/AISB/image/051_aisb.t3.051_flashtp.jpg +0 -0
- package/AISB/image/052_aisb.t3.052_nsdiff.jpg +0 -0
- package/AISB/image/053_aisb.t3.053_k2vae.jpg +0 -0
- package/AISB/image/054_aisb.t3.054_timebase.jpg +0 -0
- package/AISB/image/055_aisb.t3.055_csbrain.jpg +0 -0
- package/AISB/image/056_aisb.t3.056_infosam.jpg +0 -0
- package/AISB/image/057_aisb.t3.057_mdreid.jpg +0 -0
- package/AISB/image/058_aisb.t3.058_mindglitch.jpg +0 -0
- package/AISB/image/059_aisb.t3.059_selfsupervised.jpg +0 -0
- package/AISB/image/060_aisb.t3.060_iaggad.jpg +0 -0
- package/AISB/image/061_aisb.t3.061_hsgkn.jpg +0 -0
- package/AISB/image/062_aisb.t3.062_visionts.jpg +0 -0
- package/AISB/image/063_aisb.t3.063_tsrag.jpg +0 -0
- package/AISB/image/064_aisb.t3.064_pir.jpg +0 -0
- package/AISB/image/065_aisb.t3.065_proteinbinding.jpg +0 -0
- package/AISB/image/066_aisb.t3.066_tropicalattention.jpg +0 -0
- package/AISB/image/067_aisb.t3.067_kanad.jpg +0 -0
- package/AISB/image/068_aisb.t3.068_sempo.jpg +0 -0
- package/AISB/image/069_aisb.t3.069_treehfd.jpg +0 -0
- package/AISB/image/070_aisb.t3.070_certifiedunlearning.jpg +0 -0
- package/AISB/image/071_aisb.t3.071_neuralmjd.jpg +0 -0
- package/AISB/image/072_aisb.t3.072_fedgmt.jpg +0 -0
- package/AISB/image/073_aisb.t3.073_rld.jpg +0 -0
- package/AISB/image/074_aisb.t3.074_lsvi.jpg +0 -0
- package/AISB/image/075_aisb.t3.075_treeslicedentropy.jpg +0 -0
- package/AISB/image/076_aisb.t3.076_aanet.jpg +0 -0
- package/AISB/image/077_aisb.t3.077_cmnn.jpg +0 -0
- package/AISB/image/078_aisb.t3.078_conformalanomaly.jpg +0 -0
- package/AISB/image/079_aisb.t3.079_dpfkmeans.jpg +0 -0
- package/AISB/image/080_aisb.t3.080_latentscorereweight.jpg +0 -0
- package/AISB/image/081_aisb.t3.081_qmamba.jpg +0 -0
- package/AISB/image/082_aisb.t3.082_onlinellmrouting.jpg +0 -0
- package/AISB/image/083_aisb.t3.083_starformer.jpg +0 -0
- package/AISB/image/084_aisb.t3.084_ift.jpg +0 -0
- package/AISB/image/085_aisb.t3.085_neuralsurv.jpg +0 -0
- package/AISB/image/086_aisb.t3.086_stella.jpg +0 -0
- package/AISB/image/087_aisb.t3.087_moses.jpg +0 -0
- package/AISB/image/088_aisb.t3.088_channelnorm.jpg +0 -0
- package/AISB/image/089_aisb.t3.089_causalvelocity.jpg +0 -0
- package/AISB/image/090_aisb.t3.090_rstib.jpg +0 -0
- package/AISB/image/091_aisb.t3.091_timeawarecausal.jpg +0 -0
- package/AISB/image/092_aisb.t3.092_kmeanslocalopt.jpg +0 -0
- package/AISB/image/093_aisb.t3.093_fedwmsam.jpg +0 -0
- package/AISB/image/094_aisb.t3.094_boundre.jpg +0 -0
- package/AISB/image/095_aisb.t3.095_fastfeaturecp.jpg +0 -0
- package/AISB/image/096_aisb.t3.096_m3svm.jpg +0 -0
- package/AISB/image/097_aisb.t3.097_wassersteintl.jpg +0 -0
- package/AISB/image/098_aisb.t3.098_xmahalanobis.jpg +0 -0
- package/AISB/image/099_aisb.t3.099_ollalanding.jpg +0 -0
- package/AISB/image/100_aisb.t3.100_invmissingdata.jpg +0 -0
- package/AISB/image/101_aisb.t3.101_acia.jpg +0 -0
- package/AISB/image/102_aisb.t3.102_stochasticff.jpg +0 -0
- package/AISB/image/103_aisb.t3.103_qdcp.jpg +0 -0
- package/AISB/image/104_aisb.t3.104_balancedactiveinf.jpg +0 -0
- package/AISB/image/105_aisb.t3.105_binaryclasseval.jpg +0 -0
- package/AISB/image/106_aisb.t1.reasoning_lite.jpg +0 -0
- package/AISB/image/107_aisb.t2.paper_audit.jpg +0 -0
- package/AISB/image/108_aisb.t3.multi_gpu_search.jpg +0 -0
- package/AISB/image/109_aisb.t3.tdc_admet.jpg +0 -0
- package/AISB/image/aisb.b1.agentic_coding.svg +16 -0
- package/AISB/image/aisb.b10.climate_earth.svg +16 -0
- package/AISB/image/aisb.b11.model_efficiency.svg +16 -0
- package/AISB/image/aisb.b12.embodied_ai.svg +16 -0
- package/AISB/image/aisb.b2.agent_systems.svg +16 -0
- package/AISB/image/aisb.b3.self_evolving_rl.svg +16 -0
- package/AISB/image/aisb.b4.lm_reasoning.svg +16 -0
- package/AISB/image/aisb.b5.math_proof.svg +16 -0
- package/AISB/image/aisb.b6.research_process.svg +16 -0
- package/AISB/image/aisb.b7.multimodal_fusion.svg +16 -0
- package/AISB/image/aisb.b8.lifesci_drug.svg +16 -0
- package/AISB/image/aisb.b9.material_science.svg +16 -0
- package/README.md +196 -32
- package/bin/ds.js +924 -66
- package/docs/en/00_QUICK_START.md +195 -18
- package/docs/en/01_SETTINGS_REFERENCE.md +468 -96
- package/docs/en/02_START_RESEARCH_GUIDE.md +26 -5
- package/docs/en/03_QQ_CONNECTOR_GUIDE.md +14 -3
- package/docs/en/04_LINGZHU_CONNECTOR_GUIDE.md +2 -0
- package/docs/en/05_TUI_GUIDE.md +171 -2
- package/docs/en/07_MEMORY_AND_MCP.md +38 -2
- package/docs/en/09_DOCTOR.md +78 -7
- package/docs/en/10_WEIXIN_CONNECTOR_GUIDE.md +38 -1
- package/docs/en/11_LICENSE_AND_RISK.md +4 -0
- package/docs/en/12_GUIDED_WORKFLOW_TOUR.md +15 -0
- package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +9 -0
- package/docs/en/15_CODEX_PROVIDER_SETUP.md +624 -180
- package/docs/en/16_TELEGRAM_CONNECTOR_GUIDE.md +14 -0
- package/docs/en/17_WHATSAPP_CONNECTOR_GUIDE.md +14 -0
- package/docs/en/18_FEISHU_CONNECTOR_GUIDE.md +14 -0
- package/docs/en/21_LOCAL_MODEL_BACKENDS_GUIDE.md +386 -0
- package/docs/en/22_BENCHSTORE_YAML_REFERENCE.md +469 -0
- package/docs/en/23_BENCHSTORE_GITHUB_RELEASES_SPEC.md +316 -0
- package/docs/en/24_CLAUDE_CODE_PROVIDER_SETUP.md +469 -0
- package/docs/en/25_OPENCODE_PROVIDER_SETUP.md +653 -0
- package/docs/en/26_CITATION_AND_ATTRIBUTION.md +119 -0
- package/docs/en/27_KIMI_CODE_PROVIDER_SETUP.md +180 -0
- package/docs/en/28_DISCORD_CONNECTOR_GUIDE.md +61 -0
- package/docs/en/29_SLACK_CONNECTOR_GUIDE.md +60 -0
- package/docs/en/30_SETTINGS_CONTROL_CENTER_GUIDE.md +371 -0
- package/docs/en/{19_LOCAL_BROWSER_AUTH.md → 31_LOCAL_BROWSER_AUTH.md} +1 -1
- package/docs/en/32_WINDOWS_WSL2_DEPLOYMENT_GUIDE.md +273 -0
- package/docs/en/33_WORKSPACE_EXPLORER_QA.md +121 -0
- package/docs/en/91_DEVELOPMENT.md +266 -0
- package/docs/en/99_ACKNOWLEDGEMENTS.md +24 -19
- package/docs/en/README.md +48 -7
- package/docs/images/admin/admin-connectors-health-en.png +0 -0
- package/docs/images/admin/admin-controllers-en.png +0 -0
- package/docs/images/admin/admin-diagnostics-en.png +0 -0
- package/docs/images/admin/admin-errors-en.png +0 -0
- package/docs/images/admin/admin-issues-en.png +0 -0
- package/docs/images/admin/admin-logs-en.png +0 -0
- package/docs/images/admin/admin-quest-detail-en.png +0 -0
- package/docs/images/admin/admin-quests-en.png +0 -0
- package/docs/images/admin/admin-repairs-en.png +0 -0
- package/docs/images/admin/admin-runtime-en.png +0 -0
- package/docs/images/admin/admin-search-en.png +0 -0
- package/docs/images/admin/admin-stats-en.png +0 -0
- package/docs/images/admin/admin-summary-en.png +0 -0
- package/docs/images/connectors/connector-discord-en.png +0 -0
- package/docs/images/connectors/connector-feishu-en.png +0 -0
- package/docs/images/connectors/connector-lingzhu-en.png +0 -0
- package/docs/images/connectors/connector-qq-en.png +0 -0
- package/docs/images/connectors/connector-slack-en.png +0 -0
- package/docs/images/connectors/connector-telegram-en.png +0 -0
- package/docs/images/connectors/connector-weixin-en.png +0 -0
- package/docs/images/connectors/connector-whatsapp-en.png +0 -0
- package/docs/images/settings/settings-baselines-en.png +0 -0
- package/docs/images/settings/settings-config-en.png +0 -0
- package/docs/images/settings/settings-connectors-overview-en.png +0 -0
- package/docs/images/settings/settings-deepxiv-en.png +0 -0
- package/docs/images/settings/settings-mcp-servers-en.png +0 -0
- package/docs/images/settings/settings-plugins-en.png +0 -0
- package/docs/images/settings/settings-runners-en.png +0 -0
- package/docs/zh/00_QUICK_START.md +142 -18
- package/docs/zh/01_SETTINGS_REFERENCE.md +219 -98
- package/docs/zh/02_START_RESEARCH_GUIDE.md +26 -5
- package/docs/zh/05_TUI_GUIDE.md +171 -2
- package/docs/zh/07_MEMORY_AND_MCP.md +29 -2
- package/docs/zh/09_DOCTOR.md +54 -8
- package/docs/zh/10_WEIXIN_CONNECTOR_GUIDE.md +24 -1
- package/docs/zh/11_LICENSE_AND_RISK.md +4 -0
- package/docs/zh/12_GUIDED_WORKFLOW_TOUR.md +15 -0
- package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +9 -0
- package/docs/zh/15_CODEX_PROVIDER_SETUP.md +552 -181
- package/docs/zh/21_LOCAL_MODEL_BACKENDS_GUIDE.md +384 -0
- package/docs/zh/22_BENCHSTORE_YAML_REFERENCE.md +459 -0
- package/docs/zh/23_BENCHSTORE_GITHUB_RELEASES_SPEC.md +287 -0
- package/docs/zh/23_CLAUDE_RUNNER_GUIDE.md +103 -0
- package/docs/zh/24_CLAUDE_CODE_PROVIDER_SETUP.md +460 -0
- package/docs/zh/25_OPENCODE_PROVIDER_SETUP.md +660 -0
- package/docs/zh/26_CITATION_AND_ATTRIBUTION.md +102 -0
- package/docs/zh/27_KIMI_CODE_PROVIDER_SETUP.md +51 -0
- package/docs/zh/{19_LOCAL_BROWSER_AUTH.md → 31_LOCAL_BROWSER_AUTH.md} +1 -1
- package/docs/zh/32_WINDOWS_WSL2_DEPLOYMENT_GUIDE.md +264 -0
- package/docs/zh/33_WORKSPACE_EXPLORER_QA.md +127 -0
- package/docs/zh/99_ACKNOWLEDGEMENTS.md +23 -19
- package/docs/zh/README.md +33 -7
- package/install.sh +168 -20
- package/package.json +5 -1
- package/pyproject.toml +2 -1
- package/src/deepscientist/__init__.py +1 -1
- package/src/deepscientist/acp/envelope.py +13 -0
- package/src/deepscientist/admin/__init__.py +3 -0
- package/src/deepscientist/admin/charts.py +681 -0
- package/src/deepscientist/admin/logs.py +119 -0
- package/src/deepscientist/admin/repairs.py +217 -0
- package/src/deepscientist/admin/service.py +1310 -0
- package/src/deepscientist/admin/system_info.py +700 -0
- package/src/deepscientist/admin/tasks.py +465 -0
- package/src/deepscientist/admin/tool_metrics.py +600 -0
- package/src/deepscientist/artifact/guidance.py +8 -4
- package/src/deepscientist/artifact/schemas.py +115 -0
- package/src/deepscientist/artifact/service.py +4268 -260
- package/src/deepscientist/bash_exec/monitor.py +30 -3
- package/src/deepscientist/bash_exec/service.py +134 -1
- package/src/deepscientist/benchstore/__init__.py +4 -0
- package/src/deepscientist/benchstore/prompt_builder.py +224 -0
- package/src/deepscientist/benchstore/service.py +1716 -0
- package/src/deepscientist/bridges/connectors.py +8 -2
- package/src/deepscientist/channels/weixin_ilink.py +8 -1
- package/src/deepscientist/cli.py +92 -17
- package/src/deepscientist/codex_cli_compat.py +187 -74
- package/src/deepscientist/config/models.py +82 -11
- package/src/deepscientist/config/service.py +1077 -93
- package/src/deepscientist/connector/weixin_support.py +48 -17
- package/src/deepscientist/daemon/api/handlers.py +827 -235
- package/src/deepscientist/daemon/api/router.py +81 -1
- package/src/deepscientist/daemon/app.py +1512 -85
- package/src/deepscientist/diagnostics/__init__.py +6 -0
- package/src/deepscientist/diagnostics/runner_failures.py +277 -0
- package/src/deepscientist/doctor.py +407 -56
- package/src/deepscientist/evidence_packets.py +590 -0
- package/src/deepscientist/home.py +52 -4
- package/src/deepscientist/kimi_cli_compat.py +50 -0
- package/src/deepscientist/latex_runtime.py +2 -2
- package/src/deepscientist/mcp/context.py +2 -0
- package/src/deepscientist/mcp/schemas.py +114 -0
- package/src/deepscientist/mcp/server.py +1566 -126
- package/src/deepscientist/memory/service.py +203 -16
- package/src/deepscientist/process_control.py +8 -1
- package/src/deepscientist/prompts/builder.py +850 -88
- package/src/deepscientist/quest/__init__.py +2 -2
- package/src/deepscientist/quest/layout.py +12 -1
- package/src/deepscientist/quest/node_traces.py +10 -0
- package/src/deepscientist/quest/service.py +1852 -161
- package/src/deepscientist/quest/stage_views.py +1 -1
- package/src/deepscientist/runners/__init__.py +18 -0
- package/src/deepscientist/runners/base.py +89 -1
- package/src/deepscientist/runners/builtins.py +13 -1
- package/src/deepscientist/runners/claude.py +391 -0
- package/src/deepscientist/runners/codex.py +480 -35
- package/src/deepscientist/runners/codex_telemetry.py +127 -0
- package/src/deepscientist/runners/kimi.py +334 -0
- package/src/deepscientist/runners/metadata.py +68 -0
- package/src/deepscientist/runners/opencode.py +414 -0
- package/src/deepscientist/runners/runtime_overrides.py +100 -0
- package/src/deepscientist/runners/simple_cli.py +538 -0
- package/src/deepscientist/runtime_storage.py +303 -0
- package/src/deepscientist/shared.py +80 -16
- package/src/deepscientist/skills/installer.py +37 -0
- package/src/deepscientist/skills/registry.py +2 -0
- package/src/deepscientist/tinytex.py +2 -2
- package/src/deepscientist/tui.py +10 -3
- package/src/prompts/benchstore/system.md +77 -0
- package/src/prompts/connectors/qq.md +33 -2
- package/src/prompts/connectors/weixin.md +208 -23
- package/src/prompts/contracts/admin_ops.md +74 -0
- package/src/prompts/contracts/admin_ops_knowledge.md +138 -0
- package/src/prompts/contracts/shared_interaction.md +5 -10
- package/src/prompts/start_setup/system.md +422 -0
- package/src/prompts/system.md +411 -304
- package/src/prompts/system_copilot.md +89 -0
- package/src/skills/analysis-campaign/SKILL.md +239 -578
- package/src/skills/analysis-campaign/references/artifact-flow-examples.md +102 -0
- package/src/skills/analysis-campaign/references/boundary-cases.md +98 -0
- package/src/skills/analysis-campaign/references/campaign-checklist-template.md +39 -24
- package/src/skills/analysis-campaign/references/campaign-design.md +26 -10
- package/src/skills/analysis-campaign/references/campaign-plan-template.md +53 -54
- package/src/skills/analysis-campaign/references/operational-guidance.md +97 -0
- package/src/skills/analysis-campaign/references/writing-facing-slice-examples.md +10 -20
- package/src/skills/baseline/SKILL.md +183 -461
- package/src/skills/baseline/references/artifact-flow-examples.md +106 -0
- package/src/skills/baseline/references/artifact-payload-examples.md +1 -1
- package/src/skills/baseline/references/baseline-checklist-template.md +27 -35
- package/src/skills/baseline/references/baseline-plan-template.md +37 -76
- package/src/skills/baseline/references/boundary-cases.md +86 -0
- package/src/skills/baseline/references/codebase-audit-checklist.md +2 -6
- package/src/skills/baseline/references/comparability-contract.md +7 -12
- package/src/skills/baseline/references/operational-guidance.md +56 -0
- package/src/skills/baseline/references/route-selection.md +5 -25
- package/src/skills/decision/SKILL.md +113 -306
- package/src/skills/decision/references/checkpoint-memory-template.md +47 -0
- package/src/skills/decision/references/operational-guidance.md +94 -0
- package/src/skills/decision/references/research-route-criteria.md +7 -8
- package/src/skills/decision/references/strategic-decision-template.md +13 -26
- package/src/skills/experiment/SKILL.md +132 -670
- package/src/skills/experiment/references/execution-playbook.md +374 -0
- package/src/skills/experiment/references/main-experiment-checklist-template.md +26 -2
- package/src/skills/experiment/references/main-experiment-plan-template.md +28 -17
- package/src/skills/experiment/references/operational-guidance.md +108 -0
- package/src/skills/finalize/SKILL.md +62 -0
- package/src/skills/finalize/references/checkpoint-memory-template.md +49 -0
- package/src/skills/finalize/references/resume-packet-template.md +7 -0
- package/src/skills/idea/SKILL.md +228 -15
- package/src/skills/idea/references/controlled-brainstorming-playbook.md +78 -0
- package/src/skills/idea/references/current-board-packet-template.md +61 -0
- package/src/skills/idea/references/high-value-idea-sourcing.md +119 -0
- package/src/skills/idea/references/idea-generation-playbook.md +21 -0
- package/src/skills/idea/references/idea-thinking-flow.md +6 -0
- package/src/skills/idea/references/literature-survey-template.md +3 -0
- package/src/skills/idea/references/objective-contract-template.md +54 -0
- package/src/skills/idea/references/outline-seeding-example.md +56 -0
- package/src/skills/idea/references/pre-idea-draft-template.md +105 -0
- package/src/skills/idea/references/related-work-playbook.md +75 -2
- package/src/skills/idea/references/research-history-playbook.md +114 -0
- package/src/skills/idea/references/selection-gate.md +58 -6
- package/src/skills/intake-audit/SKILL.md +43 -2
- package/src/skills/intake-audit/references/state-audit-template.md +10 -0
- package/src/skills/nature-data/SKILL.md +128 -0
- package/src/skills/nature-data/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-data/agents/openai.yaml +4 -0
- package/src/skills/nature-data/references/chinese-author-alignment.md +84 -0
- package/src/skills/nature-data/references/fair-metadata-checklist.md +105 -0
- package/src/skills/nature-data/references/policy-principles.md +103 -0
- package/src/skills/nature-data/references/repository-and-identifiers.md +96 -0
- package/src/skills/nature-data/references/source-basis.md +54 -0
- package/src/skills/nature-data/references/statement-patterns.md +153 -0
- package/src/skills/nature-figure/SKILL.md +197 -0
- package/src/skills/nature-figure/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-figure/agents/openai.yaml +4 -0
- package/src/skills/nature-figure/evals/evals.json +37 -0
- package/src/skills/nature-figure/references/api.md +428 -0
- package/src/skills/nature-figure/references/backend-selection.md +100 -0
- package/src/skills/nature-figure/references/chart-types.md +281 -0
- package/src/skills/nature-figure/references/common-patterns.md +349 -0
- package/src/skills/nature-figure/references/design-theory.md +436 -0
- package/src/skills/nature-figure/references/figure-contract.md +93 -0
- package/src/skills/nature-figure/references/nature-2026-observations.md +112 -0
- package/src/skills/nature-figure/references/qa-contract.md +119 -0
- package/src/skills/nature-figure/references/r-template-index.md +66 -0
- package/src/skills/nature-figure/references/r-workflow.md +161 -0
- package/src/skills/nature-figure/references/tutorials.md +250 -0
- package/src/skills/nature-paper2ppt/SKILL.md +507 -0
- package/src/skills/nature-paper2ppt/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-paper2ppt/agents/openai.yaml +4 -0
- package/src/skills/nature-polishing/SKILL.md +385 -0
- package/src/skills/nature-polishing/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-polishing/agents/openai.yaml +4 -0
- package/src/skills/nature-polishing/references/phrasebank-playbook.md +162 -0
- package/src/skills/nature-polishing/references/section-moves.md +240 -0
- package/src/skills/nature-polishing/references/style-guardrails.md +94 -0
- package/src/skills/nature-polishing/references/writing-strategy.md +148 -0
- package/src/skills/optimize/SKILL.md +177 -1568
- package/src/skills/optimize/references/brief-shaping-playbook.md +95 -0
- package/src/skills/optimize/references/candidate-board-template.md +13 -0
- package/src/skills/optimize/references/candidate-ranking-template.md +51 -0
- package/src/skills/optimize/references/codegen-route-playbook.md +50 -0
- package/src/skills/optimize/references/debug-response-template.md +29 -0
- package/src/skills/optimize/references/frontier-review-template.md +32 -0
- package/src/skills/optimize/references/fusion-playbook.md +36 -0
- package/src/skills/optimize/references/method-brief-template.md +73 -0
- package/src/skills/optimize/references/operational-guidance.md +621 -0
- package/src/skills/optimize/references/optimization-memory-template.md +30 -0
- package/src/skills/optimize/references/optimize-checklist-template.md +18 -0
- package/src/skills/optimize/references/plateau-response-playbook.md +28 -0
- package/src/skills/optimize/references/prompt-patterns.md +49 -0
- package/src/skills/paper-outline/SKILL.md +227 -0
- package/src/skills/paper-outline/references/outline-patterns.md +87 -0
- package/src/skills/paper-plot/SKILL.md +79 -0
- package/src/skills/paper-plot/agents/openai.yaml +4 -0
- package/src/skills/paper-plot/references/bar_grouped_hatch.md +96 -0
- package/src/skills/paper-plot/references/bar_paired_delta.md +72 -0
- package/src/skills/paper-plot/references/line_confidence_band.md +75 -0
- package/src/skills/paper-plot/references/line_loss_with_inset.md +65 -0
- package/src/skills/paper-plot/references/line_training_curve.md +44 -0
- package/src/skills/paper-plot/references/radar_dual_series.md +59 -0
- package/src/skills/paper-plot/references/scatter_broken_axis.md +59 -0
- package/src/skills/paper-plot/references/scatter_tsne_cluster.md +72 -0
- package/src/skills/paper-plot/scripts/bar_memevolve.py +109 -0
- package/src/skills/paper-plot/scripts/bar_spice.py +166 -0
- package/src/skills/paper-plot/scripts/line_aime.py +94 -0
- package/src/skills/paper-plot/scripts/line_loss_inset.py +157 -0
- package/src/skills/paper-plot/scripts/line_selfdistill.py +168 -0
- package/src/skills/paper-plot/scripts/radar_dora.py +151 -0
- package/src/skills/paper-plot/scripts/scatter_break.py +169 -0
- package/src/skills/paper-plot/scripts/scatter_tsne.py +133 -0
- package/src/skills/rebuttal/SKILL.md +9 -0
- package/src/skills/references/tool-usage-by-stage.md +438 -0
- package/src/skills/review/SKILL.md +105 -7
- package/src/skills/science/PROVENANCE.md +44 -0
- package/src/skills/science/SKILL.md +137 -0
- package/src/skills/science/references/artifact-science-tool.md +110 -0
- package/src/skills/science/references/claim-type-discipline.md +56 -0
- package/src/skills/science/references/domain-index.md +422 -0
- package/src/skills/science/references/hpc-via-bash-exec.md +42 -0
- package/src/skills/science/references/package-check-playbook.md +64 -0
- package/src/skills/science/references/package-index.min.json +3616 -0
- package/src/skills/science/references/packages/abinit.md +80 -0
- package/src/skills/science/references/packages/acts.md +73 -0
- package/src/skills/science/references/packages/aiida-core.md +80 -0
- package/src/skills/science/references/packages/alamode.md +80 -0
- package/src/skills/science/references/packages/amuse.md +88 -0
- package/src/skills/science/references/packages/anndata.md +88 -0
- package/src/skills/science/references/packages/arbor.md +80 -0
- package/src/skills/science/references/packages/arc.md +73 -0
- package/src/skills/science/references/packages/astropy.md +88 -0
- package/src/skills/science/references/packages/astroquery.md +88 -0
- package/src/skills/science/references/packages/atomate2.md +80 -0
- package/src/skills/science/references/packages/atomsmltr.md +73 -0
- package/src/skills/science/references/packages/awkward.md +73 -0
- package/src/skills/science/references/packages/batman.md +88 -0
- package/src/skills/science/references/packages/biopython.md +88 -0
- package/src/skills/science/references/packages/bloqade.md +73 -0
- package/src/skills/science/references/packages/brian2.md +73 -0
- package/src/skills/science/references/packages/bullet3.md +73 -0
- package/src/skills/science/references/packages/calculix.md +80 -0
- package/src/skills/science/references/packages/cantera.md +73 -0
- package/src/skills/science/references/packages/cavity-md-ipi.md +80 -0
- package/src/skills/science/references/packages/ccdproc.md +88 -0
- package/src/skills/science/references/packages/celerite2.md +88 -0
- package/src/skills/science/references/packages/cellrank.md +73 -0
- package/src/skills/science/references/packages/cesm.md +80 -0
- package/src/skills/science/references/packages/chemicals.md +73 -0
- package/src/skills/science/references/packages/chempy.md +73 -0
- package/src/skills/science/references/packages/cirq.md +73 -0
- package/src/skills/science/references/packages/coffea.md +73 -0
- package/src/skills/science/references/packages/cp2k.md +88 -0
- package/src/skills/science/references/packages/custodian.md +80 -0
- package/src/skills/science/references/packages/dart.md +73 -0
- package/src/skills/science/references/packages/datamol.md +88 -0
- package/src/skills/science/references/packages/dd4hep.md +73 -0
- package/src/skills/science/references/packages/dealii.md +80 -0
- package/src/skills/science/references/packages/deepchem.md +88 -0
- package/src/skills/science/references/packages/delphes.md +73 -0
- package/src/skills/science/references/packages/devito.md +80 -0
- package/src/skills/science/references/packages/dftb.md +88 -0
- package/src/skills/science/references/packages/dftd4.md +88 -0
- package/src/skills/science/references/packages/dftk-jl.md +80 -0
- package/src/skills/science/references/packages/dolfinx.md +80 -0
- package/src/skills/science/references/packages/drake.md +73 -0
- package/src/skills/science/references/packages/dumux.md +73 -0
- package/src/skills/science/references/packages/elk.md +80 -0
- package/src/skills/science/references/packages/elmerfem.md +80 -0
- package/src/skills/science/references/packages/enzo-e.md +88 -0
- package/src/skills/science/references/packages/espresso.md +80 -0
- package/src/skills/science/references/packages/exoplanet.md +88 -0
- package/src/skills/science/references/packages/fairroot.md +73 -0
- package/src/skills/science/references/packages/fbpic.md +80 -0
- package/src/skills/science/references/packages/fdtdbath-meep.md +80 -0
- package/src/skills/science/references/packages/geant4.md +73 -0
- package/src/skills/science/references/packages/geosx.md +80 -0
- package/src/skills/science/references/packages/gprmax.md +80 -0
- package/src/skills/science/references/packages/gromacs.md +80 -0
- package/src/skills/science/references/packages/gwaslab.md +73 -0
- package/src/skills/science/references/packages/gz-sim.md +73 -0
- package/src/skills/science/references/packages/hail.md +88 -0
- package/src/skills/science/references/packages/hiphive.md +80 -0
- package/src/skills/science/references/packages/hoomd-blue.md +80 -0
- package/src/skills/science/references/packages/itensor.md +73 -0
- package/src/skills/science/references/packages/itensors-jl.md +73 -0
- package/src/skills/science/references/packages/jdftx.md +73 -0
- package/src/skills/science/references/packages/jobflow.md +80 -0
- package/src/skills/science/references/packages/kadanoffbaym-jl.md +73 -0
- package/src/skills/science/references/packages/kite.md +80 -0
- package/src/skills/science/references/packages/kratos.md +80 -0
- package/src/skills/science/references/packages/kwant.md +73 -0
- package/src/skills/science/references/packages/lammps.md +80 -0
- package/src/skills/science/references/packages/lightkurve.md +88 -0
- package/src/skills/science/references/packages/limix.md +73 -0
- package/src/skills/science/references/packages/maxwelllink.md +80 -0
- package/src/skills/science/references/packages/mcdc.md +73 -0
- package/src/skills/science/references/packages/meep.md +80 -0
- package/src/skills/science/references/packages/mfem.md +80 -0
- package/src/skills/science/references/packages/mitgcm.md +73 -0
- package/src/skills/science/references/packages/modflow6.md +73 -0
- package/src/skills/science/references/packages/molecool.md +73 -0
- package/src/skills/science/references/packages/mom6.md +73 -0
- package/src/skills/science/references/packages/moose.md +80 -0
- package/src/skills/science/references/packages/mpas-model.md +73 -0
- package/src/skills/science/references/packages/mujoco.md +73 -0
- package/src/skills/science/references/packages/mumax3.md +73 -0
- package/src/skills/science/references/packages/nekrs.md +80 -0
- package/src/skills/science/references/packages/nessi.md +73 -0
- package/src/skills/science/references/packages/nest-simulator.md +73 -0
- package/src/skills/science/references/packages/netket.md +73 -0
- package/src/skills/science/references/packages/neuron.md +73 -0
- package/src/skills/science/references/packages/nextflow.md +88 -0
- package/src/skills/science/references/packages/nwchem.md +88 -0
- package/src/skills/science/references/packages/openbabel.md +88 -0
- package/src/skills/science/references/packages/openems.md +80 -0
- package/src/skills/science/references/packages/openff-toolkit.md +88 -0
- package/src/skills/science/references/packages/openfoam-dev.md +80 -0
- package/src/skills/science/references/packages/openmc.md +73 -0
- package/src/skills/science/references/packages/openmm.md +80 -0
- package/src/skills/science/references/packages/openmoc.md +73 -0
- package/src/skills/science/references/packages/openmx.md +80 -0
- package/src/skills/science/references/packages/opensees.md +80 -0
- package/src/skills/science/references/packages/opensn.md +80 -0
- package/src/skills/science/references/packages/opm-simulators.md +73 -0
- package/src/skills/science/references/packages/oqupy.md +73 -0
- package/src/skills/science/references/packages/packmol.md +80 -0
- package/src/skills/science/references/packages/palabos.md +80 -0
- package/src/skills/science/references/packages/parflow.md +80 -0
- package/src/skills/science/references/packages/pennylane.md +88 -0
- package/src/skills/science/references/packages/perceval.md +73 -0
- package/src/skills/science/references/packages/phono3py.md +73 -0
- package/src/skills/science/references/packages/phonopy.md +73 -0
- package/src/skills/science/references/packages/photutils.md +88 -0
- package/src/skills/science/references/packages/picongpu.md +80 -0
- package/src/skills/science/references/packages/plink-ng.md +88 -0
- package/src/skills/science/references/packages/precice.md +73 -0
- package/src/skills/science/references/packages/psc.md +80 -0
- package/src/skills/science/references/packages/psi4.md +88 -0
- package/src/skills/science/references/packages/pybinding.md +73 -0
- package/src/skills/science/references/packages/pyfr.md +80 -0
- package/src/skills/science/references/packages/pyhf.md +73 -0
- package/src/skills/science/references/packages/pyiron_base.md +80 -0
- package/src/skills/science/references/packages/pylcp.md +73 -0
- package/src/skills/science/references/packages/pylith.md +80 -0
- package/src/skills/science/references/packages/pynbody.md +88 -0
- package/src/skills/science/references/packages/pysam.md +88 -0
- package/src/skills/science/references/packages/pyscf.md +88 -0
- package/src/skills/science/references/packages/q-e.md +73 -0
- package/src/skills/science/references/packages/qibo.md +73 -0
- package/src/skills/science/references/packages/qiskit.md +73 -0
- package/src/skills/science/references/packages/quantica-jl.md +73 -0
- package/src/skills/science/references/packages/quantumoptics-jl.md +73 -0
- package/src/skills/science/references/packages/quimb.md +73 -0
- package/src/skills/science/references/packages/qulacs.md +73 -0
- package/src/skills/science/references/packages/qutip.md +73 -0
- package/src/skills/science/references/packages/rdkit.md +88 -0
- package/src/skills/science/references/packages/rmg-py.md +73 -0
- package/src/skills/science/references/packages/root.md +73 -0
- package/src/skills/science/references/packages/scanpy.md +88 -0
- package/src/skills/science/references/packages/scikit-allel.md +88 -0
- package/src/skills/science/references/packages/scikit-bio.md +88 -0
- package/src/skills/science/references/packages/scqubits.md +73 -0
- package/src/skills/science/references/packages/scuff-em.md +80 -0
- package/src/skills/science/references/packages/scvi-tools.md +73 -0
- package/src/skills/science/references/packages/seissol.md +73 -0
- package/src/skills/science/references/packages/sfepy.md +80 -0
- package/src/skills/science/references/packages/sisl.md +73 -0
- package/src/skills/science/references/packages/smilei.md +80 -0
- package/src/skills/science/references/packages/snakemake.md +88 -0
- package/src/skills/science/references/packages/specfem3d-globe.md +80 -0
- package/src/skills/science/references/packages/specutils.md +88 -0
- package/src/skills/science/references/packages/spglib.md +80 -0
- package/src/skills/science/references/packages/squidpy.md +88 -0
- package/src/skills/science/references/packages/starry.md +88 -0
- package/src/skills/science/references/packages/strawberryfields.md +73 -0
- package/src/skills/science/references/packages/su2.md +80 -0
- package/src/skills/science/references/packages/sunny-jl.md +73 -0
- package/src/skills/science/references/packages/sw4.md +73 -0
- package/src/skills/science/references/packages/swift.md +88 -0
- package/src/skills/science/references/packages/tdnegf.md +73 -0
- package/src/skills/science/references/packages/tenpy.md +73 -0
- package/src/skills/science/references/packages/thermo.md +73 -0
- package/src/skills/science/references/packages/tkwant.md +73 -0
- package/src/skills/science/references/packages/tvb-root.md +73 -0
- package/src/skills/science/references/packages/uproot5.md +73 -0
- package/src/skills/science/references/packages/vampire.md +80 -0
- package/src/skills/science/references/packages/wannier_tools.md +73 -0
- package/src/skills/science/references/packages/warpx.md +80 -0
- package/src/skills/science/references/packages/wrf.md +73 -0
- package/src/skills/science/references/packages/xtb.md +88 -0
- package/src/skills/science/references/packages/yt.md +73 -0
- package/src/skills/science/references/science-task-brief-template.md +71 -0
- package/src/skills/scout/SKILL.md +83 -425
- package/src/skills/scout/references/literature-scout-template.md +5 -24
- package/src/skills/scout/references/operational-guidance.md +191 -0
- package/src/skills/scout/references/paper-triage-playbook.md +11 -35
- package/src/skills/write/SKILL.md +744 -1246
- package/src/skills/write/references/experiments_analysis_patterns.md +129 -0
- package/src/skills/write/references/oral_package_patterns.md +252 -0
- package/src/skills/write/references/oral_writing_principles.md +291 -0
- package/src/skills/write/references/section_rewrite_checklist.md +234 -0
- package/src/tui/dist/app/AppContainer.js +1314 -27
- package/src/tui/dist/components/Composer.js +26 -1
- package/src/tui/dist/components/ConfigScreen.js +2 -1
- package/src/tui/dist/components/InputPrompt.js +25 -9
- package/src/tui/dist/components/MainContent.js +18 -3
- package/src/tui/dist/components/QuestScreen.js +3 -2
- package/src/tui/dist/components/UtilityScreen.js +37 -0
- package/src/tui/dist/hooks/useSafeInput.js +10 -0
- package/src/tui/dist/index.js +13 -1
- package/src/tui/dist/layouts/DefaultAppLayout.js +11 -8
- package/src/tui/dist/lib/api.js +89 -1
- package/src/tui/package.json +1 -1
- package/src/ui/dist/assets/{AnalysisPlugin-DnSm0GZn.js → AnalysisPlugin-CA94NGmI.js} +1 -1
- package/src/ui/dist/assets/CliPlugin-DHBzphZU.js +79 -0
- package/src/ui/dist/assets/CodeEditorPlugin-BOFwD2rn.js +2 -0
- package/src/ui/dist/assets/{CodeViewerPlugin-itb0tltR.js → CodeViewerPlugin-CqDpgjik.js} +4 -4
- package/src/ui/dist/assets/{DocViewerPlugin-DqKkiCI6.js → DocViewerPlugin-UDBgt8-4.js} +3 -3
- package/src/ui/dist/assets/GitCommitViewerPlugin-BmHtZ0bZ.js +6 -0
- package/src/ui/dist/assets/{GitDiffViewerPlugin-DxL2ezFG.js → GitDiffViewerPlugin-CAxjNorQ.js} +2 -2
- package/src/ui/dist/assets/{GitSnapshotViewer-B_RQm1YZ.js → GitSnapshotViewer-CweA6VON.js} +2 -2
- package/src/ui/dist/assets/{ImageViewerPlugin-tHqlXY3n.js → ImageViewerPlugin-C8wHGvGN.js} +5 -5
- package/src/ui/dist/assets/LabPlugin-COyyLUol.js +32 -0
- package/src/ui/dist/assets/{LatexPlugin-B495DTXC.js → LatexPlugin-BQjAaA5J.js} +4 -4
- package/src/ui/dist/assets/{MarkdownViewerPlugin-DG28-61B.js → MarkdownViewerPlugin-Dy1NE2dI.js} +3 -3
- package/src/ui/dist/assets/{MarketplacePlugin-BiOGT-Kj.js → MarketplacePlugin-DMIZtEJ2.js} +2 -2
- package/src/ui/dist/assets/NotebookEditor-CFHMq_Qt.js +91 -0
- package/src/ui/dist/assets/{NotebookEditor-CVsj8h_T.js → NotebookEditor-WFyd8Ybt.js} +23 -23
- package/src/ui/dist/assets/{PdfLoader-CASDQmxJ.js → PdfLoader-CLE5u5TS.js} +3 -3
- package/src/ui/dist/assets/{PdfMarkdownPlugin-BFhwoKsY.js → PdfMarkdownPlugin-_iNK_H83.js} +1 -1
- package/src/ui/dist/assets/PdfViewerPlugin-DgWsbInT.js +22 -0
- package/src/ui/dist/assets/SearchPlugin-DrZmn5iw.js +11 -0
- package/src/ui/dist/assets/{TextViewerPlugin-CB4DYfWO.js → TextViewerPlugin-D1-T3aC7.js} +4 -4
- package/src/ui/dist/assets/branding/runner-claude.svg +107 -0
- package/src/ui/dist/assets/branding/runner-codex.svg +10 -0
- package/src/ui/dist/assets/branding/runner-kimi.svg +14 -0
- package/src/ui/dist/assets/branding/runner-opencode.svg +7 -0
- package/src/ui/dist/assets/cli-store-CoZ-x5Ip.js +1 -0
- package/src/ui/dist/assets/{code-DLC6G24T.js → code-DbsmSd3Y.js} +1 -1
- package/src/ui/dist/assets/file-diff-panel-DsvyRz47.js +1 -0
- package/src/ui/dist/assets/{wrap-text-CwMn-iqb.js → file-jump-queue-DeQBikaw.js} +3 -3
- package/src/ui/dist/assets/{file-socket-Cu4Qln7Y.js → file-socket-DA5XIx88.js} +1 -1
- package/src/ui/dist/assets/fonts/ds-fonts.css +50 -4
- package/src/ui/dist/assets/images/deepxiv/register-guide.png +0 -0
- package/src/ui/dist/assets/index-39vY9LmZ.js +1 -0
- package/src/ui/dist/assets/{index-wQ7RIIRd.js → index-BsO46tJA.js} +1 -1
- package/src/ui/dist/assets/index-CHzJ2xtB.js +3530 -0
- package/src/ui/dist/assets/index-DH-zxoZ3.css +33 -0
- package/src/ui/dist/assets/{plugin-notebook-HbW2K-1c.js → plugin-notebook-JRhysCqj.js} +2 -2
- package/src/ui/dist/assets/{project-sync-CsX08Qno.js → project-sync-DPmWKmKD.js} +1 -1
- package/src/ui/dist/assets/{zoom-out-R-GWEhzS.js → zoom-out-DAukFWen.js} +3 -3
- package/src/ui/dist/index.html +3 -3
- package/src/skills/analysis-campaign/references/artifact-orchestration.md +0 -58
- package/src/skills/baseline/references/memory-playbook.md +0 -40
- package/src/skills/baseline/references/publishable-baseline-package.md +0 -30
- package/src/skills/write/references/outline-evidence-contract-example.md +0 -107
- package/src/skills/write/references/paper-experiment-matrix-template.md +0 -131
- package/src/skills/write/references/paper-section-playbook.md +0 -64
- package/src/skills/write/references/reviewer-first-writing.md +0 -64
- package/src/skills/write/references/revision-checklist.md +0 -70
- package/src/skills/write/references/section-contracts.md +0 -82
- package/src/skills/write/references/sentence-level-proofing.md +0 -49
- package/src/ui/dist/assets/AiManusChatView-COFACy7V.js +0 -204
- package/src/ui/dist/assets/CliPlugin-CvwCmDQ5.js +0 -109
- package/src/ui/dist/assets/CodeEditorPlugin-cOqSa0xq.js +0 -2
- package/src/ui/dist/assets/GitCommitViewerPlugin-DVgNHBCS.js +0 -1
- package/src/ui/dist/assets/LabCopilotPanel-ClMbq5Yu.js +0 -14
- package/src/ui/dist/assets/LabPlugin-L_SuE8ow.js +0 -22
- package/src/ui/dist/assets/NotebookEditor-C-4Kt1p9.js +0 -81
- package/src/ui/dist/assets/PdfViewerPlugin-DcOzU9vd.js +0 -17
- package/src/ui/dist/assets/SearchPlugin-CHj7M58O.js +0 -16
- package/src/ui/dist/assets/VNCViewer-CjlbyCB3.js +0 -11
- package/src/ui/dist/assets/bot-CFkZY-JP.js +0 -6
- package/src/ui/dist/assets/chevron-up-Dq5ofbht.js +0 -6
- package/src/ui/dist/assets/file-content-Dv4LoZec.js +0 -1
- package/src/ui/dist/assets/file-diff-panel-Denq-lC3.js +0 -1
- package/src/ui/dist/assets/file-jump-queue-DA-SdG__.js +0 -1
- package/src/ui/dist/assets/git-commit-horizontal-BUh6G52n.js +0 -6
- package/src/ui/dist/assets/image-B9HUUddG.js +0 -6
- package/src/ui/dist/assets/index-B2B1sg-M.js +0 -1
- package/src/ui/dist/assets/index-Cgla8biy.css +0 -33
- package/src/ui/dist/assets/index-DRyx7vAc.js +0 -1
- package/src/ui/dist/assets/index-Gbl53BNp.js +0 -2496
- package/src/ui/dist/assets/pdf-effect-queue-ZtnHFCAi.js +0 -6
- package/src/ui/dist/assets/popover-DL6h35vr.js +0 -1
- package/src/ui/dist/assets/select-DvmXt1yY.js +0 -11
- package/src/ui/dist/assets/sigma-7jpXazui.js +0 -6
- package/src/ui/dist/assets/trash-xA7kFt8i.js +0 -11
- package/src/ui/dist/assets/useCliAccess-DsMwDjOp.js +0 -1
- package/src/ui/dist/assets/useFileDiffOverlay-FuhcnKiw.js +0 -1
package/bin/ds.js
CHANGED
|
@@ -36,12 +36,39 @@ const pythonCommands = new Set([
|
|
|
36
36
|
const UPDATE_PACKAGE_NAME = String(packageJson.name || '@researai/deepscientist').trim() || '@researai/deepscientist';
|
|
37
37
|
const UPDATE_CHECK_TTL_MS = 12 * 60 * 60 * 1000;
|
|
38
38
|
|
|
39
|
-
const optionsWithValues = new Set(['--home', '--host', '--port', '--quest-id', '--mode', '--proxy', '--codex-profile', '--codex', '--auth']);
|
|
39
|
+
const optionsWithValues = new Set(['--home', '--host', '--port', '--quest-id', '--mode', '--proxy', '--codex-profile', '--codex', '--auth', '--runner', '--debug-log']);
|
|
40
40
|
|
|
41
|
-
function
|
|
41
|
+
function normalizeRunnerName(value, fallback = '') {
|
|
42
|
+
const normalized = String(value || '')
|
|
43
|
+
.trim()
|
|
44
|
+
.toLowerCase()
|
|
45
|
+
.replace(/_/g, '-');
|
|
46
|
+
if (!normalized) return fallback;
|
|
47
|
+
if (normalized === 'claude-code' || normalized === 'claudecode') return 'claude';
|
|
48
|
+
if (normalized === 'kimi-code' || normalized === 'kimicode') return 'kimi';
|
|
49
|
+
if (normalized === 'open-code' || normalized === 'open code' || normalized === 'opencode-ai' || normalized === 'opencodeai') return 'opencode';
|
|
50
|
+
return normalized.replace(/-/g, '');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function runnerDisplayName(value) {
|
|
54
|
+
const normalized = normalizeRunnerName(value, 'codex');
|
|
55
|
+
return {
|
|
56
|
+
codex: 'Codex',
|
|
57
|
+
claude: 'Claude Code',
|
|
58
|
+
kimi: 'Kimi Code',
|
|
59
|
+
opencode: 'OpenCode',
|
|
60
|
+
}[normalized] || normalized || 'runner';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function buildCodexOverrideEnv({ yolo = true, profile = null, binary = null, runner = null } = {}) {
|
|
42
64
|
const normalizedProfile = typeof profile === 'string' ? profile.trim() : '';
|
|
43
65
|
const normalizedBinary = typeof binary === 'string' ? binary.trim() : '';
|
|
66
|
+
const normalizedRunner = normalizeRunnerName(runner);
|
|
44
67
|
const overrides = {};
|
|
68
|
+
if (normalizedRunner) {
|
|
69
|
+
overrides.DEEPSCIENTIST_DEFAULT_RUNNER = normalizedRunner;
|
|
70
|
+
overrides.DEEPSCIENTIST_ENABLE_RUNNER = normalizedRunner;
|
|
71
|
+
}
|
|
45
72
|
if (normalizedBinary) {
|
|
46
73
|
overrides.DEEPSCIENTIST_CODEX_BINARY = normalizedBinary;
|
|
47
74
|
}
|
|
@@ -139,6 +166,7 @@ Usage:
|
|
|
139
166
|
ds update
|
|
140
167
|
ds update --check
|
|
141
168
|
ds update --yes
|
|
169
|
+
ds uninstall
|
|
142
170
|
ds migrate /data/DeepScientist
|
|
143
171
|
ds --here
|
|
144
172
|
ds --yolo --port 20999 --here
|
|
@@ -151,6 +179,7 @@ Usage:
|
|
|
151
179
|
ds --restart
|
|
152
180
|
ds --status
|
|
153
181
|
ds doctor
|
|
182
|
+
ds --runner claude
|
|
154
183
|
ds latex status
|
|
155
184
|
ds --home ~/DeepScientist --port 20999
|
|
156
185
|
|
|
@@ -160,6 +189,8 @@ Launcher flags:
|
|
|
160
189
|
--auth [true|false] Require a 16-character local browser password. Default is false
|
|
161
190
|
--tui Start the terminal workspace only
|
|
162
191
|
--both Start web + terminal workspace together
|
|
192
|
+
--debug Show the TUI debug strip and write redacted JSONL snapshots when TUI is open
|
|
193
|
+
--debug-log <path> Write TUI debug snapshots to this JSONL file. Default: /tmp/deepscientist_tui_debug.jsonl
|
|
163
194
|
--no-browser Do not auto-open the browser
|
|
164
195
|
--daemon-only Start the managed daemon and exit
|
|
165
196
|
--status Print managed daemon health as JSON
|
|
@@ -169,6 +200,7 @@ Launcher flags:
|
|
|
169
200
|
--here Create/use ./DeepScientist under the current working directory as home
|
|
170
201
|
--proxy <url> Use an outbound HTTP/WS proxy for npm and Python runtime traffic
|
|
171
202
|
--yolo [true|false] Control Codex YOLO mode. Default is true; pass false to restore on-request + workspace-write
|
|
203
|
+
--runner <name> Select builtin runner for this launch: codex, claude, kimi, or opencode
|
|
172
204
|
--codex-profile <id> Run DeepScientist with a specific Codex profile, for example \`m27\`
|
|
173
205
|
--codex <path> Run DeepScientist with a specific Codex executable path for this launch
|
|
174
206
|
--quest-id <id> Open the TUI on one quest directly
|
|
@@ -182,6 +214,9 @@ Migration:
|
|
|
182
214
|
ds migrate <target> Move the DeepScientist home/install root to a new absolute path
|
|
183
215
|
ds migrate <target> --yes --restart
|
|
184
216
|
|
|
217
|
+
Uninstall:
|
|
218
|
+
ds uninstall Remove code/runtime only and preserve local data
|
|
219
|
+
|
|
185
220
|
Runtime:
|
|
186
221
|
DeepScientist uses uv to manage a locked local Python runtime.
|
|
187
222
|
If uv is missing, ds bootstraps a local copy under the DeepScientist home automatically.
|
|
@@ -606,6 +641,54 @@ function resolveHome(args) {
|
|
|
606
641
|
return path.join(os.homedir(), 'DeepScientist');
|
|
607
642
|
}
|
|
608
643
|
|
|
644
|
+
function hasManagedDaemonState(home) {
|
|
645
|
+
const state = readDaemonState(home);
|
|
646
|
+
return Boolean(
|
|
647
|
+
state
|
|
648
|
+
&& typeof state === 'object'
|
|
649
|
+
&& (
|
|
650
|
+
state.daemon_id
|
|
651
|
+
|| state.pid
|
|
652
|
+
|| state.url
|
|
653
|
+
|| state.launch_url
|
|
654
|
+
|| state.home
|
|
655
|
+
)
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
function resolveManagementHome(rawArgs, options = {}) {
|
|
660
|
+
if (
|
|
661
|
+
options.home
|
|
662
|
+
|| rawArgs.includes('--here')
|
|
663
|
+
|| process.env.DEEPSCIENTIST_HOME
|
|
664
|
+
|| process.env.DS_HOME
|
|
665
|
+
) {
|
|
666
|
+
return options.home || resolveHome(rawArgs);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
const cwdHome = normalizeHomePath(path.join(process.cwd(), 'DeepScientist'));
|
|
670
|
+
if (hasManagedDaemonState(cwdHome)) {
|
|
671
|
+
return cwdHome;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
const defaultHome = normalizeHomePath(resolveHome(rawArgs));
|
|
675
|
+
if (hasManagedDaemonState(defaultHome)) {
|
|
676
|
+
return defaultHome;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
const installs = readInstallIndex()
|
|
680
|
+
.installs
|
|
681
|
+
.map((item) => normalizeInstallRecord(item))
|
|
682
|
+
.filter(Boolean);
|
|
683
|
+
const indexedHomes = [...new Set(installs.map((item) => item.home).filter(Boolean))];
|
|
684
|
+
const managedHomes = indexedHomes.filter((home) => hasManagedDaemonState(home));
|
|
685
|
+
if (managedHomes.length === 1) {
|
|
686
|
+
return managedHomes[0];
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
return defaultHome;
|
|
690
|
+
}
|
|
691
|
+
|
|
609
692
|
function formatHttpHost(host) {
|
|
610
693
|
const normalized = String(host || '').trim();
|
|
611
694
|
if (!normalized) {
|
|
@@ -886,15 +969,19 @@ function pythonVersionText(probe) {
|
|
|
886
969
|
return version;
|
|
887
970
|
}
|
|
888
971
|
|
|
889
|
-
function renderLaunchHints({ home, url, bindUrl, pythonSelection, yolo, authEnabled, authToken }) {
|
|
972
|
+
function renderLaunchHints({ home, url, bindUrl, pythonSelection, yolo, authEnabled, authToken, runnerName }) {
|
|
973
|
+
const normalizedRunner = normalizeRunnerName(runnerName, 'codex');
|
|
890
974
|
const runtimeRows = [
|
|
891
975
|
['Version', packageJson.version],
|
|
892
976
|
['Home', truncateMiddle(home)],
|
|
893
977
|
['Browser URL', url],
|
|
894
978
|
['Bind URL', bindUrl],
|
|
895
979
|
['Python', truncateMiddle(pythonVersionText(pythonSelection))],
|
|
896
|
-
['
|
|
980
|
+
['Runner', runnerDisplayName(normalizedRunner)],
|
|
897
981
|
];
|
|
982
|
+
if (normalizedRunner === 'codex') {
|
|
983
|
+
runtimeRows.push(['Codex mode', yolo ? 'YOLO (never + danger-full-access)' : 'Default (on-request + workspace-write)']);
|
|
984
|
+
}
|
|
898
985
|
if (authEnabled && authToken) {
|
|
899
986
|
runtimeRows.splice(4, 0, ['Auth token', authToken]);
|
|
900
987
|
}
|
|
@@ -936,6 +1023,7 @@ function printLaunchCard({
|
|
|
936
1023
|
yolo,
|
|
937
1024
|
authEnabled,
|
|
938
1025
|
authToken,
|
|
1026
|
+
runnerName,
|
|
939
1027
|
}) {
|
|
940
1028
|
const width = Math.max(72, Math.min(process.stdout.columns || 100, 108));
|
|
941
1029
|
const divider = colorize('\u001B[38;5;245m', '─'.repeat(Math.max(36, width - 6)));
|
|
@@ -1005,7 +1093,7 @@ function printLaunchCard({
|
|
|
1005
1093
|
console.log(centerText('Need to move this installation later? Use ds migrate /new/path.', width));
|
|
1006
1094
|
console.log(centerText(officialRepositoryLine(), width));
|
|
1007
1095
|
console.log('');
|
|
1008
|
-
renderLaunchHints({ home, url, bindUrl, pythonSelection, yolo, authEnabled, authToken });
|
|
1096
|
+
renderLaunchHints({ home, url, bindUrl, pythonSelection, yolo, authEnabled, authToken, runnerName });
|
|
1009
1097
|
}
|
|
1010
1098
|
|
|
1011
1099
|
function escapeHtml(value) {
|
|
@@ -1017,21 +1105,28 @@ function escapeHtml(value) {
|
|
|
1017
1105
|
.replaceAll("'", ''');
|
|
1018
1106
|
}
|
|
1019
1107
|
|
|
1020
|
-
function
|
|
1108
|
+
function writeRunnerPreflightReport(home, runnerName, probe) {
|
|
1021
1109
|
const reportDir = path.join(home, 'runtime', 'preflight');
|
|
1022
1110
|
ensureDir(reportDir);
|
|
1023
|
-
const
|
|
1111
|
+
const normalizedRunner = normalizeRunnerName(runnerName, 'runner');
|
|
1112
|
+
const runnerLabel = {
|
|
1113
|
+
codex: 'Codex',
|
|
1114
|
+
claude: 'Claude Code',
|
|
1115
|
+
kimi: 'Kimi Code',
|
|
1116
|
+
opencode: 'OpenCode',
|
|
1117
|
+
}[normalizedRunner] || String(runnerName || 'runner').trim() || 'runner';
|
|
1118
|
+
const reportPath = path.join(reportDir, `${normalizedRunner}-preflight.html`);
|
|
1024
1119
|
const warnings = Array.isArray(probe?.warnings) ? probe.warnings : [];
|
|
1025
1120
|
const errors = Array.isArray(probe?.errors) ? probe.errors : [];
|
|
1026
1121
|
const guidance = Array.isArray(probe?.guidance) ? probe.guidance : [];
|
|
1027
1122
|
const details = probe && typeof probe.details === 'object' ? probe.details : {};
|
|
1028
1123
|
const profile = typeof details.profile === 'string' ? details.profile.trim() : '';
|
|
1029
|
-
const intro = profile
|
|
1030
|
-
? `DeepScientist blocked startup because the
|
|
1031
|
-
:
|
|
1032
|
-
const introZh = profile
|
|
1033
|
-
? `DeepScientist 启动前进行了
|
|
1034
|
-
:
|
|
1124
|
+
const intro = profile && normalizedRunner === 'codex'
|
|
1125
|
+
? `DeepScientist blocked startup because the ${runnerLabel} hello probe did not pass for profile \`${profile}\`. Verify that \`codex --profile ${profile}\` works on this machine and that the profile's provider-specific API key, Base URL, and model configuration are already set up.`
|
|
1126
|
+
: `DeepScientist blocked startup because the selected runner (${runnerLabel}) did not pass its startup probe. Start DeepScientist with a runner that already works, or enter the web workspace with the default runner and configure another runner later from Settings.`;
|
|
1127
|
+
const introZh = profile && normalizedRunner === 'codex'
|
|
1128
|
+
? `DeepScientist 启动前进行了 ${runnerLabel} 可用性检查,但 profile \`${profile}\` 的 hello 探测没有通过。请先确认 \`codex --profile ${profile}\` 在当前机器上可以正常启动,并确保该 profile 依赖的 provider API Key、Base URL 和模型配置都已经在 Codex 中配置好。`
|
|
1129
|
+
: `DeepScientist 启动前检查了所选 runner(${runnerLabel}),但它没有通过启动探测。你可以先用已经可用的默认 runner 进入 Web 工作区,再在 Settings 里配置或切换 Claude Code / Kimi Code / OpenCode。`;
|
|
1035
1130
|
const renderItems = (items, tone) =>
|
|
1036
1131
|
items
|
|
1037
1132
|
.map(
|
|
@@ -1044,7 +1139,7 @@ function writeCodexPreflightReport(home, probe) {
|
|
|
1044
1139
|
<head>
|
|
1045
1140
|
<meta charset="utf-8" />
|
|
1046
1141
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
1047
|
-
<title>DeepScientist
|
|
1142
|
+
<title>DeepScientist runner check failed</title>
|
|
1048
1143
|
<style>
|
|
1049
1144
|
:root { color-scheme: light dark; font-family: Inter, system-ui, sans-serif; }
|
|
1050
1145
|
body {
|
|
@@ -1091,12 +1186,12 @@ function writeCodexPreflightReport(home, probe) {
|
|
|
1091
1186
|
<body>
|
|
1092
1187
|
<main class="page">
|
|
1093
1188
|
<section class="panel">
|
|
1094
|
-
<h1>DeepScientist could not start
|
|
1189
|
+
<h1>DeepScientist could not start the selected runner</h1>
|
|
1095
1190
|
<p class="meta">${escapeHtml(intro)}</p>
|
|
1096
1191
|
<p class="meta">${escapeHtml(introZh)}</p>
|
|
1097
1192
|
|
|
1098
1193
|
<h2>Summary</h2>
|
|
1099
|
-
<p>${escapeHtml(probe?.summary ||
|
|
1194
|
+
<p>${escapeHtml(probe?.summary || `${runnerLabel} startup probe failed.`)}</p>
|
|
1100
1195
|
|
|
1101
1196
|
${errors.length ? `<h2>Errors</h2><ul>${renderItems(errors, 'error')}</ul>` : ''}
|
|
1102
1197
|
${warnings.length ? `<h2>Warnings</h2><ul>${renderItems(warnings, 'warn')}</ul>` : ''}
|
|
@@ -1139,6 +1234,171 @@ function writeCodexPreflightReport(home, probe) {
|
|
|
1139
1234
|
};
|
|
1140
1235
|
}
|
|
1141
1236
|
|
|
1237
|
+
|
|
1238
|
+
function readConfiguredDefaultRunner(home, fallback = 'codex') {
|
|
1239
|
+
const configPath = path.join(home, 'config', 'config.yaml');
|
|
1240
|
+
if (!fs.existsSync(configPath)) {
|
|
1241
|
+
return fallback;
|
|
1242
|
+
}
|
|
1243
|
+
try {
|
|
1244
|
+
const text = fs.readFileSync(configPath, 'utf8');
|
|
1245
|
+
const match = text.match(new RegExp("^\\s*default_runner:\\s*[\"']?([^\"'\\n]+)[\"']?\\s*$", "m"));
|
|
1246
|
+
const value = match ? String(match[1] || '').trim().toLowerCase() : '';
|
|
1247
|
+
return value || fallback;
|
|
1248
|
+
} catch {
|
|
1249
|
+
return fallback;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
function readRunnerBootstrapState(home, runtimePython, runnerName, envOverrides = {}) {
|
|
1254
|
+
const snippet = [
|
|
1255
|
+
'import json, pathlib, sys',
|
|
1256
|
+
'from deepscientist.config import ConfigManager',
|
|
1257
|
+
'home = pathlib.Path(sys.argv[1])',
|
|
1258
|
+
'runner = str(sys.argv[2])',
|
|
1259
|
+
'manager = ConfigManager(home)',
|
|
1260
|
+
'print(json.dumps(manager.runner_bootstrap_state(runner), ensure_ascii=False))',
|
|
1261
|
+
].join('\n');
|
|
1262
|
+
const result = runSync(runtimePython, ['-c', snippet, home, runnerName], {
|
|
1263
|
+
capture: true,
|
|
1264
|
+
allowFailure: true,
|
|
1265
|
+
env: {
|
|
1266
|
+
...process.env,
|
|
1267
|
+
...envOverrides,
|
|
1268
|
+
},
|
|
1269
|
+
});
|
|
1270
|
+
if (result.status !== 0) {
|
|
1271
|
+
return { runner: runnerName, ready: false, last_checked_at: null, last_result: {} };
|
|
1272
|
+
}
|
|
1273
|
+
try {
|
|
1274
|
+
return JSON.parse(result.stdout || '{}');
|
|
1275
|
+
} catch {
|
|
1276
|
+
return { runner: runnerName, ready: false, last_checked_at: null, last_result: {} };
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
function probeRunnerBootstrap(home, runtimePython, runnerName, envOverrides = {}) {
|
|
1281
|
+
const snippet = [
|
|
1282
|
+
'import json, pathlib, sys',
|
|
1283
|
+
'from deepscientist.config import ConfigManager',
|
|
1284
|
+
'home = pathlib.Path(sys.argv[1])',
|
|
1285
|
+
'runner = str(sys.argv[2])',
|
|
1286
|
+
'manager = ConfigManager(home)',
|
|
1287
|
+
'print(json.dumps(manager.probe_runner_bootstrap(runner, persist=True), ensure_ascii=False))',
|
|
1288
|
+
].join('\n');
|
|
1289
|
+
const result = runSync(runtimePython, ['-c', snippet, home, runnerName], {
|
|
1290
|
+
capture: true,
|
|
1291
|
+
allowFailure: true,
|
|
1292
|
+
env: {
|
|
1293
|
+
...process.env,
|
|
1294
|
+
...envOverrides,
|
|
1295
|
+
},
|
|
1296
|
+
});
|
|
1297
|
+
let payload = null;
|
|
1298
|
+
try {
|
|
1299
|
+
payload = JSON.parse(result.stdout || '{}');
|
|
1300
|
+
} catch {
|
|
1301
|
+
payload = null;
|
|
1302
|
+
}
|
|
1303
|
+
if (payload && typeof payload === 'object') {
|
|
1304
|
+
return payload;
|
|
1305
|
+
}
|
|
1306
|
+
return {
|
|
1307
|
+
ok: false,
|
|
1308
|
+
summary: `${runnerName} startup probe crashed before a structured result was returned.`,
|
|
1309
|
+
warnings: [],
|
|
1310
|
+
errors: [result.stderr || 'Unable to parse the startup probe result.'],
|
|
1311
|
+
details: {
|
|
1312
|
+
runner: runnerName,
|
|
1313
|
+
exit_code: result.status ?? null,
|
|
1314
|
+
stdout_excerpt: result.stdout || '',
|
|
1315
|
+
stderr_excerpt: result.stderr || '',
|
|
1316
|
+
},
|
|
1317
|
+
guidance: [
|
|
1318
|
+
`Run \`${runnerName}\` manually and complete any required setup.`,
|
|
1319
|
+
'Then start DeepScientist again.',
|
|
1320
|
+
],
|
|
1321
|
+
};
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
function readEnabledRunnerNames(home, runtimePython, envOverrides = {}) {
|
|
1325
|
+
const snippet = [
|
|
1326
|
+
'import json, pathlib, sys',
|
|
1327
|
+
'from deepscientist.config import ConfigManager',
|
|
1328
|
+
'home = pathlib.Path(sys.argv[1])',
|
|
1329
|
+
'manager = ConfigManager(home)',
|
|
1330
|
+
'payload = manager.load_runners_config()',
|
|
1331
|
+
'print(json.dumps(sorted(name for name, cfg in payload.items() if isinstance(cfg, dict) and bool(cfg.get("enabled", False))), ensure_ascii=False))',
|
|
1332
|
+
].join('\n');
|
|
1333
|
+
const result = runSync(runtimePython, ['-c', snippet, home], {
|
|
1334
|
+
capture: true,
|
|
1335
|
+
allowFailure: true,
|
|
1336
|
+
env: {
|
|
1337
|
+
...process.env,
|
|
1338
|
+
...envOverrides,
|
|
1339
|
+
},
|
|
1340
|
+
});
|
|
1341
|
+
if (result.status !== 0) {
|
|
1342
|
+
return [];
|
|
1343
|
+
}
|
|
1344
|
+
try {
|
|
1345
|
+
const parsed = JSON.parse(result.stdout || '[]');
|
|
1346
|
+
return Array.isArray(parsed) ? parsed.map((item) => String(item || '').trim().toLowerCase()).filter(Boolean) : [];
|
|
1347
|
+
} catch {
|
|
1348
|
+
return [];
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
function readRunnerReadyState(home, runtimePython, runnerName, envOverrides = {}) {
|
|
1353
|
+
if (String(runnerName || '').trim().toLowerCase() === 'codex') {
|
|
1354
|
+
const state = readCodexBootstrapState(home, runtimePython, envOverrides);
|
|
1355
|
+
return { ready: Boolean(state.codex_ready), state };
|
|
1356
|
+
}
|
|
1357
|
+
const state = readRunnerBootstrapState(home, runtimePython, runnerName, envOverrides);
|
|
1358
|
+
return { ready: Boolean(state.ready), state };
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
function probeRunnerReady(home, runtimePython, runnerName, envOverrides = {}) {
|
|
1362
|
+
if (String(runnerName || '').trim().toLowerCase() === 'codex') {
|
|
1363
|
+
return probeCodexBootstrap(home, runtimePython, envOverrides);
|
|
1364
|
+
}
|
|
1365
|
+
return probeRunnerBootstrap(home, runtimePython, runnerName, envOverrides);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
function resolveStartupRunner(home, runtimePython, preferredRunner, envOverrides = {}, options = {}) {
|
|
1369
|
+
const normalizedPreferred = normalizeRunnerName(preferredRunner, 'codex');
|
|
1370
|
+
const enabled = readEnabledRunnerNames(home, runtimePython, envOverrides);
|
|
1371
|
+
const allowFallback = options.allowFallback !== false;
|
|
1372
|
+
const ordered = allowFallback
|
|
1373
|
+
? [
|
|
1374
|
+
normalizedPreferred,
|
|
1375
|
+
...enabled.filter((name) => name !== normalizedPreferred),
|
|
1376
|
+
]
|
|
1377
|
+
: [normalizedPreferred];
|
|
1378
|
+
const seen = new Set();
|
|
1379
|
+
const candidates = ordered.filter((name) => {
|
|
1380
|
+
if (!name || seen.has(name)) return false;
|
|
1381
|
+
seen.add(name);
|
|
1382
|
+
return true;
|
|
1383
|
+
});
|
|
1384
|
+
|
|
1385
|
+
let preferredProbe = null;
|
|
1386
|
+
for (const runnerName of candidates) {
|
|
1387
|
+
const bootstrap = readRunnerReadyState(home, runtimePython, runnerName, envOverrides);
|
|
1388
|
+
if (bootstrap.ready) {
|
|
1389
|
+
return { ok: true, runnerName, preferredRunner: normalizedPreferred, fallback: runnerName !== normalizedPreferred, probe: null };
|
|
1390
|
+
}
|
|
1391
|
+
const probe = probeRunnerReady(home, runtimePython, runnerName, envOverrides);
|
|
1392
|
+
if (runnerName === normalizedPreferred) {
|
|
1393
|
+
preferredProbe = probe;
|
|
1394
|
+
}
|
|
1395
|
+
if (probe && probe.ok === true) {
|
|
1396
|
+
return { ok: true, runnerName, preferredRunner: normalizedPreferred, fallback: runnerName !== normalizedPreferred, probe };
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
return { ok: false, runnerName: normalizedPreferred, preferredRunner: normalizedPreferred, fallback: false, probe: preferredProbe };
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1142
1402
|
function readCodexBootstrapState(home, runtimePython, envOverrides = {}) {
|
|
1143
1403
|
const snippet = [
|
|
1144
1404
|
'import json, pathlib, sys',
|
|
@@ -1207,10 +1467,12 @@ function probeCodexBootstrap(home, runtimePython, envOverrides = {}) {
|
|
|
1207
1467
|
};
|
|
1208
1468
|
}
|
|
1209
1469
|
|
|
1210
|
-
function
|
|
1211
|
-
const report =
|
|
1212
|
-
const
|
|
1213
|
-
error
|
|
1470
|
+
function createRunnerPreflightError(home, runnerName, probe) {
|
|
1471
|
+
const report = writeRunnerPreflightReport(home, runnerName, probe);
|
|
1472
|
+
const normalizedRunner = normalizeRunnerName(runnerName, 'codex');
|
|
1473
|
+
const error = new Error(probe?.summary || `${normalizedRunner} startup probe failed.`);
|
|
1474
|
+
error.code = 'DS_RUNNER_PREFLIGHT';
|
|
1475
|
+
error.runnerName = normalizedRunner;
|
|
1214
1476
|
error.reportPath = report.path;
|
|
1215
1477
|
error.reportUrl = report.url;
|
|
1216
1478
|
error.probe = probe;
|
|
@@ -1235,6 +1497,9 @@ function parseLauncherArgs(argv) {
|
|
|
1235
1497
|
let auth = null;
|
|
1236
1498
|
let codexProfile = null;
|
|
1237
1499
|
let codexBinary = null;
|
|
1500
|
+
let runner = null;
|
|
1501
|
+
let tuiDebug = false;
|
|
1502
|
+
let tuiDebugLogPath = null;
|
|
1238
1503
|
|
|
1239
1504
|
if (args[0] === 'ui') {
|
|
1240
1505
|
args.shift();
|
|
@@ -1253,6 +1518,7 @@ function parseLauncherArgs(argv) {
|
|
|
1253
1518
|
else if (arg === '--open-browser') openBrowser = true;
|
|
1254
1519
|
else if (arg === '--daemon-only') daemonOnly = true;
|
|
1255
1520
|
else if (arg === '--skip-update-check') skipUpdateCheck = true;
|
|
1521
|
+
else if (arg === '--debug') tuiDebug = true;
|
|
1256
1522
|
else if (arg === '--here') continue;
|
|
1257
1523
|
else {
|
|
1258
1524
|
const parsedYolo = parseYoloArg(args, index, yolo);
|
|
@@ -1280,6 +1546,11 @@ function parseLauncherArgs(argv) {
|
|
|
1280
1546
|
if (!next.ok) return { help: false, error: next.error };
|
|
1281
1547
|
codexBinary = next.value;
|
|
1282
1548
|
index += 1;
|
|
1549
|
+
} else if (arg === '--runner') {
|
|
1550
|
+
const next = readRequiredOptionValue(args, index, '--runner');
|
|
1551
|
+
if (!next.ok) return { help: false, error: next.error };
|
|
1552
|
+
runner = next.value;
|
|
1553
|
+
index += 1;
|
|
1283
1554
|
} else if (arg === '--host') {
|
|
1284
1555
|
const next = readRequiredOptionValue(args, index, '--host');
|
|
1285
1556
|
if (!next.ok) return { help: false, error: next.error };
|
|
@@ -1307,6 +1578,12 @@ function parseLauncherArgs(argv) {
|
|
|
1307
1578
|
if (!next.ok) return { help: false, error: next.error };
|
|
1308
1579
|
questId = next.value;
|
|
1309
1580
|
index += 1;
|
|
1581
|
+
} else if (arg === '--debug-log') {
|
|
1582
|
+
const next = readRequiredOptionValue(args, index, '--debug-log');
|
|
1583
|
+
if (!next.ok) return { help: false, error: next.error };
|
|
1584
|
+
tuiDebugLogPath = next.value;
|
|
1585
|
+
tuiDebug = true;
|
|
1586
|
+
index += 1;
|
|
1310
1587
|
} else if (arg === '--mode') {
|
|
1311
1588
|
const next = readRequiredOptionValue(args, index, '--mode');
|
|
1312
1589
|
if (!next.ok) return { help: false, error: next.error };
|
|
@@ -1337,10 +1614,13 @@ function parseLauncherArgs(argv) {
|
|
|
1337
1614
|
skipUpdateCheck,
|
|
1338
1615
|
yolo,
|
|
1339
1616
|
auth,
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1617
|
+
codexProfile,
|
|
1618
|
+
codexBinary,
|
|
1619
|
+
runner,
|
|
1620
|
+
tuiDebug,
|
|
1621
|
+
tuiDebugLogPath,
|
|
1622
|
+
error: null,
|
|
1623
|
+
};
|
|
1344
1624
|
}
|
|
1345
1625
|
|
|
1346
1626
|
function printUpdateHelp() {
|
|
@@ -1381,6 +1661,26 @@ Flags:
|
|
|
1381
1661
|
`);
|
|
1382
1662
|
}
|
|
1383
1663
|
|
|
1664
|
+
function printUninstallHelp() {
|
|
1665
|
+
console.log(`DeepScientist uninstall
|
|
1666
|
+
|
|
1667
|
+
Usage:
|
|
1668
|
+
ds uninstall
|
|
1669
|
+
ds uninstall --home /absolute/home/path
|
|
1670
|
+
ds uninstall --yes
|
|
1671
|
+
|
|
1672
|
+
Behavior:
|
|
1673
|
+
- removes DeepScientist code, launcher wrappers, and local runtime code
|
|
1674
|
+
- preserves local data such as quests, memory, config, logs, plugins, and cache
|
|
1675
|
+
- if this command is run from the globally installed npm package, it also removes the npm package itself
|
|
1676
|
+
|
|
1677
|
+
Flags:
|
|
1678
|
+
--yes Skip the interactive confirmation prompt
|
|
1679
|
+
--home <path> Override the target DeepScientist home/root
|
|
1680
|
+
--origin <value> Internal use for npm uninstall integration
|
|
1681
|
+
`);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1384
1684
|
function parseUpdateArgs(argv) {
|
|
1385
1685
|
const args = [...argv];
|
|
1386
1686
|
if (args[0] === 'update') {
|
|
@@ -1504,6 +1804,43 @@ function parseMigrateArgs(argv) {
|
|
|
1504
1804
|
};
|
|
1505
1805
|
}
|
|
1506
1806
|
|
|
1807
|
+
function parseUninstallArgs(argv) {
|
|
1808
|
+
const args = [...argv];
|
|
1809
|
+
if (args[0] === 'uninstall') {
|
|
1810
|
+
args.shift();
|
|
1811
|
+
}
|
|
1812
|
+
let home = null;
|
|
1813
|
+
let yes = false;
|
|
1814
|
+
let origin = null;
|
|
1815
|
+
|
|
1816
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
1817
|
+
const arg = args[index];
|
|
1818
|
+
if (arg === '--yes') yes = true;
|
|
1819
|
+
else if (arg === '--home') {
|
|
1820
|
+
const next = readRequiredOptionValue(args, index, '--home');
|
|
1821
|
+
if (!next.ok) return { help: false, error: next.error };
|
|
1822
|
+
home = path.resolve(expandUserPath(next.value));
|
|
1823
|
+
index += 1;
|
|
1824
|
+
} else if (arg === '--origin') {
|
|
1825
|
+
const next = readRequiredOptionValue(args, index, '--origin');
|
|
1826
|
+
if (!next.ok) return { help: false, error: next.error };
|
|
1827
|
+
origin = String(next.value || '').trim().toLowerCase() || null;
|
|
1828
|
+
index += 1;
|
|
1829
|
+
}
|
|
1830
|
+
else if (arg === '--help' || arg === '-h') return { help: true };
|
|
1831
|
+
else if (arg.startsWith('--')) return { help: false, error: `Unknown uninstall flag: ${arg}` };
|
|
1832
|
+
else return { help: false, error: `Unexpected uninstall argument: ${arg}` };
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
return {
|
|
1836
|
+
help: false,
|
|
1837
|
+
home,
|
|
1838
|
+
yes,
|
|
1839
|
+
origin,
|
|
1840
|
+
error: null,
|
|
1841
|
+
};
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1507
1844
|
function findFirstPositionalArg(args) {
|
|
1508
1845
|
for (let index = 0; index < args.length; index += 1) {
|
|
1509
1846
|
const arg = args[index];
|
|
@@ -2457,6 +2794,23 @@ function buildUvRuntimeEnv(home, extraEnv = {}) {
|
|
|
2457
2794
|
for (const key of ['PYTHONPATH', 'PYTHONHOME', 'VIRTUAL_ENV', '__PYVENV_LAUNCHER__']) {
|
|
2458
2795
|
delete env[key];
|
|
2459
2796
|
}
|
|
2797
|
+
for (const key of Object.keys(env)) {
|
|
2798
|
+
if (key === 'CONDA_EXE' || key === 'CONDA_PYTHON_EXE' || key === '_CE_CONDA' || key === '_CE_M') {
|
|
2799
|
+
delete env[key];
|
|
2800
|
+
continue;
|
|
2801
|
+
}
|
|
2802
|
+
if (key === 'MAMBA_EXE' || key === 'MAMBA_ROOT_PREFIX') {
|
|
2803
|
+
delete env[key];
|
|
2804
|
+
continue;
|
|
2805
|
+
}
|
|
2806
|
+
if (key === 'CONDA_PREFIX' || key === 'CONDA_DEFAULT_ENV' || key === 'CONDA_PROMPT_MODIFIER' || key === 'CONDA_SHLVL') {
|
|
2807
|
+
delete env[key];
|
|
2808
|
+
continue;
|
|
2809
|
+
}
|
|
2810
|
+
if (/^CONDA_PREFIX_\d+$/.test(key)) {
|
|
2811
|
+
delete env[key];
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2460
2814
|
return env;
|
|
2461
2815
|
}
|
|
2462
2816
|
|
|
@@ -2578,7 +2932,9 @@ function syncUvProjectEnvironment(home, uvBinary, pythonTarget, editable) {
|
|
|
2578
2932
|
args.splice(3, 0, '--compile-bytecode');
|
|
2579
2933
|
}
|
|
2580
2934
|
if (!editable) {
|
|
2581
|
-
|
|
2935
|
+
// Force-refresh the local project package so same-version source installs
|
|
2936
|
+
// don't reuse a stale cached wheel during runtime rebuilds.
|
|
2937
|
+
args.push('--no-editable', '--reinstall-package', 'deepscientist');
|
|
2582
2938
|
}
|
|
2583
2939
|
step(2, 4, 'Syncing locked Python environment');
|
|
2584
2940
|
const result = runSync(uvBinary, args, {
|
|
@@ -2970,6 +3326,374 @@ function removeDaemonState(home) {
|
|
|
2970
3326
|
}
|
|
2971
3327
|
}
|
|
2972
3328
|
|
|
3329
|
+
function installIndexPath() {
|
|
3330
|
+
return path.join(os.homedir(), '.deepscientist', 'install-index.json');
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3333
|
+
function readInstallIndex() {
|
|
3334
|
+
const indexPath = installIndexPath();
|
|
3335
|
+
if (!fs.existsSync(indexPath)) {
|
|
3336
|
+
return { installs: [] };
|
|
3337
|
+
}
|
|
3338
|
+
try {
|
|
3339
|
+
const payload = JSON.parse(fs.readFileSync(indexPath, 'utf8'));
|
|
3340
|
+
const installs = Array.isArray(payload?.installs) ? payload.installs.filter((item) => item && typeof item === 'object') : [];
|
|
3341
|
+
return { installs };
|
|
3342
|
+
} catch {
|
|
3343
|
+
return { installs: [] };
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
function writeInstallIndex(payload) {
|
|
3348
|
+
const normalized = {
|
|
3349
|
+
installs: Array.isArray(payload?.installs) ? payload.installs : [],
|
|
3350
|
+
};
|
|
3351
|
+
const targetPath = installIndexPath();
|
|
3352
|
+
ensureDir(path.dirname(targetPath));
|
|
3353
|
+
fs.writeFileSync(targetPath, `${JSON.stringify(normalized, null, 2)}\n`, 'utf8');
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
function normalizeInstallRecord(record) {
|
|
3357
|
+
const normalizedHome = normalizeHomePath(record?.home || '');
|
|
3358
|
+
if (!normalizedHome) {
|
|
3359
|
+
return null;
|
|
3360
|
+
}
|
|
3361
|
+
const installMode = String(record?.install_mode || '').trim() || null;
|
|
3362
|
+
const installDir = record?.install_dir ? normalizeHomePath(record.install_dir) : null;
|
|
3363
|
+
const packageRoot = record?.package_root ? normalizeHomePath(record.package_root) : null;
|
|
3364
|
+
const launcherPath = record?.launcher_path ? path.resolve(String(record.launcher_path)) : null;
|
|
3365
|
+
const wrapperPaths = Array.isArray(record?.wrapper_paths)
|
|
3366
|
+
? [...new Set(record.wrapper_paths.map((item) => String(item || '').trim()).filter(Boolean).map((item) => path.resolve(item)))]
|
|
3367
|
+
: [];
|
|
3368
|
+
const createdAt = String(record?.created_at || '').trim() || new Date().toISOString();
|
|
3369
|
+
return {
|
|
3370
|
+
home: normalizedHome,
|
|
3371
|
+
install_mode: installMode,
|
|
3372
|
+
install_dir: installDir,
|
|
3373
|
+
package_root: packageRoot,
|
|
3374
|
+
launcher_path: launcherPath,
|
|
3375
|
+
wrapper_paths: wrapperPaths,
|
|
3376
|
+
created_at: createdAt,
|
|
3377
|
+
updated_at: new Date().toISOString(),
|
|
3378
|
+
};
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
function installRecordMatches(left, right) {
|
|
3382
|
+
return left.home === right.home
|
|
3383
|
+
&& (left.install_dir || null) === (right.install_dir || null)
|
|
3384
|
+
&& (left.package_root || null) === (right.package_root || null)
|
|
3385
|
+
&& (left.install_mode || null) === (right.install_mode || null);
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
function upsertInstallRecord(record) {
|
|
3389
|
+
const normalized = normalizeInstallRecord(record);
|
|
3390
|
+
if (!normalized) {
|
|
3391
|
+
return null;
|
|
3392
|
+
}
|
|
3393
|
+
const index = readInstallIndex();
|
|
3394
|
+
const installs = index.installs
|
|
3395
|
+
.map((item) => normalizeInstallRecord(item))
|
|
3396
|
+
.filter(Boolean);
|
|
3397
|
+
const nextInstalls = installs.filter((item) => !installRecordMatches(item, normalized));
|
|
3398
|
+
nextInstalls.push(normalized);
|
|
3399
|
+
nextInstalls.sort((left, right) => String(left.updated_at || '').localeCompare(String(right.updated_at || '')));
|
|
3400
|
+
writeInstallIndex({ installs: nextInstalls });
|
|
3401
|
+
return normalized;
|
|
3402
|
+
}
|
|
3403
|
+
|
|
3404
|
+
function removeInstallRecords(predicate) {
|
|
3405
|
+
const index = readInstallIndex();
|
|
3406
|
+
const installs = index.installs
|
|
3407
|
+
.map((item) => normalizeInstallRecord(item))
|
|
3408
|
+
.filter(Boolean);
|
|
3409
|
+
const nextInstalls = installs.filter((item) => !predicate(item));
|
|
3410
|
+
writeInstallIndex({ installs: nextInstalls });
|
|
3411
|
+
return nextInstalls;
|
|
3412
|
+
}
|
|
3413
|
+
|
|
3414
|
+
function parseManagedWrapperCandidate(candidatePath) {
|
|
3415
|
+
let stat = null;
|
|
3416
|
+
try {
|
|
3417
|
+
stat = fs.lstatSync(candidatePath);
|
|
3418
|
+
} catch {
|
|
3419
|
+
return null;
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3422
|
+
if (!stat.isFile() && !stat.isSymbolicLink()) {
|
|
3423
|
+
return null;
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3426
|
+
let text = '';
|
|
3427
|
+
try {
|
|
3428
|
+
text = fs.readFileSync(candidatePath, 'utf8');
|
|
3429
|
+
} catch {
|
|
3430
|
+
return null;
|
|
3431
|
+
}
|
|
3432
|
+
|
|
3433
|
+
const homeMatch = text.match(/export DEEPSCIENTIST_HOME="([^"\n]+)"/);
|
|
3434
|
+
const execMatch = text.match(/exec "([^"\n]+)" "\$@"/);
|
|
3435
|
+
return {
|
|
3436
|
+
path: path.resolve(candidatePath),
|
|
3437
|
+
home: homeMatch ? normalizeHomePath(homeMatch[1]) : null,
|
|
3438
|
+
execPath: execMatch ? path.resolve(execMatch[1]) : null,
|
|
3439
|
+
};
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
function collectManagedWrapperPaths({ home, installDir = null, explicitWrapperPaths = [] }) {
|
|
3443
|
+
const normalizedHome = normalizeHomePath(home);
|
|
3444
|
+
const normalizedInstallDir = installDir ? normalizeHomePath(installDir) : null;
|
|
3445
|
+
const candidates = new Set(explicitWrapperPaths.map((item) => path.resolve(String(item))));
|
|
3446
|
+
for (const commandName of launcherWrapperCommands) {
|
|
3447
|
+
for (const candidate of candidateWrapperPathsForCommand(commandName)) {
|
|
3448
|
+
candidates.add(candidate);
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
const matched = [];
|
|
3452
|
+
for (const candidate of candidates) {
|
|
3453
|
+
const parsed = parseManagedWrapperCandidate(candidate);
|
|
3454
|
+
if (!parsed) {
|
|
3455
|
+
continue;
|
|
3456
|
+
}
|
|
3457
|
+
if (parsed.home && parsed.home === normalizedHome) {
|
|
3458
|
+
matched.push(parsed.path);
|
|
3459
|
+
continue;
|
|
3460
|
+
}
|
|
3461
|
+
if (normalizedInstallDir && parsed.execPath && parsed.execPath.startsWith(path.join(normalizedInstallDir, 'bin'))) {
|
|
3462
|
+
matched.push(parsed.path);
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
return [...new Set(matched)].sort();
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
function buildCodeOnlyUninstallPlan({ home, installDir = null, wrapperPaths = [] }) {
|
|
3469
|
+
const normalizedHome = normalizeHomePath(home);
|
|
3470
|
+
const normalizedInstallDir = installDir ? normalizeHomePath(installDir) : null;
|
|
3471
|
+
const removePaths = [
|
|
3472
|
+
path.join(normalizedHome, 'runtime', 'python-env'),
|
|
3473
|
+
path.join(normalizedHome, 'runtime', 'python'),
|
|
3474
|
+
path.join(normalizedHome, 'runtime', 'tools'),
|
|
3475
|
+
path.join(normalizedHome, 'runtime', 'bundle'),
|
|
3476
|
+
path.join(normalizedHome, 'runtime', 'daemon.json'),
|
|
3477
|
+
];
|
|
3478
|
+
if (normalizedInstallDir && normalizedInstallDir !== normalizeHomePath(repoRoot)) {
|
|
3479
|
+
removePaths.push(normalizedInstallDir);
|
|
3480
|
+
}
|
|
3481
|
+
return {
|
|
3482
|
+
remove_paths: [...new Set(removePaths.map((item) => path.resolve(item)))].sort(),
|
|
3483
|
+
preserve_paths: [
|
|
3484
|
+
path.join(normalizedHome, 'quests'),
|
|
3485
|
+
path.join(normalizedHome, 'memory'),
|
|
3486
|
+
path.join(normalizedHome, 'config'),
|
|
3487
|
+
path.join(normalizedHome, 'logs'),
|
|
3488
|
+
path.join(normalizedHome, 'plugins'),
|
|
3489
|
+
path.join(normalizedHome, 'cache'),
|
|
3490
|
+
].sort(),
|
|
3491
|
+
wrapper_paths: [...new Set(wrapperPaths.map((item) => path.resolve(item)))].sort(),
|
|
3492
|
+
};
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
function removePathEntry(targetPath) {
|
|
3496
|
+
if (!targetPath || !fs.existsSync(targetPath)) {
|
|
3497
|
+
return false;
|
|
3498
|
+
}
|
|
3499
|
+
const stat = fs.lstatSync(targetPath);
|
|
3500
|
+
if (stat.isDirectory() && !stat.isSymbolicLink()) {
|
|
3501
|
+
fs.rmSync(targetPath, { recursive: true, force: true });
|
|
3502
|
+
return true;
|
|
3503
|
+
}
|
|
3504
|
+
fs.rmSync(targetPath, { force: true });
|
|
3505
|
+
return true;
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
function currentInstallRecord(home) {
|
|
3509
|
+
const installMode = detectInstallMode(repoRoot);
|
|
3510
|
+
return normalizeInstallRecord({
|
|
3511
|
+
home,
|
|
3512
|
+
install_mode: installMode,
|
|
3513
|
+
install_dir: installMode === 'source-checkout' ? null : null,
|
|
3514
|
+
package_root: normalizeHomePath(repoRoot),
|
|
3515
|
+
launcher_path: resolveLauncherPath() || path.join(repoRoot, 'bin', 'ds.js'),
|
|
3516
|
+
wrapper_paths: [],
|
|
3517
|
+
});
|
|
3518
|
+
}
|
|
3519
|
+
|
|
3520
|
+
function registerCurrentInstall(home) {
|
|
3521
|
+
const record = currentInstallRecord(home);
|
|
3522
|
+
if (!record) {
|
|
3523
|
+
return null;
|
|
3524
|
+
}
|
|
3525
|
+
return upsertInstallRecord(record);
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
function dedupeUninstallRecords(records) {
|
|
3529
|
+
const seen = new Set();
|
|
3530
|
+
const deduped = [];
|
|
3531
|
+
for (const record of records) {
|
|
3532
|
+
const normalized = normalizeInstallRecord(record);
|
|
3533
|
+
if (!normalized) {
|
|
3534
|
+
continue;
|
|
3535
|
+
}
|
|
3536
|
+
const key = JSON.stringify([
|
|
3537
|
+
normalized.home,
|
|
3538
|
+
normalized.install_mode || null,
|
|
3539
|
+
normalized.install_dir || null,
|
|
3540
|
+
normalized.package_root || null,
|
|
3541
|
+
]);
|
|
3542
|
+
if (seen.has(key)) {
|
|
3543
|
+
continue;
|
|
3544
|
+
}
|
|
3545
|
+
seen.add(key);
|
|
3546
|
+
deduped.push(normalized);
|
|
3547
|
+
}
|
|
3548
|
+
return deduped;
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
function resolveUninstallRecords({ home, origin }) {
|
|
3552
|
+
const normalizedHome = normalizeHomePath(home);
|
|
3553
|
+
const currentPackageRoot = normalizeHomePath(repoRoot);
|
|
3554
|
+
const index = readInstallIndex();
|
|
3555
|
+
const installs = index.installs.map((item) => normalizeInstallRecord(item)).filter(Boolean);
|
|
3556
|
+
if (origin === 'npm') {
|
|
3557
|
+
const matching = installs.filter((item) => item.package_root === currentPackageRoot);
|
|
3558
|
+
if (matching.length > 0) {
|
|
3559
|
+
return dedupeUninstallRecords(matching);
|
|
3560
|
+
}
|
|
3561
|
+
return dedupeUninstallRecords([currentInstallRecord(normalizedHome)]);
|
|
3562
|
+
}
|
|
3563
|
+
const matching = installs.filter((item) => item.home === normalizedHome);
|
|
3564
|
+
if (matching.length > 0) {
|
|
3565
|
+
return dedupeUninstallRecords(matching);
|
|
3566
|
+
}
|
|
3567
|
+
const inferredInstallDir = fs.existsSync(path.join(normalizedHome, 'cli')) ? path.join(normalizedHome, 'cli') : null;
|
|
3568
|
+
return dedupeUninstallRecords([
|
|
3569
|
+
{
|
|
3570
|
+
...currentInstallRecord(normalizedHome),
|
|
3571
|
+
install_dir: inferredInstallDir,
|
|
3572
|
+
},
|
|
3573
|
+
]);
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
function aggregateCodeOnlyUninstallPlan(records) {
|
|
3577
|
+
const removePaths = new Set();
|
|
3578
|
+
const preservePaths = new Set();
|
|
3579
|
+
const wrapperPaths = new Set();
|
|
3580
|
+
for (const record of records) {
|
|
3581
|
+
const installDir = record.install_dir || (fs.existsSync(path.join(record.home, 'cli')) ? path.join(record.home, 'cli') : null);
|
|
3582
|
+
const matchedWrappers = collectManagedWrapperPaths({
|
|
3583
|
+
home: record.home,
|
|
3584
|
+
installDir,
|
|
3585
|
+
explicitWrapperPaths: record.wrapper_paths || [],
|
|
3586
|
+
});
|
|
3587
|
+
const plan = buildCodeOnlyUninstallPlan({
|
|
3588
|
+
home: record.home,
|
|
3589
|
+
installDir,
|
|
3590
|
+
wrapperPaths: matchedWrappers,
|
|
3591
|
+
});
|
|
3592
|
+
for (const targetPath of plan.remove_paths) removePaths.add(targetPath);
|
|
3593
|
+
for (const targetPath of plan.preserve_paths) preservePaths.add(targetPath);
|
|
3594
|
+
for (const targetPath of plan.wrapper_paths) wrapperPaths.add(targetPath);
|
|
3595
|
+
}
|
|
3596
|
+
return {
|
|
3597
|
+
remove_paths: [...removePaths].sort(),
|
|
3598
|
+
preserve_paths: [...preservePaths].sort(),
|
|
3599
|
+
wrapper_paths: [...wrapperPaths].sort(),
|
|
3600
|
+
};
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3603
|
+
async function promptUninstallConfirmation({ records, plan }) {
|
|
3604
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
3605
|
+
throw new Error('DeepScientist uninstall needs a TTY for confirmation. Re-run with `--yes` to continue non-interactively.');
|
|
3606
|
+
}
|
|
3607
|
+
console.log('');
|
|
3608
|
+
console.log('DeepScientist uninstall');
|
|
3609
|
+
console.log('');
|
|
3610
|
+
console.log('This removes code and runtime directories, but preserves local data.');
|
|
3611
|
+
console.log('');
|
|
3612
|
+
for (const record of records) {
|
|
3613
|
+
console.log(`Home: ${record.home}`);
|
|
3614
|
+
}
|
|
3615
|
+
console.log('');
|
|
3616
|
+
console.log('Code/runtime paths to remove:');
|
|
3617
|
+
for (const targetPath of plan.remove_paths) {
|
|
3618
|
+
console.log(`- ${targetPath}`);
|
|
3619
|
+
}
|
|
3620
|
+
console.log('');
|
|
3621
|
+
console.log('Preserved data paths:');
|
|
3622
|
+
for (const targetPath of plan.preserve_paths) {
|
|
3623
|
+
console.log(`- ${targetPath}`);
|
|
3624
|
+
}
|
|
3625
|
+
const answer = await new Promise((resolve) => {
|
|
3626
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
3627
|
+
rl.question('Type UNINSTALL to continue: ', (value) => {
|
|
3628
|
+
rl.close();
|
|
3629
|
+
resolve(String(value || '').trim());
|
|
3630
|
+
});
|
|
3631
|
+
});
|
|
3632
|
+
return answer === 'UNINSTALL';
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
function runGlobalNpmUninstall() {
|
|
3636
|
+
const configuredPrefix = String(process.env.npm_config_prefix || process.env.NPM_CONFIG_PREFIX || '').trim();
|
|
3637
|
+
let uninstallPrefix = configuredPrefix || null;
|
|
3638
|
+
if (!uninstallPrefix && detectInstallMode(repoRoot) === 'npm-package') {
|
|
3639
|
+
let cursor = path.resolve(repoRoot);
|
|
3640
|
+
while (cursor && cursor !== path.dirname(cursor)) {
|
|
3641
|
+
if (path.basename(cursor) === 'node_modules') {
|
|
3642
|
+
const container = path.dirname(cursor);
|
|
3643
|
+
uninstallPrefix =
|
|
3644
|
+
path.basename(container) === 'lib'
|
|
3645
|
+
? path.dirname(container)
|
|
3646
|
+
: container;
|
|
3647
|
+
break;
|
|
3648
|
+
}
|
|
3649
|
+
cursor = path.dirname(cursor);
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3652
|
+
const npmBinary =
|
|
3653
|
+
resolveExecutableOnPath(process.platform === 'win32' ? 'npm.cmd' : 'npm')
|
|
3654
|
+
|| resolveExecutableOnPath('npm');
|
|
3655
|
+
if (!npmBinary) {
|
|
3656
|
+
return {
|
|
3657
|
+
ok: false,
|
|
3658
|
+
message: 'Global npm package removal was skipped because `npm` is not available on PATH.',
|
|
3659
|
+
};
|
|
3660
|
+
}
|
|
3661
|
+
const result = spawnSync(
|
|
3662
|
+
npmBinary,
|
|
3663
|
+
['uninstall', '-g', UPDATE_PACKAGE_NAME, ...(uninstallPrefix ? ['--prefix', uninstallPrefix] : [])],
|
|
3664
|
+
syncSpawnOptions({
|
|
3665
|
+
stdio: 'inherit',
|
|
3666
|
+
env: process.env,
|
|
3667
|
+
})
|
|
3668
|
+
);
|
|
3669
|
+
if (result.error) {
|
|
3670
|
+
return {
|
|
3671
|
+
ok: false,
|
|
3672
|
+
message: result.error.message,
|
|
3673
|
+
};
|
|
3674
|
+
}
|
|
3675
|
+
return {
|
|
3676
|
+
ok: result.status === 0,
|
|
3677
|
+
message: result.status === 0 ? null : `npm uninstall exited with status ${result.status ?? 1}.`,
|
|
3678
|
+
};
|
|
3679
|
+
}
|
|
3680
|
+
|
|
3681
|
+
function buildDaemonStatusPayload({ home, url, state, health, launcherPath = null }) {
|
|
3682
|
+
const healthy = Boolean(health && health.status === 'ok');
|
|
3683
|
+
const identityMatch = state ? healthMatchesManagedState({ health, state, home }) : false;
|
|
3684
|
+
return {
|
|
3685
|
+
healthy,
|
|
3686
|
+
identity_match: identityMatch,
|
|
3687
|
+
managed: Boolean(state),
|
|
3688
|
+
home,
|
|
3689
|
+
url,
|
|
3690
|
+
daemon_state_path: daemonStatePath(home),
|
|
3691
|
+
launcher_path: launcherPath || resolveLauncherPath() || null,
|
|
3692
|
+
daemon: state,
|
|
3693
|
+
health,
|
|
3694
|
+
};
|
|
3695
|
+
}
|
|
3696
|
+
|
|
2973
3697
|
function daemonSupervisorLogPath(home) {
|
|
2974
3698
|
return path.join(home, 'logs', 'daemon-supervisor.log');
|
|
2975
3699
|
}
|
|
@@ -3540,6 +4264,86 @@ async function stopDaemon(home) {
|
|
|
3540
4264
|
console.log('DeepScientist daemon stopped.');
|
|
3541
4265
|
}
|
|
3542
4266
|
|
|
4267
|
+
async function uninstallMain(rawArgs) {
|
|
4268
|
+
const options = parseUninstallArgs(rawArgs);
|
|
4269
|
+
if (options.help) {
|
|
4270
|
+
printUninstallHelp();
|
|
4271
|
+
process.exit(0);
|
|
4272
|
+
}
|
|
4273
|
+
if (options.error) {
|
|
4274
|
+
console.error(options.error);
|
|
4275
|
+
console.error('Run `ds uninstall --help` for usage.');
|
|
4276
|
+
process.exit(1);
|
|
4277
|
+
}
|
|
4278
|
+
|
|
4279
|
+
const home = normalizeHomePath(options.home || resolveHome(rawArgs));
|
|
4280
|
+
const records = resolveUninstallRecords({ home, origin: options.origin });
|
|
4281
|
+
const plan = aggregateCodeOnlyUninstallPlan(records);
|
|
4282
|
+
|
|
4283
|
+
if (!options.yes && options.origin !== 'npm') {
|
|
4284
|
+
const confirmed = await promptUninstallConfirmation({ records, plan });
|
|
4285
|
+
if (!confirmed) {
|
|
4286
|
+
console.log('DeepScientist uninstall cancelled.');
|
|
4287
|
+
process.exit(1);
|
|
4288
|
+
}
|
|
4289
|
+
}
|
|
4290
|
+
|
|
4291
|
+
for (const record of records) {
|
|
4292
|
+
try {
|
|
4293
|
+
await stopDaemon(record.home);
|
|
4294
|
+
} catch (error) {
|
|
4295
|
+
console.warn(`DeepScientist could not fully stop the daemon for ${record.home}: ${error instanceof Error ? error.message : String(error)}`);
|
|
4296
|
+
}
|
|
4297
|
+
}
|
|
4298
|
+
|
|
4299
|
+
const removed = [];
|
|
4300
|
+
for (const targetPath of plan.remove_paths) {
|
|
4301
|
+
if (removePathEntry(targetPath)) {
|
|
4302
|
+
removed.push(targetPath);
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
for (const targetPath of plan.wrapper_paths) {
|
|
4306
|
+
if (removePathEntry(targetPath)) {
|
|
4307
|
+
removed.push(targetPath);
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
|
|
4311
|
+
removeInstallRecords((record) => records.some((candidate) => installRecordMatches(candidate, record)));
|
|
4312
|
+
|
|
4313
|
+
let npmRemovalMessage = null;
|
|
4314
|
+
if (options.origin !== 'npm' && detectInstallMode(repoRoot) === 'npm-package') {
|
|
4315
|
+
const npmRemoval = runGlobalNpmUninstall();
|
|
4316
|
+
if (!npmRemoval.ok) {
|
|
4317
|
+
npmRemovalMessage = npmRemoval.message;
|
|
4318
|
+
}
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
console.log('');
|
|
4322
|
+
console.log('DeepScientist code uninstall completed.');
|
|
4323
|
+
if (removed.length > 0) {
|
|
4324
|
+
console.log('');
|
|
4325
|
+
console.log('Removed:');
|
|
4326
|
+
for (const targetPath of removed) {
|
|
4327
|
+
console.log(`- ${targetPath}`);
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
console.log('');
|
|
4331
|
+
console.log('Preserved local data:');
|
|
4332
|
+
for (const targetPath of plan.preserve_paths) {
|
|
4333
|
+
console.log(`- ${targetPath}`);
|
|
4334
|
+
}
|
|
4335
|
+
console.log('');
|
|
4336
|
+
for (const record of records) {
|
|
4337
|
+
console.log(`If you also want to delete local data manually: rm -rf ${record.home}`);
|
|
4338
|
+
}
|
|
4339
|
+
if (npmRemovalMessage) {
|
|
4340
|
+
console.log('');
|
|
4341
|
+
console.warn(`Global npm package removal did not complete automatically: ${npmRemovalMessage}`);
|
|
4342
|
+
console.warn(`Run: npm uninstall -g ${UPDATE_PACKAGE_NAME}`);
|
|
4343
|
+
}
|
|
4344
|
+
process.exit(0);
|
|
4345
|
+
}
|
|
4346
|
+
|
|
3543
4347
|
function writeUpdateLog(home, content) {
|
|
3544
4348
|
const logPath = path.join(home, 'logs', 'update.log');
|
|
3545
4349
|
ensureDir(path.dirname(logPath));
|
|
@@ -3753,6 +4557,7 @@ async function performSelfUpdate(home, options = {}) {
|
|
|
3753
4557
|
};
|
|
3754
4558
|
}
|
|
3755
4559
|
|
|
4560
|
+
const npmBinary = resolveNpmBinary();
|
|
3756
4561
|
const installResult = runNpmInstallLatest(home, npmBinary);
|
|
3757
4562
|
if (!installResult.ok) {
|
|
3758
4563
|
const message = summarizeUpdateFailure(installResult);
|
|
@@ -4148,7 +4953,7 @@ function readConfiguredUiAddressFromFile(home, fallbackHost, fallbackPort) {
|
|
|
4148
4953
|
}
|
|
4149
4954
|
}
|
|
4150
4955
|
|
|
4151
|
-
async function startDaemon(home, runtimePython, host, port, proxy = null, envOverrides = {}, authEnabled = false) {
|
|
4956
|
+
async function startDaemon(home, runtimePython, host, port, proxy = null, envOverrides = {}, authEnabled = false, runnerName = null, allowRunnerFallback = true) {
|
|
4152
4957
|
const browserUrl = browserUiUrl(host, port);
|
|
4153
4958
|
const daemonBindUrl = bindUiUrl(host, port);
|
|
4154
4959
|
const state = readDaemonState(home);
|
|
@@ -4185,6 +4990,7 @@ async function startDaemon(home, runtimePython, host, port, proxy = null, envOve
|
|
|
4185
4990
|
reused: true,
|
|
4186
4991
|
authEnabled: stateAuthEnabled,
|
|
4187
4992
|
authToken: resolvedAuthToken,
|
|
4993
|
+
runnerName: normalizeRunnerName(runnerName || readConfiguredDefaultRunner(home, "codex"), "codex"),
|
|
4188
4994
|
};
|
|
4189
4995
|
}
|
|
4190
4996
|
console.error(
|
|
@@ -4202,13 +5008,21 @@ async function startDaemon(home, runtimePython, host, port, proxy = null, envOve
|
|
|
4202
5008
|
removeDaemonState(home);
|
|
4203
5009
|
}
|
|
4204
5010
|
|
|
4205
|
-
const
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
5011
|
+
const requestedRunner = normalizeRunnerName(runnerName || readConfiguredDefaultRunner(home, "codex"), "codex");
|
|
5012
|
+
const startupRunner = resolveStartupRunner(home, runtimePython, requestedRunner, envOverrides, {
|
|
5013
|
+
allowFallback: allowRunnerFallback,
|
|
5014
|
+
});
|
|
5015
|
+
if (!startupRunner.ok) {
|
|
5016
|
+
throw createRunnerPreflightError(home, requestedRunner, startupRunner.probe);
|
|
5017
|
+
}
|
|
5018
|
+
const effectiveRunner = startupRunner.runnerName;
|
|
5019
|
+
const effectiveEnvOverrides = {
|
|
5020
|
+
...envOverrides,
|
|
5021
|
+
DEEPSCIENTIST_DEFAULT_RUNNER: effectiveRunner,
|
|
5022
|
+
DEEPSCIENTIST_ENABLE_RUNNER: effectiveRunner,
|
|
5023
|
+
};
|
|
5024
|
+
if (startupRunner.fallback) {
|
|
5025
|
+
console.log(`WARNING: ${requestedRunner} is not ready yet. Starting DeepScientist with fallback runner \`${effectiveRunner}\` for this session.`);
|
|
4212
5026
|
}
|
|
4213
5027
|
|
|
4214
5028
|
ensureNodeBundle('src/ui', 'dist/index.html');
|
|
@@ -4218,7 +5032,7 @@ async function startDaemon(home, runtimePython, host, port, proxy = null, envOve
|
|
|
4218
5032
|
host,
|
|
4219
5033
|
port,
|
|
4220
5034
|
proxy,
|
|
4221
|
-
envOverrides,
|
|
5035
|
+
envOverrides: effectiveEnvOverrides,
|
|
4222
5036
|
authEnabled,
|
|
4223
5037
|
authToken: desiredAuthToken,
|
|
4224
5038
|
});
|
|
@@ -4238,7 +5052,7 @@ async function startDaemon(home, runtimePython, host, port, proxy = null, envOve
|
|
|
4238
5052
|
host,
|
|
4239
5053
|
port,
|
|
4240
5054
|
proxy,
|
|
4241
|
-
envOverrides,
|
|
5055
|
+
envOverrides: effectiveEnvOverrides,
|
|
4242
5056
|
daemonId: String((liveState || {}).daemon_id || ''),
|
|
4243
5057
|
});
|
|
4244
5058
|
if (supervisorPid) {
|
|
@@ -4250,6 +5064,7 @@ async function startDaemon(home, runtimePython, host, port, proxy = null, envOve
|
|
|
4250
5064
|
reused: false,
|
|
4251
5065
|
authEnabled,
|
|
4252
5066
|
authToken: desiredAuthToken,
|
|
5067
|
+
runnerName: effectiveRunner,
|
|
4253
5068
|
};
|
|
4254
5069
|
}
|
|
4255
5070
|
await sleep(250);
|
|
@@ -4310,14 +5125,15 @@ function openBrowser(url) {
|
|
|
4310
5125
|
return false;
|
|
4311
5126
|
}
|
|
4312
5127
|
|
|
4313
|
-
function
|
|
4314
|
-
if (!error || error.code !== '
|
|
5128
|
+
function handleRunnerPreflightFailure(error) {
|
|
5129
|
+
if (!error || error.code !== 'DS_RUNNER_PREFLIGHT') {
|
|
4315
5130
|
return false;
|
|
4316
5131
|
}
|
|
4317
5132
|
const errorLabel = colorize('\u001B[1;38;5;196m', 'ERROR');
|
|
4318
5133
|
const warningLabel = colorize('\u001B[1;38;5;214m', 'WARNING');
|
|
4319
5134
|
console.error('');
|
|
4320
|
-
|
|
5135
|
+
const runnerLabel = String(error.runnerName || 'codex').trim() || 'runner';
|
|
5136
|
+
console.error(`${errorLabel} DeepScientist could not start because ${runnerLabel} is not ready yet.`);
|
|
4321
5137
|
console.error(`Report: ${error.reportPath}`);
|
|
4322
5138
|
if (Array.isArray(error.probe?.errors)) {
|
|
4323
5139
|
for (const item of error.probe.errors) {
|
|
@@ -4335,7 +5151,7 @@ function handleCodexPreflightFailure(error) {
|
|
|
4335
5151
|
: [
|
|
4336
5152
|
'In most installs, `npm install -g @researai/deepscientist` also installs the bundled Codex dependency.',
|
|
4337
5153
|
'If `codex` is still missing, run `npm install -g @openai/codex`.',
|
|
4338
|
-
'Run `codex
|
|
5154
|
+
'Run `codex login` (or just `codex`) and finish authentication.',
|
|
4339
5155
|
'Run `ds doctor` and confirm the Codex check passes.',
|
|
4340
5156
|
'Run `ds` again.',
|
|
4341
5157
|
];
|
|
@@ -4347,7 +5163,7 @@ function handleCodexPreflightFailure(error) {
|
|
|
4347
5163
|
return true;
|
|
4348
5164
|
}
|
|
4349
5165
|
|
|
4350
|
-
function launchTui(url, questId, home, runtimePython, authToken = null) {
|
|
5166
|
+
function launchTui(url, questId, home, runtimePython, authToken = null, debugOptions = {}) {
|
|
4351
5167
|
const entry = ensureNodeBundle('src/tui', 'dist/index.js');
|
|
4352
5168
|
const args = [entry, '--base-url', url];
|
|
4353
5169
|
if (questId) {
|
|
@@ -4356,6 +5172,12 @@ function launchTui(url, questId, home, runtimePython, authToken = null) {
|
|
|
4356
5172
|
if (typeof authToken === 'string' && authToken.trim()) {
|
|
4357
5173
|
args.push('--auth-token', authToken.trim());
|
|
4358
5174
|
}
|
|
5175
|
+
if (debugOptions && debugOptions.enabled) {
|
|
5176
|
+
args.push('--debug');
|
|
5177
|
+
}
|
|
5178
|
+
if (debugOptions && typeof debugOptions.logPath === 'string' && debugOptions.logPath.trim()) {
|
|
5179
|
+
args.push('--debug-log', debugOptions.logPath.trim());
|
|
5180
|
+
}
|
|
4359
5181
|
const child = spawn(process.execPath, args, {
|
|
4360
5182
|
cwd: repoRoot,
|
|
4361
5183
|
stdio: 'inherit',
|
|
@@ -4635,12 +5457,19 @@ async function launcherMain(rawArgs) {
|
|
|
4635
5457
|
process.exit(1);
|
|
4636
5458
|
}
|
|
4637
5459
|
|
|
4638
|
-
const home = options.
|
|
5460
|
+
const home = (options.stop || options.status || options.restart)
|
|
5461
|
+
? resolveManagementHome(rawArgs, options)
|
|
5462
|
+
: (options.home || resolveHome(rawArgs));
|
|
4639
5463
|
applyLauncherProxy(options.proxy);
|
|
4640
5464
|
ensureDir(home);
|
|
5465
|
+
registerCurrentInstall(home);
|
|
5466
|
+
const forceWrapperRepair =
|
|
5467
|
+
detectInstallMode(repoRoot) !== 'npm-package'
|
|
5468
|
+
&& Boolean(options.home || process.env.DEEPSCIENTIST_HOME);
|
|
4641
5469
|
repairLegacyPathWrappers({
|
|
4642
5470
|
home,
|
|
4643
5471
|
launcherPath: resolveLauncherPath(),
|
|
5472
|
+
force: forceWrapperRepair,
|
|
4644
5473
|
});
|
|
4645
5474
|
|
|
4646
5475
|
if (options.stop) {
|
|
@@ -4655,24 +5484,17 @@ async function launcherMain(rawArgs) {
|
|
|
4655
5484
|
const authToken = typeof state?.auth_token === 'string' ? state.auth_token.trim() : '';
|
|
4656
5485
|
const probeUrl = state?.url || browserUiUrl(configured.host, configured.port);
|
|
4657
5486
|
const health = await fetchHealth(probeUrl, authToken);
|
|
4658
|
-
const
|
|
4659
|
-
|
|
5487
|
+
const statusPayload = buildDaemonStatusPayload({
|
|
5488
|
+
home,
|
|
5489
|
+
url,
|
|
5490
|
+
state,
|
|
5491
|
+
health,
|
|
5492
|
+
launcherPath: resolveLauncherPath(),
|
|
5493
|
+
});
|
|
4660
5494
|
console.log(
|
|
4661
|
-
JSON.stringify(
|
|
4662
|
-
{
|
|
4663
|
-
healthy,
|
|
4664
|
-
identity_match: identityMatch,
|
|
4665
|
-
managed: Boolean(state),
|
|
4666
|
-
home,
|
|
4667
|
-
url,
|
|
4668
|
-
daemon: state,
|
|
4669
|
-
health,
|
|
4670
|
-
},
|
|
4671
|
-
null,
|
|
4672
|
-
2
|
|
4673
|
-
)
|
|
5495
|
+
JSON.stringify(statusPayload, null, 2)
|
|
4674
5496
|
);
|
|
4675
|
-
process.exit(healthy && (!state ||
|
|
5497
|
+
process.exit(statusPayload.healthy && (!state || statusPayload.identity_match) ? 0 : 1);
|
|
4676
5498
|
}
|
|
4677
5499
|
|
|
4678
5500
|
const pythonRuntime = ensurePythonRuntime(home);
|
|
@@ -4681,9 +5503,12 @@ async function launcherMain(rawArgs) {
|
|
|
4681
5503
|
yolo: options.yolo,
|
|
4682
5504
|
profile: options.codexProfile,
|
|
4683
5505
|
binary: options.codexBinary,
|
|
5506
|
+
runner: options.runner,
|
|
4684
5507
|
});
|
|
4685
5508
|
ensureInitialized(home, runtimePython);
|
|
4686
|
-
|
|
5509
|
+
if (!options.runner || String(options.runner).trim().toLowerCase() === "codex") {
|
|
5510
|
+
await maybeHandleMiniMaxCodexVersion(home, runtimePython, options);
|
|
5511
|
+
}
|
|
4687
5512
|
if (await maybeHandleStartupUpdate(home, rawArgs, options)) {
|
|
4688
5513
|
return true;
|
|
4689
5514
|
}
|
|
@@ -4712,9 +5537,20 @@ async function launcherMain(rawArgs) {
|
|
|
4712
5537
|
step(4, 4, 'Starting local daemon and UI surfaces');
|
|
4713
5538
|
let started;
|
|
4714
5539
|
try {
|
|
4715
|
-
|
|
5540
|
+
const selectedRunner = normalizeRunnerName(options.runner || readConfiguredDefaultRunner(home, "codex"), "codex");
|
|
5541
|
+
started = await startDaemon(
|
|
5542
|
+
home,
|
|
5543
|
+
runtimePython,
|
|
5544
|
+
host,
|
|
5545
|
+
port,
|
|
5546
|
+
options.proxy,
|
|
5547
|
+
codexOverrideEnv,
|
|
5548
|
+
authEnabled,
|
|
5549
|
+
selectedRunner,
|
|
5550
|
+
!options.runner
|
|
5551
|
+
);
|
|
4716
5552
|
} catch (error) {
|
|
4717
|
-
if (
|
|
5553
|
+
if (handleRunnerPreflightFailure(error)) return true;
|
|
4718
5554
|
throw error;
|
|
4719
5555
|
}
|
|
4720
5556
|
const browserOpened = shouldOpenBrowser ? openBrowser(started.url) : false;
|
|
@@ -4730,6 +5566,7 @@ async function launcherMain(rawArgs) {
|
|
|
4730
5566
|
yolo: options.yolo,
|
|
4731
5567
|
authEnabled: started.authEnabled,
|
|
4732
5568
|
authToken: started.authToken,
|
|
5569
|
+
runnerName: started.runnerName || selectedRunner,
|
|
4733
5570
|
});
|
|
4734
5571
|
|
|
4735
5572
|
if (options.daemonOnly) {
|
|
@@ -4738,7 +5575,10 @@ async function launcherMain(rawArgs) {
|
|
|
4738
5575
|
if (mode === 'web') {
|
|
4739
5576
|
process.exit(0);
|
|
4740
5577
|
}
|
|
4741
|
-
launchTui(browserUiUrl(host, port), options.questId, home, runtimePython, started.authToken
|
|
5578
|
+
launchTui(browserUiUrl(host, port), options.questId, home, runtimePython, started.authToken, {
|
|
5579
|
+
enabled: options.tuiDebug,
|
|
5580
|
+
logPath: options.tuiDebugLogPath,
|
|
5581
|
+
});
|
|
4742
5582
|
return true;
|
|
4743
5583
|
}
|
|
4744
5584
|
|
|
@@ -4761,6 +5601,10 @@ async function main() {
|
|
|
4761
5601
|
await migrateMain(args);
|
|
4762
5602
|
return;
|
|
4763
5603
|
}
|
|
5604
|
+
if (positional && positional.value === 'uninstall') {
|
|
5605
|
+
await uninstallMain(args);
|
|
5606
|
+
return;
|
|
5607
|
+
}
|
|
4764
5608
|
if (
|
|
4765
5609
|
args.length === 0
|
|
4766
5610
|
|| args[0] === 'ui'
|
|
@@ -4777,24 +5621,34 @@ async function main() {
|
|
|
4777
5621
|
const home = resolveHome(args);
|
|
4778
5622
|
const pythonRuntime = ensurePythonRuntime(home);
|
|
4779
5623
|
const runtimePython = pythonRuntime.runtimePython;
|
|
5624
|
+
const runnerOptionForEnv = positional.value === 'doctor' || positional.value === 'docker'
|
|
5625
|
+
? null
|
|
5626
|
+
: readOptionValue(args, '--runner');
|
|
4780
5627
|
const codexOverrideEnv = buildCodexOverrideEnv({
|
|
4781
5628
|
yolo: resolveYoloFlag(args, true),
|
|
4782
5629
|
profile: readOptionValue(args, '--codex-profile'),
|
|
4783
5630
|
binary: readOptionValue(args, '--codex'),
|
|
5631
|
+
runner: runnerOptionForEnv,
|
|
4784
5632
|
});
|
|
4785
5633
|
if (positional.value === 'run' || positional.value === 'daemon') {
|
|
4786
5634
|
maybePrintOptionalLatexNotice(home);
|
|
4787
5635
|
}
|
|
4788
5636
|
if (positional.value === 'run' || positional.value === 'daemon') {
|
|
4789
|
-
const
|
|
4790
|
-
|
|
5637
|
+
const selectedRunner = normalizeRunnerName(readOptionValue(args, '--runner') || readConfiguredDefaultRunner(home, "codex"), "codex");
|
|
5638
|
+
const bootstrapState = selectedRunner === "codex"
|
|
5639
|
+
? readCodexBootstrapState(home, runtimePython, codexOverrideEnv)
|
|
5640
|
+
: readRunnerBootstrapState(home, runtimePython, selectedRunner, codexOverrideEnv);
|
|
5641
|
+
const runnerReady = selectedRunner === "codex" ? Boolean(bootstrapState.codex_ready) : Boolean(bootstrapState.ready);
|
|
5642
|
+
if (!runnerReady) {
|
|
4791
5643
|
try {
|
|
4792
|
-
const probe =
|
|
5644
|
+
const probe = selectedRunner === "codex"
|
|
5645
|
+
? probeCodexBootstrap(home, runtimePython, codexOverrideEnv)
|
|
5646
|
+
: probeRunnerBootstrap(home, runtimePython, selectedRunner, codexOverrideEnv);
|
|
4793
5647
|
if (!probe || probe.ok !== true) {
|
|
4794
|
-
throw
|
|
5648
|
+
throw createRunnerPreflightError(home, selectedRunner, probe);
|
|
4795
5649
|
}
|
|
4796
5650
|
} catch (error) {
|
|
4797
|
-
if (
|
|
5651
|
+
if (handleRunnerPreflightFailure(error)) return;
|
|
4798
5652
|
throw error;
|
|
4799
5653
|
}
|
|
4800
5654
|
}
|
|
@@ -4820,10 +5674,12 @@ module.exports = {
|
|
|
4820
5674
|
legacyVenvRootPath,
|
|
4821
5675
|
resolveUvBinary,
|
|
4822
5676
|
resolveHome,
|
|
5677
|
+
resolveManagementHome,
|
|
4823
5678
|
parseLauncherArgs,
|
|
4824
5679
|
generateBrowserAuthToken,
|
|
4825
5680
|
appendBrowserAuthToken,
|
|
4826
5681
|
normalizeProxyUrl,
|
|
5682
|
+
buildCodeOnlyUninstallPlan,
|
|
4827
5683
|
parseMigrateArgs,
|
|
4828
5684
|
parseLegacyWrapperCandidate,
|
|
4829
5685
|
repairLegacyPathWrappers,
|
|
@@ -4833,11 +5689,13 @@ module.exports = {
|
|
|
4833
5689
|
buildUvSyncFailureGuidance,
|
|
4834
5690
|
updateManualCommand,
|
|
4835
5691
|
buildUpdateStatus,
|
|
5692
|
+
buildDaemonStatusPayload,
|
|
4836
5693
|
parseYesNoAnswer,
|
|
4837
5694
|
normalizeLauncherRelaunchArgs,
|
|
4838
5695
|
officialRepositoryLine,
|
|
4839
5696
|
stripAnsi,
|
|
4840
5697
|
normalizeLegacyHostFlagArgs,
|
|
5698
|
+
runGlobalNpmUninstall,
|
|
4841
5699
|
},
|
|
4842
5700
|
};
|
|
4843
5701
|
|