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,956 @@
|
|
|
1
|
+
import { helixlifeError, helixlifeErrorCode, printOutput, renderListAsMarkdown, } from "../../core/index.js";
|
|
2
|
+
import { META_API_PREFIX } from "./constants.js";
|
|
3
|
+
import { requestMeta } from "./api.js";
|
|
4
|
+
const WORKFLOW_COOLDOWN_MESSAGE = "请联系解螺旋客服";
|
|
5
|
+
const META_WORKFLOW_STEP_DEFINITIONS = [
|
|
6
|
+
{
|
|
7
|
+
index: "1.1",
|
|
8
|
+
label: "拟定主题",
|
|
9
|
+
nodeType: "title",
|
|
10
|
+
aliases: ["generate_topic", "verify_topic"],
|
|
11
|
+
},
|
|
12
|
+
{ index: "1.2", label: "生成 PI(E)COS", nodeType: "generate_picos" },
|
|
13
|
+
{ index: "1.3", label: "建立纳排", nodeType: "generate_sorting_criteria" },
|
|
14
|
+
{
|
|
15
|
+
index: "2.1",
|
|
16
|
+
label: "撰写检索式",
|
|
17
|
+
nodeType: "generate_retrieve_expression",
|
|
18
|
+
},
|
|
19
|
+
{ index: "2.2", label: "执行检索", nodeType: "literature_retrieve" },
|
|
20
|
+
{ index: "3.1", label: "摘要初筛", nodeType: "abstract_screening" },
|
|
21
|
+
{ index: "3.2", label: "全文复筛", nodeType: "fulltext_screening" },
|
|
22
|
+
{ index: "4.1", label: "质量评估", nodeType: "quality_assessment" },
|
|
23
|
+
{ index: "4.2", label: "基线资料", nodeType: "baseline_information" },
|
|
24
|
+
{ index: "4.3", label: "结局指标", nodeType: "outcome_indicator_extraction" },
|
|
25
|
+
{ index: "5.1", label: "效应量合并", nodeType: "effect_quantity" },
|
|
26
|
+
{ index: "5.2", label: "发表偏倚", nodeType: "publication_bias" },
|
|
27
|
+
{ index: "5.3", label: "质量评估图", nodeType: "quality_assessment_plot" },
|
|
28
|
+
{
|
|
29
|
+
index: "5.4",
|
|
30
|
+
label: "PRISMA 流程图",
|
|
31
|
+
nodeType: "prisma",
|
|
32
|
+
},
|
|
33
|
+
{ index: "6.1", label: "生成方法", nodeType: "generate_method" },
|
|
34
|
+
{ index: "6.2", label: "生成结果", nodeType: "generate_outcome" },
|
|
35
|
+
{ index: "6.3", label: "生成初稿", nodeType: "generate_fulltext" },
|
|
36
|
+
];
|
|
37
|
+
/** 历史列表展示列:不含 workflowId 等内部字段(仍保留在 row / switchTargets 供串联) */
|
|
38
|
+
const HISTORY_COLUMNS = [
|
|
39
|
+
{ key: "index", label: "序号" },
|
|
40
|
+
{ key: "name", label: "名称" },
|
|
41
|
+
{ key: "status", label: "状态" },
|
|
42
|
+
{ key: "currentStep", label: "当前步骤" },
|
|
43
|
+
{ key: "createdAt", label: "创建时间" },
|
|
44
|
+
];
|
|
45
|
+
/**
|
|
46
|
+
* 历史记录状态中文(对齐网站 HistoryModal:success/archived 为完成态,其余为进行态)。
|
|
47
|
+
* archived 文案与网站一致为「已归档」;pending 类参考 NODE_PENDING_STATUS 中文标签。
|
|
48
|
+
*/
|
|
49
|
+
const HISTORY_STATUS_LABEL = {
|
|
50
|
+
success: "成功",
|
|
51
|
+
archived: "已归档",
|
|
52
|
+
queued: "排队中",
|
|
53
|
+
pending: "等待中",
|
|
54
|
+
running: "执行中",
|
|
55
|
+
more_coming: "执行中",
|
|
56
|
+
fail: "失败",
|
|
57
|
+
failed: "失败",
|
|
58
|
+
error: "失败",
|
|
59
|
+
failure: "失败",
|
|
60
|
+
};
|
|
61
|
+
/** 历史列表操作选项文案(固定,禁止改写) */
|
|
62
|
+
const HISTORY_OP_PREV_PAGE = "查看上一页";
|
|
63
|
+
const HISTORY_OP_NEXT_PAGE = "查看下一页";
|
|
64
|
+
const HISTORY_OP_SWITCH = "切换指定历史记录";
|
|
65
|
+
/** 历史列表操作选择器 value(固定,供 Agent 分支) */
|
|
66
|
+
const HISTORY_OP_VALUE_PREV = "prev_page";
|
|
67
|
+
const HISTORY_OP_VALUE_NEXT = "next_page";
|
|
68
|
+
const HISTORY_OP_VALUE_SWITCH = "switch_record";
|
|
69
|
+
/** 历史列表操作选择器标题(固定,禁止改写) */
|
|
70
|
+
const HISTORY_LIST_SELECTOR_TITLE = "请选择历史记录操作";
|
|
71
|
+
/** 切换记录选择器标题(固定,禁止改写) */
|
|
72
|
+
const HISTORY_SWITCH_SELECTOR_TITLE = "请选择要切换的历史记录";
|
|
73
|
+
/** 聊天压缩表名称最大长度(避免大表同轮挤掉 AskQuestion) */
|
|
74
|
+
const HISTORY_CHAT_NAME_MAX_LEN = 48;
|
|
75
|
+
/**
|
|
76
|
+
* 历史列表交付硬指令。
|
|
77
|
+
* 表格在聊天展示;AskQuestion 的 prompt 不含表;本轮恰好弹 1 次选择器。
|
|
78
|
+
*/
|
|
79
|
+
const HISTORY_LIST_DISPLAY_INSTRUCTION = "同轮两步后停轮:①在聊天原样输出 tableMarkdown(历史记录表);" +
|
|
80
|
+
"②按 askQuestion 原样调用恰好 1 次 AskQuestion(prompt 不含表格),然后停轮。" +
|
|
81
|
+
"AskQuestion 调用次数必须为 1:禁止 0 次、禁止连弹 2 次;回到第 1 页也不得补弹。" +
|
|
82
|
+
"禁止把表格塞进 askQuestion.prompt。prev_page/next_page 后规则相同。";
|
|
83
|
+
/** 切换记录选项交付硬指令:本页全部序号一次展平,禁止拆成 1/2 段 */
|
|
84
|
+
const HISTORY_SWITCH_OPTIONS_DISPLAY_INSTRUCTION = "本轮 AskQuestion 恰好 1 次:按 askQuestion 原样调用(prompt 不含表);" +
|
|
85
|
+
"禁止连弹两次;禁止拆成 1/2 分页;禁止「其他补充」;" +
|
|
86
|
+
"选中后用选项 id 立刻 workflow switch。";
|
|
87
|
+
/** 步骤列表展示列:不含 nodeId / nodeType 等内部字段(仍保留在 steps 数据供 switch) */
|
|
88
|
+
const STEP_COLUMNS = [
|
|
89
|
+
{ key: "index", label: "Step" },
|
|
90
|
+
{ key: "label", label: "Name" },
|
|
91
|
+
];
|
|
92
|
+
/**
|
|
93
|
+
* Detects workflow-creation cooldown or rate-limit failures returned by the API.
|
|
94
|
+
*
|
|
95
|
+
* @param error The error thrown while creating a Meta workflow.
|
|
96
|
+
* @returns True when the failure means a new workflow cannot currently be created.
|
|
97
|
+
*/
|
|
98
|
+
function isWorkflowCreateCooldownError(error) {
|
|
99
|
+
const message = error instanceof Error ? error.message : String(error ?? "");
|
|
100
|
+
return /冷却|冷卻|cooldown|频繁|頻繁|too many|rate limit|rate-limit|429|无法创建新的工作流|不能创建新的工作流|创建新的工作流/i.test(message);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 将历史记录时间戳格式化为本地可读时间。
|
|
104
|
+
*
|
|
105
|
+
* @param value 接口返回的原始时间戳。
|
|
106
|
+
* @returns `YYYY-MM-DD HH:mm` 字符串。
|
|
107
|
+
*/
|
|
108
|
+
function formatTimestamp(value) {
|
|
109
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
110
|
+
const timestamp = value > 10_000_000_000 ? value : value * 1000;
|
|
111
|
+
const date = new Date(timestamp);
|
|
112
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
113
|
+
return (`${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ` +
|
|
114
|
+
`${pad(date.getHours())}:${pad(date.getMinutes())}`);
|
|
115
|
+
}
|
|
116
|
+
return value === undefined || value === null ? "" : String(value);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* 将历史记录状态转为中文展示。
|
|
120
|
+
*
|
|
121
|
+
* @param status 接口返回的英文状态值。
|
|
122
|
+
* @returns 中文状态;未知值原样回退。
|
|
123
|
+
*/
|
|
124
|
+
function formatHistoryStatus(status) {
|
|
125
|
+
const key = typeof status === "string" ? status.trim() : "";
|
|
126
|
+
if (!key)
|
|
127
|
+
return "";
|
|
128
|
+
return HISTORY_STATUS_LABEL[key] ?? key;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Gets the user-facing step label for a workflow node type.
|
|
132
|
+
*
|
|
133
|
+
* @param nodeType The backend node type.
|
|
134
|
+
* @returns A step label aligned with the website process list.
|
|
135
|
+
*/
|
|
136
|
+
function getStepText(nodeType) {
|
|
137
|
+
const type = typeof nodeType === "string" ? nodeType : "";
|
|
138
|
+
const match = META_WORKFLOW_STEP_DEFINITIONS.find((step) => {
|
|
139
|
+
const aliases = "aliases" in step ? [...step.aliases] : [];
|
|
140
|
+
return step.nodeType === type || aliases.includes(type);
|
|
141
|
+
});
|
|
142
|
+
return match ? `${match.index} ${match.label}` : type;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Extracts a workflow id from a history item.
|
|
146
|
+
*
|
|
147
|
+
* @param item The raw history item.
|
|
148
|
+
* @returns The workflow id if present.
|
|
149
|
+
*/
|
|
150
|
+
function getHistoryWorkflowId(item) {
|
|
151
|
+
return String(item.id ?? item.runner_id ?? "");
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 构建历史列表本轮 AskQuestion 选项(翻页 / 切换;写入 selectionOptions)。
|
|
155
|
+
*
|
|
156
|
+
* @param hasPrevPage 是否有上一页。
|
|
157
|
+
* @param hasNextPage 是否有下一页。
|
|
158
|
+
* @returns selectionOptions 与同序 operationOptions。
|
|
159
|
+
*/
|
|
160
|
+
function buildHistoryOperationSelection(hasPrevPage, hasNextPage) {
|
|
161
|
+
const selectionOptions = [];
|
|
162
|
+
if (hasPrevPage) {
|
|
163
|
+
selectionOptions.push({
|
|
164
|
+
index: selectionOptions.length + 1,
|
|
165
|
+
label: HISTORY_OP_PREV_PAGE,
|
|
166
|
+
value: HISTORY_OP_VALUE_PREV,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
if (hasNextPage) {
|
|
170
|
+
selectionOptions.push({
|
|
171
|
+
index: selectionOptions.length + 1,
|
|
172
|
+
label: HISTORY_OP_NEXT_PAGE,
|
|
173
|
+
value: HISTORY_OP_VALUE_NEXT,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
selectionOptions.push({
|
|
177
|
+
index: selectionOptions.length + 1,
|
|
178
|
+
label: HISTORY_OP_SWITCH,
|
|
179
|
+
value: HISTORY_OP_VALUE_SWITCH,
|
|
180
|
+
});
|
|
181
|
+
return {
|
|
182
|
+
selectionOptions,
|
|
183
|
+
operationOptions: selectionOptions.map((item) => item.label),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* 截断历史列表名称,供聊天压缩表使用。
|
|
188
|
+
*
|
|
189
|
+
* @param name 原始名称。
|
|
190
|
+
* @returns 截断后的名称。
|
|
191
|
+
*/
|
|
192
|
+
function truncateHistoryChatName(name) {
|
|
193
|
+
const text = name.trim();
|
|
194
|
+
if (text.length <= HISTORY_CHAT_NAME_MAX_LEN)
|
|
195
|
+
return text;
|
|
196
|
+
return `${text.slice(0, HISTORY_CHAT_NAME_MAX_LEN - 1)}...`;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* 构建历史列表表格、分页序号与操作选择器。
|
|
200
|
+
*
|
|
201
|
+
* @param data 接口返回的历史列表数据。
|
|
202
|
+
* @param options 当前请求的分页参数(用于序号与上下页判断)。
|
|
203
|
+
* @returns 表格、tableMarkdown、chatTableMarkdown、selectionOptions 等。
|
|
204
|
+
*/
|
|
205
|
+
function buildHistoryListView(data, options = {}) {
|
|
206
|
+
const items = Array.isArray(data.items) ? data.items : [];
|
|
207
|
+
const page = Math.max(1, Number(options.page ?? data.page ?? 1) || 1);
|
|
208
|
+
const limit = Math.max(1, Number(options.limit ?? data.limit ?? 10) || 10);
|
|
209
|
+
const total = Math.max(0, Number(data.total ?? 0) || 0);
|
|
210
|
+
const hasPrevPage = page > 1;
|
|
211
|
+
const hasNextPage = page * limit < total;
|
|
212
|
+
const rows = items.map((item, index) => {
|
|
213
|
+
const workflowId = getHistoryWorkflowId(item);
|
|
214
|
+
return {
|
|
215
|
+
// 序号按分页连续编号:(page - 1) * limit + 行号
|
|
216
|
+
index: (page - 1) * limit + index + 1,
|
|
217
|
+
name: String(item.name ?? ""),
|
|
218
|
+
status: formatHistoryStatus(item.status),
|
|
219
|
+
currentStep: getStepText(item.head_node_type),
|
|
220
|
+
createdAt: formatTimestamp(item.created_timestamp),
|
|
221
|
+
workflowId,
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
const columns = [...HISTORY_COLUMNS];
|
|
225
|
+
const { selectionOptions, operationOptions } = buildHistoryOperationSelection(hasPrevPage, hasNextPage);
|
|
226
|
+
// 非 SelectionOptions 形,降低 Agent 同轮误弹第二选择器的概率
|
|
227
|
+
const switchTargets = rows
|
|
228
|
+
.filter((row) => row.workflowId)
|
|
229
|
+
.map((row) => ({
|
|
230
|
+
index: Number(row.index),
|
|
231
|
+
workflowId: String(row.workflowId),
|
|
232
|
+
}));
|
|
233
|
+
const indexStart = rows.length > 0 ? Number(rows[0].index) : (page - 1) * limit + 1;
|
|
234
|
+
const indexEnd = rows.length > 0 ? Number(rows[rows.length - 1].index) : indexStart - 1;
|
|
235
|
+
const pageSummary = rows.length > 0
|
|
236
|
+
? // 用 ASCII 连字符,避免 AskQuestion prompt 中 en-dash(U+2013)显示为 �
|
|
237
|
+
`第 ${page} 页(序号 ${indexStart}-${indexEnd}),共 ${total} 条。`
|
|
238
|
+
: `第 ${page} 页,共 ${total} 条(本页无记录)。`;
|
|
239
|
+
// 聊天压缩表:缩短名称,去掉创建时间,降低同轮消息体积
|
|
240
|
+
const chatRows = rows.map((row) => ({
|
|
241
|
+
index: row.index,
|
|
242
|
+
name: truncateHistoryChatName(String(row.name)),
|
|
243
|
+
status: row.status,
|
|
244
|
+
currentStep: row.currentStep,
|
|
245
|
+
}));
|
|
246
|
+
const chatColumns = [
|
|
247
|
+
{ key: "index", label: "序号" },
|
|
248
|
+
{ key: "name", label: "名称" },
|
|
249
|
+
{ key: "status", label: "状态" },
|
|
250
|
+
{ key: "currentStep", label: "当前步骤" },
|
|
251
|
+
];
|
|
252
|
+
return {
|
|
253
|
+
table: { columns, rows },
|
|
254
|
+
tableMarkdown: renderListAsMarkdown(rows, columns),
|
|
255
|
+
chatTableMarkdown: renderListAsMarkdown(chatRows, [...chatColumns]),
|
|
256
|
+
pageSummary,
|
|
257
|
+
selectorPhase: "list-operation",
|
|
258
|
+
selectionOptions,
|
|
259
|
+
switchTargets,
|
|
260
|
+
operationOptions,
|
|
261
|
+
page,
|
|
262
|
+
limit,
|
|
263
|
+
total,
|
|
264
|
+
hasPrevPage,
|
|
265
|
+
hasNextPage,
|
|
266
|
+
requireSelector: true,
|
|
267
|
+
selectorTitle: HISTORY_LIST_SELECTOR_TITLE,
|
|
268
|
+
displayInstruction: HISTORY_LIST_DISPLAY_INSTRUCTION,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* 历史列表 JSON:聊天用 tableMarkdown;askQuestion.prompt 仅短文案不含表。
|
|
273
|
+
*
|
|
274
|
+
* @param result listMetaWorkflows 完整结果。
|
|
275
|
+
* @returns Agent 应消费的精简 JSON。
|
|
276
|
+
*/
|
|
277
|
+
function toHistoryListJsonPayload(result) {
|
|
278
|
+
// 每次 list 使用唯一 question id,避免回到第 1 页时与历史 AskQuestion 冲突连弹
|
|
279
|
+
const questionId = `meta_history_list_p${result.page}_${Date.now()}`;
|
|
280
|
+
return {
|
|
281
|
+
displayInstruction: result.displayInstruction,
|
|
282
|
+
askQuestionCallCountMustBe: 1,
|
|
283
|
+
// 历史记录表:必须贴进聊天,不要放进 askQuestion.prompt
|
|
284
|
+
tableMarkdown: result.tableMarkdown,
|
|
285
|
+
pageSummary: result.pageSummary,
|
|
286
|
+
askQuestion: {
|
|
287
|
+
title: result.selectorTitle,
|
|
288
|
+
questions: [
|
|
289
|
+
{
|
|
290
|
+
id: questionId,
|
|
291
|
+
// prompt 仅短说明,不含压缩表/完整表
|
|
292
|
+
prompt: result.pageSummary,
|
|
293
|
+
options: result.selectionOptions.map((item) => ({
|
|
294
|
+
id: item.value,
|
|
295
|
+
label: item.label,
|
|
296
|
+
})),
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
page: result.page,
|
|
301
|
+
limit: result.limit,
|
|
302
|
+
total: result.total,
|
|
303
|
+
hasPrevPage: result.hasPrevPage,
|
|
304
|
+
hasNextPage: result.hasNextPage,
|
|
305
|
+
onSelect: {
|
|
306
|
+
prev_page: "list --page <page-1> → 聊天输出 tableMarkdown → 对 askQuestion 只调用 1 次 AskQuestion",
|
|
307
|
+
next_page: "list --page <page+1> → 聊天输出 tableMarkdown → 对 askQuestion 只调用 1 次 AskQuestion",
|
|
308
|
+
switch_record: "下一轮 list --page <当前页> --switch-options → 对其 askQuestion 只调用 1 次 → switch",
|
|
309
|
+
},
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* 切换记录选项 JSON:只下发 askQuestion(含本页全部序号)。
|
|
314
|
+
*
|
|
315
|
+
* @param result listMetaWorkflows 完整结果。
|
|
316
|
+
* @returns Agent 应消费的切换选项 JSON。
|
|
317
|
+
*/
|
|
318
|
+
function toHistorySwitchOptionsJsonPayload(result) {
|
|
319
|
+
const selectionOptions = result.switchTargets.map((target) => ({
|
|
320
|
+
index: target.index,
|
|
321
|
+
label: `序号 ${target.index}`,
|
|
322
|
+
value: target.workflowId,
|
|
323
|
+
}));
|
|
324
|
+
const questionId = `meta_history_switch_p${result.page}_${Date.now()}`;
|
|
325
|
+
return {
|
|
326
|
+
displayInstruction: HISTORY_SWITCH_OPTIONS_DISPLAY_INSTRUCTION,
|
|
327
|
+
askQuestionCallCountMustBe: 1,
|
|
328
|
+
passAllOptionsInOneAsk: true,
|
|
329
|
+
selectionOptionsCount: selectionOptions.length,
|
|
330
|
+
askQuestion: {
|
|
331
|
+
title: HISTORY_SWITCH_SELECTOR_TITLE,
|
|
332
|
+
questions: [
|
|
333
|
+
{
|
|
334
|
+
id: questionId,
|
|
335
|
+
prompt: `请选择要切换的历史记录(本页共 ${selectionOptions.length} 条,须一次全部展示):`,
|
|
336
|
+
options: selectionOptions.map((item) => ({
|
|
337
|
+
id: item.value,
|
|
338
|
+
label: item.label,
|
|
339
|
+
})),
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
},
|
|
343
|
+
page: result.page,
|
|
344
|
+
limit: result.limit,
|
|
345
|
+
total: result.total,
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
const SWITCH_ARTIFACT_DISPLAY_RULE = "必须与正常流程一致:先执行 refetchCommand 生成/落盘当前节点产物,再实际展示产物本身;" +
|
|
349
|
+
"禁止只输出切换成功、步骤摘要、参数列表、语言/元数据,或口头声称「已展示 / 正文已完整展示」。";
|
|
350
|
+
/** 各节点切换后的重取命令、选择器与操作选项。 */
|
|
351
|
+
const SWITCH_NODE_GUIDANCE = {
|
|
352
|
+
generate_topic: {
|
|
353
|
+
requireSelector: true,
|
|
354
|
+
operationOptions: ["选题序号(selectionOptions)", "重新生成选题"],
|
|
355
|
+
displayInstruction: "切换后须按选题节点规则完整展示候选题(candidateListMarkdown / selectionOptions),再弹选择器。" +
|
|
356
|
+
"若已选定(返回 selectorTitle):AskQuestion 标题必须原样为 selectorTitle(已选择选题 N)," +
|
|
357
|
+
"选项为编辑当前选题 / 确认无误,下一步(生成 PICOS);" +
|
|
358
|
+
"禁止「请选择下一步操作」等泛化标题;禁止未标明已选项就弹编辑/确认操作。",
|
|
359
|
+
},
|
|
360
|
+
verify_topic: {
|
|
361
|
+
requireSelector: true,
|
|
362
|
+
operationOptions: [
|
|
363
|
+
"编辑当前选题",
|
|
364
|
+
"确认无误,下一步(生成 PICOS)",
|
|
365
|
+
],
|
|
366
|
+
displayInstruction: "切换后若已选定:聊天写明「已选择选题 N:题目」;" +
|
|
367
|
+
"AskQuestion 标题必须原样用返回的 selectorTitle(已选择选题 N)," +
|
|
368
|
+
"禁止「请选择下一步操作」「请选择操作」;" +
|
|
369
|
+
"选项:编辑当前选题 / 确认无误,下一步(生成 PICOS)。" +
|
|
370
|
+
"若尚未选定,则按候选题规则弹 selectionOptions。",
|
|
371
|
+
},
|
|
372
|
+
generate_picos: {
|
|
373
|
+
requireSelector: true,
|
|
374
|
+
operationOptions: [
|
|
375
|
+
"编辑内容",
|
|
376
|
+
"重新生成 PICOS",
|
|
377
|
+
"确认无误,下一步(生成纳排标准)",
|
|
378
|
+
],
|
|
379
|
+
displayInstruction: "切换后须完整展示 PICOS 各字段原文,再弹选择器。",
|
|
380
|
+
},
|
|
381
|
+
generate_sorting_criteria: {
|
|
382
|
+
requireSelector: true,
|
|
383
|
+
operationOptions: [
|
|
384
|
+
"编辑内容",
|
|
385
|
+
"重新生成纳排标准",
|
|
386
|
+
"确认无误,下一步(生成检索式)",
|
|
387
|
+
],
|
|
388
|
+
displayInstruction: "切换后须原样展示纳排标准 displayData,再弹选择器。",
|
|
389
|
+
},
|
|
390
|
+
generate_retrieve_expression: {
|
|
391
|
+
refetchCommand: "retrieve expression get",
|
|
392
|
+
requireSelector: true,
|
|
393
|
+
operationOptions: [
|
|
394
|
+
"编辑当前检索式",
|
|
395
|
+
"重新生成检索式",
|
|
396
|
+
"确认无误,下一步(检索文献)",
|
|
397
|
+
],
|
|
398
|
+
displayInstruction: "切换后必须执行 retrieve expression get,原样完整输出 expressionMarkdown,再弹选择器(编辑细则见 meta.md「检索式 / 编辑检索式」)。",
|
|
399
|
+
},
|
|
400
|
+
literature_retrieve: {
|
|
401
|
+
refetchCommand: "retrieve literature list",
|
|
402
|
+
requireSelector: true,
|
|
403
|
+
operationOptions: [
|
|
404
|
+
"补充文献",
|
|
405
|
+
"编辑检索式并重新检索",
|
|
406
|
+
"查看下一页结果",
|
|
407
|
+
"确认无误,下一步(摘要初筛)",
|
|
408
|
+
],
|
|
409
|
+
displayInstruction: "切换后必须执行 retrieve literature list,原样完整输出 tableMarkdown,再弹选择器。",
|
|
410
|
+
},
|
|
411
|
+
abstract_screening: {
|
|
412
|
+
refetchCommand: "screening abstract list",
|
|
413
|
+
requireSelector: true,
|
|
414
|
+
operationOptions: [
|
|
415
|
+
"编辑文献信息",
|
|
416
|
+
"上传PDF文件",
|
|
417
|
+
"已选文献重新筛选",
|
|
418
|
+
"确认无误,下一步(全文复筛)",
|
|
419
|
+
],
|
|
420
|
+
displayInstruction: "切换后先 screening abstract count-pdf,再 abstract list;原样完整输出 tableMarkdown 后弹选择器(pdf-count < 3 时去掉「下一步」)。" +
|
|
421
|
+
"选记录用 list 的 selectionOptions;上传 PDF 三拍停轮见 meta.md「初筛选文献」。",
|
|
422
|
+
},
|
|
423
|
+
fulltext_screening: {
|
|
424
|
+
refetchCommand: "screening fulltext list",
|
|
425
|
+
requireSelector: true,
|
|
426
|
+
operationOptions: [
|
|
427
|
+
"编辑文献信息",
|
|
428
|
+
"已选文献重新筛选",
|
|
429
|
+
"确认无误,下一步(数据抽提)",
|
|
430
|
+
],
|
|
431
|
+
displayInstruction: "切换后必须执行 screening fulltext list 与 fulltext check;原样完整输出 tableMarkdown 后立刻弹选择器。",
|
|
432
|
+
},
|
|
433
|
+
quality_assessment: {
|
|
434
|
+
refetchCommand: "extraction quality list",
|
|
435
|
+
requireSelector: true,
|
|
436
|
+
operationOptions: [
|
|
437
|
+
"编辑内容",
|
|
438
|
+
"选择文献重新评估",
|
|
439
|
+
"确认无误,下一步(提取基线资料)",
|
|
440
|
+
],
|
|
441
|
+
displayInstruction: "切换后必须执行 extraction quality list,原样完整输出表格后弹选择器。",
|
|
442
|
+
},
|
|
443
|
+
baseline_information: {
|
|
444
|
+
refetchCommand: "extraction baseline list",
|
|
445
|
+
requireSelector: true,
|
|
446
|
+
operationOptions: [
|
|
447
|
+
"编辑内容",
|
|
448
|
+
"选择文献重新抽提",
|
|
449
|
+
"确认无误,下一步(提取结局指标)",
|
|
450
|
+
],
|
|
451
|
+
displayInstruction: "切换后必须执行 extraction baseline list,原样完整输出 tableMarkdown(10 列)后弹选择器。" +
|
|
452
|
+
"点选「编辑内容」或「选择文献重新抽提」时:用 baselineRecordRefs 按 Study 选记录(id 仅内部使用);编辑时再展示可编辑字段并弹「手动输入」。",
|
|
453
|
+
},
|
|
454
|
+
outcome_indicator_extraction: {
|
|
455
|
+
refetchCommand: "extraction outcome list",
|
|
456
|
+
requireSelector: true,
|
|
457
|
+
operationOptions: [
|
|
458
|
+
"编辑内容",
|
|
459
|
+
"删除结局指标",
|
|
460
|
+
"确认无误,下一步(统计分析)",
|
|
461
|
+
],
|
|
462
|
+
displayInstruction: "切换后必须执行 extraction outcome list;先 Read 返回的 artifact.output 全文,再原样贴进回复(须同时含父表+各研究子表),再弹选择器。" +
|
|
463
|
+
"禁止只贴序号/Study/Pmid 父表或用 outcomeParentSelectionOptions 拼父表冒充完整结局数据;无 Outcome Name 子表视为交付失败。" +
|
|
464
|
+
"点选「编辑内容」/「删除结局指标」:先弹父级 Study+Pmid 选择器 → 再只贴该父级子表并弹子结局选择器(每页最多 10 条,超出分页);" +
|
|
465
|
+
"编辑时再按网站表单一次列全字段(g1/g2 分列;Value 槽随 Binary→Events / Continuity→SD+Mean / Survival→HR+95%CI 切换),再弹「手动输入」。",
|
|
466
|
+
},
|
|
467
|
+
effect_quantity: {
|
|
468
|
+
refetchCommand: "analysis forest get",
|
|
469
|
+
requireSelector: false,
|
|
470
|
+
operationOptions: [
|
|
471
|
+
"编辑参数并重新生成",
|
|
472
|
+
"确认无误,下一步(发表偏倚)",
|
|
473
|
+
],
|
|
474
|
+
displayInstruction: `${SWITCH_ARTIFACT_DISPLAY_RULE}` +
|
|
475
|
+
"执行 analysis forest get,从 artifact 打开/预览森林图 PDF;可附带当前参数说明。" +
|
|
476
|
+
"禁止弹选择器;按 operationOptions 以 Markdown 无序列表列出后停顿,禁止用 / 同行拼接。",
|
|
477
|
+
},
|
|
478
|
+
publication_bias: {
|
|
479
|
+
refetchCommand: "analysis funnel get",
|
|
480
|
+
requireSelector: false,
|
|
481
|
+
operationOptions: [
|
|
482
|
+
"编辑参数并重新生成",
|
|
483
|
+
"确认无误,下一步(质量评估图)",
|
|
484
|
+
],
|
|
485
|
+
displayInstruction: `${SWITCH_ARTIFACT_DISPLAY_RULE}` +
|
|
486
|
+
"执行 analysis funnel get,从 artifact 打开/预览漏斗图 PDF;可附带当前参数说明。" +
|
|
487
|
+
"禁止弹选择器;按 operationOptions 以 Markdown 无序列表列出后停顿,禁止用 / 同行拼接。",
|
|
488
|
+
},
|
|
489
|
+
quality_assessment_plot: {
|
|
490
|
+
refetchCommand: "analysis quality-plot get",
|
|
491
|
+
requireSelector: false,
|
|
492
|
+
operationOptions: [
|
|
493
|
+
"编辑参数并重新生成",
|
|
494
|
+
"确认无误,下一步(PRISMA 流程图)",
|
|
495
|
+
],
|
|
496
|
+
displayInstruction: `${SWITCH_ARTIFACT_DISPLAY_RULE}` +
|
|
497
|
+
"执行 analysis quality-plot get,必须展示红绿灯图与总结图两份 PDF 产物。" +
|
|
498
|
+
"禁止弹选择器;按 operationOptions 以 Markdown 无序列表列出后停顿,禁止用 / 同行拼接。",
|
|
499
|
+
},
|
|
500
|
+
prisma: {
|
|
501
|
+
refetchCommand: "analysis prisma get-image",
|
|
502
|
+
requireSelector: false,
|
|
503
|
+
operationOptions: [
|
|
504
|
+
"导出其他格式",
|
|
505
|
+
"确认无误,下一步(辅助写作)",
|
|
506
|
+
],
|
|
507
|
+
displayInstruction: `${SWITCH_ARTIFACT_DISPLAY_RULE}` +
|
|
508
|
+
"执行 analysis prisma get-image,从 artifact 打开/预览 PRISMA PNG。" +
|
|
509
|
+
"禁止弹选择器;按 operationOptions 以 Markdown 无序列表列出后停顿,禁止用 / 同行拼接。" +
|
|
510
|
+
"禁止此时弹全文语言选择器;仅用户点选「确认无误,下一步(辅助写作)」后,才必须弹出可点击交互选择器选择 English / 中文(禁止聊天列表代替),选定后再进入写作。",
|
|
511
|
+
},
|
|
512
|
+
generate_method: {
|
|
513
|
+
refetchCommand: "writing method get",
|
|
514
|
+
requireSelector: false,
|
|
515
|
+
operationOptions: [
|
|
516
|
+
"编辑内容",
|
|
517
|
+
"重新生成方法",
|
|
518
|
+
"确认无误,下一步(生成结果)",
|
|
519
|
+
],
|
|
520
|
+
displayInstruction: `${SWITCH_ARTIFACT_DISPLAY_RULE}` +
|
|
521
|
+
"执行 writing method get,必须将响应 text 原文逐字完整贴进对话,并交付 artifact(方法.md)。" +
|
|
522
|
+
"禁止用「方法正文已完整展示」「含 N 个章节」或章节名清单代替原文;未贴出正文即交付失败。" +
|
|
523
|
+
"禁止弹选择器;按 operationOptions 以 Markdown 无序列表列出后停顿,禁止用 / 同行拼接。",
|
|
524
|
+
},
|
|
525
|
+
generate_outcome: {
|
|
526
|
+
refetchCommand: "writing result get",
|
|
527
|
+
requireSelector: false,
|
|
528
|
+
operationOptions: [
|
|
529
|
+
"编辑内容",
|
|
530
|
+
"重新生成结果",
|
|
531
|
+
"确认无误,下一步(生成全文)",
|
|
532
|
+
],
|
|
533
|
+
displayInstruction: `${SWITCH_ARTIFACT_DISPLAY_RULE}` +
|
|
534
|
+
"执行 writing result get,交付并展示 artifact(结果.md);获取结果后回复文本中也要展示开头若干段原文,随后输出 ...,并提示「详细内容可查看文档产物」。" +
|
|
535
|
+
"禁止只用「结果已生成」而无预览;禁止只列操作选项却不展示产物;禁止弹选择器;按 operationOptions 以 Markdown 无序列表列出后停顿,禁止用 / 同行拼接。",
|
|
536
|
+
},
|
|
537
|
+
generate_fulltext: {
|
|
538
|
+
refetchCommand: "writing fulltext get",
|
|
539
|
+
requireSelector: false,
|
|
540
|
+
operationOptions: [],
|
|
541
|
+
displayInstruction: `${SWITCH_ARTIFACT_DISPLAY_RULE}` +
|
|
542
|
+
"执行 writing fulltext get,交付并展示全部 artifact:" +
|
|
543
|
+
"初筛结果.xlsx、复筛结果.xlsx、质量评估.xlsx、结局指标.xlsx、PRISMA流程图.docx、PRISMA流程图.pdf、生成初稿.docx;" +
|
|
544
|
+
"若响应含 text,回复文本中也要展示开头若干段原文后接 ...,并提示「详细内容可查看文档产物」;" +
|
|
545
|
+
"禁止只交付生成初稿.docx;结束后不弹选择器。",
|
|
546
|
+
},
|
|
547
|
+
};
|
|
548
|
+
/**
|
|
549
|
+
* 解析节点类型对应的切换指引。
|
|
550
|
+
*
|
|
551
|
+
* @param nodeType 后端 node_type。
|
|
552
|
+
* @returns 重取命令与交互指引;未知类型时返回通用指令。
|
|
553
|
+
*/
|
|
554
|
+
function resolveSwitchGuidance(nodeType) {
|
|
555
|
+
const known = SWITCH_NODE_GUIDANCE[nodeType];
|
|
556
|
+
if (known) {
|
|
557
|
+
return known;
|
|
558
|
+
}
|
|
559
|
+
return {
|
|
560
|
+
requireSelector: true,
|
|
561
|
+
operationOptions: [],
|
|
562
|
+
displayInstruction: "切换后须按该节点原有展示规则完整交付当前结果,再按逐节点操作选项继续;禁止只输出切换成功摘要。",
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
const TOPIC_NODE_TYPES = new Set([
|
|
566
|
+
"generate_topic",
|
|
567
|
+
"generate_topic_guard",
|
|
568
|
+
"verify_topic",
|
|
569
|
+
"verify_topic_guard",
|
|
570
|
+
]);
|
|
571
|
+
const CONFIRMED_TOPIC_OPERATION_OPTIONS = [
|
|
572
|
+
"编辑当前选题",
|
|
573
|
+
"确认无误,下一步(生成 PICOS)",
|
|
574
|
+
];
|
|
575
|
+
/**
|
|
576
|
+
* 从选题节点 payload 取出原始对象(兼容 output.output 嵌套)。
|
|
577
|
+
*/
|
|
578
|
+
function extractTopicPayload(node) {
|
|
579
|
+
const raw = node.output;
|
|
580
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
581
|
+
return undefined;
|
|
582
|
+
}
|
|
583
|
+
const record = raw;
|
|
584
|
+
if (record.output &&
|
|
585
|
+
typeof record.output === "object" &&
|
|
586
|
+
!Array.isArray(record.output)) {
|
|
587
|
+
return record.output;
|
|
588
|
+
}
|
|
589
|
+
return record;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* 从选题节点提取候选题目列表。
|
|
593
|
+
*/
|
|
594
|
+
function extractTopicTitlesFromNode(node) {
|
|
595
|
+
const raw = node.output;
|
|
596
|
+
const payload = raw &&
|
|
597
|
+
typeof raw === "object" &&
|
|
598
|
+
!Array.isArray(raw) &&
|
|
599
|
+
"output" in raw &&
|
|
600
|
+
Array.isArray(raw.output)
|
|
601
|
+
? raw.output
|
|
602
|
+
: extractTopicPayload(node);
|
|
603
|
+
if (Array.isArray(payload)) {
|
|
604
|
+
return payload
|
|
605
|
+
.map((item) => {
|
|
606
|
+
if (typeof item === "string") {
|
|
607
|
+
return item.trim();
|
|
608
|
+
}
|
|
609
|
+
if (item && typeof item === "object") {
|
|
610
|
+
const row = item;
|
|
611
|
+
const english = row.English ?? row.english ?? row.title;
|
|
612
|
+
return typeof english === "string" ? english.trim() : "";
|
|
613
|
+
}
|
|
614
|
+
return "";
|
|
615
|
+
})
|
|
616
|
+
.filter(Boolean);
|
|
617
|
+
}
|
|
618
|
+
if (!payload || typeof payload !== "object") {
|
|
619
|
+
return [];
|
|
620
|
+
}
|
|
621
|
+
return Object.entries(payload)
|
|
622
|
+
.filter(([key]) => /^Title\d+$/i.test(key))
|
|
623
|
+
.sort(([a], [b]) => a.localeCompare(b, undefined, { numeric: true }))
|
|
624
|
+
.map(([, value]) => {
|
|
625
|
+
if (typeof value === "string") {
|
|
626
|
+
return value.trim();
|
|
627
|
+
}
|
|
628
|
+
if (value && typeof value === "object") {
|
|
629
|
+
const row = value;
|
|
630
|
+
const english = row.English ?? row.english ?? row.title;
|
|
631
|
+
return typeof english === "string" ? english.trim() : "";
|
|
632
|
+
}
|
|
633
|
+
return "";
|
|
634
|
+
})
|
|
635
|
+
.filter(Boolean);
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* 读取节点已选选题;无 selected 时可用工作流名称在候选中匹配。
|
|
639
|
+
*/
|
|
640
|
+
function extractSelectedTopicTitle(node, workflowName) {
|
|
641
|
+
const payload = extractTopicPayload(node);
|
|
642
|
+
const selected = payload?.selected;
|
|
643
|
+
if (selected && typeof selected === "object" && !Array.isArray(selected)) {
|
|
644
|
+
const row = selected;
|
|
645
|
+
for (const key of ["English", "english", "Chinese", "chinese", "title"]) {
|
|
646
|
+
const value = row[key];
|
|
647
|
+
if (typeof value === "string" && value.trim()) {
|
|
648
|
+
return value.trim();
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (typeof selected === "string" && selected.trim()) {
|
|
653
|
+
return selected.trim();
|
|
654
|
+
}
|
|
655
|
+
const name = workflowName?.trim();
|
|
656
|
+
if (!name) {
|
|
657
|
+
return undefined;
|
|
658
|
+
}
|
|
659
|
+
const titles = extractTopicTitlesFromNode(node);
|
|
660
|
+
return titles.find((title) => title === name);
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* 选题节点切换后:若已选定则覆盖为「已确认选题」指引(含 selectorTitle)。
|
|
664
|
+
*
|
|
665
|
+
* @param node 目标选题节点。
|
|
666
|
+
* @param workflowName 工作流名称(可作已选匹配回退)。
|
|
667
|
+
* @param base 静态节点指引。
|
|
668
|
+
* @returns 可能叠加 selectorTitle / selected* 的指引字段。
|
|
669
|
+
*/
|
|
670
|
+
function resolveTopicSwitchFields(node, workflowName, base) {
|
|
671
|
+
if (!node || !TOPIC_NODE_TYPES.has(node.node_type)) {
|
|
672
|
+
return {
|
|
673
|
+
operationOptions: base.operationOptions,
|
|
674
|
+
displayInstruction: base.displayInstruction,
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
const selectedTitle = extractSelectedTopicTitle(node, workflowName);
|
|
678
|
+
if (!selectedTitle) {
|
|
679
|
+
return {
|
|
680
|
+
operationOptions: ["选题序号(selectionOptions)", "重新生成选题"],
|
|
681
|
+
displayInstruction: "切换后须完整展示候选题(candidateListMarkdown / selectionOptions),再弹候选题选择器;" +
|
|
682
|
+
"禁止未选定就弹「编辑当前选题 / 确认无误…」。",
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
const titles = extractTopicTitlesFromNode(node);
|
|
686
|
+
const matched = titles.findIndex((title) => title === selectedTitle);
|
|
687
|
+
const selectedIndex = matched >= 0 ? matched + 1 : undefined;
|
|
688
|
+
const selectorTitle = selectedIndex !== undefined
|
|
689
|
+
? `已选择选题 ${selectedIndex}`
|
|
690
|
+
: "已选择选题";
|
|
691
|
+
return {
|
|
692
|
+
selectedTitle,
|
|
693
|
+
...(selectedIndex !== undefined ? { selectedIndex } : {}),
|
|
694
|
+
selectorTitle,
|
|
695
|
+
operationOptions: [...CONFIRMED_TOPIC_OPERATION_OPTIONS],
|
|
696
|
+
displayInstruction: `已确认选题:聊天须写明「${selectorTitle}:${selectedTitle}」;` +
|
|
697
|
+
`AskQuestion / 选择器的标题(title)必须原样为「${selectorTitle}」;` +
|
|
698
|
+
"选项:编辑当前选题 / 确认无误,下一步(生成 PICOS)。" +
|
|
699
|
+
"禁止使用「请选择下一步操作」「请选择操作」「请选择」等泛化标题。",
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Finds a successful node that can be used as a branch starting point.
|
|
704
|
+
*
|
|
705
|
+
* @param workflow The source workflow.
|
|
706
|
+
* @param nodeType The requested node type or website pseudo node type.
|
|
707
|
+
* @param options.includeHead 为 true 时允许匹配 head(switch 定位含当前步骤)。
|
|
708
|
+
* @returns The matching workflow node when available.
|
|
709
|
+
*/
|
|
710
|
+
function findSwitchableNode(workflow, nodeType, options) {
|
|
711
|
+
const definition = META_WORKFLOW_STEP_DEFINITIONS.find((step) => step.nodeType === nodeType ||
|
|
712
|
+
("aliases" in step &&
|
|
713
|
+
[...step.aliases].includes(nodeType)));
|
|
714
|
+
const aliases = definition && "aliases" in definition ? [...definition.aliases] : [];
|
|
715
|
+
const candidates = new Set([
|
|
716
|
+
nodeType,
|
|
717
|
+
...(definition ? [definition.nodeType] : []),
|
|
718
|
+
...aliases,
|
|
719
|
+
]);
|
|
720
|
+
const includeHead = options?.includeHead === true;
|
|
721
|
+
// 优先精确匹配指定类型;includeHead 时允许定位到当前 head
|
|
722
|
+
return (workflow.nodes ?? []).find((node) => (includeHead || node.id !== workflow.head) &&
|
|
723
|
+
node.status === "success" &&
|
|
724
|
+
candidates.has(node.node_type));
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Builds switchable step options from successful workflow nodes.
|
|
728
|
+
*
|
|
729
|
+
* @param workflow The workflow detail response.
|
|
730
|
+
* @returns Step options that can be used to locate a historical workflow step.
|
|
731
|
+
*/
|
|
732
|
+
function buildSwitchableSteps(workflow) {
|
|
733
|
+
const nodeMap = new Map();
|
|
734
|
+
for (const node of workflow.nodes ?? []) {
|
|
735
|
+
if (node.id !== workflow.head && node.status === "success") {
|
|
736
|
+
nodeMap.set(node.node_type, node);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
const steps = [];
|
|
740
|
+
for (const step of META_WORKFLOW_STEP_DEFINITIONS) {
|
|
741
|
+
const node = findSwitchableNode(workflow, step.nodeType);
|
|
742
|
+
if (node) {
|
|
743
|
+
steps.push({
|
|
744
|
+
index: step.index,
|
|
745
|
+
label: step.label,
|
|
746
|
+
nodeType: step.nodeType,
|
|
747
|
+
nodeId: node.id,
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
else if (step.nodeType === "title") {
|
|
751
|
+
const topicNode = nodeMap.get("generate_topic") ?? nodeMap.get("verify_topic");
|
|
752
|
+
if (topicNode) {
|
|
753
|
+
steps.push({
|
|
754
|
+
index: step.index,
|
|
755
|
+
label: step.label,
|
|
756
|
+
nodeType: topicNode.node_type,
|
|
757
|
+
nodeId: topicNode.id,
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
return steps;
|
|
763
|
+
}
|
|
764
|
+
function summarizeWorkflow(workflow) {
|
|
765
|
+
if (!workflow.runner_id) {
|
|
766
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_RESPONSE, "Meta 工作流响应缺少 runner_id");
|
|
767
|
+
}
|
|
768
|
+
const nodes = Array.isArray(workflow.nodes) ? workflow.nodes : [];
|
|
769
|
+
const headNode = nodes.find((node) => node.id === workflow.head);
|
|
770
|
+
return {
|
|
771
|
+
runnerId: workflow.runner_id,
|
|
772
|
+
head: workflow.head,
|
|
773
|
+
nodeCount: nodes.length,
|
|
774
|
+
headNodeType: headNode?.node_type,
|
|
775
|
+
headStatus: headNode?.status,
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function printWorkflowResult(result, format) {
|
|
779
|
+
if (format === "json") {
|
|
780
|
+
printOutput(result, "json");
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
// 用户侧不展示 runnerId / head 等内部 ID,仅输出可读摘要
|
|
784
|
+
console.log(renderListAsMarkdown([
|
|
785
|
+
{
|
|
786
|
+
nodeCount: result.summary.nodeCount,
|
|
787
|
+
headNodeType: getStepText(result.summary.headNodeType),
|
|
788
|
+
headStatus: result.summary.headStatus ?? "",
|
|
789
|
+
},
|
|
790
|
+
], [
|
|
791
|
+
{ key: "nodeCount", label: "节点数" },
|
|
792
|
+
{ key: "headNodeType", label: "当前步骤" },
|
|
793
|
+
{ key: "headStatus", label: "状态" },
|
|
794
|
+
]));
|
|
795
|
+
}
|
|
796
|
+
export async function createMetaWorkflow(options = {}) {
|
|
797
|
+
let workflow;
|
|
798
|
+
try {
|
|
799
|
+
workflow = await requestMeta(`${META_API_PREFIX}/workflow/runs`, {
|
|
800
|
+
method: "POST",
|
|
801
|
+
body: { base: null },
|
|
802
|
+
configPath: options.configPath,
|
|
803
|
+
action: "创建 Meta 工作流",
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
catch (error) {
|
|
807
|
+
if (isWorkflowCreateCooldownError(error)) {
|
|
808
|
+
throw new helixlifeError(helixlifeErrorCode.REQUEST_FAILED, WORKFLOW_COOLDOWN_MESSAGE, {
|
|
809
|
+
cause: error,
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
throw error;
|
|
813
|
+
}
|
|
814
|
+
const summary = summarizeWorkflow(workflow);
|
|
815
|
+
return {
|
|
816
|
+
runnerId: summary.runnerId,
|
|
817
|
+
summary,
|
|
818
|
+
workflow,
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
export async function getMetaWorkflow(options) {
|
|
822
|
+
const workflow = await requestMeta(`${META_API_PREFIX}/workflow/runs/${encodeURIComponent(options.workflowId)}`, {
|
|
823
|
+
configPath: options.configPath,
|
|
824
|
+
action: "查询 Meta 工作流",
|
|
825
|
+
});
|
|
826
|
+
const summary = summarizeWorkflow(workflow);
|
|
827
|
+
return {
|
|
828
|
+
runnerId: summary.runnerId,
|
|
829
|
+
summary,
|
|
830
|
+
workflow,
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
export async function listMetaWorkflows(options = {}) {
|
|
834
|
+
const page = options.page ?? 1;
|
|
835
|
+
const limit = options.limit ?? 10;
|
|
836
|
+
const data = await requestMeta(`${META_API_PREFIX}/workflow/runs`, {
|
|
837
|
+
params: {
|
|
838
|
+
page,
|
|
839
|
+
limit,
|
|
840
|
+
name: options.name ?? "",
|
|
841
|
+
},
|
|
842
|
+
configPath: options.configPath,
|
|
843
|
+
action: "查询 Meta 历史记录",
|
|
844
|
+
});
|
|
845
|
+
const view = buildHistoryListView(data, { page, limit });
|
|
846
|
+
return { data, ...view };
|
|
847
|
+
}
|
|
848
|
+
export async function listMetaWorkflowSteps(options) {
|
|
849
|
+
const workflow = await requestMeta(`${META_API_PREFIX}/workflow/runs/${encodeURIComponent(options.workflowId)}`, {
|
|
850
|
+
configPath: options.configPath,
|
|
851
|
+
action: "查询 Meta 历史记录步骤",
|
|
852
|
+
});
|
|
853
|
+
const headNode = (workflow.nodes ?? []).find((node) => node.id === workflow.head);
|
|
854
|
+
return {
|
|
855
|
+
runnerId: workflow.runner_id,
|
|
856
|
+
head: workflow.head,
|
|
857
|
+
headNodeType: headNode?.node_type,
|
|
858
|
+
steps: buildSwitchableSteps(workflow),
|
|
859
|
+
workflow,
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
export async function switchMetaWorkflow(options) {
|
|
863
|
+
const current = await getMetaWorkflow(options);
|
|
864
|
+
const workflow = current.workflow;
|
|
865
|
+
const availableSteps = buildSwitchableSteps(workflow);
|
|
866
|
+
const requestedType = options.nodeType?.trim();
|
|
867
|
+
const workflowName = typeof workflow.name === "string" ? workflow.name : undefined;
|
|
868
|
+
// 未指定 node-type:定位到历史当前节点(head),与网站历史卡片一致
|
|
869
|
+
if (!requestedType) {
|
|
870
|
+
const headNodeType = current.summary.headNodeType;
|
|
871
|
+
const guidance = headNodeType
|
|
872
|
+
? resolveSwitchGuidance(headNodeType)
|
|
873
|
+
: resolveSwitchGuidance("");
|
|
874
|
+
const headNode = (workflow.nodes ?? []).find((node) => node.id === workflow.head);
|
|
875
|
+
const topicFields = resolveTopicSwitchFields(headNode, workflowName, guidance);
|
|
876
|
+
return {
|
|
877
|
+
...current,
|
|
878
|
+
targetNodeType: headNodeType,
|
|
879
|
+
targetNodeId: current.summary.head,
|
|
880
|
+
availableSteps,
|
|
881
|
+
refetchCommand: guidance.refetchCommand,
|
|
882
|
+
requireSelector: guidance.requireSelector,
|
|
883
|
+
...topicFields,
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
// 指定 node-type:可切到该步骤(含 head)
|
|
887
|
+
const node = findSwitchableNode(workflow, requestedType, {
|
|
888
|
+
includeHead: true,
|
|
889
|
+
});
|
|
890
|
+
if (!node) {
|
|
891
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `当前历史记录中没有可切换的成功步骤:${requestedType}`);
|
|
892
|
+
}
|
|
893
|
+
const guidance = resolveSwitchGuidance(node.node_type);
|
|
894
|
+
const topicFields = resolveTopicSwitchFields(node, workflowName, guidance);
|
|
895
|
+
return {
|
|
896
|
+
...current,
|
|
897
|
+
targetNodeType: node.node_type,
|
|
898
|
+
targetNodeId: node.id,
|
|
899
|
+
availableSteps,
|
|
900
|
+
refetchCommand: guidance.refetchCommand,
|
|
901
|
+
requireSelector: guidance.requireSelector,
|
|
902
|
+
...topicFields,
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
export async function runCreateMetaWorkflow(options = {}) {
|
|
906
|
+
const result = await createMetaWorkflow(options);
|
|
907
|
+
printWorkflowResult(result, options.format ?? "markdown");
|
|
908
|
+
}
|
|
909
|
+
export async function runGetMetaWorkflow(options) {
|
|
910
|
+
const result = await getMetaWorkflow(options);
|
|
911
|
+
printWorkflowResult(result, options.format ?? "markdown");
|
|
912
|
+
}
|
|
913
|
+
export async function runListMetaWorkflows(options = {}) {
|
|
914
|
+
const result = await listMetaWorkflows(options);
|
|
915
|
+
if ((options.format ?? "markdown") === "json") {
|
|
916
|
+
// 切换选项模式:只出序号选择器字段,避免与列表操作选择器同包双弹
|
|
917
|
+
if (options.switchOptions) {
|
|
918
|
+
printOutput(toHistorySwitchOptionsJsonPayload(result), "json");
|
|
919
|
+
return;
|
|
920
|
+
}
|
|
921
|
+
printOutput(toHistoryListJsonPayload(result), "json");
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
if (options.switchOptions) {
|
|
925
|
+
// markdown 下仍给出可点选序号列表(极少使用)
|
|
926
|
+
const rows = result.switchTargets.map((target) => ({
|
|
927
|
+
index: target.index,
|
|
928
|
+
label: `序号 ${target.index}`,
|
|
929
|
+
}));
|
|
930
|
+
console.log(renderListAsMarkdown(rows, [
|
|
931
|
+
{ key: "index", label: "序号" },
|
|
932
|
+
{ key: "label", label: "选项" },
|
|
933
|
+
]));
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
console.log(result.tableMarkdown);
|
|
937
|
+
}
|
|
938
|
+
export async function runListMetaWorkflowSteps(options) {
|
|
939
|
+
const result = await listMetaWorkflowSteps(options);
|
|
940
|
+
if ((options.format ?? "markdown") === "json") {
|
|
941
|
+
printOutput(result, "json");
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
console.log(renderListAsMarkdown(result.steps, [
|
|
945
|
+
...STEP_COLUMNS,
|
|
946
|
+
]));
|
|
947
|
+
}
|
|
948
|
+
export async function runSwitchMetaWorkflow(options) {
|
|
949
|
+
const result = await switchMetaWorkflow(options);
|
|
950
|
+
if ((options.format ?? "markdown") === "json") {
|
|
951
|
+
printOutput(result, "json");
|
|
952
|
+
return;
|
|
953
|
+
}
|
|
954
|
+
printWorkflowResult(result, options.format ?? "markdown");
|
|
955
|
+
}
|
|
956
|
+
//# sourceMappingURL=workflow.js.map
|