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,30 @@
|
|
|
1
|
+
import { loadLocalConfig } from "../env-config.js";
|
|
2
|
+
// 生产默认地址:本地 config.json 缺失对应字段时回退至此。
|
|
3
|
+
// 覆盖方式:`helixlife-expert config set api|agent_api <完整基址>` 写入 ~/.config/helixlife/config.json。
|
|
4
|
+
const DEFAULT_ENDPOINTS = {
|
|
5
|
+
api: "https://api.helixlife.cn",
|
|
6
|
+
agent_api: "https://agent.helixlife.cn",
|
|
7
|
+
newidea: "https://paas-api.newidea.pro",
|
|
8
|
+
};
|
|
9
|
+
// 解析当前生效基址:本地有对应字段则原样使用,否则回退生产默认。
|
|
10
|
+
function resolveEndpoints() {
|
|
11
|
+
const local = loadLocalConfig();
|
|
12
|
+
return {
|
|
13
|
+
api: local?.api || DEFAULT_ENDPOINTS.api,
|
|
14
|
+
agent_api: local?.agent_api || DEFAULT_ENDPOINTS.agent_api,
|
|
15
|
+
newidea: DEFAULT_ENDPOINTS.newidea,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
// 业务主接口基址:每次取用前重读本地配置
|
|
19
|
+
export function getDefaultBaseUrl() {
|
|
20
|
+
return resolveEndpoints().api;
|
|
21
|
+
}
|
|
22
|
+
// 授权相关接口基址:每次取用前重读本地配置
|
|
23
|
+
export function getDefaultAuthBaseUrl() {
|
|
24
|
+
return resolveEndpoints().agent_api;
|
|
25
|
+
}
|
|
26
|
+
// Newidea PaaS 平台接口基址(固定,不读本地配置)
|
|
27
|
+
export function getDefaultNewideaBaseUrl() {
|
|
28
|
+
return resolveEndpoints().newidea;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/core/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAenD,qCAAqC;AACrC,8FAA8F;AAC9F,MAAM,iBAAiB,GAAc;IACnC,GAAG,EAAE,0BAA0B;IAC/B,SAAS,EAAE,4BAA4B;IACvC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEF,kCAAkC;AAClC,SAAS,gBAAgB;IACvB,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,OAAO;QACL,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,iBAAiB,CAAC,GAAG;QACxC,SAAS,EAAE,KAAK,EAAE,SAAS,IAAI,iBAAiB,CAAC,SAAS;QAC1D,OAAO,EAAE,iBAAiB,CAAC,OAAO;KACnC,CAAC;AACJ,CAAC;AAED,sBAAsB;AACtB,MAAM,UAAU,iBAAiB;IAC/B,OAAO,gBAAgB,EAAE,CAAC,GAAG,CAAC;AAChC,CAAC;AAED,uBAAuB;AACvB,MAAM,UAAU,qBAAqB;IACnC,OAAO,gBAAgB,EAAE,CAAC,SAAS,CAAC;AACtC,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,wBAAwB;IACtC,OAAO,gBAAgB,EAAE,CAAC,OAAO,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/core/version.ts"],"names":[],"mappings":"AAKA,wBAAgB,iBAAiB,IAAI,MAAM,CAI1C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
// 从 package.json 读取版本号,避免与 index.ts 硬编码重复
|
|
5
|
+
export function getPackageVersion() {
|
|
6
|
+
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "../../../package.json");
|
|
7
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
8
|
+
return pkg.version;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/core/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB;IAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC;IACvF,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAwB,CAAC;IAC9E,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { helixlifeError } from "./core/index.js";
|
|
2
|
+
import { createProgram } from "./program.js";
|
|
3
|
+
export { createProgram } from "./program.js";
|
|
4
|
+
// CLI 入口:解析参数并统一处理错误
|
|
5
|
+
async function main() {
|
|
6
|
+
const program = createProgram();
|
|
7
|
+
try {
|
|
8
|
+
await program.parseAsync(process.argv);
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
if (error instanceof helixlifeError) {
|
|
12
|
+
console.error(`[${error.code}] ${error.message}`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
if (error instanceof Error) {
|
|
16
|
+
console.error(`[E9999] ${error.message}`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
main();
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,qBAAqB;AACrB,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAEhC,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;YACpC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,WAAW,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/analysis/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,qBAAqB,yCAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/modules/analysis/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkB/D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { emitJson } from "../../core/index.js";
|
|
2
|
+
import { ANALYSIS_EXPERT_ID, ANALYSIS_EXPERT_TITLE } from "./constants.js";
|
|
3
|
+
// 注册数据分析专家命名空间:helixlife-expert analysis info
|
|
4
|
+
// 业务执行经外部仙桃 CLI(xt,npm: @helixlife-ai/xiantao),与本 CLI 共用 ~/.config/helixlife 授权
|
|
5
|
+
export function registerAnalysisCommands(program) {
|
|
6
|
+
const analysis = program
|
|
7
|
+
.command(ANALYSIS_EXPERT_ID)
|
|
8
|
+
.description(ANALYSIS_EXPERT_TITLE);
|
|
9
|
+
analysis
|
|
10
|
+
.command("info")
|
|
11
|
+
.description("查看数据分析专家模块状态")
|
|
12
|
+
.action(() => {
|
|
13
|
+
emitJson({
|
|
14
|
+
ok: true,
|
|
15
|
+
expert: ANALYSIS_EXPERT_ID,
|
|
16
|
+
title: ANALYSIS_EXPERT_TITLE,
|
|
17
|
+
implemented: true,
|
|
18
|
+
runtime: "external",
|
|
19
|
+
note: "分析/绘图经外部仙桃 CLI(xt,npm: @helixlife-ai/xiantao)执行,与本 CLI 共用 ~/.config/helixlife 授权",
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/analysis/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,8CAA8C;AAC9C,gFAAgF;AAChF,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,MAAM,QAAQ,GAAG,OAAO;SACrB,OAAO,CAAC,kBAAkB,CAAC;SAC3B,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAEtC,QAAQ;SACL,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,cAAc,CAAC;SAC3B,MAAM,CAAC,GAAG,EAAE;QACX,QAAQ,CAAC;YACP,EAAE,EAAE,IAAI;YACR,MAAM,EAAE,kBAAkB;YAC1B,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,UAAU;YACnB,IAAI,EAAE,kFAAkF;SACzF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiF3D"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { checkToken, reauthorize, loadTokenFromFile, clearTokenFile, emitJson, } from "../../core/index.js";
|
|
2
|
+
// 注册授权与鉴权命名空间:helixlife-expert auth status / login / logout
|
|
3
|
+
export function registerAuthCommands(program) {
|
|
4
|
+
const auth = program.command("auth").description("授权与鉴权管理");
|
|
5
|
+
auth
|
|
6
|
+
.command("status")
|
|
7
|
+
.description("检测本地 token 的授权状态(调用检测授权接口 check-token)")
|
|
8
|
+
.action(async () => {
|
|
9
|
+
const token = loadTokenFromFile();
|
|
10
|
+
if (!token) {
|
|
11
|
+
emitJson({
|
|
12
|
+
authorized: false,
|
|
13
|
+
status: "no_token",
|
|
14
|
+
message: "本地无 token,请运行 `helixlife-expert auth login` 获取授权链接并完成授权",
|
|
15
|
+
});
|
|
16
|
+
process.exitCode = 2;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// 未授权时 checkToken 内部已统一清除本地失效 token,命令层无需重复处理
|
|
20
|
+
const result = await checkToken(token);
|
|
21
|
+
if (result.status === "valid") {
|
|
22
|
+
emitJson({
|
|
23
|
+
authorized: true,
|
|
24
|
+
status: "valid",
|
|
25
|
+
message: result.message,
|
|
26
|
+
});
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (result.status === "unauthorized") {
|
|
30
|
+
emitJson({
|
|
31
|
+
authorized: false,
|
|
32
|
+
status: "unauthorized",
|
|
33
|
+
code: result.code,
|
|
34
|
+
message: `${result.message},请运行 \`helixlife-expert auth login\` 重新授权`,
|
|
35
|
+
});
|
|
36
|
+
process.exitCode = 2;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
// error:其他错误(网络 / 权限 / 账号异常等)仅提示,不引导重新授权
|
|
40
|
+
emitJson({
|
|
41
|
+
authorized: false,
|
|
42
|
+
status: "error",
|
|
43
|
+
code: result.code,
|
|
44
|
+
message: result.message,
|
|
45
|
+
});
|
|
46
|
+
process.exitCode = 3;
|
|
47
|
+
});
|
|
48
|
+
auth
|
|
49
|
+
.command("login")
|
|
50
|
+
.description("获取授权链接并自动打开浏览器,引导用户完成授权")
|
|
51
|
+
.option("--no-open", "不自动打开浏览器,仅输出授权链接")
|
|
52
|
+
.action(async (opts) => {
|
|
53
|
+
// 始终重新授权:先清除本地失效 token,再获取授权链接,
|
|
54
|
+
// 避免未绑定的新 token 覆盖有效旧 token 造成「假登录」
|
|
55
|
+
const result = await reauthorize({
|
|
56
|
+
openBrowser: opts.open,
|
|
57
|
+
});
|
|
58
|
+
emitJson({
|
|
59
|
+
action: "authorize",
|
|
60
|
+
token_saved: true,
|
|
61
|
+
auth_url: result.finalUrl,
|
|
62
|
+
browser_opened: result.browserOpened,
|
|
63
|
+
message: result.browserOpened
|
|
64
|
+
? "已打开浏览器,请完成授权;完成后运行 `helixlife-expert auth status` 确认授权是否成功。"
|
|
65
|
+
: "请手动复制 auth_url 到浏览器完成授权;完成后运行 `helixlife-expert auth status` 确认授权是否成功。",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
auth
|
|
69
|
+
.command("logout")
|
|
70
|
+
.description("清除本地 token")
|
|
71
|
+
.action(() => {
|
|
72
|
+
clearTokenFile();
|
|
73
|
+
emitJson({ action: "logout", message: "已清除本地 token" });
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/auth/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,QAAQ,GAET,MAAM,qBAAqB,CAAC;AAE7B,4DAA4D;AAC5D,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAE5D,IAAI;SACD,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,wCAAwC,CAAC;SACrD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,QAAQ,CAAC;gBACP,UAAU,EAAE,KAAK;gBACjB,MAAM,EAAE,UAAU;gBAClB,OAAO,EACL,yDAAyD;aAC5D,CAAC,CAAC;YACH,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QAED,8CAA8C;QAC9C,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,CAAC;QAEvC,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;YAC9B,QAAQ,CAAC;gBACP,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,OAAO;gBACf,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;YACrC,QAAQ,CAAC;gBACP,UAAU,EAAE,KAAK;gBACjB,MAAM,EAAE,cAAc;gBACtB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,2CAA2C;aACtE,CAAC,CAAC;YACH,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QAED,yCAAyC;QACzC,QAAQ,CAAC;YACP,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC;QACH,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IAEL,IAAI;SACD,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,yBAAyB,CAAC;SACtC,MAAM,CAAC,WAAW,EAAE,kBAAkB,CAAC;SACvC,MAAM,CAAC,KAAK,EAAE,IAAwB,EAAE,EAAE;QACzC,gCAAgC;QAChC,oCAAoC;QACpC,MAAM,MAAM,GAAe,MAAM,WAAW,CAAC;YAC3C,WAAW,EAAE,IAAI,CAAC,IAAI;SACvB,CAAC,CAAC;QAEH,QAAQ,CAAC;YACP,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,cAAc,EAAE,MAAM,CAAC,aAAa;YACpC,OAAO,EAAE,MAAM,CAAC,aAAa;gBAC3B,CAAC,CAAC,6DAA6D;gBAC/D,CAAC,CAAC,wEAAwE;SAC7E,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEL,IAAI;SACD,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,YAAY,CAAC;SACzB,MAAM,CAAC,GAAG,EAAE;QACX,cAAc,EAAE,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export interface ExpertDefinition {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const EXPERTS: readonly [{
|
|
7
|
+
readonly id: "meta";
|
|
8
|
+
readonly title: "Meta分析专家";
|
|
9
|
+
}, {
|
|
10
|
+
readonly id: "fund";
|
|
11
|
+
readonly title: "基金写作专家";
|
|
12
|
+
}, {
|
|
13
|
+
readonly id: "sci";
|
|
14
|
+
readonly title: "SCI写作专家";
|
|
15
|
+
}, {
|
|
16
|
+
readonly id: "analysis";
|
|
17
|
+
readonly title: "数据分析专家";
|
|
18
|
+
}, {
|
|
19
|
+
readonly id: "literature";
|
|
20
|
+
readonly title: "文献调研专家";
|
|
21
|
+
}, {
|
|
22
|
+
readonly id: "proposal";
|
|
23
|
+
readonly title: "课题方案专家";
|
|
24
|
+
}];
|
|
25
|
+
export type ExpertId = (typeof EXPERTS)[number]["id"];
|
|
26
|
+
export declare function registerExpertScaffold(program: Command, expert: ExpertDefinition): void;
|
|
27
|
+
//# sourceMappingURL=expert-scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expert-scaffold.d.ts","sourceRoot":"","sources":["../../src/modules/expert-scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;EAO4B,CAAC;AAEjD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAGtD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,GACvB,IAAI,CAcN"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { emitJson } from "../core/index.js";
|
|
2
|
+
export const EXPERTS = [
|
|
3
|
+
{ id: "meta", title: "Meta分析专家" },
|
|
4
|
+
{ id: "fund", title: "基金写作专家" },
|
|
5
|
+
{ id: "sci", title: "SCI写作专家" },
|
|
6
|
+
{ id: "analysis", title: "数据分析专家" },
|
|
7
|
+
{ id: "literature", title: "文献调研专家" },
|
|
8
|
+
{ id: "proposal", title: "课题方案专家" },
|
|
9
|
+
];
|
|
10
|
+
// 注册专家脚手架命名空间:helixlife-expert <id> info
|
|
11
|
+
export function registerExpertScaffold(program, expert) {
|
|
12
|
+
const cmd = program.command(expert.id).description(expert.title);
|
|
13
|
+
cmd
|
|
14
|
+
.command("info")
|
|
15
|
+
.description(`查看${expert.title}模块状态(脚手架)`)
|
|
16
|
+
.action(() => {
|
|
17
|
+
emitJson({
|
|
18
|
+
ok: true,
|
|
19
|
+
expert: expert.id,
|
|
20
|
+
title: expert.title,
|
|
21
|
+
implemented: false,
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=expert-scaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expert-scaffold.js","sourceRoot":"","sources":["../../src/modules/expert-scaffold.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO5C,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE;IACjC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC/B,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE;IAC/B,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE;IACnC,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE;IACrC,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE;CACW,CAAC;AAIjD,yCAAyC;AACzC,MAAM,UAAU,sBAAsB,CACpC,OAAgB,EAChB,MAAwB;IAExB,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEjE,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,KAAK,MAAM,CAAC,KAAK,WAAW,CAAC;SACzC,MAAM,CAAC,GAAG,EAAE;QACX,QAAQ,CAAC;YACP,EAAE,EAAE,IAAI;YACR,MAAM,EAAE,MAAM,CAAC,EAAE;YACjB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** 临床工作流 execute body:网页所有步骤均不携带订单字段 */
|
|
2
|
+
export interface ClinicalWorkflowBody {
|
|
3
|
+
response_mode: "streaming";
|
|
4
|
+
query: string;
|
|
5
|
+
inputs: Record<string, unknown>;
|
|
6
|
+
app_id: string;
|
|
7
|
+
app_name: string;
|
|
8
|
+
app_mode: "workflow";
|
|
9
|
+
app_type: 0 | 1;
|
|
10
|
+
}
|
|
11
|
+
/** 对齐 fetchAIOutputs/helixAiRequest 的请求体 */
|
|
12
|
+
export declare function buildClinicalWorkflowBody(params: {
|
|
13
|
+
query?: string;
|
|
14
|
+
inputs: Record<string, unknown>;
|
|
15
|
+
appId: string;
|
|
16
|
+
appName: string;
|
|
17
|
+
appType?: 0 | 1;
|
|
18
|
+
}): ClinicalWorkflowBody;
|
|
19
|
+
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/clinical/apps.ts"],"names":[],"mappings":"AAEA,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,WAAW,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAED,4CAA4C;AAC5C,wBAAgB,yBAAyB,CAAC,MAAM,EAAE;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB,GAAG,oBAAoB,CAUvB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// 临床工作台 /apps/execute 请求体,对齐网页 fetchAIOutputs/helixAiRequest。
|
|
2
|
+
/** 对齐 fetchAIOutputs/helixAiRequest 的请求体 */
|
|
3
|
+
export function buildClinicalWorkflowBody(params) {
|
|
4
|
+
return {
|
|
5
|
+
response_mode: "streaming",
|
|
6
|
+
query: params.query ?? "",
|
|
7
|
+
inputs: params.inputs,
|
|
8
|
+
app_id: params.appId,
|
|
9
|
+
app_name: params.appName,
|
|
10
|
+
app_mode: "workflow",
|
|
11
|
+
app_type: params.appType ?? 1,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=apps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../../../../src/modules/fund/clinical/apps.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAa9D,4CAA4C;AAC5C,MAAM,UAAU,yBAAyB,CAAC,MAMzC;IACC,OAAO;QACL,aAAa,EAAE,WAAW;QAC1B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,KAAK;QACpB,QAAQ,EAAE,MAAM,CAAC,OAAO;QACxB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC;KAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function readClinicalJsonObject(path: string, label: string): Promise<Record<string, unknown>>;
|
|
2
|
+
export declare function readClinicalStringMap(path: string, label: string): Promise<Record<string, string>>;
|
|
3
|
+
export declare function readClinicalTextFile(path: string, label: string): Promise<string>;
|
|
4
|
+
//# sourceMappingURL=command-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-utils.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/clinical/command-utils.ts"],"names":[],"mappings":"AAmBA,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAiBlC;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAQjC;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAYjB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { helixlifeError, helixlifeErrorCode, resolveUserPath, } from "../../../core/index.js";
|
|
3
|
+
function windowsTempPathHint(path, error) {
|
|
4
|
+
const code = error?.code;
|
|
5
|
+
if (process.platform === "win32" &&
|
|
6
|
+
code === "ENOENT" &&
|
|
7
|
+
/^\/(?:var\/)?tmp(?:\/|$)/i.test(path.replace(/\\/g, "/"))) {
|
|
8
|
+
return ";Windows 下请将临时文件写入 %TEMP% 并传入绝对路径,不要使用沙箱 /tmp 路径";
|
|
9
|
+
}
|
|
10
|
+
return "";
|
|
11
|
+
}
|
|
12
|
+
export async function readClinicalJsonObject(path, label) {
|
|
13
|
+
try {
|
|
14
|
+
const raw = (await readFile(resolveUserPath(path), "utf8")).replace(/^\uFEFF/, "");
|
|
15
|
+
const parsed = JSON.parse(raw);
|
|
16
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
17
|
+
throw new Error("JSON 顶层必须是对象");
|
|
18
|
+
}
|
|
19
|
+
return parsed;
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无法读取${label}: ${error.message}${windowsTempPathHint(path, error)}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export async function readClinicalStringMap(path, label) {
|
|
26
|
+
const record = await readClinicalJsonObject(path, label);
|
|
27
|
+
return Object.fromEntries(Object.entries(record).map(([key, value]) => [
|
|
28
|
+
key,
|
|
29
|
+
value === undefined || value === null ? "" : String(value),
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
export async function readClinicalTextFile(path, label) {
|
|
33
|
+
try {
|
|
34
|
+
return (await readFile(resolveUserPath(path), "utf8")).replace(/^\uFEFF/, "");
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无法读取${label}: ${error.message}${windowsTempPathHint(path, error)}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=command-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-utils.js","sourceRoot":"","sources":["../../../../src/modules/fund/clinical/command-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAEhC,SAAS,mBAAmB,CAAC,IAAY,EAAE,KAAc;IACvD,MAAM,IAAI,GAAI,KAA2C,EAAE,IAAI,CAAC;IAChE,IACE,OAAO,CAAC,QAAQ,KAAK,OAAO;QAC5B,IAAI,KAAK,QAAQ;QACjB,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,EAC1D,CAAC;QACD,OAAO,kDAAkD,CAAC;IAC5D,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,IAAY,EACZ,KAAa;IAEb,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,CAAC,MAAM,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CACjE,SAAS,EACT,EAAE,CACH,CAAC;QACF,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACnE,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QACD,OAAO,MAAiC,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,OAAO,KAAK,KAAM,KAAe,CAAC,OAAO,GAAG,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAC/E,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,IAAY,EACZ,KAAa;IAEb,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;QAC3C,GAAG;QACH,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAC3D,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAAY,EACZ,KAAa;IAEb,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAC5D,SAAS,EACT,EAAE,CACH,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,OAAO,KAAK,KAAM,KAAe,CAAC,OAAO,GAAG,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAC/E,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../../core/index.js";
|
|
2
|
+
export interface CreateClinicalArticleOptions {
|
|
3
|
+
sessionId?: string;
|
|
4
|
+
format?: OutputFormat;
|
|
5
|
+
}
|
|
6
|
+
/** 对齐网页 Proofread:text → output → 非 reference 字符串。 */
|
|
7
|
+
export declare function pickClinicalFulltext(outputs: Record<string, unknown> | undefined, streamedText?: string): string;
|
|
8
|
+
export declare function runCreateClinicalArticle(options: CreateClinicalArticleOptions): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=article-create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article-create.d.ts","sourceRoot":"","sources":["../../../../../src/modules/fund/clinical/commands/article-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAC;AAoBnC,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,sDAAsD;AACtD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC5C,YAAY,SAAK,GAChB,MAAM,CAmBR;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,IAAI,CAAC,CA6Ff"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { createFormatLogger, extractReferences, helixlifeError, helixlifeErrorCode, printOutput, } from "../../../../core/index.js";
|
|
2
|
+
import { wrapWorkbenchResult } from "../../../shared/result-wrapper.js";
|
|
3
|
+
import { CLINICAL_EXECUTE_API_PATH, CLINICAL_FULLTEXT_WAIT_HINT, CLINICAL_WORKFLOW_APP_TYPE, getClinicalFulltextAppId, } from "../constants.js";
|
|
4
|
+
import { fourElementsDraftToWorkflowInputs, isFourElementsDraftDrifted, preprocessClinicalMarkdown, } from "../four-elements.js";
|
|
5
|
+
import { buildClinicalWorkflowBody } from "../apps.js";
|
|
6
|
+
import { streamClinicalWorkflow } from "../sse-utils.js";
|
|
7
|
+
import { requireClinicalSession, updateClinicalSession, } from "../session-cache.js";
|
|
8
|
+
/** 对齐网页 Proofread:text → output → 非 reference 字符串。 */
|
|
9
|
+
export function pickClinicalFulltext(outputs, streamedText = "") {
|
|
10
|
+
if (outputs) {
|
|
11
|
+
if (typeof outputs.text === "string" && outputs.text.trim()) {
|
|
12
|
+
return outputs.text;
|
|
13
|
+
}
|
|
14
|
+
if (typeof outputs.output === "string" && outputs.output.trim()) {
|
|
15
|
+
return outputs.output;
|
|
16
|
+
}
|
|
17
|
+
const values = Object.entries(outputs)
|
|
18
|
+
.filter(([key, value]) => !key.toLowerCase().includes("reference") &&
|
|
19
|
+
typeof value === "string" &&
|
|
20
|
+
value.trim())
|
|
21
|
+
.map(([, value]) => value);
|
|
22
|
+
if (values.length)
|
|
23
|
+
return values.join("\n\n");
|
|
24
|
+
}
|
|
25
|
+
return streamedText;
|
|
26
|
+
}
|
|
27
|
+
export async function runCreateClinicalArticle(options) {
|
|
28
|
+
const format = options.format ?? "markdown";
|
|
29
|
+
const session = await requireClinicalSession(options.sessionId);
|
|
30
|
+
if (session.proofread?.outcome !== "success") {
|
|
31
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "四要素尚未预检成功,无法生成全文");
|
|
32
|
+
}
|
|
33
|
+
if (isFourElementsDraftDrifted(session.precheckInputs, session.draft)) {
|
|
34
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "四要素在预检后发生变化,请重新预检");
|
|
35
|
+
}
|
|
36
|
+
const appId = getClinicalFulltextAppId(session.researchObjective, session.topicInputs.Study_design);
|
|
37
|
+
const workflowInputs = {
|
|
38
|
+
...fourElementsDraftToWorkflowInputs(session.draft),
|
|
39
|
+
};
|
|
40
|
+
if (session.topicInputs.Prognosis_model) {
|
|
41
|
+
workflowInputs.Prognosis_model =
|
|
42
|
+
session.topicInputs.Prognosis_model;
|
|
43
|
+
}
|
|
44
|
+
if (session.topicInputs.diagnostic_model) {
|
|
45
|
+
workflowInputs.diagnostic_model =
|
|
46
|
+
session.topicInputs.diagnostic_model;
|
|
47
|
+
}
|
|
48
|
+
process.stderr.write(`${CLINICAL_FULLTEXT_WAIT_HINT}\n`);
|
|
49
|
+
const stream = await streamClinicalWorkflow({
|
|
50
|
+
path: CLINICAL_EXECUTE_API_PATH,
|
|
51
|
+
body: buildClinicalWorkflowBody({
|
|
52
|
+
appId,
|
|
53
|
+
appName: `${session.researchObjective}-全文`,
|
|
54
|
+
appType: CLINICAL_WORKFLOW_APP_TYPE,
|
|
55
|
+
inputs: workflowInputs,
|
|
56
|
+
}),
|
|
57
|
+
format,
|
|
58
|
+
startLabel: "正在生成临床申请书全文...",
|
|
59
|
+
progressLabel: "全文生成中",
|
|
60
|
+
finishLabel: "全文生成完成",
|
|
61
|
+
failureMessage: "临床申请书全文生成失败,请稍后重试",
|
|
62
|
+
emptyMessage: "临床申请书全文结果为空",
|
|
63
|
+
allowEmptyText: true,
|
|
64
|
+
});
|
|
65
|
+
const rawArticle = pickClinicalFulltext(stream.outputs, stream.text).trim();
|
|
66
|
+
if (!rawArticle) {
|
|
67
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_RESPONSE, "临床申请书全文结果为空,请稍后重试");
|
|
68
|
+
}
|
|
69
|
+
const article = preprocessClinicalMarkdown(rawArticle).trim();
|
|
70
|
+
const references = extractReferences(stream.outputs);
|
|
71
|
+
const cacheReady = await updateClinicalSession(session, {
|
|
72
|
+
article: {
|
|
73
|
+
article,
|
|
74
|
+
references,
|
|
75
|
+
workflowRunId: stream.workflowRunId,
|
|
76
|
+
},
|
|
77
|
+
}).then(() => true);
|
|
78
|
+
const result = {
|
|
79
|
+
status: "article_ready",
|
|
80
|
+
nextAction: "download_article",
|
|
81
|
+
article,
|
|
82
|
+
references,
|
|
83
|
+
};
|
|
84
|
+
if (format === "json") {
|
|
85
|
+
printOutput(wrapWorkbenchResult(result, { step: "article", subType: "clinical" }, {
|
|
86
|
+
sessionId: session.sessionId,
|
|
87
|
+
workflowRunId: stream.workflowRunId,
|
|
88
|
+
cacheReady,
|
|
89
|
+
}), "json");
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const log = createFormatLogger(format);
|
|
93
|
+
log(`\n${article}\n`);
|
|
94
|
+
if (references.length) {
|
|
95
|
+
log(`\n## 参考文献\n\n${references.join("\n")}\n`);
|
|
96
|
+
}
|
|
97
|
+
log("\n全文已生成,可继续导出原始引文格式 MD 和 Word。\n");
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=article-create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article-create.js","sourceRoot":"","sources":["../../../../../src/modules/fund/clinical/commands/article-create.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../../core/index.js";
|
|
2
|
+
export interface DownloadClinicalArticleOptions {
|
|
3
|
+
sessionId?: string;
|
|
4
|
+
file?: string;
|
|
5
|
+
referencesFile?: string;
|
|
6
|
+
output?: string;
|
|
7
|
+
produceId?: string;
|
|
8
|
+
format?: OutputFormat;
|
|
9
|
+
}
|
|
10
|
+
export interface ClinicalArticleDownloadResult {
|
|
11
|
+
mdPath: string;
|
|
12
|
+
mdSize: number;
|
|
13
|
+
docxPath: string;
|
|
14
|
+
docxSize: number;
|
|
15
|
+
contentType: string | null;
|
|
16
|
+
filename: string;
|
|
17
|
+
}
|
|
18
|
+
/** 对齐网页标题语义:项目名称/标题/Title 优先,否则首个有效 H1。 */
|
|
19
|
+
export declare function extractClinicalArticleTitle(markdown: string): string;
|
|
20
|
+
export declare function appendClinicalReferences(article: string, references: string[]): string;
|
|
21
|
+
export declare function resolveClinicalDownloadPaths(output: string | undefined, title: string): {
|
|
22
|
+
docxPath: string;
|
|
23
|
+
mdPath: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function downloadClinicalArticleDocx(markdown: string, produceId: string): Promise<{
|
|
26
|
+
buffer: Buffer;
|
|
27
|
+
contentType: string | null;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function runDownloadClinicalArticle(options: DownloadClinicalArticleOptions): Promise<ClinicalArticleDownloadResult>;
|
|
30
|
+
//# sourceMappingURL=article-download.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article-download.d.ts","sourceRoot":"","sources":["../../../../../src/modules/fund/clinical/commands/article-download.ts"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAC;AAUnC,MAAM,WAAW,8BAA8B;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAWD,2CAA2C;AAC3C,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqBpE;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAAE,GACnB,MAAM,CAIR;AAOD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CActC;AAqBD,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAazD;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,6BAA6B,CAAC,CAuExC"}
|