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,120 @@
|
|
|
1
|
+
// 假说机制图:基于 Step2 科学假说,下载 PNG,不插入全文
|
|
2
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { helixlifeError, helixlifeErrorCode, getUserDownloadsDir, printOutput, createFormatLogger, resolveUserPath, } from "../../../../core/index.js";
|
|
5
|
+
import { wrapWorkbenchResult } from "../../../shared/result-wrapper.js";
|
|
6
|
+
import { buildNsfcExecuteBody, createNsfcOrder, extractNsfcOrderId, } from "../apps.js";
|
|
7
|
+
import { NSFC_APP_NAMES, NSFC_EXECUTE_API_PATH, NSFC_HYPOTHESIS_FIGURE_APP_ID, NSFC_HYPOTHESIS_FIGURE_STYLE, } from "../constants.js";
|
|
8
|
+
import { applyPngWatermark } from "../png-watermark.js";
|
|
9
|
+
import { loadNsfcSessionCache } from "../session-cache.js";
|
|
10
|
+
import { streamNsfcWorkflow } from "../sse-utils.js";
|
|
11
|
+
function pickFileUrl(outputs) {
|
|
12
|
+
if (!outputs)
|
|
13
|
+
return "";
|
|
14
|
+
const files = outputs.files;
|
|
15
|
+
if (Array.isArray(files) && files[0] && typeof files[0] === "object") {
|
|
16
|
+
const url = files[0].url;
|
|
17
|
+
if (typeof url === "string" && url.trim())
|
|
18
|
+
return url.trim();
|
|
19
|
+
}
|
|
20
|
+
// 兜底常见字段
|
|
21
|
+
for (const key of ["url", "image_url", "file_url"]) {
|
|
22
|
+
const v = outputs[key];
|
|
23
|
+
if (typeof v === "string" && v.trim())
|
|
24
|
+
return v.trim();
|
|
25
|
+
}
|
|
26
|
+
return "";
|
|
27
|
+
}
|
|
28
|
+
export async function runNsfcHypothesisFigure(options) {
|
|
29
|
+
const format = options.format ?? "markdown";
|
|
30
|
+
const log = createFormatLogger(format);
|
|
31
|
+
if (!options.orderId?.trim()) {
|
|
32
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "hypothesis-figure create 必须提供 --order-id");
|
|
33
|
+
}
|
|
34
|
+
const session = await loadNsfcSessionCache(options.orderId);
|
|
35
|
+
if (!session) {
|
|
36
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `会话缓存缺失:orderId=${options.orderId}`);
|
|
37
|
+
}
|
|
38
|
+
const hypothesis = String(session.confirmedHypothesis ?? session.outlineParams?.query ?? "").trim();
|
|
39
|
+
if (!hypothesis) {
|
|
40
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "缺少 Step2 确认的科学假说,无法生成假说机制图");
|
|
41
|
+
}
|
|
42
|
+
log("接口正在处理中,请耐心等待...");
|
|
43
|
+
const childOrder = await createNsfcOrder({
|
|
44
|
+
index: 3,
|
|
45
|
+
count: 1,
|
|
46
|
+
query: "",
|
|
47
|
+
inputs: {
|
|
48
|
+
hypothesis,
|
|
49
|
+
style: NSFC_HYPOTHESIS_FIGURE_STYLE,
|
|
50
|
+
},
|
|
51
|
+
parent_order_id: session.orderId,
|
|
52
|
+
});
|
|
53
|
+
const childOrderId = extractNsfcOrderId(childOrder);
|
|
54
|
+
const body = buildNsfcExecuteBody({
|
|
55
|
+
query: "",
|
|
56
|
+
inputs: {
|
|
57
|
+
hypothesis,
|
|
58
|
+
style: NSFC_HYPOTHESIS_FIGURE_STYLE,
|
|
59
|
+
},
|
|
60
|
+
appId: NSFC_HYPOTHESIS_FIGURE_APP_ID,
|
|
61
|
+
appName: NSFC_APP_NAMES.hypothesisFigure,
|
|
62
|
+
orderId: childOrderId,
|
|
63
|
+
index: 3,
|
|
64
|
+
parentOrderId: session.orderId,
|
|
65
|
+
end: false,
|
|
66
|
+
});
|
|
67
|
+
const stream = await streamNsfcWorkflow({
|
|
68
|
+
path: NSFC_EXECUTE_API_PATH,
|
|
69
|
+
body,
|
|
70
|
+
format,
|
|
71
|
+
startLabel: "假说机制图生成中…",
|
|
72
|
+
progressLabel: "假说机制图进行中",
|
|
73
|
+
finishLabel: "假说机制图完成",
|
|
74
|
+
failureMessage: "假说机制图生成失败",
|
|
75
|
+
emptyMessage: "假说机制图未返回有效结果",
|
|
76
|
+
allowEmptyText: true,
|
|
77
|
+
});
|
|
78
|
+
const url = pickFileUrl(stream.outputs);
|
|
79
|
+
if (!url) {
|
|
80
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_RESPONSE, "假说机制图未返回 files[0].url");
|
|
81
|
+
}
|
|
82
|
+
const res = await fetch(url);
|
|
83
|
+
if (!res.ok) {
|
|
84
|
+
throw new helixlifeError(helixlifeErrorCode.REQUEST_FAILED, `下载假说机制图失败: HTTP ${res.status}`);
|
|
85
|
+
}
|
|
86
|
+
const buf = Buffer.from(await res.arrayBuffer());
|
|
87
|
+
const wm = await applyPngWatermark({
|
|
88
|
+
pngBuffer: buf,
|
|
89
|
+
produceId: stream.workflowRunId ?? "",
|
|
90
|
+
paddingColor: "#ffffff",
|
|
91
|
+
});
|
|
92
|
+
const outDir = options.output
|
|
93
|
+
? resolveUserPath(options.output)
|
|
94
|
+
: getUserDownloadsDir();
|
|
95
|
+
await mkdir(outDir, { recursive: true });
|
|
96
|
+
const imagePath = join(outDir, "nsfc-hypothesis-figure.png");
|
|
97
|
+
await writeFile(imagePath, wm.buffer);
|
|
98
|
+
const result = {
|
|
99
|
+
imagePath,
|
|
100
|
+
sourceUrl: url,
|
|
101
|
+
watermarked: wm.watermarked,
|
|
102
|
+
warnings: wm.watermarked
|
|
103
|
+
? undefined
|
|
104
|
+
: wm.error
|
|
105
|
+
? [`水印失败(已保留原图):${wm.error}`]
|
|
106
|
+
: undefined,
|
|
107
|
+
note: "图片未插入全文,请 Agent 按需自行插入。PNG 含水印「AI生成」(与原站一致)。",
|
|
108
|
+
ready: true,
|
|
109
|
+
};
|
|
110
|
+
if (format === "json") {
|
|
111
|
+
printOutput(wrapWorkbenchResult(result, { step: "hypothesis-figure", subType: "nsfc" }, {
|
|
112
|
+
orderId: session.orderId,
|
|
113
|
+
workflowRunId: stream.workflowRunId,
|
|
114
|
+
}), "json");
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
console.log("## 假说机制图已生成(未插入全文)\n");
|
|
118
|
+
console.log(imagePath);
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=hypothesis-figure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypothesis-figure.js","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/hypothesis-figure.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,eAAe,GAEhB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AASrD,SAAS,WAAW,CAAC,OAA4C;IAC/D,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,OAAO,KAAK,CA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,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,EAC9C;YACE,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,aAAa,EAAE,MAAM,CAAC,aAAa;SACpC,CACF,EACD,MAAM,CACP,CAAC;QACF,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../../core/index.js";
|
|
2
|
+
export interface GenesSelectOptions {
|
|
3
|
+
orderId?: string;
|
|
4
|
+
gene?: string;
|
|
5
|
+
mechanism?: string;
|
|
6
|
+
results?: string;
|
|
7
|
+
yes?: boolean;
|
|
8
|
+
format?: OutputFormat;
|
|
9
|
+
}
|
|
10
|
+
export declare function runNsfcGenesSelect(options: GenesSelectOptions): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=hypothesis-genes-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypothesis-genes-select.d.ts","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/hypothesis-genes-select.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAC;AAwBnC,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAsJf"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// Step2:提交候选基因 → 生成假说列表(仅 background_genes)
|
|
2
|
+
import { helixlifeError, helixlifeErrorCode, printOutput, createFormatLogger, } from "../../../../core/index.js";
|
|
3
|
+
import { wrapWorkbenchResult } from "../../../shared/result-wrapper.js";
|
|
4
|
+
import { buildNsfcExecuteBody, createNsfcOrder, extractNsfcOrderId, } from "../apps.js";
|
|
5
|
+
import { NSFC_APP_NAMES, NSFC_EXECUTE_API_PATH, NSFC_PROVINCE_PROGRAM, resolvePickFromGeneAppId, } from "../constants.js";
|
|
6
|
+
import { buildHypothesisSelectionOptions, tryParseHypothesisList, } from "../parse-hypothesis.js";
|
|
7
|
+
import { promptSelectGene } from "../prompt-step2.js";
|
|
8
|
+
import { loadNsfcSessionCache, saveNsfcSessionCache, } from "../session-cache.js";
|
|
9
|
+
import { formatElapsedHint, streamNsfcWorkflow } from "../sse-utils.js";
|
|
10
|
+
export async function runNsfcGenesSelect(options) {
|
|
11
|
+
const format = options.format ?? "markdown";
|
|
12
|
+
const log = createFormatLogger(format);
|
|
13
|
+
if (!options.orderId?.trim()) {
|
|
14
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "hypothesis genes select 必须提供 --order-id(来自 hypothesis analyze)");
|
|
15
|
+
}
|
|
16
|
+
const session = await loadNsfcSessionCache(options.orderId);
|
|
17
|
+
if (!session) {
|
|
18
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `会话缓存缺失:orderId=${options.orderId},请重新执行 hypothesis analyze`);
|
|
19
|
+
}
|
|
20
|
+
if (session.nextSubStep !== "background_genes") {
|
|
21
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `当前路径为 ${session.nextSubStep},不需要 genes select`);
|
|
22
|
+
}
|
|
23
|
+
let gene = options.gene?.trim();
|
|
24
|
+
let mechanism = options.mechanism?.trim();
|
|
25
|
+
let results = options.results?.trim();
|
|
26
|
+
if (!gene || !mechanism) {
|
|
27
|
+
if (options.yes) {
|
|
28
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "使用 -y 时必须提供 --gene 与 --mechanism(及可选 --results)");
|
|
29
|
+
}
|
|
30
|
+
const picked = await promptSelectGene(session.genes ?? []);
|
|
31
|
+
gene = picked.gene;
|
|
32
|
+
mechanism = picked.mechanism;
|
|
33
|
+
results = picked.results;
|
|
34
|
+
}
|
|
35
|
+
const projectLevel = String(session.inputs.projectLevel ?? "");
|
|
36
|
+
const isProvince = projectLevel === "省部级";
|
|
37
|
+
const disease = String(session.inputs.input ?? session.query);
|
|
38
|
+
log("接口正在处理中,请耐心等待...");
|
|
39
|
+
// 子订单:挂在 analyze 的 order 下
|
|
40
|
+
const childOrder = await createNsfcOrder({
|
|
41
|
+
index: 1,
|
|
42
|
+
count: 1,
|
|
43
|
+
query: "",
|
|
44
|
+
inputs: {
|
|
45
|
+
disease,
|
|
46
|
+
level: isProvince
|
|
47
|
+
? NSFC_PROVINCE_PROGRAM
|
|
48
|
+
: String(session.inputs.project ?? ""),
|
|
49
|
+
molecule: gene,
|
|
50
|
+
mechanism,
|
|
51
|
+
results: results ?? "",
|
|
52
|
+
},
|
|
53
|
+
parent_order_id: session.orderId,
|
|
54
|
+
});
|
|
55
|
+
const childOrderId = extractNsfcOrderId(childOrder);
|
|
56
|
+
const body = buildNsfcExecuteBody({
|
|
57
|
+
query: "",
|
|
58
|
+
inputs: {
|
|
59
|
+
disease,
|
|
60
|
+
level: isProvince
|
|
61
|
+
? NSFC_PROVINCE_PROGRAM
|
|
62
|
+
: String(session.inputs.project ?? ""),
|
|
63
|
+
molecule: gene,
|
|
64
|
+
mechanism: mechanism,
|
|
65
|
+
results: results ?? "",
|
|
66
|
+
},
|
|
67
|
+
appId: resolvePickFromGeneAppId(projectLevel),
|
|
68
|
+
appName: NSFC_APP_NAMES.generateHypothesis,
|
|
69
|
+
orderId: childOrderId,
|
|
70
|
+
index: 1,
|
|
71
|
+
parentOrderId: session.orderId,
|
|
72
|
+
end: false,
|
|
73
|
+
});
|
|
74
|
+
const stream = await streamNsfcWorkflow({
|
|
75
|
+
path: NSFC_EXECUTE_API_PATH,
|
|
76
|
+
body,
|
|
77
|
+
format,
|
|
78
|
+
startLabel: "基于候选基因生成科学假说…",
|
|
79
|
+
progressLabel: "假说生成进行中",
|
|
80
|
+
finishLabel: "假说生成完成",
|
|
81
|
+
failureMessage: "科学假说生成失败,请稍后重试",
|
|
82
|
+
emptyMessage: "科学假说生成结果为空",
|
|
83
|
+
allowEmptyText: true,
|
|
84
|
+
});
|
|
85
|
+
const hypotheses = tryParseHypothesisList(stream.outputs);
|
|
86
|
+
if (!hypotheses.length) {
|
|
87
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_RESPONSE, "科学假说生成结果为空,请稍后重试");
|
|
88
|
+
}
|
|
89
|
+
// 继续用原 analyze orderId 作为会话 key,便于 Agent 串联
|
|
90
|
+
await saveNsfcSessionCache({
|
|
91
|
+
...session,
|
|
92
|
+
selectedGene: gene,
|
|
93
|
+
selectedMechanism: mechanism,
|
|
94
|
+
selectedResults: results,
|
|
95
|
+
hypotheses,
|
|
96
|
+
workflowRunId: stream.workflowRunId,
|
|
97
|
+
});
|
|
98
|
+
const result = {
|
|
99
|
+
path: "background_genes",
|
|
100
|
+
selectedGene: gene,
|
|
101
|
+
hypotheses: hypotheses.map((h) => ({
|
|
102
|
+
id: h.id,
|
|
103
|
+
text: h.new_text || h.original_text,
|
|
104
|
+
})),
|
|
105
|
+
selectionOptions: buildHypothesisSelectionOptions(hypotheses),
|
|
106
|
+
ready: true,
|
|
107
|
+
};
|
|
108
|
+
if (format === "json") {
|
|
109
|
+
printOutput(wrapWorkbenchResult(result, { step: "hypothesis-genes-select", subType: "nsfc" }, {
|
|
110
|
+
orderId: session.orderId,
|
|
111
|
+
workflowRunId: stream.workflowRunId,
|
|
112
|
+
hasHypothesis: session.hasHypothesis,
|
|
113
|
+
nextSubStep: session.nextSubStep,
|
|
114
|
+
outlineAppSuffix: session.outlineAppSuffix,
|
|
115
|
+
}), "json");
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
console.log(`\n## 科学假说候选${formatElapsedHint(stream.elapsedTime)}\n`);
|
|
119
|
+
console.log(`已选基因:${gene}\n`);
|
|
120
|
+
hypotheses.forEach((h, i) => {
|
|
121
|
+
console.log(`### ${i + 1}\n${h.new_text || h.original_text}\n`);
|
|
122
|
+
});
|
|
123
|
+
console.log("请选择或自定义假说,再执行 hypothesis pick。");
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=hypothesis-genes-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypothesis-genes-select.js","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/hypothesis-genes-select.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,kBAAkB,GAEnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAWxE,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAA2B;IAE3B,MAAM,MAAM,GAAiB,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC;IAC1D,MAAM,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAEvC,IAAI,CAAC,OAAO,CA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C,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;SAC3C,CACF,EACD,MAAM,CACP,CAAC;QACF,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,cAAc,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;IAC9B,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../../core/index.js";
|
|
2
|
+
export interface HypothesisPickOptions {
|
|
3
|
+
orderId?: string;
|
|
4
|
+
hypothesisIndex?: string;
|
|
5
|
+
custom?: string;
|
|
6
|
+
customFile?: string;
|
|
7
|
+
yes?: boolean;
|
|
8
|
+
format?: OutputFormat;
|
|
9
|
+
}
|
|
10
|
+
export declare function runNsfcHypothesisPick(options: HypothesisPickOptions): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=hypothesis-pick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypothesis-pick.d.ts","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/hypothesis-pick.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAC;AASnC,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAyBD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAgIf"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Step2:确认假说(路径 1/2)— 仅 handoff,不跑提纲(1A)
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { helixlifeError, helixlifeErrorCode, printOutput, resolveUserPath, } from "../../../../core/index.js";
|
|
4
|
+
import { wrapWorkbenchResult } from "../../../shared/result-wrapper.js";
|
|
5
|
+
import { NSFC_PROVINCE_PROGRAM } from "../constants.js";
|
|
6
|
+
import { promptPickHypothesis } from "../prompt-step2.js";
|
|
7
|
+
import { loadNsfcSessionCache, saveNsfcSessionCache, } from "../session-cache.js";
|
|
8
|
+
async function resolveCustomText(options) {
|
|
9
|
+
if (options.custom?.trim() && options.customFile?.trim()) {
|
|
10
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "--custom 与 --custom-file 互斥");
|
|
11
|
+
}
|
|
12
|
+
if (options.customFile?.trim()) {
|
|
13
|
+
const p = resolveUserPath(options.customFile);
|
|
14
|
+
try {
|
|
15
|
+
return (await readFile(p, "utf8")).trim();
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无法读取 --custom-file: ${options.customFile}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return options.custom?.trim() || undefined;
|
|
22
|
+
}
|
|
23
|
+
export async function runNsfcHypothesisPick(options) {
|
|
24
|
+
const format = options.format ?? "markdown";
|
|
25
|
+
if (!options.orderId?.trim()) {
|
|
26
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "hypothesis pick 必须提供 --order-id");
|
|
27
|
+
}
|
|
28
|
+
const session = await loadNsfcSessionCache(options.orderId);
|
|
29
|
+
if (!session) {
|
|
30
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `会话缓存缺失:orderId=${options.orderId},请重新执行 hypothesis analyze`);
|
|
31
|
+
}
|
|
32
|
+
if (session.nextSubStep !== "hypothesis_pick" &&
|
|
33
|
+
session.nextSubStep !== "background_genes") {
|
|
34
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `当前路径为 ${session.nextSubStep},请使用 research-path confirm`);
|
|
35
|
+
}
|
|
36
|
+
const hypotheses = session.hypotheses ?? [];
|
|
37
|
+
if (!hypotheses.length) {
|
|
38
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "缓存中无假说列表:background_genes 请先 genes select;hypothesis_pick 请先 analyze");
|
|
39
|
+
}
|
|
40
|
+
let confirmed = await resolveCustomText(options);
|
|
41
|
+
if (!confirmed && options.hypothesisIndex !== undefined) {
|
|
42
|
+
const idx = Number.parseInt(options.hypothesisIndex, 10);
|
|
43
|
+
if (Number.isNaN(idx) || idx < 0 || idx >= hypotheses.length) {
|
|
44
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `--hypothesis-index 无效(0-${hypotheses.length - 1})`);
|
|
45
|
+
}
|
|
46
|
+
confirmed = hypotheses[idx].new_text || hypotheses[idx].original_text;
|
|
47
|
+
}
|
|
48
|
+
if (!confirmed) {
|
|
49
|
+
if (options.yes) {
|
|
50
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "使用 -y 时必须提供 --hypothesis-index 或 --custom / --custom-file");
|
|
51
|
+
}
|
|
52
|
+
const picked = await promptPickHypothesis(hypotheses);
|
|
53
|
+
if (picked.custom?.trim()) {
|
|
54
|
+
confirmed = picked.custom.trim();
|
|
55
|
+
}
|
|
56
|
+
else if (picked.index !== undefined) {
|
|
57
|
+
const h = hypotheses[picked.index];
|
|
58
|
+
confirmed = h.new_text || h.original_text;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (!confirmed?.trim()) {
|
|
62
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "未确认科学假说内容");
|
|
63
|
+
}
|
|
64
|
+
const projectLevel = String(session.inputs.projectLevel ?? "");
|
|
65
|
+
const isProvince = projectLevel === "省部级";
|
|
66
|
+
const program = isProvince
|
|
67
|
+
? NSFC_PROVINCE_PROGRAM
|
|
68
|
+
: String(session.inputs.project ?? "");
|
|
69
|
+
const outlineParams = {
|
|
70
|
+
query: confirmed.trim(),
|
|
71
|
+
inputs: {
|
|
72
|
+
program,
|
|
73
|
+
results: session.selectedResults ?? "",
|
|
74
|
+
text: confirmed.trim(),
|
|
75
|
+
projectLevel,
|
|
76
|
+
...(session.selectedGene
|
|
77
|
+
? {
|
|
78
|
+
selectedCandidateGene: session.selectedGene,
|
|
79
|
+
selectedCandidateMechanism: session.selectedMechanism,
|
|
80
|
+
selectedCandidateResults: session.selectedResults,
|
|
81
|
+
}
|
|
82
|
+
: {}),
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
await saveNsfcSessionCache({
|
|
86
|
+
...session,
|
|
87
|
+
confirmedHypothesis: confirmed.trim(),
|
|
88
|
+
outlineParams,
|
|
89
|
+
});
|
|
90
|
+
const result = {
|
|
91
|
+
confirmedHypothesis: confirmed.trim(),
|
|
92
|
+
outlineParams,
|
|
93
|
+
ready: true,
|
|
94
|
+
};
|
|
95
|
+
if (format === "json") {
|
|
96
|
+
printOutput(wrapWorkbenchResult(result, { step: "hypothesis-pick", subType: "nsfc" }, {
|
|
97
|
+
orderId: session.orderId,
|
|
98
|
+
hasHypothesis: session.hasHypothesis,
|
|
99
|
+
nextSubStep: session.nextSubStep,
|
|
100
|
+
outlineAppSuffix: "-none-hypothesis",
|
|
101
|
+
readyForOutline: true,
|
|
102
|
+
}), "json");
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
console.log("## 假说已确认(第 2 步就绪)\n");
|
|
106
|
+
console.log(confirmed.trim());
|
|
107
|
+
console.log("\n参数已就绪。请执行 outline create 生成提纲(第 3 步)。");
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=hypothesis-pick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypothesis-pick.js","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/hypothesis-pick.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,eAAe,GAEhB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAW7B,KAAK,UAAU,iBAAiB,CAC9B,OAA8B;IAE9B,IAAI,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;QACzD,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,6BAA6B,CAC9B,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;QAC/B,MAAM,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,CAAC;YACH,OAAO,CAAC,MAAM,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC5C,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,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C,qBAAqB,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9B,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../../core/index.js";
|
|
2
|
+
export interface ConfirmNsfcOutlineOptions {
|
|
3
|
+
orderId?: string;
|
|
4
|
+
file?: string;
|
|
5
|
+
yes?: boolean;
|
|
6
|
+
format?: OutputFormat;
|
|
7
|
+
}
|
|
8
|
+
export declare function runConfirmNsfcOutline(options: ConfirmNsfcOutlineOptions): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=outline-confirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outline-confirm.d.ts","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/outline-confirm.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAC;AAQnC,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,IAAI,CAAC,CAuFf"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Step3:确认提纲(可带 Agent 本地改稿)
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { helixlifeError, helixlifeErrorCode, printOutput, resolveUserPath, } from "../../../../core/index.js";
|
|
4
|
+
import { wrapWorkbenchResult } from "../../../shared/result-wrapper.js";
|
|
5
|
+
import { assertOutlineHasH2 } from "../parse-outline.js";
|
|
6
|
+
import { loadNsfcSessionCache, saveNsfcSessionCache, } from "../session-cache.js";
|
|
7
|
+
export async function runConfirmNsfcOutline(options) {
|
|
8
|
+
const format = options.format ?? "markdown";
|
|
9
|
+
if (!options.orderId?.trim()) {
|
|
10
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "outline confirm 必须提供 --order-id");
|
|
11
|
+
}
|
|
12
|
+
const session = await loadNsfcSessionCache(options.orderId);
|
|
13
|
+
if (!session) {
|
|
14
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `会话缓存缺失:orderId=${options.orderId},请先完成 Step2 / outline create`);
|
|
15
|
+
}
|
|
16
|
+
let outline = "";
|
|
17
|
+
if (options.file?.trim()) {
|
|
18
|
+
const filePath = resolveUserPath(options.file);
|
|
19
|
+
try {
|
|
20
|
+
outline = (await readFile(filePath, "utf8")).trim();
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无法读取提纲文件: ${options.file}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
outline = String(session.outline ?? "").trim();
|
|
28
|
+
}
|
|
29
|
+
if (!outline) {
|
|
30
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "无提纲内容:请先 outline create,或通过 --file 提供改稿后的 Markdown");
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
assertOutlineHasH2(outline);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, error.message);
|
|
37
|
+
}
|
|
38
|
+
const hypothesis = String(session.outlineParams?.query ?? session.confirmedHypothesis ?? "").trim();
|
|
39
|
+
await saveNsfcSessionCache({
|
|
40
|
+
...session,
|
|
41
|
+
outline,
|
|
42
|
+
outlineConfirmed: true,
|
|
43
|
+
confirmedHypothesis: hypothesis || session.confirmedHypothesis,
|
|
44
|
+
});
|
|
45
|
+
const result = {
|
|
46
|
+
outline,
|
|
47
|
+
hypothesis,
|
|
48
|
+
ready: true,
|
|
49
|
+
};
|
|
50
|
+
if (format === "json") {
|
|
51
|
+
printOutput(wrapWorkbenchResult(result, { step: "outline-confirm", subType: "nsfc" }, {
|
|
52
|
+
orderId: session.orderId,
|
|
53
|
+
hasHypothesis: session.hasHypothesis,
|
|
54
|
+
nextSubStep: session.nextSubStep,
|
|
55
|
+
outlineAppSuffix: session.outlineAppSuffix,
|
|
56
|
+
readyForArticle: true,
|
|
57
|
+
}), "json");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
console.log("## 提纲已确认(第 3 步就绪)\n");
|
|
61
|
+
console.log(outline);
|
|
62
|
+
console.log("\n可进入第 4 步「生成全文」(命令待后续开放)。");
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=outline-confirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outline-confirm.js","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/outline-confirm.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,eAAe,GAEhB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAS7B,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAkC;IAElC,MAAM,MAAM,GAAiB,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC;IAE1D,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;QAC7B,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,iCAAiC,CAClC,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AI,EAAE,CAAC;IAET,MAAM,oBAAoB,CAAC;QACzB,GAAG,OAAO;QACV,OAAO;QACP,gBAAgB,EAAE,IAAI;QACtB,mBAAmB,EAAE,UAAU,IAAI,OAAO,CAAC,mBAAmB;KAC/D,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACb,OAAO;QACP,UAAU;QACV,KAAK,EAAE,IAAI;KACZ,CAAC;IAEF,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,WAAW,CACT,mBAAmB,CACjB,MAAM,EACN,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,EAC5C;YACE,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,eAAe,EAAE,IAAI;SACtB,CACF,EACD,MAAM,CACP,CAAC;QACF,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../../core/index.js";
|
|
2
|
+
export interface CreateNsfcOutlineOptions {
|
|
3
|
+
orderId?: string;
|
|
4
|
+
yes?: boolean;
|
|
5
|
+
format?: OutputFormat;
|
|
6
|
+
}
|
|
7
|
+
export declare function runCreateNsfcOutline(options: CreateNsfcOutlineOptions): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=outline-create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outline-create.d.ts","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/outline-create.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAC;AAmBnC,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAQD,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CA8Hf"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// Step3:生成 / 重新生成提纲
|
|
2
|
+
import { helixlifeError, helixlifeErrorCode, printOutput, createFormatLogger, } from "../../../../core/index.js";
|
|
3
|
+
import { wrapWorkbenchResult } from "../../../shared/result-wrapper.js";
|
|
4
|
+
import { buildNsfcExecuteBody, createNsfcOrder, extractNsfcOrderId, } from "../apps.js";
|
|
5
|
+
import { NSFC_APP_NAMES, NSFC_EXECUTE_API_PATH, NSFC_OUTLINE_APP_ID, } from "../constants.js";
|
|
6
|
+
import { buildNsfcOutlineSlimBody } from "../parse-outline.js";
|
|
7
|
+
import { loadNsfcSessionCache, saveNsfcSessionCache, } from "../session-cache.js";
|
|
8
|
+
import { formatElapsedHint, streamNsfcWorkflow } from "../sse-utils.js";
|
|
9
|
+
function resolveOutlineAppName(suffix) {
|
|
10
|
+
return suffix === "-none-hypothesis"
|
|
11
|
+
? NSFC_APP_NAMES.outlineNoneHypothesis
|
|
12
|
+
: NSFC_APP_NAMES.outline;
|
|
13
|
+
}
|
|
14
|
+
export async function runCreateNsfcOutline(options) {
|
|
15
|
+
const format = options.format ?? "markdown";
|
|
16
|
+
const log = createFormatLogger(format);
|
|
17
|
+
if (!options.orderId?.trim()) {
|
|
18
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "outline create 必须提供 --order-id(来自 Step2)");
|
|
19
|
+
}
|
|
20
|
+
const session = await loadNsfcSessionCache(options.orderId);
|
|
21
|
+
if (!session) {
|
|
22
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `会话缓存缺失:orderId=${options.orderId},请先完成 Step2`);
|
|
23
|
+
}
|
|
24
|
+
// 路径 1/2 须先 pick 写入 outlineParams;路径 3 在 research-path confirm 已写入
|
|
25
|
+
if (!session.outlineParams?.query && !session.confirmedHypothesis) {
|
|
26
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "缺少确认假说:路径 1/2 请先执行 hypothesis pick;路径 3 请先 research-path confirm");
|
|
27
|
+
}
|
|
28
|
+
const slim = buildNsfcOutlineSlimBody(session);
|
|
29
|
+
if (!slim.query) {
|
|
30
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, "提纲生成需要科学假说文本(outlineParams.query)");
|
|
31
|
+
}
|
|
32
|
+
log("接口正在处理中,请耐心等待...");
|
|
33
|
+
const childOrder = await createNsfcOrder({
|
|
34
|
+
index: 1,
|
|
35
|
+
count: 1,
|
|
36
|
+
query: slim.query,
|
|
37
|
+
inputs: slim.inputs,
|
|
38
|
+
parent_order_id: session.orderId,
|
|
39
|
+
});
|
|
40
|
+
const childOrderId = extractNsfcOrderId(childOrder);
|
|
41
|
+
const body = buildNsfcExecuteBody({
|
|
42
|
+
query: slim.query,
|
|
43
|
+
inputs: slim.inputs,
|
|
44
|
+
appId: NSFC_OUTLINE_APP_ID,
|
|
45
|
+
appName: resolveOutlineAppName(session.outlineAppSuffix),
|
|
46
|
+
orderId: childOrderId,
|
|
47
|
+
index: 1,
|
|
48
|
+
parentOrderId: session.orderId,
|
|
49
|
+
end: false,
|
|
50
|
+
});
|
|
51
|
+
const stream = await streamNsfcWorkflow({
|
|
52
|
+
path: NSFC_EXECUTE_API_PATH,
|
|
53
|
+
body,
|
|
54
|
+
format,
|
|
55
|
+
startLabel: "申请书提纲生成中…",
|
|
56
|
+
progressLabel: "提纲生成进行中",
|
|
57
|
+
finishLabel: "提纲生成完成",
|
|
58
|
+
failureMessage: "提纲生成失败,请稍后重试",
|
|
59
|
+
emptyMessage: "提纲生成结果为空",
|
|
60
|
+
});
|
|
61
|
+
// 优先 outputs.output(nsfc-v2 单字段),否则 stream text
|
|
62
|
+
const fromOutput = typeof stream.outputs?.output === "string"
|
|
63
|
+
? stream.outputs.output.trim()
|
|
64
|
+
: "";
|
|
65
|
+
const outline = (fromOutput || stream.text).trim();
|
|
66
|
+
if (!outline) {
|
|
67
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_RESPONSE, "提纲生成结果为空");
|
|
68
|
+
}
|
|
69
|
+
await saveNsfcSessionCache({
|
|
70
|
+
...session,
|
|
71
|
+
outlineParams: {
|
|
72
|
+
query: slim.query,
|
|
73
|
+
inputs: {
|
|
74
|
+
...(session.outlineParams?.inputs ?? session.inputs),
|
|
75
|
+
...slim.inputs,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
confirmedHypothesis: slim.query,
|
|
79
|
+
outline,
|
|
80
|
+
outlineConfirmed: false,
|
|
81
|
+
workflowRunId: stream.workflowRunId,
|
|
82
|
+
});
|
|
83
|
+
const result = {
|
|
84
|
+
outline,
|
|
85
|
+
hypothesis: slim.query,
|
|
86
|
+
ready: true,
|
|
87
|
+
};
|
|
88
|
+
if (format === "json") {
|
|
89
|
+
printOutput(wrapWorkbenchResult(result, { step: "outline", subType: "nsfc" }, {
|
|
90
|
+
orderId: session.orderId,
|
|
91
|
+
workflowRunId: stream.workflowRunId,
|
|
92
|
+
hasHypothesis: session.hasHypothesis,
|
|
93
|
+
nextSubStep: session.nextSubStep,
|
|
94
|
+
outlineAppSuffix: session.outlineAppSuffix,
|
|
95
|
+
readyForOutline: true,
|
|
96
|
+
}), "json");
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
console.log(`\n## 申请书提纲${formatElapsedHint(stream.elapsedTime)}\n`);
|
|
100
|
+
console.log(outline);
|
|
101
|
+
console.log("\n请确认提纲,或选择重新生成 / 本地修改后执行 outline confirm。");
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=outline-create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outline-create.js","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/outline-create.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,kBAAkB,GAEnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAQxE,SAAS,qBAAqB,CAAC,MAA+B;IAC5D,OAAO,MAAM,KAAK,kBAAkB;QAClC,CAAC,CAAC,cAAc,CAAC,qBAAqB;QACtC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC;AAC7B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAiC;IAEjC,MAAM,MAAM,GAAiB,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC;IAC1D,MAAM,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAEvC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;QAC7B,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,0CAA0C,CAC3C,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,cAAc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AAa;YACpC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,eAAe,EAAE,IAAI;SACtB,CACF,EACD,MAAM,CACP,CAAC;QACF,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,aAAa,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CACT,4CAA4C,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type OutputFormat } from "../../../../core/index.js";
|
|
2
|
+
export interface ResearchPathConfirmOptions {
|
|
3
|
+
orderId?: string;
|
|
4
|
+
picksFile?: string;
|
|
5
|
+
yes?: boolean;
|
|
6
|
+
format?: OutputFormat;
|
|
7
|
+
}
|
|
8
|
+
export declare function runNsfcResearchPathConfirm(options: ResearchPathConfirmOptions): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=research-path-confirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-path-confirm.d.ts","sourceRoot":"","sources":["../../../../../src/modules/fund/nsfc/commands/research-path-confirm.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAC;AAqBnC,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAoDD,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAqLf"}
|