helixlife-expert-cli 0.1.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.
Files changed (523) hide show
  1. package/README.md +159 -0
  2. package/cli/bin/helixlife-expert.js +3 -0
  3. package/cli/dist/core/api/client.d.ts +31 -0
  4. package/cli/dist/core/api/client.d.ts.map +1 -0
  5. package/cli/dist/core/api/client.js +183 -0
  6. package/cli/dist/core/api/client.js.map +1 -0
  7. package/cli/dist/core/api/http.d.ts +3 -0
  8. package/cli/dist/core/api/http.d.ts.map +1 -0
  9. package/cli/dist/core/api/http.js +22 -0
  10. package/cli/dist/core/api/http.js.map +1 -0
  11. package/cli/dist/core/api/response.d.ts +48 -0
  12. package/cli/dist/core/api/response.d.ts.map +1 -0
  13. package/cli/dist/core/api/response.js +84 -0
  14. package/cli/dist/core/api/response.js.map +1 -0
  15. package/cli/dist/core/api/sse.d.ts +6 -0
  16. package/cli/dist/core/api/sse.d.ts.map +1 -0
  17. package/cli/dist/core/api/sse.js +60 -0
  18. package/cli/dist/core/api/sse.js.map +1 -0
  19. package/cli/dist/core/auth/index.d.ts +35 -0
  20. package/cli/dist/core/auth/index.d.ts.map +1 -0
  21. package/cli/dist/core/auth/index.js +150 -0
  22. package/cli/dist/core/auth/index.js.map +1 -0
  23. package/cli/dist/core/env-config.d.ts +16 -0
  24. package/cli/dist/core/env-config.d.ts.map +1 -0
  25. package/cli/dist/core/env-config.js +80 -0
  26. package/cli/dist/core/env-config.js.map +1 -0
  27. package/cli/dist/core/errors.d.ts +20 -0
  28. package/cli/dist/core/errors.d.ts.map +1 -0
  29. package/cli/dist/core/errors.js +28 -0
  30. package/cli/dist/core/errors.js.map +1 -0
  31. package/cli/dist/core/index.d.ts +16 -0
  32. package/cli/dist/core/index.d.ts.map +1 -0
  33. package/cli/dist/core/index.js +16 -0
  34. package/cli/dist/core/index.js.map +1 -0
  35. package/cli/dist/core/interactive.d.ts +18 -0
  36. package/cli/dist/core/interactive.d.ts.map +1 -0
  37. package/cli/dist/core/interactive.js +74 -0
  38. package/cli/dist/core/interactive.js.map +1 -0
  39. package/cli/dist/core/output/index.d.ts +29 -0
  40. package/cli/dist/core/output/index.d.ts.map +1 -0
  41. package/cli/dist/core/output/index.js +153 -0
  42. package/cli/dist/core/output/index.js.map +1 -0
  43. package/cli/dist/core/parse.d.ts +9 -0
  44. package/cli/dist/core/parse.d.ts.map +1 -0
  45. package/cli/dist/core/parse.js +31 -0
  46. package/cli/dist/core/parse.js.map +1 -0
  47. package/cli/dist/core/paths.d.ts +21 -0
  48. package/cli/dist/core/paths.d.ts.map +1 -0
  49. package/cli/dist/core/paths.js +65 -0
  50. package/cli/dist/core/paths.js.map +1 -0
  51. package/cli/dist/core/sse-utils.d.ts +49 -0
  52. package/cli/dist/core/sse-utils.d.ts.map +1 -0
  53. package/cli/dist/core/sse-utils.js +181 -0
  54. package/cli/dist/core/sse-utils.js.map +1 -0
  55. package/cli/dist/core/terminal.d.ts +2 -0
  56. package/cli/dist/core/terminal.d.ts.map +1 -0
  57. package/cli/dist/core/terminal.js +6 -0
  58. package/cli/dist/core/terminal.js.map +1 -0
  59. package/cli/dist/core/token/index.d.ts +5 -0
  60. package/cli/dist/core/token/index.d.ts.map +1 -0
  61. package/cli/dist/core/token/index.js +26 -0
  62. package/cli/dist/core/token/index.js.map +1 -0
  63. package/cli/dist/core/types/config.d.ts +8 -0
  64. package/cli/dist/core/types/config.d.ts.map +1 -0
  65. package/cli/dist/core/types/config.js +30 -0
  66. package/cli/dist/core/types/config.js.map +1 -0
  67. package/cli/dist/core/version.d.ts +2 -0
  68. package/cli/dist/core/version.d.ts.map +1 -0
  69. package/cli/dist/core/version.js +10 -0
  70. package/cli/dist/core/version.js.map +1 -0
  71. package/cli/dist/index.d.ts +2 -0
  72. package/cli/dist/index.d.ts.map +1 -0
  73. package/cli/dist/index.js +23 -0
  74. package/cli/dist/index.js.map +1 -0
  75. package/cli/dist/modules/analysis/constants.d.ts +3 -0
  76. package/cli/dist/modules/analysis/constants.d.ts.map +1 -0
  77. package/cli/dist/modules/analysis/constants.js +3 -0
  78. package/cli/dist/modules/analysis/constants.js.map +1 -0
  79. package/cli/dist/modules/analysis/index.d.ts +3 -0
  80. package/cli/dist/modules/analysis/index.d.ts.map +1 -0
  81. package/cli/dist/modules/analysis/index.js +23 -0
  82. package/cli/dist/modules/analysis/index.js.map +1 -0
  83. package/cli/dist/modules/auth/index.d.ts +3 -0
  84. package/cli/dist/modules/auth/index.d.ts.map +1 -0
  85. package/cli/dist/modules/auth/index.js +76 -0
  86. package/cli/dist/modules/auth/index.js.map +1 -0
  87. package/cli/dist/modules/expert-scaffold.d.ts +27 -0
  88. package/cli/dist/modules/expert-scaffold.d.ts.map +1 -0
  89. package/cli/dist/modules/expert-scaffold.js +25 -0
  90. package/cli/dist/modules/expert-scaffold.js.map +1 -0
  91. package/cli/dist/modules/fund/clinical/apps.d.ts +19 -0
  92. package/cli/dist/modules/fund/clinical/apps.d.ts.map +1 -0
  93. package/cli/dist/modules/fund/clinical/apps.js +14 -0
  94. package/cli/dist/modules/fund/clinical/apps.js.map +1 -0
  95. package/cli/dist/modules/fund/clinical/command-utils.d.ts +4 -0
  96. package/cli/dist/modules/fund/clinical/command-utils.d.ts.map +1 -0
  97. package/cli/dist/modules/fund/clinical/command-utils.js +40 -0
  98. package/cli/dist/modules/fund/clinical/command-utils.js.map +1 -0
  99. package/cli/dist/modules/fund/clinical/commands/article-create.d.ts +9 -0
  100. package/cli/dist/modules/fund/clinical/commands/article-create.d.ts.map +1 -0
  101. package/cli/dist/modules/fund/clinical/commands/article-create.js +99 -0
  102. package/cli/dist/modules/fund/clinical/commands/article-create.js.map +1 -0
  103. package/cli/dist/modules/fund/clinical/commands/article-download.d.ts +30 -0
  104. package/cli/dist/modules/fund/clinical/commands/article-download.d.ts.map +1 -0
  105. package/cli/dist/modules/fund/clinical/commands/article-download.js +153 -0
  106. package/cli/dist/modules/fund/clinical/commands/article-download.js.map +1 -0
  107. package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts +7 -0
  108. package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts.map +1 -0
  109. package/cli/dist/modules/fund/clinical/commands/four-elements-create.js +81 -0
  110. package/cli/dist/modules/fund/clinical/commands/four-elements-create.js.map +1 -0
  111. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts +7 -0
  112. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts.map +1 -0
  113. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js +76 -0
  114. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js.map +1 -0
  115. package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts +16 -0
  116. package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts.map +1 -0
  117. package/cli/dist/modules/fund/clinical/commands/four-elements-update.js +108 -0
  118. package/cli/dist/modules/fund/clinical/commands/four-elements-update.js.map +1 -0
  119. package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts +14 -0
  120. package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts.map +1 -0
  121. package/cli/dist/modules/fund/clinical/commands/sample-size.js +164 -0
  122. package/cli/dist/modules/fund/clinical/commands/sample-size.js.map +1 -0
  123. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts +25 -0
  124. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts.map +1 -0
  125. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js +228 -0
  126. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js.map +1 -0
  127. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts +45 -0
  128. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts.map +1 -0
  129. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js +211 -0
  130. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js.map +1 -0
  131. package/cli/dist/modules/fund/clinical/constants.d.ts +85 -0
  132. package/cli/dist/modules/fund/clinical/constants.d.ts.map +1 -0
  133. package/cli/dist/modules/fund/clinical/constants.js +161 -0
  134. package/cli/dist/modules/fund/clinical/constants.js.map +1 -0
  135. package/cli/dist/modules/fund/clinical/form-rules.d.ts +56 -0
  136. package/cli/dist/modules/fund/clinical/form-rules.d.ts.map +1 -0
  137. package/cli/dist/modules/fund/clinical/form-rules.js +542 -0
  138. package/cli/dist/modules/fund/clinical/form-rules.js.map +1 -0
  139. package/cli/dist/modules/fund/clinical/four-elements.d.ts +46 -0
  140. package/cli/dist/modules/fund/clinical/four-elements.d.ts.map +1 -0
  141. package/cli/dist/modules/fund/clinical/four-elements.js +190 -0
  142. package/cli/dist/modules/fund/clinical/four-elements.js.map +1 -0
  143. package/cli/dist/modules/fund/clinical/index.d.ts +3 -0
  144. package/cli/dist/modules/fund/clinical/index.d.ts.map +1 -0
  145. package/cli/dist/modules/fund/clinical/index.js +176 -0
  146. package/cli/dist/modules/fund/clinical/index.js.map +1 -0
  147. package/cli/dist/modules/fund/clinical/parameters.d.ts +51 -0
  148. package/cli/dist/modules/fund/clinical/parameters.d.ts.map +1 -0
  149. package/cli/dist/modules/fund/clinical/parameters.js +145 -0
  150. package/cli/dist/modules/fund/clinical/parameters.js.map +1 -0
  151. package/cli/dist/modules/fund/clinical/sample-size.d.ts +130 -0
  152. package/cli/dist/modules/fund/clinical/sample-size.d.ts.map +1 -0
  153. package/cli/dist/modules/fund/clinical/sample-size.js +356 -0
  154. package/cli/dist/modules/fund/clinical/sample-size.js.map +1 -0
  155. package/cli/dist/modules/fund/clinical/session-cache.d.ts +25 -0
  156. package/cli/dist/modules/fund/clinical/session-cache.d.ts.map +1 -0
  157. package/cli/dist/modules/fund/clinical/session-cache.js +100 -0
  158. package/cli/dist/modules/fund/clinical/session-cache.js.map +1 -0
  159. package/cli/dist/modules/fund/clinical/sse-utils.d.ts +22 -0
  160. package/cli/dist/modules/fund/clinical/sse-utils.d.ts.map +1 -0
  161. package/cli/dist/modules/fund/clinical/sse-utils.js +80 -0
  162. package/cli/dist/modules/fund/clinical/sse-utils.js.map +1 -0
  163. package/cli/dist/modules/fund/constants.d.ts +3 -0
  164. package/cli/dist/modules/fund/constants.d.ts.map +1 -0
  165. package/cli/dist/modules/fund/constants.js +3 -0
  166. package/cli/dist/modules/fund/constants.js.map +1 -0
  167. package/cli/dist/modules/fund/index.d.ts +3 -0
  168. package/cli/dist/modules/fund/index.d.ts.map +1 -0
  169. package/cli/dist/modules/fund/index.js +28 -0
  170. package/cli/dist/modules/fund/index.js.map +1 -0
  171. package/cli/dist/modules/fund/nsfc/apps.d.ts +54 -0
  172. package/cli/dist/modules/fund/nsfc/apps.d.ts.map +1 -0
  173. package/cli/dist/modules/fund/nsfc/apps.js +76 -0
  174. package/cli/dist/modules/fund/nsfc/apps.js.map +1 -0
  175. package/cli/dist/modules/fund/nsfc/article-cache.d.ts +14 -0
  176. package/cli/dist/modules/fund/nsfc/article-cache.d.ts.map +1 -0
  177. package/cli/dist/modules/fund/nsfc/article-cache.js +79 -0
  178. package/cli/dist/modules/fund/nsfc/article-cache.js.map +1 -0
  179. package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts +8 -0
  180. package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts.map +1 -0
  181. package/cli/dist/modules/fund/nsfc/commands/article-create.js +108 -0
  182. package/cli/dist/modules/fund/nsfc/commands/article-create.js.map +1 -0
  183. package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts +42 -0
  184. package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts.map +1 -0
  185. package/cli/dist/modules/fund/nsfc/commands/article-download.js +189 -0
  186. package/cli/dist/modules/fund/nsfc/commands/article-download.js.map +1 -0
  187. package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts +9 -0
  188. package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts.map +1 -0
  189. package/cli/dist/modules/fund/nsfc/commands/format-convert.js +98 -0
  190. package/cli/dist/modules/fund/nsfc/commands/format-convert.js.map +1 -0
  191. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts +12 -0
  192. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts.map +1 -0
  193. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js +351 -0
  194. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js.map +1 -0
  195. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts +21 -0
  196. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts.map +1 -0
  197. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js +197 -0
  198. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js.map +1 -0
  199. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts +9 -0
  200. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts.map +1 -0
  201. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js +120 -0
  202. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js.map +1 -0
  203. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts +11 -0
  204. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts.map +1 -0
  205. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js +125 -0
  206. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js.map +1 -0
  207. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts +11 -0
  208. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts.map +1 -0
  209. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js +109 -0
  210. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js.map +1 -0
  211. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts +9 -0
  212. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts.map +1 -0
  213. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js +64 -0
  214. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js.map +1 -0
  215. package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts +8 -0
  216. package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts.map +1 -0
  217. package/cli/dist/modules/fund/nsfc/commands/outline-create.js +103 -0
  218. package/cli/dist/modules/fund/nsfc/commands/outline-create.js.map +1 -0
  219. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts +9 -0
  220. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts.map +1 -0
  221. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js +176 -0
  222. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js.map +1 -0
  223. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts +9 -0
  224. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts.map +1 -0
  225. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js +190 -0
  226. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js.map +1 -0
  227. package/cli/dist/modules/fund/nsfc/constants.d.ts +96 -0
  228. package/cli/dist/modules/fund/nsfc/constants.d.ts.map +1 -0
  229. package/cli/dist/modules/fund/nsfc/constants.js +156 -0
  230. package/cli/dist/modules/fund/nsfc/constants.js.map +1 -0
  231. package/cli/dist/modules/fund/nsfc/graph-render.d.ts +25 -0
  232. package/cli/dist/modules/fund/nsfc/graph-render.d.ts.map +1 -0
  233. package/cli/dist/modules/fund/nsfc/graph-render.js +212 -0
  234. package/cli/dist/modules/fund/nsfc/graph-render.js.map +1 -0
  235. package/cli/dist/modules/fund/nsfc/index.d.ts +4 -0
  236. package/cli/dist/modules/fund/nsfc/index.d.ts.map +1 -0
  237. package/cli/dist/modules/fund/nsfc/index.js +238 -0
  238. package/cli/dist/modules/fund/nsfc/index.js.map +1 -0
  239. package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts +18 -0
  240. package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts.map +1 -0
  241. package/cli/dist/modules/fund/nsfc/mermaid-render.js +47 -0
  242. package/cli/dist/modules/fund/nsfc/mermaid-render.js.map +1 -0
  243. package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts +76 -0
  244. package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts.map +1 -0
  245. package/cli/dist/modules/fund/nsfc/parse-hypothesis.js +278 -0
  246. package/cli/dist/modules/fund/nsfc/parse-hypothesis.js.map +1 -0
  247. package/cli/dist/modules/fund/nsfc/parse-outline.d.ts +23 -0
  248. package/cli/dist/modules/fund/nsfc/parse-outline.d.ts.map +1 -0
  249. package/cli/dist/modules/fund/nsfc/parse-outline.js +91 -0
  250. package/cli/dist/modules/fund/nsfc/parse-outline.js.map +1 -0
  251. package/cli/dist/modules/fund/nsfc/png-watermark.d.ts +24 -0
  252. package/cli/dist/modules/fund/nsfc/png-watermark.d.ts.map +1 -0
  253. package/cli/dist/modules/fund/nsfc/png-watermark.js +78 -0
  254. package/cli/dist/modules/fund/nsfc/png-watermark.js.map +1 -0
  255. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts +20 -0
  256. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts.map +1 -0
  257. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js +107 -0
  258. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js.map +1 -0
  259. package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts +18 -0
  260. package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts.map +1 -0
  261. package/cli/dist/modules/fund/nsfc/prompt-step2.js +107 -0
  262. package/cli/dist/modules/fund/nsfc/prompt-step2.js.map +1 -0
  263. package/cli/dist/modules/fund/nsfc/request-body.d.ts +47 -0
  264. package/cli/dist/modules/fund/nsfc/request-body.d.ts.map +1 -0
  265. package/cli/dist/modules/fund/nsfc/request-body.js +38 -0
  266. package/cli/dist/modules/fund/nsfc/request-body.js.map +1 -0
  267. package/cli/dist/modules/fund/nsfc/session-cache.d.ts +48 -0
  268. package/cli/dist/modules/fund/nsfc/session-cache.d.ts.map +1 -0
  269. package/cli/dist/modules/fund/nsfc/session-cache.js +90 -0
  270. package/cli/dist/modules/fund/nsfc/session-cache.js.map +1 -0
  271. package/cli/dist/modules/fund/nsfc/sse-utils.d.ts +22 -0
  272. package/cli/dist/modules/fund/nsfc/sse-utils.d.ts.map +1 -0
  273. package/cli/dist/modules/fund/nsfc/sse-utils.js +81 -0
  274. package/cli/dist/modules/fund/nsfc/sse-utils.js.map +1 -0
  275. package/cli/dist/modules/fund/nsfc/upload.d.ts +3 -0
  276. package/cli/dist/modules/fund/nsfc/upload.d.ts.map +1 -0
  277. package/cli/dist/modules/fund/nsfc/upload.js +59 -0
  278. package/cli/dist/modules/fund/nsfc/upload.js.map +1 -0
  279. package/cli/dist/modules/fund/nsfc/validate.d.ts +30 -0
  280. package/cli/dist/modules/fund/nsfc/validate.d.ts.map +1 -0
  281. package/cli/dist/modules/fund/nsfc/validate.js +91 -0
  282. package/cli/dist/modules/fund/nsfc/validate.js.map +1 -0
  283. package/cli/dist/modules/literature/commands/workflow-list.d.ts +5 -0
  284. package/cli/dist/modules/literature/commands/workflow-list.d.ts.map +1 -0
  285. package/cli/dist/modules/literature/commands/workflow-list.js +9 -0
  286. package/cli/dist/modules/literature/commands/workflow-list.js.map +1 -0
  287. package/cli/dist/modules/literature/commands/workflow-params.d.ts +6 -0
  288. package/cli/dist/modules/literature/commands/workflow-params.d.ts.map +1 -0
  289. package/cli/dist/modules/literature/commands/workflow-params.js +9 -0
  290. package/cli/dist/modules/literature/commands/workflow-params.js.map +1 -0
  291. package/cli/dist/modules/literature/commands/workflow-run.d.ts +7 -0
  292. package/cli/dist/modules/literature/commands/workflow-run.d.ts.map +1 -0
  293. package/cli/dist/modules/literature/commands/workflow-run.js +10 -0
  294. package/cli/dist/modules/literature/commands/workflow-run.js.map +1 -0
  295. package/cli/dist/modules/literature/constants.d.ts +20 -0
  296. package/cli/dist/modules/literature/constants.d.ts.map +1 -0
  297. package/cli/dist/modules/literature/constants.js +56 -0
  298. package/cli/dist/modules/literature/constants.js.map +1 -0
  299. package/cli/dist/modules/literature/index.d.ts +3 -0
  300. package/cli/dist/modules/literature/index.d.ts.map +1 -0
  301. package/cli/dist/modules/literature/index.js +63 -0
  302. package/cli/dist/modules/literature/index.js.map +1 -0
  303. package/cli/dist/modules/meta/analysis.d.ts +127 -0
  304. package/cli/dist/modules/meta/analysis.d.ts.map +1 -0
  305. package/cli/dist/modules/meta/analysis.js +1165 -0
  306. package/cli/dist/modules/meta/analysis.js.map +1 -0
  307. package/cli/dist/modules/meta/api.d.ts +11 -0
  308. package/cli/dist/modules/meta/api.d.ts.map +1 -0
  309. package/cli/dist/modules/meta/api.js +40 -0
  310. package/cli/dist/modules/meta/api.js.map +1 -0
  311. package/cli/dist/modules/meta/commands.d.ts +3 -0
  312. package/cli/dist/modules/meta/commands.d.ts.map +1 -0
  313. package/cli/dist/modules/meta/commands.js +1185 -0
  314. package/cli/dist/modules/meta/commands.js.map +1 -0
  315. package/cli/dist/modules/meta/constants.d.ts +8 -0
  316. package/cli/dist/modules/meta/constants.d.ts.map +1 -0
  317. package/cli/dist/modules/meta/constants.js +9 -0
  318. package/cli/dist/modules/meta/constants.js.map +1 -0
  319. package/cli/dist/modules/meta/extraction.d.ts +206 -0
  320. package/cli/dist/modules/meta/extraction.d.ts.map +1 -0
  321. package/cli/dist/modules/meta/extraction.js +1248 -0
  322. package/cli/dist/modules/meta/extraction.js.map +1 -0
  323. package/cli/dist/modules/meta/index.d.ts +3 -0
  324. package/cli/dist/modules/meta/index.d.ts.map +1 -0
  325. package/cli/dist/modules/meta/index.js +19 -0
  326. package/cli/dist/modules/meta/index.js.map +1 -0
  327. package/cli/dist/modules/meta/node.d.ts +70 -0
  328. package/cli/dist/modules/meta/node.d.ts.map +1 -0
  329. package/cli/dist/modules/meta/node.js +167 -0
  330. package/cli/dist/modules/meta/node.js.map +1 -0
  331. package/cli/dist/modules/meta/plot-params.d.ts +82 -0
  332. package/cli/dist/modules/meta/plot-params.d.ts.map +1 -0
  333. package/cli/dist/modules/meta/plot-params.js +1179 -0
  334. package/cli/dist/modules/meta/plot-params.js.map +1 -0
  335. package/cli/dist/modules/meta/prisma-flow-docx.d.ts +23 -0
  336. package/cli/dist/modules/meta/prisma-flow-docx.d.ts.map +1 -0
  337. package/cli/dist/modules/meta/prisma-flow-docx.js +302 -0
  338. package/cli/dist/modules/meta/prisma-flow-docx.js.map +1 -0
  339. package/cli/dist/modules/meta/retrieve.d.ts +113 -0
  340. package/cli/dist/modules/meta/retrieve.d.ts.map +1 -0
  341. package/cli/dist/modules/meta/retrieve.js +913 -0
  342. package/cli/dist/modules/meta/retrieve.js.map +1 -0
  343. package/cli/dist/modules/meta/screening.d.ts +179 -0
  344. package/cli/dist/modules/meta/screening.d.ts.map +1 -0
  345. package/cli/dist/modules/meta/screening.js +1255 -0
  346. package/cli/dist/modules/meta/screening.js.map +1 -0
  347. package/cli/dist/modules/meta/topic.d.ts +110 -0
  348. package/cli/dist/modules/meta/topic.d.ts.map +1 -0
  349. package/cli/dist/modules/meta/topic.js +865 -0
  350. package/cli/dist/modules/meta/topic.js.map +1 -0
  351. package/cli/dist/modules/meta/types.d.ts +49 -0
  352. package/cli/dist/modules/meta/types.d.ts.map +1 -0
  353. package/cli/dist/modules/meta/types.js +2 -0
  354. package/cli/dist/modules/meta/types.js.map +1 -0
  355. package/cli/dist/modules/meta/workflow.d.ts +154 -0
  356. package/cli/dist/modules/meta/workflow.d.ts.map +1 -0
  357. package/cli/dist/modules/meta/workflow.js +956 -0
  358. package/cli/dist/modules/meta/workflow.js.map +1 -0
  359. package/cli/dist/modules/meta/writing.d.ts +83 -0
  360. package/cli/dist/modules/meta/writing.d.ts.map +1 -0
  361. package/cli/dist/modules/meta/writing.js +1077 -0
  362. package/cli/dist/modules/meta/writing.js.map +1 -0
  363. package/cli/dist/modules/proposal/artifacts.d.ts +18 -0
  364. package/cli/dist/modules/proposal/artifacts.d.ts.map +1 -0
  365. package/cli/dist/modules/proposal/artifacts.js +43 -0
  366. package/cli/dist/modules/proposal/artifacts.js.map +1 -0
  367. package/cli/dist/modules/proposal/commands/basic-create.d.ts +22 -0
  368. package/cli/dist/modules/proposal/commands/basic-create.d.ts.map +1 -0
  369. package/cli/dist/modules/proposal/commands/basic-create.js +81 -0
  370. package/cli/dist/modules/proposal/commands/basic-create.js.map +1 -0
  371. package/cli/dist/modules/proposal/commands/basic-result.d.ts +24 -0
  372. package/cli/dist/modules/proposal/commands/basic-result.d.ts.map +1 -0
  373. package/cli/dist/modules/proposal/commands/basic-result.js +96 -0
  374. package/cli/dist/modules/proposal/commands/basic-result.js.map +1 -0
  375. package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts +5 -0
  376. package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts.map +1 -0
  377. package/cli/dist/modules/proposal/commands/bioinfo-params.js +9 -0
  378. package/cli/dist/modules/proposal/commands/bioinfo-params.js.map +1 -0
  379. package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts +6 -0
  380. package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts.map +1 -0
  381. package/cli/dist/modules/proposal/commands/bioinfo-run.js +10 -0
  382. package/cli/dist/modules/proposal/commands/bioinfo-run.js.map +1 -0
  383. package/cli/dist/modules/proposal/commands/clinical-list.d.ts +5 -0
  384. package/cli/dist/modules/proposal/commands/clinical-list.d.ts.map +1 -0
  385. package/cli/dist/modules/proposal/commands/clinical-list.js +9 -0
  386. package/cli/dist/modules/proposal/commands/clinical-list.js.map +1 -0
  387. package/cli/dist/modules/proposal/commands/clinical-params.d.ts +6 -0
  388. package/cli/dist/modules/proposal/commands/clinical-params.d.ts.map +1 -0
  389. package/cli/dist/modules/proposal/commands/clinical-params.js +9 -0
  390. package/cli/dist/modules/proposal/commands/clinical-params.js.map +1 -0
  391. package/cli/dist/modules/proposal/commands/clinical-run.d.ts +7 -0
  392. package/cli/dist/modules/proposal/commands/clinical-run.d.ts.map +1 -0
  393. package/cli/dist/modules/proposal/commands/clinical-run.js +10 -0
  394. package/cli/dist/modules/proposal/commands/clinical-run.js.map +1 -0
  395. package/cli/dist/modules/proposal/constants.d.ts +34 -0
  396. package/cli/dist/modules/proposal/constants.d.ts.map +1 -0
  397. package/cli/dist/modules/proposal/constants.js +75 -0
  398. package/cli/dist/modules/proposal/constants.js.map +1 -0
  399. package/cli/dist/modules/proposal/index.d.ts +3 -0
  400. package/cli/dist/modules/proposal/index.d.ts.map +1 -0
  401. package/cli/dist/modules/proposal/index.js +95 -0
  402. package/cli/dist/modules/proposal/index.js.map +1 -0
  403. package/cli/dist/modules/proposal/newidea-env.d.ts +28 -0
  404. package/cli/dist/modules/proposal/newidea-env.d.ts.map +1 -0
  405. package/cli/dist/modules/proposal/newidea-env.js +69 -0
  406. package/cli/dist/modules/proposal/newidea-env.js.map +1 -0
  407. package/cli/dist/modules/proposal/newidea-runner.d.ts +25 -0
  408. package/cli/dist/modules/proposal/newidea-runner.d.ts.map +1 -0
  409. package/cli/dist/modules/proposal/newidea-runner.js +158 -0
  410. package/cli/dist/modules/proposal/newidea-runner.js.map +1 -0
  411. package/cli/dist/modules/proposal/parse.d.ts +25 -0
  412. package/cli/dist/modules/proposal/parse.d.ts.map +1 -0
  413. package/cli/dist/modules/proposal/parse.js +173 -0
  414. package/cli/dist/modules/proposal/parse.js.map +1 -0
  415. package/cli/dist/modules/sci/apps.d.ts +48 -0
  416. package/cli/dist/modules/sci/apps.d.ts.map +1 -0
  417. package/cli/dist/modules/sci/apps.js +43 -0
  418. package/cli/dist/modules/sci/apps.js.map +1 -0
  419. package/cli/dist/modules/sci/article-cache.d.ts +32 -0
  420. package/cli/dist/modules/sci/article-cache.d.ts.map +1 -0
  421. package/cli/dist/modules/sci/article-cache.js +163 -0
  422. package/cli/dist/modules/sci/article-cache.js.map +1 -0
  423. package/cli/dist/modules/sci/article-validate.d.ts +11 -0
  424. package/cli/dist/modules/sci/article-validate.d.ts.map +1 -0
  425. package/cli/dist/modules/sci/article-validate.js +43 -0
  426. package/cli/dist/modules/sci/article-validate.js.map +1 -0
  427. package/cli/dist/modules/sci/commands/article-create.d.ts +46 -0
  428. package/cli/dist/modules/sci/commands/article-create.d.ts.map +1 -0
  429. package/cli/dist/modules/sci/commands/article-create.js +315 -0
  430. package/cli/dist/modules/sci/commands/article-create.js.map +1 -0
  431. package/cli/dist/modules/sci/commands/article-download.d.ts +50 -0
  432. package/cli/dist/modules/sci/commands/article-download.d.ts.map +1 -0
  433. package/cli/dist/modules/sci/commands/article-download.js +281 -0
  434. package/cli/dist/modules/sci/commands/article-download.js.map +1 -0
  435. package/cli/dist/modules/sci/commands/outline.d.ts +36 -0
  436. package/cli/dist/modules/sci/commands/outline.d.ts.map +1 -0
  437. package/cli/dist/modules/sci/commands/outline.js +491 -0
  438. package/cli/dist/modules/sci/commands/outline.js.map +1 -0
  439. package/cli/dist/modules/sci/commands/template.d.ts +9 -0
  440. package/cli/dist/modules/sci/commands/template.d.ts.map +1 -0
  441. package/cli/dist/modules/sci/commands/template.js +12 -0
  442. package/cli/dist/modules/sci/commands/template.js.map +1 -0
  443. package/cli/dist/modules/sci/commands.d.ts +3 -0
  444. package/cli/dist/modules/sci/commands.d.ts.map +1 -0
  445. package/cli/dist/modules/sci/commands.js +108 -0
  446. package/cli/dist/modules/sci/commands.js.map +1 -0
  447. package/cli/dist/modules/sci/constants.d.ts +117 -0
  448. package/cli/dist/modules/sci/constants.d.ts.map +1 -0
  449. package/cli/dist/modules/sci/constants.js +152 -0
  450. package/cli/dist/modules/sci/constants.js.map +1 -0
  451. package/cli/dist/modules/sci/content-source.d.ts +18 -0
  452. package/cli/dist/modules/sci/content-source.d.ts.map +1 -0
  453. package/cli/dist/modules/sci/content-source.js +54 -0
  454. package/cli/dist/modules/sci/content-source.js.map +1 -0
  455. package/cli/dist/modules/sci/index.d.ts +3 -0
  456. package/cli/dist/modules/sci/index.d.ts.map +1 -0
  457. package/cli/dist/modules/sci/index.js +19 -0
  458. package/cli/dist/modules/sci/index.js.map +1 -0
  459. package/cli/dist/modules/sci/outline-transform.d.ts +16 -0
  460. package/cli/dist/modules/sci/outline-transform.d.ts.map +1 -0
  461. package/cli/dist/modules/sci/outline-transform.js +67 -0
  462. package/cli/dist/modules/sci/outline-transform.js.map +1 -0
  463. package/cli/dist/modules/sci/precheck-cache.d.ts +23 -0
  464. package/cli/dist/modules/sci/precheck-cache.d.ts.map +1 -0
  465. package/cli/dist/modules/sci/precheck-cache.js +141 -0
  466. package/cli/dist/modules/sci/precheck-cache.js.map +1 -0
  467. package/cli/dist/modules/sci/prompt-article.d.ts +12 -0
  468. package/cli/dist/modules/sci/prompt-article.d.ts.map +1 -0
  469. package/cli/dist/modules/sci/prompt-article.js +37 -0
  470. package/cli/dist/modules/sci/prompt-article.js.map +1 -0
  471. package/cli/dist/modules/sci/prompt-precheck.d.ts +16 -0
  472. package/cli/dist/modules/sci/prompt-precheck.d.ts.map +1 -0
  473. package/cli/dist/modules/sci/prompt-precheck.js +61 -0
  474. package/cli/dist/modules/sci/prompt-precheck.js.map +1 -0
  475. package/cli/dist/modules/sci/sse-utils.d.ts +50 -0
  476. package/cli/dist/modules/sci/sse-utils.d.ts.map +1 -0
  477. package/cli/dist/modules/sci/sse-utils.js +207 -0
  478. package/cli/dist/modules/sci/sse-utils.js.map +1 -0
  479. package/cli/dist/modules/shared/result-wrapper.d.ts +71 -0
  480. package/cli/dist/modules/shared/result-wrapper.d.ts.map +1 -0
  481. package/cli/dist/modules/shared/result-wrapper.js +95 -0
  482. package/cli/dist/modules/shared/result-wrapper.js.map +1 -0
  483. package/cli/dist/modules/shared/workflow-app/api.d.ts +6 -0
  484. package/cli/dist/modules/shared/workflow-app/api.d.ts.map +1 -0
  485. package/cli/dist/modules/shared/workflow-app/api.js +31 -0
  486. package/cli/dist/modules/shared/workflow-app/api.js.map +1 -0
  487. package/cli/dist/modules/shared/workflow-app/command.d.ts +30 -0
  488. package/cli/dist/modules/shared/workflow-app/command.d.ts.map +1 -0
  489. package/cli/dist/modules/shared/workflow-app/command.js +183 -0
  490. package/cli/dist/modules/shared/workflow-app/command.js.map +1 -0
  491. package/cli/dist/modules/shared/workflow-app/constants.d.ts +12 -0
  492. package/cli/dist/modules/shared/workflow-app/constants.d.ts.map +1 -0
  493. package/cli/dist/modules/shared/workflow-app/constants.js +21 -0
  494. package/cli/dist/modules/shared/workflow-app/constants.js.map +1 -0
  495. package/cli/dist/modules/shared/workflow-app/form.d.ts +21 -0
  496. package/cli/dist/modules/shared/workflow-app/form.d.ts.map +1 -0
  497. package/cli/dist/modules/shared/workflow-app/form.js +123 -0
  498. package/cli/dist/modules/shared/workflow-app/form.js.map +1 -0
  499. package/cli/dist/modules/shared/workflow-app/index.d.ts +8 -0
  500. package/cli/dist/modules/shared/workflow-app/index.d.ts.map +1 -0
  501. package/cli/dist/modules/shared/workflow-app/index.js +7 -0
  502. package/cli/dist/modules/shared/workflow-app/index.js.map +1 -0
  503. package/cli/dist/modules/shared/workflow-app/run.d.ts +15 -0
  504. package/cli/dist/modules/shared/workflow-app/run.d.ts.map +1 -0
  505. package/cli/dist/modules/shared/workflow-app/run.js +71 -0
  506. package/cli/dist/modules/shared/workflow-app/run.js.map +1 -0
  507. package/cli/dist/modules/shared/workflow-app/types.d.ts +74 -0
  508. package/cli/dist/modules/shared/workflow-app/types.d.ts.map +1 -0
  509. package/cli/dist/modules/shared/workflow-app/types.js +3 -0
  510. package/cli/dist/modules/shared/workflow-app/types.js.map +1 -0
  511. package/cli/dist/modules/site-configs.d.ts +4 -0
  512. package/cli/dist/modules/site-configs.d.ts.map +1 -0
  513. package/cli/dist/modules/site-configs.js +21 -0
  514. package/cli/dist/modules/site-configs.js.map +1 -0
  515. package/cli/dist/modules/upgrade/index.d.ts +6 -0
  516. package/cli/dist/modules/upgrade/index.d.ts.map +1 -0
  517. package/cli/dist/modules/upgrade/index.js +105 -0
  518. package/cli/dist/modules/upgrade/index.js.map +1 -0
  519. package/cli/dist/program.d.ts +3 -0
  520. package/cli/dist/program.d.ts.map +1 -0
  521. package/cli/dist/program.js +69 -0
  522. package/cli/dist/program.js.map +1 -0
  523. package/package.json +37 -0
@@ -0,0 +1,108 @@
1
+ import { parseOutputFormat } from "../../core/index.js";
2
+ import { runCreateSciArticle } from "./commands/article-create.js";
3
+ import { runCreateSciOutline } from "./commands/outline.js";
4
+ import { runDownloadSciArticle } from "./commands/article-download.js";
5
+ import { runListSciTemplates } from "./commands/template.js";
6
+ // 注册 SCI 论著工作台子模块下的全部子命令
7
+ export function registerSciWorkbenchCommands(sci) {
8
+ // 模板列表
9
+ sci
10
+ .command("template")
11
+ .description("SCI 模板管理")
12
+ .command("list")
13
+ .description("列出 SCI 文章模板(基础/临床/生信)")
14
+ .option("--format <format>", "输出格式:markdown | json", "markdown")
15
+ .action(async (opts) => {
16
+ await runListSciTemplates(parseOutputFormat(opts.format));
17
+ });
18
+ // 拟题提纲(第一步)
19
+ const outline = sci.command("outline").description("拟定主题(第一步)");
20
+ outline
21
+ .command("create")
22
+ .description("SCI 论著拟定主题:选择模板 → 填写方法/结果 → 预检 → 生成提纲")
23
+ .option("-t, --template <type>", "文章模板类型:basic | clinical | bioinformatics", "basic")
24
+ .option("-m, --methods <text>", "方法段落(Materials and Methods);长文本请改用 --methods-file")
25
+ .option("-r, --results <text>", "结果段落(Results);长文本请改用 --results-file")
26
+ .option("--methods-file <path>", "方法段落文件路径(UTF-8,与 --methods 互斥)")
27
+ .option("--results-file <path>", "结果段落文件路径(UTF-8,与 --results 互斥)")
28
+ .option("-y, --yes", "跳过交互确认,直接使用参数(需提供 template/methods/results)")
29
+ .option("--precheck-choice <choice>", "Yellow 预检用户选择:yes(允许 AI 优化)| no(不希望 AI 修改)| retry(重新修改方法和结果)")
30
+ .option("--order-id <id>", "首次 awaiting_precheck_choice 返回的预检 orderId;与 --precheck-choice yes|no 联用时跳过二次预检、直接生成提纲")
31
+ .option("--format <format>", "输出格式:markdown | json", "markdown")
32
+ .action(async (opts) => {
33
+ await runCreateSciOutline({
34
+ template: opts.template,
35
+ methods: opts.methods,
36
+ results: opts.results,
37
+ methodsFile: opts.methodsFile,
38
+ resultsFile: opts.resultsFile,
39
+ yes: opts.yes,
40
+ precheckChoice: opts.precheckChoice,
41
+ orderId: opts.orderId,
42
+ format: parseOutputFormat(opts.format),
43
+ });
44
+ });
45
+ // 确认提纲(第二步):outline confirm
46
+ const confirm = outline
47
+ .command("confirm")
48
+ .description("确认提纲(第二步)");
49
+ confirm
50
+ .command("create")
51
+ .description("确认提纲并生成 SCI 论著全文")
52
+ .requiredOption("--order-id <id>", "步骤① outline create 返回的 orderId")
53
+ .option("-t, --template <type>", "文章模板类型:basic | clinical | bioinformatics,默认 basic", "basic")
54
+ .option("-c, --content <text>", "提纲 Markdown 文本;长文本请改用 --file / --content-file")
55
+ .option("-f, --file <path>", "提纲 Markdown 文件路径(与 --content-file 同义)")
56
+ .option("--content-file <path>", "提纲 Markdown 文件路径(别名,等同 --file)")
57
+ .option("--stdin", "从标准输入读取提纲 Markdown")
58
+ .option("-m, --methods <text>", "步骤① 方法段落;长文本请改用 --methods-file")
59
+ .option("-r, --results <text>", "步骤① 结果段落;长文本请改用 --results-file")
60
+ .option("--methods-file <path>", "方法段落文件路径(UTF-8,与 --methods 互斥)")
61
+ .option("--results-file <path>", "结果段落文件路径(UTF-8,与 --results 互斥)")
62
+ .option("--language <lang>", "输出语言:中文 | 英文,默认 中文", "中文")
63
+ .option("-y, --yes", "跳过交互确认,直接使用参数")
64
+ .option("--format <format>", "输出格式:markdown | json", "markdown")
65
+ .action(async (opts) => {
66
+ await runCreateSciArticle({
67
+ orderId: opts.orderId,
68
+ template: opts.template,
69
+ content: opts.content,
70
+ file: opts.file || opts.contentFile,
71
+ stdin: opts.stdin,
72
+ methods: opts.methods,
73
+ results: opts.results,
74
+ methodsFile: opts.methodsFile,
75
+ resultsFile: opts.resultsFile,
76
+ language: opts.language,
77
+ yes: opts.yes,
78
+ format: parseOutputFormat(opts.format),
79
+ });
80
+ });
81
+ // 全文下载(第三步):article download
82
+ sci
83
+ .command("article")
84
+ .description("全文管理(第三步)")
85
+ .command("download")
86
+ .description("下载 SCI 全文(原始引文格式 MD + Word)")
87
+ .option("--order-id <id>", "步骤② outline confirm create 返回的 orderId;命中系统临时目录缓存后无需再传全文")
88
+ .option("-f, --file <path>", "全文 Markdown 文件路径(兜底:缓存缺失或过期时使用)")
89
+ .option("--references <items...>", "参考文献条目(可多次传入)")
90
+ .option("--references-file <path>", "参考文献 JSON 数组文件")
91
+ .option("--language <lang>", "参考文献标题语言:中文 | 英文;未传且 --order-id 命中缓存时回退用步骤② language")
92
+ .option("-o, --output <path>", "输出 docx 路径,默认用户下载目录(同名 .md 配套输出)")
93
+ .option("--produce-id <id>", "AIGC produce_id,默认 workflow_run_id")
94
+ .option("--format <format>", "输出格式:markdown | json", "markdown")
95
+ .action(async (opts) => {
96
+ await runDownloadSciArticle({
97
+ orderId: opts.orderId,
98
+ file: opts.file,
99
+ references: opts.references,
100
+ referencesFile: opts.referencesFile,
101
+ language: opts.language,
102
+ output: opts.output,
103
+ produceId: opts.produceId,
104
+ format: parseOutputFormat(opts.format),
105
+ });
106
+ });
107
+ }
108
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/modules/sci/commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,yBAAyB;AACzB,MAAM,UAAU,4BAA4B,CAAC,GAAY;IACvD,OAAO;IACP,GAA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AAM,EAAE,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC;SACvC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACN,CAAC"}
@@ -0,0 +1,117 @@
1
+ export type SciTemplateType = "basic" | "clinical" | "bioinformatics";
2
+ export interface SciTemplateOption {
3
+ value: SciTemplateType;
4
+ label: string;
5
+ description: string;
6
+ }
7
+ export type SciPrecheckLevel = "Green" | "Yellow" | "Red";
8
+ export type SciPrecheckResult = "success" | "failed";
9
+ export type SciPrecheckChoice = "yes" | "no" | "retry";
10
+ export declare const SCI_PRECHECK_CHOICE_OPTIONS: SciPrecheckChoice[];
11
+ export declare function parseSciPrecheckChoice(raw: string): SciPrecheckChoice;
12
+ export declare const SCI_TEMPLATE_OPTIONS: SciTemplateOption[];
13
+ export declare const SCI_PRECHECK_APP_IDS: Record<SciTemplateType, string>;
14
+ /**
15
+ * 官网「已有方法和结果」(existing) 共用标题 App
16
+ * site-sci.ts: outline/article *-existing tokens.slice(2)[0]
17
+ */
18
+ export declare const SCI_EXISTING_TITLE_APP_ID = "95cd72d5-2885-445f-acff-2fcbf38e76c1";
19
+ /**
20
+ * 提纲生成 App IDs(existing:title + body)
21
+ * 对齐官网 Outline.tsx:tokens.slice(2) when fulltextAppSuffix includes "existing"
22
+ * CLI Step1 为 methods/results + 预检,等同官网 existing 路径(非 blank 主题路径)
23
+ */
24
+ export declare const SCI_OUTLINE_APP_IDS: Record<SciTemplateType, string[]>;
25
+ /**
26
+ * 全文生成 App IDs(existing:title + body)
27
+ * 对齐官网 Writing.tsx:article-{type}-existing tokens.slice(2)
28
+ */
29
+ export declare const SCI_ARTICLE_APP_IDS: Record<SciTemplateType, string[]>;
30
+ /** 全文生成开始前提示(CLI stderr + Agent 话术,勿改措辞) */
31
+ export declare const SCI_ARTICLE_WAIT_HINT = "\u5185\u5BB9\u751F\u6210\u9884\u8BA1\u8017\u65F6\u7EA6 10 \u5206\u949F\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...";
32
+ export declare const SCI_ARTICLE_CONTENT_PRODUCER = "helixlife-SCI";
33
+ export declare const SCI_ORDER_API_PATH = "agent/v1/ai/workbench/sci/apps/orders";
34
+ export declare const SCI_EXECUTE_API_PATH = "agent/v1/ai/workbench/sci/apps/execute";
35
+ export declare const SCI_DOCX_CONVERT_API_PATH = "data_conversion/v2/markdown/to/docx";
36
+ export declare function getSciPrecheckAppId(template: SciTemplateType): string;
37
+ /** 获取提纲 App IDs(title + body,existing) */
38
+ export declare function getSciOutlineAppIds(template: SciTemplateType): string[];
39
+ /** 获取提纲正文 App ID(兼容旧接口) */
40
+ export declare function getSciOutlineAppId(template: SciTemplateType): string;
41
+ export declare function getSciArticleAppIds(template: SciTemplateType): string[];
42
+ export declare function getSciArticleAppId(template: SciTemplateType): string;
43
+ export declare function getSciTemplateLabel(template: SciTemplateType, options?: {
44
+ withDescription?: boolean;
45
+ }): string;
46
+ export declare function parseSciTemplateType(raw: string): SciTemplateType;
47
+ export interface SciPrecheckResponse {
48
+ level: SciPrecheckLevel;
49
+ result: SciPrecheckResult;
50
+ content: string;
51
+ status: "success" | "error" | "";
52
+ }
53
+ export type SciPrecheckBranch = {
54
+ branch: "pass";
55
+ } | {
56
+ branch: "warn";
57
+ level: SciPrecheckLevel;
58
+ result: SciPrecheckResult;
59
+ content: string;
60
+ } | {
61
+ branch: "fail";
62
+ result: SciPrecheckResult;
63
+ content: string;
64
+ };
65
+ export declare function classifySciPrecheckBranch(resp: SciPrecheckResponse): SciPrecheckBranch;
66
+ export type SciLanguage = "中文" | "英文";
67
+ export declare const SCI_LANGUAGE_OPTIONS: SciLanguage[];
68
+ export interface SciPrecheckOutput {
69
+ level: string;
70
+ result: string;
71
+ content: string;
72
+ }
73
+ export interface SciOutlineOutput {
74
+ text: string;
75
+ elapsedTime?: number;
76
+ workflowRunId?: string;
77
+ }
78
+ /**
79
+ * Step1 固定状态(Agent 只按 status 分支,禁止自行推断)
80
+ * - awaiting_precheck_choice: Yellow,须弹三选项;yes/no 带 --order-id + --precheck-choice 续跑提纲(不二次预检)
81
+ * - awaiting_revision: 用户选 retry,改 methods/results 后重调(不带 choice / order-id)
82
+ * - precheck_failed: Red,改 methods/results 后重调
83
+ * - outline_ready: 提纲已生成,进入 Step2 确认
84
+ */
85
+ export type SciStep1Status = "awaiting_precheck_choice" | "awaiting_revision" | "precheck_failed" | "outline_ready";
86
+ export type SciStep1NextAction = "ask_precheck_choice" | "revise_methods_results" | "confirm_outline";
87
+ export interface SciOutlineCreateResult {
88
+ status: SciStep1Status;
89
+ nextAction: SciStep1NextAction;
90
+ template: SciTemplateType;
91
+ methods: string;
92
+ results: string;
93
+ precheck: SciPrecheckOutput | null;
94
+ precheckChoice: string | null;
95
+ orderId: string;
96
+ outline: string;
97
+ outlineElapsedTime?: number;
98
+ outlineWorkflowRunId?: string;
99
+ }
100
+ export interface SciArticleCreateResult {
101
+ orderId: string;
102
+ template: SciTemplateType;
103
+ language: SciLanguage;
104
+ article: string;
105
+ references: string[];
106
+ workflowRunId?: string;
107
+ elapsedTime?: number;
108
+ }
109
+ export interface SciArticleDownloadResult {
110
+ mdPath: string;
111
+ mdSize: number;
112
+ docxPath: string;
113
+ docxSize: number;
114
+ contentType: string | null;
115
+ filename?: string;
116
+ }
117
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/sci/constants.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAGtE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAG1D,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAGrD,M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,CAAC;AAGtB,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACnC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAGD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,152 @@
1
+ import { helixlifeError, helixlifeErrorCode } from "../../core/errors.js";
2
+ export const SCI_PRECHECK_CHOICE_OPTIONS = [
3
+ "yes",
4
+ "no",
5
+ "retry",
6
+ ];
7
+ export function parseSciPrecheckChoice(raw) {
8
+ const value = raw.trim().toLowerCase();
9
+ if (value === "yes" || value === "no" || value === "retry") {
10
+ return value;
11
+ }
12
+ throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无效预检选择: ${raw},可选: yes | no | retry`);
13
+ }
14
+ // 模板选项列表
15
+ export const SCI_TEMPLATE_OPTIONS = [
16
+ {
17
+ value: "basic",
18
+ label: "基础",
19
+ description: "输入基础研究的方法和结果,辅助完成科研论文写作",
20
+ },
21
+ {
22
+ value: "clinical",
23
+ label: "临床",
24
+ description: "输入临床研究的方法和结果,辅助完成科研论文写作",
25
+ },
26
+ {
27
+ value: "bioinformatics",
28
+ label: "生信",
29
+ description: "输入生信研究的方法和结果,辅助完成科研论文写作",
30
+ },
31
+ ];
32
+ // 预检 App IDs(按模板类型)
33
+ export const SCI_PRECHECK_APP_IDS = {
34
+ basic: "7f2dae4a-ded2-4138-a69c-9592173ba73b",
35
+ clinical: "f1f96a5a-9881-4a62-bfc7-f1127271d7c4",
36
+ bioinformatics: "91605027-dadf-4958-8684-784717f7258a",
37
+ };
38
+ /**
39
+ * 官网「已有方法和结果」(existing) 共用标题 App
40
+ * site-sci.ts: outline/article *-existing tokens.slice(2)[0]
41
+ */
42
+ export const SCI_EXISTING_TITLE_APP_ID = "95cd72d5-2885-445f-acff-2fcbf38e76c1";
43
+ /**
44
+ * 提纲生成 App IDs(existing:title + body)
45
+ * 对齐官网 Outline.tsx:tokens.slice(2) when fulltextAppSuffix includes "existing"
46
+ * CLI Step1 为 methods/results + 预检,等同官网 existing 路径(非 blank 主题路径)
47
+ */
48
+ export const SCI_OUTLINE_APP_IDS = {
49
+ basic: [SCI_EXISTING_TITLE_APP_ID, "345ac624-f08e-4ec6-97e1-1f69b4bd4732"],
50
+ clinical: [SCI_EXISTING_TITLE_APP_ID, "5888e2c2-3a4b-46e1-8c8c-eab1b4d3e8fe"],
51
+ bioinformatics: [
52
+ SCI_EXISTING_TITLE_APP_ID,
53
+ "985eded1-afa8-4d2b-a8cd-cba812bba153",
54
+ ],
55
+ };
56
+ /**
57
+ * 全文生成 App IDs(existing:title + body)
58
+ * 对齐官网 Writing.tsx:article-{type}-existing tokens.slice(2)
59
+ */
60
+ export const SCI_ARTICLE_APP_IDS = {
61
+ basic: [SCI_EXISTING_TITLE_APP_ID, "e48529ca-7c94-4774-969a-9339894c703b"],
62
+ clinical: [SCI_EXISTING_TITLE_APP_ID, "f534b4c5-befa-4d97-9271-991367c9c1a2"],
63
+ bioinformatics: [
64
+ SCI_EXISTING_TITLE_APP_ID,
65
+ "8ef69c63-83c3-4b0e-bfaa-01c1016fcd4b",
66
+ ],
67
+ };
68
+ /** 全文生成开始前提示(CLI stderr + Agent 话术,勿改措辞) */
69
+ export const SCI_ARTICLE_WAIT_HINT = "内容生成预计耗时约 10 分钟,请耐心等待...";
70
+ // SCI 全文导出 content_producer(与 PaaS 接口字段对应)
71
+ export const SCI_ARTICLE_CONTENT_PRODUCER = "helixlife-SCI";
72
+ // ============================================================
73
+ // API 路径常量化(集中管理,便于修改)
74
+ // ============================================================
75
+ // 创建 SCI 订单
76
+ export const SCI_ORDER_API_PATH = "agent/v1/ai/workbench/sci/apps/orders";
77
+ // SSE 执行(预检/提纲/全文共用)
78
+ export const SCI_EXECUTE_API_PATH = "agent/v1/ai/workbench/sci/apps/execute";
79
+ // Markdown 转 Word(PaaS 接口)
80
+ export const SCI_DOCX_CONVERT_API_PATH = "data_conversion/v2/markdown/to/docx";
81
+ // 获取预检 App ID
82
+ export function getSciPrecheckAppId(template) {
83
+ return SCI_PRECHECK_APP_IDS[template];
84
+ }
85
+ /** 获取提纲 App IDs(title + body,existing) */
86
+ export function getSciOutlineAppIds(template) {
87
+ return SCI_OUTLINE_APP_IDS[template] ?? [];
88
+ }
89
+ /** 获取提纲正文 App ID(兼容旧接口) */
90
+ export function getSciOutlineAppId(template) {
91
+ return SCI_OUTLINE_APP_IDS[template]?.[1] ?? "";
92
+ }
93
+ // 获取全文生成 App IDs(返回完整列表,用于批量调用)
94
+ export function getSciArticleAppIds(template) {
95
+ return SCI_ARTICLE_APP_IDS[template] ?? [];
96
+ }
97
+ // 获取全文生成主 App ID(兼容旧接口)
98
+ export function getSciArticleAppId(template) {
99
+ return SCI_ARTICLE_APP_IDS[template]?.[1] ?? "";
100
+ }
101
+ // 获取模板标签
102
+ export function getSciTemplateLabel(template, options = {}) {
103
+ const matched = SCI_TEMPLATE_OPTIONS.find((opt) => opt.value === template) ??
104
+ SCI_TEMPLATE_OPTIONS[0];
105
+ return options.withDescription
106
+ ? `${matched.label}(${matched.description})`
107
+ : matched.label;
108
+ }
109
+ // 解析用户输入的模板类型(支持英文值、中文名、菜单序号)
110
+ export function parseSciTemplateType(raw) {
111
+ const trimmed = raw.trim().toLowerCase();
112
+ if (!trimmed) {
113
+ return "basic";
114
+ }
115
+ const byValue = SCI_TEMPLATE_OPTIONS.find((opt) => opt.value === trimmed);
116
+ if (byValue) {
117
+ return byValue.value;
118
+ }
119
+ const byLabel = SCI_TEMPLATE_OPTIONS.find((opt) => opt.label === raw.trim());
120
+ if (byLabel) {
121
+ return byLabel.value;
122
+ }
123
+ const index = Number.parseInt(trimmed, 10);
124
+ if (!Number.isNaN(index) &&
125
+ index >= 1 &&
126
+ index <= SCI_TEMPLATE_OPTIONS.length) {
127
+ return SCI_TEMPLATE_OPTIONS[index - 1].value;
128
+ }
129
+ const hint = SCI_TEMPLATE_OPTIONS.map((opt) => opt.value).join(" | ");
130
+ throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无效模板类型: ${raw},可选: ${hint}`);
131
+ }
132
+ // 根据预检响应判断分支
133
+ export function classifySciPrecheckBranch(resp) {
134
+ if (resp.result === "success" && resp.level === "Green") {
135
+ return { branch: "pass" };
136
+ }
137
+ if (resp.result === "success" && resp.level === "Yellow") {
138
+ return {
139
+ branch: "warn",
140
+ level: resp.level,
141
+ result: resp.result,
142
+ content: resp.content,
143
+ };
144
+ }
145
+ return {
146
+ branch: "fail",
147
+ result: resp.result ?? "failed",
148
+ content: resp.content ?? "",
149
+ };
150
+ }
151
+ export const SCI_LANGUAGE_OPTIONS = ["中文", "英文"];
152
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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-8 文本文件(供 methods-file / results-file 等复用) */
7
+ export declare function readTextFile(path: string): Promise<string>;
8
+ /**
9
+ * 解析「内联文本」或「文件路径」二选一(互斥)。
10
+ * 优先 file;二者皆空则返回 undefined(由调用方决定是否报错)。
11
+ */
12
+ export declare function resolveTextOrFile(options: {
13
+ text?: string;
14
+ file?: string;
15
+ label: string;
16
+ }): Promise<string | undefined>;
17
+ export declare function resolveMarkdownContent(options: MarkdownContentSourceOptions, missingMessage: string): Promise<string>;
18
+ //# sourceMappingURL=content-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-source.d.ts","sourceRoot":"","sources":["../../../src/modules/sci/content-source.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,4BAA4B;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAWD,uDAAuD;AACvD,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUhE;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc9B;AAGD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,4BAA4B,EACrC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC,CAkBjB"}
@@ -0,0 +1,54 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { helixlifeError, helixlifeErrorCode, resolveUserPath, } from "../../core/index.js";
3
+ // 从标准输入读取 Markdown 全文
4
+ async function readMarkdownFromStdin() {
5
+ const chunks = [];
6
+ for await (const chunk of process.stdin) {
7
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
8
+ }
9
+ return Buffer.concat(chunks).toString("utf8");
10
+ }
11
+ /** 读取 UTF-8 文本文件(供 methods-file / results-file 等复用) */
12
+ export async function readTextFile(path) {
13
+ const filePath = resolveUserPath(path);
14
+ try {
15
+ return await readFile(filePath, "utf8");
16
+ }
17
+ catch {
18
+ throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无法读取文件: ${filePath}`);
19
+ }
20
+ }
21
+ /**
22
+ * 解析「内联文本」或「文件路径」二选一(互斥)。
23
+ * 优先 file;二者皆空则返回 undefined(由调用方决定是否报错)。
24
+ */
25
+ export async function resolveTextOrFile(options) {
26
+ if (options.text?.trim() && options.file?.trim()) {
27
+ throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `${options.label} 不能同时使用内联参数与 *-file,请二选一`);
28
+ }
29
+ if (options.file?.trim()) {
30
+ return (await readTextFile(options.file)).trim();
31
+ }
32
+ if (options.text?.trim()) {
33
+ return options.text.trim();
34
+ }
35
+ return undefined;
36
+ }
37
+ // 解析 Markdown 来源:文件、参数文本或标准输入(三选一)
38
+ export async function resolveMarkdownContent(options, missingMessage) {
39
+ if (options.file) {
40
+ return readTextFile(options.file);
41
+ }
42
+ if (options.content) {
43
+ return options.content;
44
+ }
45
+ // 仅在显式 --stdin 时读取标准输入,避免非交互环境意外阻塞
46
+ if (options.stdin) {
47
+ const markdown = await readMarkdownFromStdin();
48
+ if (markdown.trim()) {
49
+ return markdown;
50
+ }
51
+ }
52
+ throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, missingMessage);
53
+ }
54
+ //# sourceMappingURL=content-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-source.js","sourceRoot":"","sources":["../../../src/modules/sci/content-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAS7B,sBAAs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E,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,mCAAmC;AACnC,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAqC,EACrC,cAAsB;IAEtB,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,OAAO,CAAC,OAAO,CAAC;IACzB,CAAC;IAED,mCAAmC;IACnC,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,QAAQ,GAAG,MAAM,qBAAqB,EAAE,CAAC;QAC/C,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;YACpB,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,cAAc,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAChF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerSciCommands(program: Command): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/sci/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgB1D"}
@@ -0,0 +1,19 @@
1
+ import { emitJson } from "../../core/index.js";
2
+ import { registerSciWorkbenchCommands } from "./commands.js";
3
+ // 注册 SCI 写作专家命名空间:helixlife-expert sci <template|outline|article>
4
+ export function registerSciCommands(program) {
5
+ const sci = program.command("sci").description("SCI写作专家");
6
+ sci
7
+ .command("info")
8
+ .description("查看SCI写作专家模块状态")
9
+ .action(() => {
10
+ emitJson({
11
+ ok: true,
12
+ expert: "sci",
13
+ title: "SCI写作专家",
14
+ implemented: true,
15
+ });
16
+ });
17
+ registerSciWorkbenchCommands(sci);
18
+ }
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/sci/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAE7D,kEAAkE;AAClE,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAE1D,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,eAAe,CAAC;SAC5B,MAAM,CAAC,GAAG,EAAE;QACX,QAAQ,CAAC;YACP,EAAE,EAAE,IAAI;YACR,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEL,4BAA4B,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * SCI 提纲组装工具:对齐官网 editor.ts transformOutline / getTitleFromOutline
3
+ */
4
+ export declare function checkIsOutlineTitleLabel(text: string): boolean;
5
+ export declare function extractLabeledOutlineTitle(text: string): string;
6
+ /** 对齐官网 getTitleFromOutline */
7
+ export declare function getTitleFromOutlineSections(list: string[]): {
8
+ title: string;
9
+ index: number;
10
+ };
11
+ /**
12
+ * 对齐官网 transformOutline:
13
+ * title 工作流输出 + body 工作流输出 → 强制首行为 `# 标题`
14
+ */
15
+ export declare function transformSciOutline(sections: string[]): string;
16
+ //# sourceMappingURL=outline-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outline-transform.d.ts","sourceRoot":"","sources":["../../../src/modules/sci/outline-transform.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK/D;AAED,+BAA+B;AAC/B,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EAAE,GACb;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CA2BlC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAyB9D"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * SCI 提纲组装工具:对齐官网 editor.ts transformOutline / getTitleFromOutline
3
+ */
4
+ export function checkIsOutlineTitleLabel(text) {
5
+ return /^(?:项目名称|标题|Title)\s*[::]?/.test(text.trim());
6
+ }
7
+ export function extractLabeledOutlineTitle(text) {
8
+ const match = text
9
+ .trim()
10
+ .match(/^(?:项目名称|标题|Title)\s*[::]?\s*\*{0,2}([^*]+)\*{0,2}/);
11
+ return match?.[1]?.trim() || "";
12
+ }
13
+ /** 对齐官网 getTitleFromOutline */
14
+ export function getTitleFromOutlineSections(list) {
15
+ let title = "";
16
+ let index = 0;
17
+ for (let i = 0; i < list.length; i++) {
18
+ const nodeText = list[i]?.trim() ?? "";
19
+ if (!nodeText) {
20
+ continue;
21
+ }
22
+ if (checkIsOutlineTitleLabel(nodeText)) {
23
+ const labeled = extractLabeledOutlineTitle(nodeText);
24
+ if (labeled) {
25
+ title = labeled;
26
+ index = i + 1;
27
+ break;
28
+ }
29
+ }
30
+ else {
31
+ const matchedTitle = nodeText.replace(/^#+\s+/, "").trim();
32
+ if (matchedTitle) {
33
+ title = matchedTitle;
34
+ index = i + 1;
35
+ break;
36
+ }
37
+ }
38
+ }
39
+ return { title, index };
40
+ }
41
+ /**
42
+ * 对齐官网 transformOutline:
43
+ * title 工作流输出 + body 工作流输出 → 强制首行为 `# 标题`
44
+ */
45
+ export function transformSciOutline(sections) {
46
+ const outlineList = sections
47
+ .join("\n")
48
+ .split("\n")
49
+ .filter((item) => item.trim());
50
+ if (!outlineList.length) {
51
+ return "";
52
+ }
53
+ const { title, index } = getTitleFromOutlineSections(outlineList);
54
+ const firstLine = outlineList[0] ?? "";
55
+ const firstHashMatch = firstLine.match(/^(#{1,6})\s+/);
56
+ const firstHeadingHashCount = firstHashMatch
57
+ ? firstHashMatch[1].length
58
+ : 1;
59
+ if (!title) {
60
+ return outlineList.join("\n");
61
+ }
62
+ return [
63
+ `${"#".repeat(firstHeadingHashCount)} ${title}`,
64
+ ...outlineList.slice(index),
65
+ ].join("\n");
66
+ }
67
+ //# sourceMappingURL=outline-transform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outline-transform.js","sourceRoot":"","sources":["../../../src/modules/sci/outline-transform.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,OAAO,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,IAAY;IACrD,MAAM,KAAK,GAAG,IAAI;SACf,IAAI,EAAE;SACN,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC/D,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClC,CAAC;AAED,+BAA+B;AAC/B,MAAM,UAAU,2BAA2B,CACzC,IAAc;IAEd,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,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G,cAAc;QAC1C,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM;QAC1B,CAAC,CAAC,CAAC,CAAC;IAEN,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;QACL,GAAG,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,KAAK,EAAE;QAC/C,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC;KAC5B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { SciPrecheckOutput, SciTemplateType } from "./constants.js";
2
+ export interface SciPrecheckCachePayload {
3
+ orderId: string;
4
+ template: SciTemplateType;
5
+ methods: string;
6
+ results: string;
7
+ precheck: SciPrecheckOutput;
8
+ }
9
+ export declare function __setSciPrecheckCacheDirForTesting(dir: string | null): void;
10
+ export declare function resolveSciPrecheckCachePath(orderId: string): string;
11
+ /**
12
+ * 写入 Yellow 闸门预检缓存。失败仅 stderr 警告,不阻断主流程。
13
+ */
14
+ export declare function saveSciPrecheckCache(payload: SciPrecheckCachePayload): Promise<boolean>;
15
+ /** 读取预检缓存;不存在 / 非法返回 null */
16
+ export declare function loadSciPrecheckCache(orderId: string): Promise<SciPrecheckCachePayload | null>;
17
+ /** 取走并删除预检缓存(提纲生成成功后调用) */
18
+ export declare function popSciPrecheckCache(orderId: string): Promise<SciPrecheckCachePayload | null>;
19
+ /** 仅删除缓存文件(retry 放弃续跑提纲时) */
20
+ export declare function deleteSciPrecheckCache(orderId: string): Promise<void>;
21
+ /** 供单元测试:当前缓存目录 */
22
+ export declare function getSciPrecheckCacheDirForTesting(): string;
23
+ //# sourceMappingURL=precheck-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"precheck-cache.d.ts","sourceRoot":"","sources":["../../../src/modules/sci/precheck-cache.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AASzE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAED,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAE3E;AAUD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKnE;AAwCD;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,OAAO,CAAC,CAUlB;AA2BD,6BAA6B;AAC7B,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAYzC;AAED,2BAA2B;AAC3B,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAezC;AAED,6BAA6B;AAC7B,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ3E;AAED,mBAAmB;AACnB,wBAAgB,gCAAgC,IAAI,MAAM,CAEzD"}