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.
- package/README.md +159 -0
- package/cli/bin/helixlife-expert.js +3 -0
- package/cli/dist/core/api/client.d.ts +31 -0
- package/cli/dist/core/api/client.d.ts.map +1 -0
- package/cli/dist/core/api/client.js +183 -0
- package/cli/dist/core/api/client.js.map +1 -0
- package/cli/dist/core/api/http.d.ts +3 -0
- package/cli/dist/core/api/http.d.ts.map +1 -0
- package/cli/dist/core/api/http.js +22 -0
- package/cli/dist/core/api/http.js.map +1 -0
- package/cli/dist/core/api/response.d.ts +48 -0
- package/cli/dist/core/api/response.d.ts.map +1 -0
- package/cli/dist/core/api/response.js +84 -0
- package/cli/dist/core/api/response.js.map +1 -0
- package/cli/dist/core/api/sse.d.ts +6 -0
- package/cli/dist/core/api/sse.d.ts.map +1 -0
- package/cli/dist/core/api/sse.js +60 -0
- package/cli/dist/core/api/sse.js.map +1 -0
- package/cli/dist/core/auth/index.d.ts +35 -0
- package/cli/dist/core/auth/index.d.ts.map +1 -0
- package/cli/dist/core/auth/index.js +150 -0
- package/cli/dist/core/auth/index.js.map +1 -0
- package/cli/dist/core/env-config.d.ts +16 -0
- package/cli/dist/core/env-config.d.ts.map +1 -0
- package/cli/dist/core/env-config.js +80 -0
- package/cli/dist/core/env-config.js.map +1 -0
- package/cli/dist/core/errors.d.ts +20 -0
- package/cli/dist/core/errors.d.ts.map +1 -0
- package/cli/dist/core/errors.js +28 -0
- package/cli/dist/core/errors.js.map +1 -0
- package/cli/dist/core/index.d.ts +16 -0
- package/cli/dist/core/index.d.ts.map +1 -0
- package/cli/dist/core/index.js +16 -0
- package/cli/dist/core/index.js.map +1 -0
- package/cli/dist/core/interactive.d.ts +18 -0
- package/cli/dist/core/interactive.d.ts.map +1 -0
- package/cli/dist/core/interactive.js +74 -0
- package/cli/dist/core/interactive.js.map +1 -0
- package/cli/dist/core/output/index.d.ts +29 -0
- package/cli/dist/core/output/index.d.ts.map +1 -0
- package/cli/dist/core/output/index.js +153 -0
- package/cli/dist/core/output/index.js.map +1 -0
- package/cli/dist/core/parse.d.ts +9 -0
- package/cli/dist/core/parse.d.ts.map +1 -0
- package/cli/dist/core/parse.js +31 -0
- package/cli/dist/core/parse.js.map +1 -0
- package/cli/dist/core/paths.d.ts +21 -0
- package/cli/dist/core/paths.d.ts.map +1 -0
- package/cli/dist/core/paths.js +65 -0
- package/cli/dist/core/paths.js.map +1 -0
- package/cli/dist/core/sse-utils.d.ts +49 -0
- package/cli/dist/core/sse-utils.d.ts.map +1 -0
- package/cli/dist/core/sse-utils.js +181 -0
- package/cli/dist/core/sse-utils.js.map +1 -0
- package/cli/dist/core/terminal.d.ts +2 -0
- package/cli/dist/core/terminal.d.ts.map +1 -0
- package/cli/dist/core/terminal.js +6 -0
- package/cli/dist/core/terminal.js.map +1 -0
- package/cli/dist/core/token/index.d.ts +5 -0
- package/cli/dist/core/token/index.d.ts.map +1 -0
- package/cli/dist/core/token/index.js +26 -0
- package/cli/dist/core/token/index.js.map +1 -0
- package/cli/dist/core/types/config.d.ts +8 -0
- package/cli/dist/core/types/config.d.ts.map +1 -0
- package/cli/dist/core/types/config.js +30 -0
- package/cli/dist/core/types/config.js.map +1 -0
- package/cli/dist/core/version.d.ts +2 -0
- package/cli/dist/core/version.d.ts.map +1 -0
- package/cli/dist/core/version.js +10 -0
- package/cli/dist/core/version.js.map +1 -0
- package/cli/dist/index.d.ts +2 -0
- package/cli/dist/index.d.ts.map +1 -0
- package/cli/dist/index.js +23 -0
- package/cli/dist/index.js.map +1 -0
- package/cli/dist/modules/analysis/constants.d.ts +3 -0
- package/cli/dist/modules/analysis/constants.d.ts.map +1 -0
- package/cli/dist/modules/analysis/constants.js +3 -0
- package/cli/dist/modules/analysis/constants.js.map +1 -0
- package/cli/dist/modules/analysis/index.d.ts +3 -0
- package/cli/dist/modules/analysis/index.d.ts.map +1 -0
- package/cli/dist/modules/analysis/index.js +23 -0
- package/cli/dist/modules/analysis/index.js.map +1 -0
- package/cli/dist/modules/auth/index.d.ts +3 -0
- package/cli/dist/modules/auth/index.d.ts.map +1 -0
- package/cli/dist/modules/auth/index.js +76 -0
- package/cli/dist/modules/auth/index.js.map +1 -0
- package/cli/dist/modules/expert-scaffold.d.ts +27 -0
- package/cli/dist/modules/expert-scaffold.d.ts.map +1 -0
- package/cli/dist/modules/expert-scaffold.js +25 -0
- package/cli/dist/modules/expert-scaffold.js.map +1 -0
- package/cli/dist/modules/fund/clinical/apps.d.ts +19 -0
- package/cli/dist/modules/fund/clinical/apps.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/apps.js +14 -0
- package/cli/dist/modules/fund/clinical/apps.js.map +1 -0
- package/cli/dist/modules/fund/clinical/command-utils.d.ts +4 -0
- package/cli/dist/modules/fund/clinical/command-utils.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/command-utils.js +40 -0
- package/cli/dist/modules/fund/clinical/command-utils.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.d.ts +9 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.js +99 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.d.ts +30 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.js +153 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts +7 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.js +81 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts +7 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js +76 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts +16 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.js +108 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts +14 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.js +164 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts +25 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js +228 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts +45 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js +211 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js.map +1 -0
- package/cli/dist/modules/fund/clinical/constants.d.ts +85 -0
- package/cli/dist/modules/fund/clinical/constants.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/constants.js +161 -0
- package/cli/dist/modules/fund/clinical/constants.js.map +1 -0
- package/cli/dist/modules/fund/clinical/form-rules.d.ts +56 -0
- package/cli/dist/modules/fund/clinical/form-rules.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/form-rules.js +542 -0
- package/cli/dist/modules/fund/clinical/form-rules.js.map +1 -0
- package/cli/dist/modules/fund/clinical/four-elements.d.ts +46 -0
- package/cli/dist/modules/fund/clinical/four-elements.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/four-elements.js +190 -0
- package/cli/dist/modules/fund/clinical/four-elements.js.map +1 -0
- package/cli/dist/modules/fund/clinical/index.d.ts +3 -0
- package/cli/dist/modules/fund/clinical/index.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/index.js +176 -0
- package/cli/dist/modules/fund/clinical/index.js.map +1 -0
- package/cli/dist/modules/fund/clinical/parameters.d.ts +51 -0
- package/cli/dist/modules/fund/clinical/parameters.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/parameters.js +145 -0
- package/cli/dist/modules/fund/clinical/parameters.js.map +1 -0
- package/cli/dist/modules/fund/clinical/sample-size.d.ts +130 -0
- package/cli/dist/modules/fund/clinical/sample-size.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/sample-size.js +356 -0
- package/cli/dist/modules/fund/clinical/sample-size.js.map +1 -0
- package/cli/dist/modules/fund/clinical/session-cache.d.ts +25 -0
- package/cli/dist/modules/fund/clinical/session-cache.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/session-cache.js +100 -0
- package/cli/dist/modules/fund/clinical/session-cache.js.map +1 -0
- package/cli/dist/modules/fund/clinical/sse-utils.d.ts +22 -0
- package/cli/dist/modules/fund/clinical/sse-utils.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/sse-utils.js +80 -0
- package/cli/dist/modules/fund/clinical/sse-utils.js.map +1 -0
- package/cli/dist/modules/fund/constants.d.ts +3 -0
- package/cli/dist/modules/fund/constants.d.ts.map +1 -0
- package/cli/dist/modules/fund/constants.js +3 -0
- package/cli/dist/modules/fund/constants.js.map +1 -0
- package/cli/dist/modules/fund/index.d.ts +3 -0
- package/cli/dist/modules/fund/index.d.ts.map +1 -0
- package/cli/dist/modules/fund/index.js +28 -0
- package/cli/dist/modules/fund/index.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/apps.d.ts +54 -0
- package/cli/dist/modules/fund/nsfc/apps.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/apps.js +76 -0
- package/cli/dist/modules/fund/nsfc/apps.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/article-cache.d.ts +14 -0
- package/cli/dist/modules/fund/nsfc/article-cache.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/article-cache.js +79 -0
- package/cli/dist/modules/fund/nsfc/article-cache.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts +8 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.js +108 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts +42 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.js +189 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.js +98 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts +12 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js +351 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts +21 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js +197 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js +120 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts +11 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js +125 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts +11 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js +109 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js +64 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts +8 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.js +103 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js +176 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js +190 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/constants.d.ts +96 -0
- package/cli/dist/modules/fund/nsfc/constants.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/constants.js +156 -0
- package/cli/dist/modules/fund/nsfc/constants.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/graph-render.d.ts +25 -0
- package/cli/dist/modules/fund/nsfc/graph-render.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/graph-render.js +212 -0
- package/cli/dist/modules/fund/nsfc/graph-render.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/index.d.ts +4 -0
- package/cli/dist/modules/fund/nsfc/index.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/index.js +238 -0
- package/cli/dist/modules/fund/nsfc/index.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts +18 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.js +47 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts +76 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.js +278 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.d.ts +23 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.js +91 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.d.ts +24 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.js +78 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts +20 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js +107 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts +18 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.js +107 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/request-body.d.ts +47 -0
- package/cli/dist/modules/fund/nsfc/request-body.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/request-body.js +38 -0
- package/cli/dist/modules/fund/nsfc/request-body.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/session-cache.d.ts +48 -0
- package/cli/dist/modules/fund/nsfc/session-cache.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/session-cache.js +90 -0
- package/cli/dist/modules/fund/nsfc/session-cache.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.d.ts +22 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.js +81 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/upload.d.ts +3 -0
- package/cli/dist/modules/fund/nsfc/upload.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/upload.js +59 -0
- package/cli/dist/modules/fund/nsfc/upload.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/validate.d.ts +30 -0
- package/cli/dist/modules/fund/nsfc/validate.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/validate.js +91 -0
- package/cli/dist/modules/fund/nsfc/validate.js.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-list.d.ts +5 -0
- package/cli/dist/modules/literature/commands/workflow-list.d.ts.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-list.js +9 -0
- package/cli/dist/modules/literature/commands/workflow-list.js.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-params.d.ts +6 -0
- package/cli/dist/modules/literature/commands/workflow-params.d.ts.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-params.js +9 -0
- package/cli/dist/modules/literature/commands/workflow-params.js.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-run.d.ts +7 -0
- package/cli/dist/modules/literature/commands/workflow-run.d.ts.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-run.js +10 -0
- package/cli/dist/modules/literature/commands/workflow-run.js.map +1 -0
- package/cli/dist/modules/literature/constants.d.ts +20 -0
- package/cli/dist/modules/literature/constants.d.ts.map +1 -0
- package/cli/dist/modules/literature/constants.js +56 -0
- package/cli/dist/modules/literature/constants.js.map +1 -0
- package/cli/dist/modules/literature/index.d.ts +3 -0
- package/cli/dist/modules/literature/index.d.ts.map +1 -0
- package/cli/dist/modules/literature/index.js +63 -0
- package/cli/dist/modules/literature/index.js.map +1 -0
- package/cli/dist/modules/meta/analysis.d.ts +127 -0
- package/cli/dist/modules/meta/analysis.d.ts.map +1 -0
- package/cli/dist/modules/meta/analysis.js +1165 -0
- package/cli/dist/modules/meta/analysis.js.map +1 -0
- package/cli/dist/modules/meta/api.d.ts +11 -0
- package/cli/dist/modules/meta/api.d.ts.map +1 -0
- package/cli/dist/modules/meta/api.js +40 -0
- package/cli/dist/modules/meta/api.js.map +1 -0
- package/cli/dist/modules/meta/commands.d.ts +3 -0
- package/cli/dist/modules/meta/commands.d.ts.map +1 -0
- package/cli/dist/modules/meta/commands.js +1185 -0
- package/cli/dist/modules/meta/commands.js.map +1 -0
- package/cli/dist/modules/meta/constants.d.ts +8 -0
- package/cli/dist/modules/meta/constants.d.ts.map +1 -0
- package/cli/dist/modules/meta/constants.js +9 -0
- package/cli/dist/modules/meta/constants.js.map +1 -0
- package/cli/dist/modules/meta/extraction.d.ts +206 -0
- package/cli/dist/modules/meta/extraction.d.ts.map +1 -0
- package/cli/dist/modules/meta/extraction.js +1248 -0
- package/cli/dist/modules/meta/extraction.js.map +1 -0
- package/cli/dist/modules/meta/index.d.ts +3 -0
- package/cli/dist/modules/meta/index.d.ts.map +1 -0
- package/cli/dist/modules/meta/index.js +19 -0
- package/cli/dist/modules/meta/index.js.map +1 -0
- package/cli/dist/modules/meta/node.d.ts +70 -0
- package/cli/dist/modules/meta/node.d.ts.map +1 -0
- package/cli/dist/modules/meta/node.js +167 -0
- package/cli/dist/modules/meta/node.js.map +1 -0
- package/cli/dist/modules/meta/plot-params.d.ts +82 -0
- package/cli/dist/modules/meta/plot-params.d.ts.map +1 -0
- package/cli/dist/modules/meta/plot-params.js +1179 -0
- package/cli/dist/modules/meta/plot-params.js.map +1 -0
- package/cli/dist/modules/meta/prisma-flow-docx.d.ts +23 -0
- package/cli/dist/modules/meta/prisma-flow-docx.d.ts.map +1 -0
- package/cli/dist/modules/meta/prisma-flow-docx.js +302 -0
- package/cli/dist/modules/meta/prisma-flow-docx.js.map +1 -0
- package/cli/dist/modules/meta/retrieve.d.ts +113 -0
- package/cli/dist/modules/meta/retrieve.d.ts.map +1 -0
- package/cli/dist/modules/meta/retrieve.js +913 -0
- package/cli/dist/modules/meta/retrieve.js.map +1 -0
- package/cli/dist/modules/meta/screening.d.ts +179 -0
- package/cli/dist/modules/meta/screening.d.ts.map +1 -0
- package/cli/dist/modules/meta/screening.js +1255 -0
- package/cli/dist/modules/meta/screening.js.map +1 -0
- package/cli/dist/modules/meta/topic.d.ts +110 -0
- package/cli/dist/modules/meta/topic.d.ts.map +1 -0
- package/cli/dist/modules/meta/topic.js +865 -0
- package/cli/dist/modules/meta/topic.js.map +1 -0
- package/cli/dist/modules/meta/types.d.ts +49 -0
- package/cli/dist/modules/meta/types.d.ts.map +1 -0
- package/cli/dist/modules/meta/types.js +2 -0
- package/cli/dist/modules/meta/types.js.map +1 -0
- package/cli/dist/modules/meta/workflow.d.ts +154 -0
- package/cli/dist/modules/meta/workflow.d.ts.map +1 -0
- package/cli/dist/modules/meta/workflow.js +956 -0
- package/cli/dist/modules/meta/workflow.js.map +1 -0
- package/cli/dist/modules/meta/writing.d.ts +83 -0
- package/cli/dist/modules/meta/writing.d.ts.map +1 -0
- package/cli/dist/modules/meta/writing.js +1077 -0
- package/cli/dist/modules/meta/writing.js.map +1 -0
- package/cli/dist/modules/proposal/artifacts.d.ts +18 -0
- package/cli/dist/modules/proposal/artifacts.d.ts.map +1 -0
- package/cli/dist/modules/proposal/artifacts.js +43 -0
- package/cli/dist/modules/proposal/artifacts.js.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-create.d.ts +22 -0
- package/cli/dist/modules/proposal/commands/basic-create.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-create.js +81 -0
- package/cli/dist/modules/proposal/commands/basic-create.js.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-result.d.ts +24 -0
- package/cli/dist/modules/proposal/commands/basic-result.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-result.js +96 -0
- package/cli/dist/modules/proposal/commands/basic-result.js.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts +5 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.js +9 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.js.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts +6 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.js +10 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.js.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-list.d.ts +5 -0
- package/cli/dist/modules/proposal/commands/clinical-list.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-list.js +9 -0
- package/cli/dist/modules/proposal/commands/clinical-list.js.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-params.d.ts +6 -0
- package/cli/dist/modules/proposal/commands/clinical-params.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-params.js +9 -0
- package/cli/dist/modules/proposal/commands/clinical-params.js.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-run.d.ts +7 -0
- package/cli/dist/modules/proposal/commands/clinical-run.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-run.js +10 -0
- package/cli/dist/modules/proposal/commands/clinical-run.js.map +1 -0
- package/cli/dist/modules/proposal/constants.d.ts +34 -0
- package/cli/dist/modules/proposal/constants.d.ts.map +1 -0
- package/cli/dist/modules/proposal/constants.js +75 -0
- package/cli/dist/modules/proposal/constants.js.map +1 -0
- package/cli/dist/modules/proposal/index.d.ts +3 -0
- package/cli/dist/modules/proposal/index.d.ts.map +1 -0
- package/cli/dist/modules/proposal/index.js +95 -0
- package/cli/dist/modules/proposal/index.js.map +1 -0
- package/cli/dist/modules/proposal/newidea-env.d.ts +28 -0
- package/cli/dist/modules/proposal/newidea-env.d.ts.map +1 -0
- package/cli/dist/modules/proposal/newidea-env.js +69 -0
- package/cli/dist/modules/proposal/newidea-env.js.map +1 -0
- package/cli/dist/modules/proposal/newidea-runner.d.ts +25 -0
- package/cli/dist/modules/proposal/newidea-runner.d.ts.map +1 -0
- package/cli/dist/modules/proposal/newidea-runner.js +158 -0
- package/cli/dist/modules/proposal/newidea-runner.js.map +1 -0
- package/cli/dist/modules/proposal/parse.d.ts +25 -0
- package/cli/dist/modules/proposal/parse.d.ts.map +1 -0
- package/cli/dist/modules/proposal/parse.js +173 -0
- package/cli/dist/modules/proposal/parse.js.map +1 -0
- package/cli/dist/modules/sci/apps.d.ts +48 -0
- package/cli/dist/modules/sci/apps.d.ts.map +1 -0
- package/cli/dist/modules/sci/apps.js +43 -0
- package/cli/dist/modules/sci/apps.js.map +1 -0
- package/cli/dist/modules/sci/article-cache.d.ts +32 -0
- package/cli/dist/modules/sci/article-cache.d.ts.map +1 -0
- package/cli/dist/modules/sci/article-cache.js +163 -0
- package/cli/dist/modules/sci/article-cache.js.map +1 -0
- package/cli/dist/modules/sci/article-validate.d.ts +11 -0
- package/cli/dist/modules/sci/article-validate.d.ts.map +1 -0
- package/cli/dist/modules/sci/article-validate.js +43 -0
- package/cli/dist/modules/sci/article-validate.js.map +1 -0
- package/cli/dist/modules/sci/commands/article-create.d.ts +46 -0
- package/cli/dist/modules/sci/commands/article-create.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/article-create.js +315 -0
- package/cli/dist/modules/sci/commands/article-create.js.map +1 -0
- package/cli/dist/modules/sci/commands/article-download.d.ts +50 -0
- package/cli/dist/modules/sci/commands/article-download.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/article-download.js +281 -0
- package/cli/dist/modules/sci/commands/article-download.js.map +1 -0
- package/cli/dist/modules/sci/commands/outline.d.ts +36 -0
- package/cli/dist/modules/sci/commands/outline.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/outline.js +491 -0
- package/cli/dist/modules/sci/commands/outline.js.map +1 -0
- package/cli/dist/modules/sci/commands/template.d.ts +9 -0
- package/cli/dist/modules/sci/commands/template.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/template.js +12 -0
- package/cli/dist/modules/sci/commands/template.js.map +1 -0
- package/cli/dist/modules/sci/commands.d.ts +3 -0
- package/cli/dist/modules/sci/commands.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands.js +108 -0
- package/cli/dist/modules/sci/commands.js.map +1 -0
- package/cli/dist/modules/sci/constants.d.ts +117 -0
- package/cli/dist/modules/sci/constants.d.ts.map +1 -0
- package/cli/dist/modules/sci/constants.js +152 -0
- package/cli/dist/modules/sci/constants.js.map +1 -0
- package/cli/dist/modules/sci/content-source.d.ts +18 -0
- package/cli/dist/modules/sci/content-source.d.ts.map +1 -0
- package/cli/dist/modules/sci/content-source.js +54 -0
- package/cli/dist/modules/sci/content-source.js.map +1 -0
- package/cli/dist/modules/sci/index.d.ts +3 -0
- package/cli/dist/modules/sci/index.d.ts.map +1 -0
- package/cli/dist/modules/sci/index.js +19 -0
- package/cli/dist/modules/sci/index.js.map +1 -0
- package/cli/dist/modules/sci/outline-transform.d.ts +16 -0
- package/cli/dist/modules/sci/outline-transform.d.ts.map +1 -0
- package/cli/dist/modules/sci/outline-transform.js +67 -0
- package/cli/dist/modules/sci/outline-transform.js.map +1 -0
- package/cli/dist/modules/sci/precheck-cache.d.ts +23 -0
- package/cli/dist/modules/sci/precheck-cache.d.ts.map +1 -0
- package/cli/dist/modules/sci/precheck-cache.js +141 -0
- package/cli/dist/modules/sci/precheck-cache.js.map +1 -0
- package/cli/dist/modules/sci/prompt-article.d.ts +12 -0
- package/cli/dist/modules/sci/prompt-article.d.ts.map +1 -0
- package/cli/dist/modules/sci/prompt-article.js +37 -0
- package/cli/dist/modules/sci/prompt-article.js.map +1 -0
- package/cli/dist/modules/sci/prompt-precheck.d.ts +16 -0
- package/cli/dist/modules/sci/prompt-precheck.d.ts.map +1 -0
- package/cli/dist/modules/sci/prompt-precheck.js +61 -0
- package/cli/dist/modules/sci/prompt-precheck.js.map +1 -0
- package/cli/dist/modules/sci/sse-utils.d.ts +50 -0
- package/cli/dist/modules/sci/sse-utils.d.ts.map +1 -0
- package/cli/dist/modules/sci/sse-utils.js +207 -0
- package/cli/dist/modules/sci/sse-utils.js.map +1 -0
- package/cli/dist/modules/shared/result-wrapper.d.ts +71 -0
- package/cli/dist/modules/shared/result-wrapper.d.ts.map +1 -0
- package/cli/dist/modules/shared/result-wrapper.js +95 -0
- package/cli/dist/modules/shared/result-wrapper.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/api.d.ts +6 -0
- package/cli/dist/modules/shared/workflow-app/api.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/api.js +31 -0
- package/cli/dist/modules/shared/workflow-app/api.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/command.d.ts +30 -0
- package/cli/dist/modules/shared/workflow-app/command.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/command.js +183 -0
- package/cli/dist/modules/shared/workflow-app/command.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/constants.d.ts +12 -0
- package/cli/dist/modules/shared/workflow-app/constants.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/constants.js +21 -0
- package/cli/dist/modules/shared/workflow-app/constants.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/form.d.ts +21 -0
- package/cli/dist/modules/shared/workflow-app/form.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/form.js +123 -0
- package/cli/dist/modules/shared/workflow-app/form.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/index.d.ts +8 -0
- package/cli/dist/modules/shared/workflow-app/index.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/index.js +7 -0
- package/cli/dist/modules/shared/workflow-app/index.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/run.d.ts +15 -0
- package/cli/dist/modules/shared/workflow-app/run.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/run.js +71 -0
- package/cli/dist/modules/shared/workflow-app/run.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/types.d.ts +74 -0
- package/cli/dist/modules/shared/workflow-app/types.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/types.js +3 -0
- package/cli/dist/modules/shared/workflow-app/types.js.map +1 -0
- package/cli/dist/modules/site-configs.d.ts +4 -0
- package/cli/dist/modules/site-configs.d.ts.map +1 -0
- package/cli/dist/modules/site-configs.js +21 -0
- package/cli/dist/modules/site-configs.js.map +1 -0
- package/cli/dist/modules/upgrade/index.d.ts +6 -0
- package/cli/dist/modules/upgrade/index.d.ts.map +1 -0
- package/cli/dist/modules/upgrade/index.js +105 -0
- package/cli/dist/modules/upgrade/index.js.map +1 -0
- package/cli/dist/program.d.ts +3 -0
- package/cli/dist/program.d.ts.map +1 -0
- package/cli/dist/program.js +69 -0
- package/cli/dist/program.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// Step1 交互提示:对齐 writing-type-configs nsfc-v2 字段出现顺序
|
|
2
|
+
// blank+有前期:您的情况 → 补充材料 → 疾病名称
|
|
3
|
+
// blank+无前期:您的情况 → 研究主题(无上传)
|
|
4
|
+
// existing:假说 → 疾病名称 → 可选补充材料
|
|
5
|
+
import { askOptionWithRl, createInteractiveInterface, helixlifeError, helixlifeErrorCode, isInteractiveTerminal, } from "../../../core/index.js";
|
|
6
|
+
import { NSFC_HAS_HYPOTHESIS_OPTIONS, NSFC_PRIOR_RESULT_OPTIONS, NSFC_PROJECT_LEVEL_OPTIONS, NSFC_PROJECT_TYPE_OPTIONS, NSFC_QUERY_MAX_BLANK_DISEASE, NSFC_QUERY_MAX_BLANK_THEME, NSFC_QUERY_MAX_EXISTING_HYPOTHESIS, NSFC_DISEASE_MAX, NSFC_UPLOAD_EXT, NSFC_UPLOAD_MAX_MB, } from "./constants.js";
|
|
7
|
+
function printFieldGuide(hasHypothesis, priorResult) {
|
|
8
|
+
console.log("\n—— 必填 / 非必填说明 ——");
|
|
9
|
+
console.log("必填选项:项目级别" +
|
|
10
|
+
(hasHypothesis === "blank" ? ";您的情况(是否有前期研究结果)" : ""));
|
|
11
|
+
console.log("条件必填:项目级别为「国家级」时须选项目类型(面上 / 地区 / 青年)");
|
|
12
|
+
if (hasHypothesis === "blank") {
|
|
13
|
+
if (priorResult === "yes") {
|
|
14
|
+
console.log(`必填上传:补充材料(${NSFC_UPLOAD_EXT.join("/")},单文件,≤${NSFC_UPLOAD_MAX_MB}MB)——先于疾病名称`);
|
|
15
|
+
console.log(`必填输入:疾病名称(≤${NSFC_QUERY_MAX_BLANK_DISEASE} 字)——勿问「研究主题」`);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
console.log(`必填输入:您的研究主题(≤${NSFC_QUERY_MAX_BLANK_THEME} 字)`);
|
|
19
|
+
console.log("非必填上传:本路径无需补充材料,禁止索要附件");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
console.log(`必填输入:您的疾病名称(≤${NSFC_DISEASE_MAX} 字)——先于科学假说`);
|
|
24
|
+
console.log(`必填输入:您的科学假说(≤${NSFC_QUERY_MAX_EXISTING_HYPOTHESIS} 字)`);
|
|
25
|
+
console.log(`非必填上传:补充材料(${NSFC_UPLOAD_EXT.join("/")},单文件,≤${NSFC_UPLOAD_MAX_MB}MB)——最后询问`);
|
|
26
|
+
}
|
|
27
|
+
console.log("——————————————\n");
|
|
28
|
+
}
|
|
29
|
+
export async function promptNsfcHypothesisCreate(partial) {
|
|
30
|
+
if (!isInteractiveTerminal()) {
|
|
31
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "非交互终端请通过命令行参数提供全部必填项,并加 -y/--yes");
|
|
32
|
+
}
|
|
33
|
+
const rl = createInteractiveInterface();
|
|
34
|
+
try {
|
|
35
|
+
let hasHypothesis = partial.hasHypothesis;
|
|
36
|
+
if (!hasHypothesis) {
|
|
37
|
+
const values = NSFC_HAS_HYPOTHESIS_OPTIONS.map((o) => o.value);
|
|
38
|
+
hasHypothesis = await askOptionWithRl(rl, "是否已有科学假说", values, "blank", (value, index) => {
|
|
39
|
+
const opt = NSFC_HAS_HYPOTHESIS_OPTIONS[index];
|
|
40
|
+
return `${index + 1}) ${opt.label}`;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
let projectLevel = partial.projectLevel;
|
|
44
|
+
if (!projectLevel) {
|
|
45
|
+
projectLevel = await askOptionWithRl(rl, "项目级别", NSFC_PROJECT_LEVEL_OPTIONS, "国家级");
|
|
46
|
+
}
|
|
47
|
+
let project = partial.project;
|
|
48
|
+
if (projectLevel === "国家级" && !project) {
|
|
49
|
+
project = await askOptionWithRl(rl, "项目类型", NSFC_PROJECT_TYPE_OPTIONS, "面上项目");
|
|
50
|
+
}
|
|
51
|
+
let priorResult = partial.priorResult;
|
|
52
|
+
if (hasHypothesis === "blank" && !priorResult) {
|
|
53
|
+
const values = NSFC_PRIOR_RESULT_OPTIONS.map((o) => o.value);
|
|
54
|
+
priorResult = await askOptionWithRl(rl, "您的情况", values, "yes", (value, index) => {
|
|
55
|
+
const opt = NSFC_PRIOR_RESULT_OPTIONS[index];
|
|
56
|
+
return `${index + 1}) ${opt.label}`;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
printFieldGuide(hasHypothesis, priorResult);
|
|
60
|
+
let attachPath = partial.attachPath?.trim();
|
|
61
|
+
let query = partial.query?.trim();
|
|
62
|
+
let disease = partial.disease?.trim();
|
|
63
|
+
if (hasHypothesis === "blank" && priorResult === "yes") {
|
|
64
|
+
// 对齐前端 content.blank:补充材料(ifs 有前期)→ textarea 疾病名称
|
|
65
|
+
if (!attachPath) {
|
|
66
|
+
attachPath = (await rl.question(`请输入补充材料本地路径(${NSFC_UPLOAD_EXT.join("/")},必填):\n> `)).trim();
|
|
67
|
+
}
|
|
68
|
+
if (!query) {
|
|
69
|
+
query = (await rl.question(`请输入疾病名称(≤${NSFC_QUERY_MAX_BLANK_DISEASE} 字):\n> `)).trim();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else if (hasHypothesis === "blank" && priorResult === "no") {
|
|
73
|
+
// 无前期:仅研究主题,不问上传
|
|
74
|
+
if (!query) {
|
|
75
|
+
query = (await rl.question(`请输入您的研究主题(≤${NSFC_QUERY_MAX_BLANK_THEME} 字):\n> `)).trim();
|
|
76
|
+
}
|
|
77
|
+
attachPath = undefined;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
// existing:对齐 content.existing 左栏「疾病名称→补充材料」+ 右栏科学假说
|
|
81
|
+
// Agent/交互顺序:疾病名称 → 科学假说 → 可选附件
|
|
82
|
+
if (!disease) {
|
|
83
|
+
disease = (await rl.question(`请输入您的疾病名称(≤${NSFC_DISEASE_MAX} 字):\n> `)).trim();
|
|
84
|
+
}
|
|
85
|
+
if (!query) {
|
|
86
|
+
query = (await rl.question(`请输入您的科学假说(≤${NSFC_QUERY_MAX_EXISTING_HYPOTHESIS} 字):\n> `)).trim();
|
|
87
|
+
}
|
|
88
|
+
if (partial.attachPath === undefined) {
|
|
89
|
+
const optional = (await rl.question(`补充材料本地路径(可选,回车跳过;${NSFC_UPLOAD_EXT.join("/")}):\n> `)).trim();
|
|
90
|
+
attachPath = optional || undefined;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
hasHypothesis,
|
|
95
|
+
projectLevel,
|
|
96
|
+
project: projectLevel === "国家级" ? project : undefined,
|
|
97
|
+
priorResult: hasHypothesis === "blank" ? priorResult : undefined,
|
|
98
|
+
query: query ?? "",
|
|
99
|
+
disease,
|
|
100
|
+
attachPath,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
finally {
|
|
104
|
+
rl.close();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=prompt-hypothesis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-hypothesis.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/prompt-hypothesis.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,0BAA0B,EAC1B,kCAAkC,EAClC,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GAKnB,MAAM,gBAAgB,CAAC;AAYxB,SAAS,eAAe,CACtB,aAAgC,EAChC,WAA6B;IAE7B,O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IAAI,EAAE,CAAC;YACX,CAAC;YACD,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,KAAK,GAAG,CACN,MAAM,EAAE,CAAC,QAAQ,CACf,cAAc,kCAAkC,UAAU,CAC3D,CACF,CAAC,IAAI,EAAE,CAAC;YACX,CAAC;YACD,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;gBACrC,MAAM,QAAQ,GAAG,CACf,MAAM,EAAE,CAAC,QAAQ,CACf,oBAAoB,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CACtD,CACF,CAAC,IAAI,EAAE,CAAC;gBACT,UAAU,GAAG,QAAQ,IAAI,SAAS,CAAC;YACrC,CAAC;QACH,CAAC;QAED,OAAO;YACL,aAAa;YACb,YAAY;YACZ,OAAO,EAAE,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YACrD,WAAW,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;YAChE,KAAK,EAAE,KAAK,IAAI,EAAE;YAClB,OAAO;YACP,UAAU;SACX,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NsfcHypothesisItem, NsfcMissingInfoBlock } from "./parse-hypothesis.js";
|
|
2
|
+
export declare function promptSelectGene(genes: NsfcHypothesisItem[]): Promise<{
|
|
3
|
+
gene: string;
|
|
4
|
+
mechanism: string;
|
|
5
|
+
results: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function promptPickHypothesis(hypotheses: NsfcHypothesisItem[]): Promise<{
|
|
8
|
+
index?: number;
|
|
9
|
+
custom?: string;
|
|
10
|
+
}>;
|
|
11
|
+
export interface MissingPickResult {
|
|
12
|
+
picks: {
|
|
13
|
+
title: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
export declare function promptMissingInfoPicks(blocks: NsfcMissingInfoBlock[]): Promise<MissingPickResult>;
|
|
18
|
+
//# sourceMappingURL=prompt-step2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-step2.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/prompt-step2.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAO/B,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,kBAAkB,EAAE,GAC1B,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA+C/D;AAED,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,kBAAkB,EAAE,GAC/B,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA0C9C;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,oBAAoB,EAAE,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CAqD5B"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// Step2 TTY 交互:基因 / 假说 / 缺失信息
|
|
2
|
+
import { askOptionWithRl, createInteractiveInterface, helixlifeError, helixlifeErrorCode, isInteractiveTerminal, } from "../../../core/index.js";
|
|
3
|
+
import { formatGeneResearchDirections, isMissingInfoCustomOption, shortMissingInfoLabel, } from "./parse-hypothesis.js";
|
|
4
|
+
export async function promptSelectGene(genes) {
|
|
5
|
+
if (!genes.length) {
|
|
6
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "无可选候选基因,请重新执行 hypothesis analyze");
|
|
7
|
+
}
|
|
8
|
+
if (!isInteractiveTerminal()) {
|
|
9
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "非交互终端请通过 --gene / --mechanism / --results 提供选型");
|
|
10
|
+
}
|
|
11
|
+
const rl = createInteractiveInterface();
|
|
12
|
+
try {
|
|
13
|
+
console.log("\n候选基因:\n");
|
|
14
|
+
genes.forEach((g, i) => {
|
|
15
|
+
const gene = g.gene || g.id;
|
|
16
|
+
const directions = formatGeneResearchDirections(g);
|
|
17
|
+
console.log(`候选基因 ${i + 1}:${gene}`);
|
|
18
|
+
if (directions) {
|
|
19
|
+
console.log(`研究方向:\n${directions.split(";").map((d) => `- ${d}`).join("\n")}`);
|
|
20
|
+
}
|
|
21
|
+
console.log("");
|
|
22
|
+
});
|
|
23
|
+
const indices = genes.map((_, i) => String(i));
|
|
24
|
+
const selected = await askOptionWithRl(rl, "选择候选基因(单选)", indices, "0", (_v, index) => {
|
|
25
|
+
const g = genes[index];
|
|
26
|
+
return `${index + 1}) ${g.gene || g.id}`;
|
|
27
|
+
});
|
|
28
|
+
const item = genes[Number(selected)];
|
|
29
|
+
return {
|
|
30
|
+
gene: item.gene || item.id,
|
|
31
|
+
mechanism: item.mechanism || item.original_text || "",
|
|
32
|
+
results: item.results || "",
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
finally {
|
|
36
|
+
rl.close();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export async function promptPickHypothesis(hypotheses) {
|
|
40
|
+
if (!hypotheses.length) {
|
|
41
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "无可选假说,请重新执行 analyze / genes select");
|
|
42
|
+
}
|
|
43
|
+
if (!isInteractiveTerminal()) {
|
|
44
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "非交互终端请通过 --hypothesis-index 或 --custom / --custom-file 提供假说");
|
|
45
|
+
}
|
|
46
|
+
const rl = createInteractiveInterface();
|
|
47
|
+
try {
|
|
48
|
+
const options = [...hypotheses.map((_, i) => String(i)), "custom"];
|
|
49
|
+
const selected = await askOptionWithRl(rl, "选择科学假说(或自定义)", options, "0", (value, index) => {
|
|
50
|
+
if (value === "custom") {
|
|
51
|
+
return `${index + 1}) 自定义假说`;
|
|
52
|
+
}
|
|
53
|
+
const n = Number(value) + 1;
|
|
54
|
+
const cn = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"][Number(value)];
|
|
55
|
+
return `${index + 1}) 假说${cn ?? n}`;
|
|
56
|
+
});
|
|
57
|
+
if (selected === "custom") {
|
|
58
|
+
const custom = (await rl.question("请输入自定义科学假说:\n> ")).trim();
|
|
59
|
+
return { custom };
|
|
60
|
+
}
|
|
61
|
+
return { index: Number(selected) };
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
rl.close();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export async function promptMissingInfoPicks(blocks) {
|
|
68
|
+
if (!blocks.length) {
|
|
69
|
+
return { picks: [] };
|
|
70
|
+
}
|
|
71
|
+
if (!isInteractiveTerminal()) {
|
|
72
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "非交互终端请通过 --picks-file 提供缺失信息选型");
|
|
73
|
+
}
|
|
74
|
+
const rl = createInteractiveInterface();
|
|
75
|
+
try {
|
|
76
|
+
const picks = [];
|
|
77
|
+
for (let bi = 0; bi < blocks.length; bi += 1) {
|
|
78
|
+
const block = blocks[bi];
|
|
79
|
+
if (!block.select.length)
|
|
80
|
+
continue;
|
|
81
|
+
const optionValues = block.select.map((_, i) => String(i));
|
|
82
|
+
console.log(`\n缺失信息 [${bi + 1}/${blocks.length}]: ${block.title || "(无标题)"}`);
|
|
83
|
+
block.select.forEach((o, j) => {
|
|
84
|
+
console.log(` ${j + 1}) ${o}`);
|
|
85
|
+
});
|
|
86
|
+
const selected = await askOptionWithRl(rl, "请选择(须从当前选项中选择)", optionValues, "0", (value, index) => {
|
|
87
|
+
const full = block.select[Number(value)] ?? "";
|
|
88
|
+
return `${index + 1}) ${shortMissingInfoLabel(full)}`;
|
|
89
|
+
});
|
|
90
|
+
const opt = block.select[Number(selected)] ?? "";
|
|
91
|
+
if (isMissingInfoCustomOption(opt)) {
|
|
92
|
+
const custom = (await rl.question("请输入自定义内容(≤200 字):\n> "))
|
|
93
|
+
.trim()
|
|
94
|
+
.slice(0, 200);
|
|
95
|
+
picks.push({ title: block.title, value: custom || opt });
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
picks.push({ title: block.title, value: opt });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return { picks };
|
|
102
|
+
}
|
|
103
|
+
finally {
|
|
104
|
+
rl.close();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=prompt-step2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-step2.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/prompt-step2.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAA2B;IAE3B,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAClB,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,kCAAkC,CACnC,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;QAC7B,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,gDAAgD,CACjD,CAAC;IACJ,CA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AAC;QACH,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { NsfcHasHypothesis, NsfcPriorResult, NsfcProjectLevel, NsfcProjectType } from "./constants.js";
|
|
2
|
+
/** 上传材料项,对齐前端 FileUploadItem 成功态 */
|
|
3
|
+
export interface NsfcUploadFileItem {
|
|
4
|
+
file_name: string;
|
|
5
|
+
suffix: string;
|
|
6
|
+
content?: string;
|
|
7
|
+
word_count?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface NsfcHypothesisInputs {
|
|
10
|
+
projectLevel: NsfcProjectLevel;
|
|
11
|
+
project?: NsfcProjectType;
|
|
12
|
+
/** blank:有/无前期研究结果文案;existing:疾病名称 */
|
|
13
|
+
value?: string;
|
|
14
|
+
/** blank 主文本(疾病名或研究主题) */
|
|
15
|
+
input?: string;
|
|
16
|
+
/** existing 主文本(科学假说) */
|
|
17
|
+
text?: string;
|
|
18
|
+
/** blank + 有前期:必填附件 */
|
|
19
|
+
file?: NsfcUploadFileItem[];
|
|
20
|
+
/** existing:可选附件 */
|
|
21
|
+
file1?: NsfcUploadFileItem[];
|
|
22
|
+
}
|
|
23
|
+
export interface NsfcHypothesisRequestBody {
|
|
24
|
+
query: string;
|
|
25
|
+
inputs: NsfcHypothesisInputs;
|
|
26
|
+
}
|
|
27
|
+
export interface BuildNsfcHypothesisBodyParams {
|
|
28
|
+
hasHypothesis: NsfcHasHypothesis;
|
|
29
|
+
projectLevel: NsfcProjectLevel;
|
|
30
|
+
project?: NsfcProjectType;
|
|
31
|
+
priorResult?: NsfcPriorResult;
|
|
32
|
+
/** 主文本:blank 为疾病/主题;existing 为科学假说 */
|
|
33
|
+
query: string;
|
|
34
|
+
/** existing 必填疾病名;blank+有前期时通常等于 query */
|
|
35
|
+
disease?: string;
|
|
36
|
+
attachFiles?: NsfcUploadFileItem[];
|
|
37
|
+
}
|
|
38
|
+
export declare function buildNsfcHypothesisBody(params: BuildNsfcHypothesisBodyParams): NsfcHypothesisRequestBody;
|
|
39
|
+
export declare function buildNsfcHandoff(params: {
|
|
40
|
+
hasHypothesis: NsfcHasHypothesis;
|
|
41
|
+
priorResult?: NsfcPriorResult;
|
|
42
|
+
}): {
|
|
43
|
+
hasHypothesis: NsfcHasHypothesis;
|
|
44
|
+
nextSubStep: import("./constants.js").NsfcNextSubStep;
|
|
45
|
+
outlineAppSuffix: "" | "-none-hypothesis";
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=request-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-body.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/request-body.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAOxB,oCAAoC;AACpC,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,IAAI,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC5B,oBAAoB;IACpB,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,6BAA6B;IAC5C,aAAa,EAAE,iBAAiB,CAAC;IACjC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACpC;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,6BAA6B,GACpC,yBAAyB,CA8B3B;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACvC,aAAa,EAAE,iBAAiB,CAAC;IACjC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;;;;EASA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { NSFC_PRIOR_RESULT_LABEL, resolveNextSubStep, resolveOutlineAppSuffix, } from "./constants.js";
|
|
2
|
+
export function buildNsfcHypothesisBody(params) {
|
|
3
|
+
const inputs = {
|
|
4
|
+
projectLevel: params.projectLevel,
|
|
5
|
+
};
|
|
6
|
+
if (params.projectLevel === "国家级") {
|
|
7
|
+
inputs.project = params.project ?? "面上项目";
|
|
8
|
+
}
|
|
9
|
+
if (params.hasHypothesis === "blank") {
|
|
10
|
+
inputs.input = params.query;
|
|
11
|
+
inputs.value =
|
|
12
|
+
params.priorResult === "yes"
|
|
13
|
+
? NSFC_PRIOR_RESULT_LABEL.yes
|
|
14
|
+
: NSFC_PRIOR_RESULT_LABEL.no;
|
|
15
|
+
if (params.attachFiles?.length) {
|
|
16
|
+
inputs.file = params.attachFiles;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
inputs.text = params.query;
|
|
21
|
+
inputs.value = params.disease ?? "";
|
|
22
|
+
if (params.attachFiles?.length) {
|
|
23
|
+
inputs.file1 = params.attachFiles;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
query: params.query,
|
|
28
|
+
inputs,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function buildNsfcHandoff(params) {
|
|
32
|
+
return {
|
|
33
|
+
hasHypothesis: params.hasHypothesis,
|
|
34
|
+
nextSubStep: resolveNextSubStep(params.hasHypothesis, params.priorResult),
|
|
35
|
+
outlineAppSuffix: resolveOutlineAppSuffix(params.hasHypothesis),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=request-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-body.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/request-body.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AA0CxB,MAAM,UAAU,uBAAuB,CACrC,MAAqC;IAErC,MAAM,MAAM,GAAyB;QACnC,YAAY,EAAE,MAAM,CAAC,YAAY;KAClC,CAAC;IAEF,IAAI,MAAM,CAAC,YAAY,KAAK,KAAK,EAAE,CAAC;QAClC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC;IAC5C,CAAC;IAED,IAAI,MAAM,CAAC,aAAa,KAAK,OAAO,EAAE,CAAC;QACrC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC5B,MAAM,CAAC,KAAK;YACV,MAAM,CAAC,WAAW,KAAK,KAAK;gBAC1B,CAAC,CAAC,uBAAuB,CAAC,GAAG;gBAC7B,CAAC,CAAC,uBAAuB,CAAC,EAAE,CAAC;QACjC,IAAI,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;YAC/B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC;QACnC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;QAC3B,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;QACpC,IAAI,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;YAC/B,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC;QACpC,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM;KACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAGhC;IACC,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,WAAW,EAAE,kBAAkB,CAC7B,MAAM,CAAC,aAAa,EACpB,MAAM,CAAC,WAAW,CACnB;QACD,gBAAgB,EAAE,uBAAuB,CAAC,MAAM,CAAC,aAAa,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { NsfcHasHypothesis, NsfcNextSubStep } from "./constants.js";
|
|
2
|
+
import type { NsfcHypothesisItem, NsfcMissingInfoBlock } from "./parse-hypothesis.js";
|
|
3
|
+
export interface NsfcSessionCachePayload {
|
|
4
|
+
orderId: string;
|
|
5
|
+
query: string;
|
|
6
|
+
inputs: Record<string, unknown>;
|
|
7
|
+
hasHypothesis: NsfcHasHypothesis;
|
|
8
|
+
nextSubStep: NsfcNextSubStep;
|
|
9
|
+
outlineAppSuffix: "-none-hypothesis" | "";
|
|
10
|
+
/** 文章分析背景 */
|
|
11
|
+
backgroundReport?: string;
|
|
12
|
+
/** 候选基因 */
|
|
13
|
+
genes?: NsfcHypothesisItem[];
|
|
14
|
+
/** 假说列表(pick 前) */
|
|
15
|
+
hypotheses?: NsfcHypothesisItem[];
|
|
16
|
+
/** 研究路径原文 */
|
|
17
|
+
researchPathText?: string;
|
|
18
|
+
/** 研究路径原始 result */
|
|
19
|
+
researchPathResult?: unknown;
|
|
20
|
+
missingInfo?: NsfcMissingInfoBlock[];
|
|
21
|
+
genePreResultsText?: string;
|
|
22
|
+
/** 已选基因(genes select 后) */
|
|
23
|
+
selectedGene?: string;
|
|
24
|
+
selectedMechanism?: string;
|
|
25
|
+
selectedResults?: string;
|
|
26
|
+
/** pick 确认后的假说 */
|
|
27
|
+
confirmedHypothesis?: string;
|
|
28
|
+
outlineParams?: {
|
|
29
|
+
query: string;
|
|
30
|
+
inputs: Record<string, unknown>;
|
|
31
|
+
};
|
|
32
|
+
/** 提纲正文(create / research-path confirm / confirm --file) */
|
|
33
|
+
outline?: string;
|
|
34
|
+
/** Step3 outline confirm 后为 true */
|
|
35
|
+
outlineConfirmed?: boolean;
|
|
36
|
+
/** Step4 全文 Markdown */
|
|
37
|
+
article?: string;
|
|
38
|
+
/** 格式转换后的 Markdown */
|
|
39
|
+
convertedArticle?: string;
|
|
40
|
+
workflowRunId?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function __setNsfcSessionCacheDirForTesting(dir: string): void;
|
|
43
|
+
export declare function getNsfcSessionCacheDir(): string;
|
|
44
|
+
export declare function resolveNsfcSessionCachePath(orderId: string): string;
|
|
45
|
+
export declare function saveNsfcSessionCache(payload: NsfcSessionCachePayload): Promise<boolean>;
|
|
46
|
+
export declare function loadNsfcSessionCache(orderId: string): Promise<NsfcSessionCachePayload | null>;
|
|
47
|
+
export declare function updateNsfcSessionCache(orderId: string, patch: Partial<NsfcSessionCachePayload>): Promise<NsfcSessionCachePayload | null>;
|
|
48
|
+
//# sourceMappingURL=session-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-cache.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/session-cache.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;A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AEpE;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKnE;AAuCD,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAgBzC;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACtC,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAMzC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NSFC Step2 跨进程会话缓存(系统临时目录 helixlife-nsfc-cache/)
|
|
3
|
+
*/
|
|
4
|
+
import { randomBytes } from "node:crypto";
|
|
5
|
+
import { chmod, mkdir, readFile, rename, rm, writeFile, } from "node:fs/promises";
|
|
6
|
+
import { tmpdir } from "node:os";
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
let CACHE_DIR = join(tmpdir(), "helixlife-nsfc-cache");
|
|
9
|
+
const CACHE_FILE_PREFIX = "session-";
|
|
10
|
+
const CACHE_FILE_EXT = ".json";
|
|
11
|
+
export function __setNsfcSessionCacheDirForTesting(dir) {
|
|
12
|
+
CACHE_DIR = dir;
|
|
13
|
+
}
|
|
14
|
+
export function getNsfcSessionCacheDir() {
|
|
15
|
+
return CACHE_DIR;
|
|
16
|
+
}
|
|
17
|
+
export function resolveNsfcSessionCachePath(orderId) {
|
|
18
|
+
return join(CACHE_DIR, `${CACHE_FILE_PREFIX}${sanitizeOrderId(orderId)}${CACHE_FILE_EXT}`);
|
|
19
|
+
}
|
|
20
|
+
function sanitizeOrderId(orderId) {
|
|
21
|
+
return orderId.replace(/[^a-zA-Z0-9_.-]/g, "_");
|
|
22
|
+
}
|
|
23
|
+
async function ensureCacheDir() {
|
|
24
|
+
await mkdir(CACHE_DIR, { recursive: true });
|
|
25
|
+
}
|
|
26
|
+
async function atomicReplace(tempPath, finalPath) {
|
|
27
|
+
try {
|
|
28
|
+
await rename(tempPath, finalPath);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (process.platform === "win32") {
|
|
32
|
+
await rm(finalPath, { force: true });
|
|
33
|
+
await rename(tempPath, finalPath);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function persist(payload) {
|
|
40
|
+
if (!payload.orderId?.trim()) {
|
|
41
|
+
throw new Error("orderId 不能为空");
|
|
42
|
+
}
|
|
43
|
+
await ensureCacheDir();
|
|
44
|
+
const finalPath = resolveNsfcSessionCachePath(payload.orderId);
|
|
45
|
+
const nonce = randomBytes(6).toString("hex");
|
|
46
|
+
const tempPath = `${finalPath}.${nonce}.tmp`;
|
|
47
|
+
await writeFile(tempPath, JSON.stringify(payload), "utf8");
|
|
48
|
+
await atomicReplace(tempPath, finalPath);
|
|
49
|
+
await chmod(finalPath, 0o600);
|
|
50
|
+
}
|
|
51
|
+
export async function saveNsfcSessionCache(payload) {
|
|
52
|
+
try {
|
|
53
|
+
await persist(payload);
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.warn(`[nsfc-cache] 写入失败 orderId=${payload.orderId}: ${error.message}`);
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export async function loadNsfcSessionCache(orderId) {
|
|
62
|
+
if (!orderId?.trim())
|
|
63
|
+
return null;
|
|
64
|
+
const path = resolveNsfcSessionCachePath(orderId);
|
|
65
|
+
let raw;
|
|
66
|
+
try {
|
|
67
|
+
raw = await readFile(path, "utf8");
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
const entry = JSON.parse(raw);
|
|
74
|
+
if (!entry.orderId)
|
|
75
|
+
entry.orderId = orderId;
|
|
76
|
+
return entry;
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export async function updateNsfcSessionCache(orderId, patch) {
|
|
83
|
+
const existing = await loadNsfcSessionCache(orderId);
|
|
84
|
+
if (!existing)
|
|
85
|
+
return null;
|
|
86
|
+
const next = { ...existing, ...patch, orderId };
|
|
87
|
+
await saveNsfcSessionCache(next);
|
|
88
|
+
return next;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=session-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-cache.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/session-cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAAM,EACN,EAAE,EACF,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOjC,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,sBAAsB,CAAC,CAAC;AAEvD,MAAM,iBAAiB,GAAG,UAAU,CAAC;AACrC,MAAM,cAAc,GAAG,OAAO,CAAC;AAuC/B,MAAM,UAAU,kCAAkC,CAAC,GAAW;IAC5D,SAAS,GAAG,GAAG,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,OAAe;IACzD,OAAO,IAAI,CACT,SAAS,EACT,GAAG,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG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GAAG,KAAK,EAAE,OAAO,EAAE,CAAC;IAChD,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../core/index.js";
|
|
2
|
+
export interface StreamNsfcWorkflowOptions {
|
|
3
|
+
path: string;
|
|
4
|
+
body: unknown;
|
|
5
|
+
format?: OutputFormat;
|
|
6
|
+
startLabel: string;
|
|
7
|
+
progressLabel: string;
|
|
8
|
+
finishLabel: string;
|
|
9
|
+
failureMessage: string;
|
|
10
|
+
emptyMessage: string;
|
|
11
|
+
/** 为 true 时:有 outputs 即可成功,不强制要求 text */
|
|
12
|
+
allowEmptyText?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface StreamNsfcWorkflowResult {
|
|
15
|
+
text: string;
|
|
16
|
+
elapsedTime?: number;
|
|
17
|
+
workflowRunId?: string;
|
|
18
|
+
outputs?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export declare function streamNsfcWorkflow(options: StreamNsfcWorkflowOptions): Promise<StreamNsfcWorkflowResult>;
|
|
21
|
+
export declare function formatElapsedHint(elapsedTime?: number): string;
|
|
22
|
+
//# sourceMappingURL=sse-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse-utils.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/sse-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,YAAY,EAClB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,wBAAwB,CAAC,CA+FnC;AAED,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9D"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// NSFC SSE workflow:允许仅返回结构化 outputs(无正文 text)
|
|
2
|
+
import { ApiClient, helixlifeError, helixlifeErrorCode, createStderrProgress, extractSseText, pickWorkflowOutputText, assertWorkflowSucceeded, } from "../../../core/index.js";
|
|
3
|
+
export async function streamNsfcWorkflow(options) {
|
|
4
|
+
const client = new ApiClient();
|
|
5
|
+
const chunks = [];
|
|
6
|
+
let receivedLength = 0;
|
|
7
|
+
let overrideText;
|
|
8
|
+
let succeeded = false;
|
|
9
|
+
let elapsedTime;
|
|
10
|
+
let workflowRunId;
|
|
11
|
+
let finishedOutputs;
|
|
12
|
+
let streamedAny = false;
|
|
13
|
+
const streamToStdout = options.format !== "json";
|
|
14
|
+
if (streamToStdout) {
|
|
15
|
+
console.log(`${options.startLabel}\n`);
|
|
16
|
+
}
|
|
17
|
+
const progress = createStderrProgress(!streamToStdout);
|
|
18
|
+
progress.start(options.progressLabel);
|
|
19
|
+
try {
|
|
20
|
+
await client.requestSse(options.path, { method: "POST", body: options.body }, (payload) => {
|
|
21
|
+
assertWorkflowSucceeded(payload, options.failureMessage, [
|
|
22
|
+
"workflow_finished",
|
|
23
|
+
]);
|
|
24
|
+
const chunk = extractSseText(payload, { nested: true });
|
|
25
|
+
if (chunk) {
|
|
26
|
+
chunks.push(chunk);
|
|
27
|
+
receivedLength += chunk.length;
|
|
28
|
+
progress.update(receivedLength);
|
|
29
|
+
if (streamToStdout) {
|
|
30
|
+
process.stdout.write(chunk);
|
|
31
|
+
streamedAny = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (payload.event === "workflow_finished") {
|
|
35
|
+
const data = payload.data;
|
|
36
|
+
if (typeof data === "object" && data !== null) {
|
|
37
|
+
const record = data;
|
|
38
|
+
if (record.status === "succeeded") {
|
|
39
|
+
succeeded = true;
|
|
40
|
+
}
|
|
41
|
+
if (typeof record.elapsed_time === "number") {
|
|
42
|
+
elapsedTime = record.elapsed_time;
|
|
43
|
+
}
|
|
44
|
+
const outputs = record.outputs;
|
|
45
|
+
if (typeof outputs === "object" && outputs !== null) {
|
|
46
|
+
finishedOutputs = outputs;
|
|
47
|
+
const finishedText = pickWorkflowOutputText(finishedOutputs);
|
|
48
|
+
if (finishedText) {
|
|
49
|
+
overrideText = finishedText;
|
|
50
|
+
if (streamToStdout && !streamedAny) {
|
|
51
|
+
process.stdout.write(`${finishedText}\n`);
|
|
52
|
+
streamedAny = true;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (typeof payload.workflow_run_id === "string") {
|
|
58
|
+
workflowRunId = payload.workflow_run_id;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
progress.dispose();
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
progress.finish(options.finishLabel);
|
|
68
|
+
const text = overrideText ?? chunks.join("");
|
|
69
|
+
const hasOutputs = finishedOutputs !== undefined && Object.keys(finishedOutputs).length > 0;
|
|
70
|
+
if (!text && !(options.allowEmptyText && hasOutputs)) {
|
|
71
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_RESPONSE, options.emptyMessage);
|
|
72
|
+
}
|
|
73
|
+
if (!succeeded) {
|
|
74
|
+
throw new helixlifeError(helixlifeErrorCode.REQUEST_FAILED, options.failureMessage);
|
|
75
|
+
}
|
|
76
|
+
return { text, elapsedTime, workflowRunId, outputs: finishedOutputs };
|
|
77
|
+
}
|
|
78
|
+
export function formatElapsedHint(elapsedTime) {
|
|
79
|
+
return elapsedTime !== undefined ? `,耗时 ${elapsedTime.toFixed(1)} 秒` : "";
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=sse-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse-utils.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/sse-utils.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EACL,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAsBhC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAkC;IAElC,MAAM,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,IAAI,YAAgC,CAAC;IACrC,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,IAAI,WAA+B,CAAC;IACpC,IAAI,aAAiC,CAAC;IACtC,IAAI,eAAoD,CAAC;IACzD,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC;IAEjD,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,QAAQ,GAAG,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAC;IACvD,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,C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