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,238 @@
|
|
|
1
|
+
import { parseOutputFormat } from "../../../core/index.js";
|
|
2
|
+
import { runCreateNsfcHypothesis } from "./commands/hypothesis-create.js";
|
|
3
|
+
import { runAnalyzeNsfcHypothesis } from "./commands/hypothesis-analyze.js";
|
|
4
|
+
import { runNsfcGenesSelect } from "./commands/hypothesis-genes-select.js";
|
|
5
|
+
import { runNsfcHypothesisPick } from "./commands/hypothesis-pick.js";
|
|
6
|
+
import { runNsfcResearchPathConfirm } from "./commands/research-path-confirm.js";
|
|
7
|
+
import { runCreateNsfcOutline } from "./commands/outline-create.js";
|
|
8
|
+
import { runConfirmNsfcOutline } from "./commands/outline-confirm.js";
|
|
9
|
+
import { runCreateNsfcArticle } from "./commands/article-create.js";
|
|
10
|
+
import { runDownloadNsfcArticle } from "./commands/article-download.js";
|
|
11
|
+
import { runNsfcTechRoadmap } from "./commands/tech-roadmap.js";
|
|
12
|
+
import { runNsfcHypothesisFigure } from "./commands/hypothesis-figure.js";
|
|
13
|
+
import { runNsfcFormatConvert } from "./commands/format-convert.js";
|
|
14
|
+
/** 注册基金工作台(nsfc)子命令 */
|
|
15
|
+
export function registerNsfcCommands(nsfc) {
|
|
16
|
+
const hypothesis = nsfc
|
|
17
|
+
.command("hypothesis")
|
|
18
|
+
.description("科学假说(Step1 采集 / Step2 确认)");
|
|
19
|
+
hypothesis
|
|
20
|
+
.command("create")
|
|
21
|
+
.description("Step1:选择是否有假说 → 填选项/文本/材料 → 校验通过后输出可串联参数(不调工作流)")
|
|
22
|
+
.option("--has-hypothesis <type>", "是否有科学假说:blank(无)| existing(有)")
|
|
23
|
+
.option("--project-level <level>", "项目级别:国家级 | 省部级")
|
|
24
|
+
.option("--project <type>", "项目类型(国家级必填):面上项目 | 地区项目 | 青年项目")
|
|
25
|
+
.option("--prior-result <yes|no>", "是否有前期研究结果(仅 blank):yes | no")
|
|
26
|
+
.option("-q, --query <text>", "主文本:blank 为疾病名/研究主题;existing 为科学假说;长文本请用 --query-file")
|
|
27
|
+
.option("--query-file <path>", "主文本文件路径(UTF-8,与 --query 互斥)")
|
|
28
|
+
.option("--disease <text>", "疾病名称(existing 必填;blank+有前期时通常与 --query 相同)")
|
|
29
|
+
.option("--disease-file <path>", "疾病名称文件路径(与 --disease 互斥)")
|
|
30
|
+
.option("--attach <path>", "补充材料本地路径(pdf/docx;blank+有前期必填,existing 可选)")
|
|
31
|
+
.option("-y, --yes", "跳过交互,直接使用参数(须提供全部当前路径必填项)")
|
|
32
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
33
|
+
.action(async (opts) => {
|
|
34
|
+
await runCreateNsfcHypothesis({
|
|
35
|
+
hasHypothesis: opts.hasHypothesis,
|
|
36
|
+
projectLevel: opts.projectLevel,
|
|
37
|
+
project: opts.project,
|
|
38
|
+
priorResult: opts.priorResult,
|
|
39
|
+
query: opts.query,
|
|
40
|
+
queryFile: opts.queryFile,
|
|
41
|
+
disease: opts.disease,
|
|
42
|
+
diseaseFile: opts.diseaseFile,
|
|
43
|
+
attach: opts.attach,
|
|
44
|
+
yes: opts.yes,
|
|
45
|
+
format: parseOutputFormat(opts.format),
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
hypothesis
|
|
49
|
+
.command("analyze")
|
|
50
|
+
.description("Step2①:按 Step1 nextSubStep 跑首个分析工作流(背景基因 / 假说列表 / 研究路径)")
|
|
51
|
+
.requiredOption("--has-hypothesis <type>", "blank | existing(Step1 _handoff)")
|
|
52
|
+
.requiredOption("--next-sub-step <step>", "background_genes | hypothesis_pick | research_path")
|
|
53
|
+
.requiredOption("--inputs-file <path>", "Step1 data.inputs JSON 文件路径")
|
|
54
|
+
.option("-q, --query <text>", "主文本(可省略,默认取 inputs.input/text)")
|
|
55
|
+
.option("--query-file <path>", "主文本文件(与 --query 互斥)")
|
|
56
|
+
.option("-y, --yes", "非交互(本命令无额外选型)")
|
|
57
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
58
|
+
.action(async (opts) => {
|
|
59
|
+
await runAnalyzeNsfcHypothesis({
|
|
60
|
+
hasHypothesis: opts.hasHypothesis,
|
|
61
|
+
nextSubStep: opts.nextSubStep,
|
|
62
|
+
inputsFile: opts.inputsFile,
|
|
63
|
+
query: opts.query,
|
|
64
|
+
queryFile: opts.queryFile,
|
|
65
|
+
yes: opts.yes,
|
|
66
|
+
format: parseOutputFormat(opts.format),
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
const genes = hypothesis.command("genes").description("候选基因(有前期路径)");
|
|
70
|
+
genes
|
|
71
|
+
.command("select")
|
|
72
|
+
.description("提交候选基因 N 选 1,生成假说列表")
|
|
73
|
+
.requiredOption("--order-id <id>", "hypothesis analyze 返回的 orderId")
|
|
74
|
+
.option("--gene <name>", "候选基因名")
|
|
75
|
+
.option("--mechanism <text>", "机制/方向文案")
|
|
76
|
+
.option("--results <text>", "前期结果 pre_result")
|
|
77
|
+
.option("-y, --yes", "跳过交互,须提供 --gene / --mechanism")
|
|
78
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
79
|
+
.action(async (opts) => {
|
|
80
|
+
await runNsfcGenesSelect({
|
|
81
|
+
orderId: opts.orderId,
|
|
82
|
+
gene: opts.gene,
|
|
83
|
+
mechanism: opts.mechanism,
|
|
84
|
+
results: opts.results,
|
|
85
|
+
yes: opts.yes,
|
|
86
|
+
format: parseOutputFormat(opts.format),
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
hypothesis
|
|
90
|
+
.command("pick")
|
|
91
|
+
.description("Step2:确认科学假说(可选自定义);仅输出 handoff,不跑提纲")
|
|
92
|
+
.requiredOption("--order-id <id>", "analyze 或 genes select 返回的 orderId")
|
|
93
|
+
.option("--hypothesis-index <n>", "假说列表下标(从 0 起)")
|
|
94
|
+
.option("--custom <text>", "自定义假说文本")
|
|
95
|
+
.option("--custom-file <path>", "自定义假说文件(与 --custom 互斥)")
|
|
96
|
+
.option("-y, --yes", "跳过交互")
|
|
97
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
98
|
+
.action(async (opts) => {
|
|
99
|
+
await runNsfcHypothesisPick({
|
|
100
|
+
orderId: opts.orderId,
|
|
101
|
+
hypothesisIndex: opts.hypothesisIndex,
|
|
102
|
+
custom: opts.custom,
|
|
103
|
+
customFile: opts.customFile,
|
|
104
|
+
yes: opts.yes,
|
|
105
|
+
format: parseOutputFormat(opts.format),
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
const researchPath = nsfc
|
|
109
|
+
.command("research-path")
|
|
110
|
+
.description("已有假说:研究路径 + 缺失信息");
|
|
111
|
+
researchPath
|
|
112
|
+
.command("confirm")
|
|
113
|
+
.description("确认缺失信息并直接生成提纲(跳过补假说)")
|
|
114
|
+
.requiredOption("--order-id <id>", "hypothesis analyze 返回的 orderId")
|
|
115
|
+
.option("--picks-file <path>", "缺失信息选型 JSON:[{title,value},...](有缺失信息时必填)")
|
|
116
|
+
.option("-y, --yes", "跳过交互")
|
|
117
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
118
|
+
.action(async (opts) => {
|
|
119
|
+
await runNsfcResearchPathConfirm({
|
|
120
|
+
orderId: opts.orderId,
|
|
121
|
+
picksFile: opts.picksFile,
|
|
122
|
+
yes: opts.yes,
|
|
123
|
+
format: parseOutputFormat(opts.format),
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
const outline = nsfc.command("outline").description("申请书提纲(Step3)");
|
|
127
|
+
outline
|
|
128
|
+
.command("create")
|
|
129
|
+
.description("生成 / 重新生成提纲(读 Step2 会话假说与 outlineParams)")
|
|
130
|
+
.requiredOption("--order-id <id>", "Step2 返回的 orderId")
|
|
131
|
+
.option("-y, --yes", "非交互")
|
|
132
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
133
|
+
.action(async (opts) => {
|
|
134
|
+
await runCreateNsfcOutline({
|
|
135
|
+
orderId: opts.orderId,
|
|
136
|
+
yes: opts.yes,
|
|
137
|
+
format: parseOutputFormat(opts.format),
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
outline
|
|
141
|
+
.command("confirm")
|
|
142
|
+
.description("确认提纲(可选 --file 回传 Agent 本地修改后的 Markdown)")
|
|
143
|
+
.requiredOption("--order-id <id>", "会话 orderId")
|
|
144
|
+
.option("-f, --file <path>", "改稿后的提纲 Markdown 文件;缺省使用缓存中的提纲")
|
|
145
|
+
.option("-y, --yes", "非交互")
|
|
146
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
147
|
+
.action(async (opts) => {
|
|
148
|
+
await runConfirmNsfcOutline({
|
|
149
|
+
orderId: opts.orderId,
|
|
150
|
+
file: opts.file,
|
|
151
|
+
yes: opts.yes,
|
|
152
|
+
format: parseOutputFormat(opts.format),
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
const article = nsfc.command("article").description("申请书全文(Step4)");
|
|
156
|
+
article
|
|
157
|
+
.command("create")
|
|
158
|
+
.description("基于已确认提纲生成申请书全文(SSE)")
|
|
159
|
+
.requiredOption("--order-id <id>", "会话 orderId")
|
|
160
|
+
.option("-y, --yes", "非交互")
|
|
161
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
162
|
+
.action(async (opts) => {
|
|
163
|
+
await runCreateNsfcArticle({
|
|
164
|
+
orderId: opts.orderId,
|
|
165
|
+
yes: opts.yes,
|
|
166
|
+
format: parseOutputFormat(opts.format),
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
article
|
|
170
|
+
.command("download")
|
|
171
|
+
.description("导出原始引文格式 Markdown + Word")
|
|
172
|
+
.option("--order-id <id>", "会话 orderId(命中全文缓存)")
|
|
173
|
+
.option("--file <path>", "本地 Markdown 全文(与 --order-id 互斥)")
|
|
174
|
+
.option("-o, --output <path>", "输出 .docx 路径或目录")
|
|
175
|
+
.option("--produce-id <id>", "AIGC produce_id(默认取 workflowRunId)")
|
|
176
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
177
|
+
.action(async (opts) => {
|
|
178
|
+
await runDownloadNsfcArticle({
|
|
179
|
+
orderId: opts.orderId,
|
|
180
|
+
file: opts.file,
|
|
181
|
+
output: opts.output,
|
|
182
|
+
produceId: opts.produceId,
|
|
183
|
+
format: parseOutputFormat(opts.format),
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
const techRoadmap = nsfc
|
|
187
|
+
.command("tech-roadmap")
|
|
188
|
+
.description("技术路线图(基于提纲立项依据,只出图)");
|
|
189
|
+
techRoadmap
|
|
190
|
+
.command("create")
|
|
191
|
+
.description("生成技术路线图 Mermaid/PNG(不插入全文)")
|
|
192
|
+
.requiredOption("--order-id <id>", "会话 orderId")
|
|
193
|
+
.option("-o, --output <dir>", "图片输出目录(默认 Downloads/nsfc-tech-roadmap)")
|
|
194
|
+
.option("-y, --yes", "非交互")
|
|
195
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
196
|
+
.action(async (opts) => {
|
|
197
|
+
await runNsfcTechRoadmap({
|
|
198
|
+
orderId: opts.orderId,
|
|
199
|
+
output: opts.output,
|
|
200
|
+
yes: opts.yes,
|
|
201
|
+
format: parseOutputFormat(opts.format),
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
const hypothesisFigure = nsfc
|
|
205
|
+
.command("hypothesis-figure")
|
|
206
|
+
.description("假说机制图(基于科学假说,只出图)");
|
|
207
|
+
hypothesisFigure
|
|
208
|
+
.command("create")
|
|
209
|
+
.description("生成假说机制图 PNG(不插入全文)")
|
|
210
|
+
.requiredOption("--order-id <id>", "会话 orderId")
|
|
211
|
+
.option("-o, --output <dir>", "图片输出目录(默认 Downloads)")
|
|
212
|
+
.option("-y, --yes", "非交互")
|
|
213
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
214
|
+
.action(async (opts) => {
|
|
215
|
+
await runNsfcHypothesisFigure({
|
|
216
|
+
orderId: opts.orderId,
|
|
217
|
+
output: opts.output,
|
|
218
|
+
yes: opts.yes,
|
|
219
|
+
format: parseOutputFormat(opts.format),
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
nsfc
|
|
223
|
+
.command("format-convert")
|
|
224
|
+
.description("格式转换:全文 Markdown → 改写 → Word(全项目类型)")
|
|
225
|
+
.requiredOption("--order-id <id>", "会话 orderId")
|
|
226
|
+
.option("-o, --output <path>", "输出 .docx 路径或目录")
|
|
227
|
+
.option("-y, --yes", "非交互")
|
|
228
|
+
.option("--format <format>", "输出格式:markdown | json", "markdown")
|
|
229
|
+
.action(async (opts) => {
|
|
230
|
+
await runNsfcFormatConvert({
|
|
231
|
+
orderId: opts.orderId,
|
|
232
|
+
output: opts.output,
|
|
233
|
+
yes: opts.yes,
|
|
234
|
+
format: parseOutputFormat(opts.format),
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM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CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface MermaidRenderResult {
|
|
2
|
+
mmdPath: string;
|
|
3
|
+
pngPath?: string;
|
|
4
|
+
rendered: boolean;
|
|
5
|
+
method?: "graph-layout";
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface RenderMermaidOptions {
|
|
9
|
+
/** 横向排布(对齐原站:动物/临床水平用横排,细胞用纵排) */
|
|
10
|
+
horizontal?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 去掉 Markdown 代码围栏(对齐原站 tech-roadmap-modal)
|
|
14
|
+
* 工作流常返回 ```mermaid ... ```,需纯 Mermaid 源码。
|
|
15
|
+
*/
|
|
16
|
+
export declare function stripMermaidFences(source: string): string;
|
|
17
|
+
export declare function renderMermaidToPng(mermaidSource: string, outputBasePath: string, options?: RenderMermaidOptions): Promise<MermaidRenderResult>;
|
|
18
|
+
//# sourceMappingURL=mermaid-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-render.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/mermaid-render.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED,wBAAsB,kBAAkB,CACtC,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CA0B9B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mermaid → PNG:graph-layout(服务端布局,与原站同源)+ Resvg。
|
|
3
|
+
* 与工作流同前提:网络 + token;不依赖本机 Chrome / mmdc。
|
|
4
|
+
*/
|
|
5
|
+
import { writeFile } from "node:fs/promises";
|
|
6
|
+
import { renderMermaidViaGraphLayout } from "./graph-render.js";
|
|
7
|
+
/**
|
|
8
|
+
* 去掉 Markdown 代码围栏(对齐原站 tech-roadmap-modal)
|
|
9
|
+
* 工作流常返回 ```mermaid ... ```,需纯 Mermaid 源码。
|
|
10
|
+
*/
|
|
11
|
+
export function stripMermaidFences(source) {
|
|
12
|
+
let s = source.trim();
|
|
13
|
+
const fenced = /^```(?:mermaid)?\s*\r?\n?([\s\S]*?)\r?\n?```\s*$/i;
|
|
14
|
+
const matched = s.match(fenced);
|
|
15
|
+
if (matched)
|
|
16
|
+
return matched[1].trim();
|
|
17
|
+
s = s.replace(/^```(?:mermaid)?\s*\r?\n?/i, "").replace(/\r?\n?```\s*$/i, "");
|
|
18
|
+
return s.trim();
|
|
19
|
+
}
|
|
20
|
+
export async function renderMermaidToPng(mermaidSource, outputBasePath, options = {}) {
|
|
21
|
+
const mmdPath = `${outputBasePath}.mmd`;
|
|
22
|
+
const pngPath = `${outputBasePath}.png`;
|
|
23
|
+
const clean = stripMermaidFences(mermaidSource);
|
|
24
|
+
if (!clean) {
|
|
25
|
+
await writeFile(mmdPath, "\n", "utf8");
|
|
26
|
+
return {
|
|
27
|
+
mmdPath,
|
|
28
|
+
rendered: false,
|
|
29
|
+
error: `Mermaid 源码为空(已跳过渲染):${outputBasePath}`,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
await writeFile(mmdPath, clean + "\n", "utf8");
|
|
33
|
+
try {
|
|
34
|
+
const png = await renderMermaidViaGraphLayout(clean, options.horizontal);
|
|
35
|
+
await writeFile(pngPath, png);
|
|
36
|
+
return { mmdPath, pngPath, rendered: true, method: "graph-layout" };
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
40
|
+
return {
|
|
41
|
+
mmdPath,
|
|
42
|
+
rendered: false,
|
|
43
|
+
error: `Mermaid PNG 渲染失败(已保存 ${mmdPath}):${message.slice(0, 300)}`,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=mermaid-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-render.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/mermaid-render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAehE;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IACtB,MAAM,MAAM,GAAG,mDAAmD,CAAC;IACnE,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAC9E,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,aAAqB,EACrB,cAAsB,EACtB,UAAgC,EAAE;IAElC,MAAM,OAAO,GAAG,GAAG,cAAc,MAAM,CAAC;IACxC,MAAM,OAAO,GAAG,GAAG,cAAc,MAAM,CAAC;IACxC,MAAM,KAAK,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAChD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,OAAO;YACL,OAAO;YACP,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,uBAAuB,cAAc,EAAE;SAC/C,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,CAAC,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;IAE/C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,2BAA2B,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QACzE,MAAM,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC9B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACtE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO;YACL,OAAO;YACP,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,wBAAwB,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;SACnE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export interface NsfcHypothesisItem {
|
|
2
|
+
id: string;
|
|
3
|
+
original_text: string;
|
|
4
|
+
new_text: string;
|
|
5
|
+
background_report?: string;
|
|
6
|
+
mechanism?: string;
|
|
7
|
+
results?: string;
|
|
8
|
+
gene?: string;
|
|
9
|
+
directions?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface NsfcMissingInfoBlock {
|
|
12
|
+
title: string;
|
|
13
|
+
select: string[];
|
|
14
|
+
}
|
|
15
|
+
/** WorkBuddy / AskQuestion 可直接使用的候选基因选项 */
|
|
16
|
+
export interface NsfcGeneSelectionOption {
|
|
17
|
+
index: number;
|
|
18
|
+
label: string;
|
|
19
|
+
description: string;
|
|
20
|
+
value: string;
|
|
21
|
+
mechanism: string;
|
|
22
|
+
results: string;
|
|
23
|
+
}
|
|
24
|
+
/** WorkBuddy / AskQuestion 可直接使用的假说选项(含自定义) */
|
|
25
|
+
export interface NsfcHypothesisSelectionOption {
|
|
26
|
+
index: number;
|
|
27
|
+
label: string;
|
|
28
|
+
description: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}
|
|
31
|
+
/** 缺失信息单块内的选择器选项(label=短标题;全文在 description / value) */
|
|
32
|
+
export interface NsfcMissingInfoSelectionOption {
|
|
33
|
+
index: number;
|
|
34
|
+
label: string;
|
|
35
|
+
description: string;
|
|
36
|
+
value: string;
|
|
37
|
+
}
|
|
38
|
+
/** 拼接候选基因的研究方向文案(directions 全量;无则 mechanism) */
|
|
39
|
+
export declare function formatGeneResearchDirections(g: NsfcHypothesisItem): string;
|
|
40
|
+
/**
|
|
41
|
+
* 缺失信息选项短标题:取括号前机制名(如 `ceRNA机制 (…)` → `ceRNA机制`);
|
|
42
|
+
* 无括号则用全文。对齐「聊天展示全文 + 选择器短标题」。
|
|
43
|
+
*/
|
|
44
|
+
export declare function shortMissingInfoLabel(full: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* 构造候选基因选择器选项。
|
|
47
|
+
* UX:聊天先按基因列出研究方向全文;选择器 label 仅基因名(勿重复塞进 label)。
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildGeneSelectionOptions(genes: NsfcHypothesisItem[]): NsfcGeneSelectionOption[];
|
|
50
|
+
/**
|
|
51
|
+
* 构造假说选择器选项。
|
|
52
|
+
* UX:聊天完整展示假说正文;选择器仅短标题(假说 N)。
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildHypothesisSelectionOptions(hypotheses: NsfcHypothesisItem[]): NsfcHypothesisSelectionOption[];
|
|
55
|
+
/**
|
|
56
|
+
* 构造缺失信息单块选择器选项。
|
|
57
|
+
* UX:聊天先列出选项全文(含括号说明);选择器 label 仅短标题;
|
|
58
|
+
* value 仍为工作流全文,供 --picks-file 提交。
|
|
59
|
+
*/
|
|
60
|
+
export declare function buildMissingInfoBlockSelectionOptions(block: NsfcMissingInfoBlock): NsfcMissingInfoSelectionOption[];
|
|
61
|
+
export declare function articleContentToJsonArrayString(raw: string): string;
|
|
62
|
+
export declare function splitGeneDirectionLines(direction: string): string[];
|
|
63
|
+
/** 解析假说列表 outputs.jsonN */
|
|
64
|
+
export declare function parseNsfcV2HypothesisWorkflowResult(outputs: unknown): NsfcHypothesisItem[] | null;
|
|
65
|
+
/** 解析文章分析 outputs.result → 背景 + 候选基因 */
|
|
66
|
+
export declare function parseNsfcV2ArticleWorkflowResult(result: unknown): {
|
|
67
|
+
backgroundReport: string;
|
|
68
|
+
genes: NsfcHypothesisItem[];
|
|
69
|
+
} | null;
|
|
70
|
+
export declare function buildNsfcV2GenePreResultsText(genes: NsfcHypothesisItem[] | null | undefined): string;
|
|
71
|
+
export declare function getResearchPathReportText(result: unknown): string;
|
|
72
|
+
export declare function parseMissingInfoFromAnalysisResult(result: unknown): NsfcMissingInfoBlock[];
|
|
73
|
+
export declare function isMissingInfoCustomOption(optionLabel: string): boolean;
|
|
74
|
+
/** 从 outputs 统一尝试解析假说列表 */
|
|
75
|
+
export declare function tryParseHypothesisList(outputs: Record<string, unknown> | undefined): NsfcHypothesisItem[];
|
|
76
|
+
//# sourceMappingURL=parse-hypothesis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-hypothesis.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/parse-hypothesis.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACj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