matvenus-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/CHANGELOG.md +22 -0
- package/LICENSE +201 -0
- package/README.md +408 -0
- package/bin/cli.js +3 -0
- package/dist/client.d.ts +13 -0
- package/dist/client.js +62 -0
- package/dist/commands/alphafold_protein_folding.d.ts +2 -0
- package/dist/commands/alphafold_protein_folding.js +262 -0
- package/dist/commands/cancel_tool_result.d.ts +2 -0
- package/dist/commands/cancel_tool_result.js +388 -0
- package/dist/commands/diffdock_protein_ligand_docking.d.ts +2 -0
- package/dist/commands/diffdock_protein_ligand_docking.js +252 -0
- package/dist/commands/esmfold_protein_folding.d.ts +2 -0
- package/dist/commands/esmfold_protein_folding.js +219 -0
- package/dist/commands/get_tool_result.d.ts +2 -0
- package/dist/commands/get_tool_result.js +388 -0
- package/dist/commands/gromacs_analysis.d.ts +2 -0
- package/dist/commands/gromacs_analysis.js +212 -0
- package/dist/commands/gromacs_md.d.ts +2 -0
- package/dist/commands/gromacs_md.js +236 -0
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/index.js +39 -0
- package/dist/commands/predict_functional_residue.d.ts +2 -0
- package/dist/commands/predict_functional_residue.js +234 -0
- package/dist/commands/predict_protein_properties.d.ts +2 -0
- package/dist/commands/predict_protein_properties.js +228 -0
- package/dist/commands/proteinmpnn_sequence_design.d.ts +2 -0
- package/dist/commands/proteinmpnn_sequence_design.js +271 -0
- package/dist/commands/rfdiffusion_protein_design.d.ts +2 -0
- package/dist/commands/rfdiffusion_protein_design.js +333 -0
- package/dist/commands/upload_file_base_64.d.ts +2 -0
- package/dist/commands/upload_file_base_64.js +212 -0
- package/dist/commands/venusg_protein_function_prediction.d.ts +2 -0
- package/dist/commands/venusg_protein_function_prediction.js +234 -0
- package/dist/commands/venusmine_protein_mining.d.ts +2 -0
- package/dist/commands/venusmine_protein_mining.js +212 -0
- package/dist/commands/venusprime_multipoint_prediction.d.ts +2 -0
- package/dist/commands/venusprime_multipoint_prediction.js +322 -0
- package/dist/commands/venusrem_mutation_prediction.d.ts +2 -0
- package/dist/commands/venusrem_mutation_prediction.js +260 -0
- package/dist/commands/venusx_functional_residue_prediction.d.ts +2 -0
- package/dist/commands/venusx_functional_residue_prediction.js +234 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +125 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.js +6 -0
- package/package.json +41 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const commands_1 = require("./commands");
|
|
6
|
+
const program = new commander_1.Command();
|
|
7
|
+
program
|
|
8
|
+
.name('matwings-venus-cli')
|
|
9
|
+
.description('Standalone MCP server for VenusFactory protein tools')
|
|
10
|
+
.version('0.5.0');
|
|
11
|
+
// System command: Search API
|
|
12
|
+
program
|
|
13
|
+
.command('search-api')
|
|
14
|
+
.description('Search for API endpoints by keyword')
|
|
15
|
+
.argument('<keyword>', 'Keyword to search for')
|
|
16
|
+
.action((keyword) => {
|
|
17
|
+
const spec = { "info": { "title": "VenusFactory MCP Server", "description": "Standalone MCP server for VenusFactory protein tools", "version": "0.5.0" }, "securitySchemes": [{ "name": "HTTPBearer", "type": "bearer", "envVarName": "BEARER_TOKEN" }], "paths": [{ "path": "/api/tools/predict/functional-residue", "methods": [{ "method": "post", "operationId": "predict_functional_residue", "summary": "Functional Residue", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file" }, "model_name": { "type": "string", "title": "Model Name", "description": "Model name for function prediction, Optional model names: ESM2-650M, Ankh-large, ProtT5-xl-uniref50 ", "default": "ESM2-650M" }, "task": { "type": "string", "title": "Task", "description": "Task: Activity Site, Binding Site, Conserved Site, Motif", "default": "Activity Site" } }, "type": "object", "title": "ResidueFunctionPredictionInput", "description": "Input for functional residue prediction" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "predict-functional-residue" }] }, { "path": "/api/tools/predict/venusx-functional-residue", "methods": [{ "method": "post", "operationId": "venusx_functional_residue_prediction", "summary": "Venusx Functional Residue", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file" }, "task": { "type": "string", "title": "Task", "description": "VenusX task: VenusX-Activity (activity site), VenusX-Binding (binding site), VenusX-Evo (conserved site)", "default": "VenusX-Activity" }, "mode": { "type": "string", "title": "Mode", "description": "Model mode: pro uses Ankh-large (default), light uses ESM2-650M. Model is read from venusx_config.yaml", "default": "pro" } }, "type": "object", "title": "VenusXFunctionalResiduePredictionInput", "description": "Input for VenusX functional site prediction. Uses venusx_config.yaml; default mode=pro." }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusx-functional-residue-prediction" }] }, { "path": "/api/tools/predict/venusg-protein-function", "methods": [{ "method": "post", "operationId": "venusg_protein_function_prediction", "summary": "Venusg Protein Function", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file" }, "task": { "type": "string", "title": "Task", "description": "VenusG task: VenusG-Solubility, VenusG-SubcellularLocalization, VenusG-MembraneProtein, VenusG-Metalionbinding, VenusG-Stability, VenusG-Sortingsignal, VenusG-OptimumTemperature, VenusG-Kcat, VenusG-OptimalPH", "default": "VenusG-Solubility" }, "mode": { "type": "string", "title": "Mode", "description": "Model mode: pro uses ESM2-650M, light uses ProtBert (default). Model is read from venusg_config.yaml", "default": "light" } }, "type": "object", "title": "VenusGProteinFunctionPredictionInput", "description": "Input for VenusG protein-level function prediction. Uses venusg_config.yaml; pro=ESM2-650M, light=ProtBert." }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusg-protein-function-prediction" }] }, { "path": "/api/tools/predict/protein-properties", "methods": [{ "method": "post", "operationId": "predict_protein_properties", "summary": "Protein Properties", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to PDB structure file or FASTA file" }, "task_name": { "type": "string", "title": "Task Name", "description": "Task name: Physical and chemical properties, Relative solvent accessible surface area (PDB only), SASA value (PDB only), Secondary structure (PDB only)", "default": "Physical and chemical properties" } }, "type": "object", "title": "ProteinPropertiesInput", "description": "Input for protein properties generation" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "predict-protein-properties" }] }, { "path": "/api/tools/predict/esmfold", "methods": [{ "method": "post", "operationId": "esmfold_protein_folding", "summary": "Esmfold Folding", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "type": "string", "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "verbose": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Verbose", "description": "Whether to print detailed information", "default": true } }, "type": "object", "required": ["sequence"], "title": "ProteinStructurePredictionInput", "description": "Input for protein structure prediction based on ESMFold" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "esmfold-protein-folding" }] }, { "path": "/api/tools/predict/alphafold", "methods": [{ "method": "post", "operationId": "alphafold_protein_folding", "summary": "Alphafold Folding", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "model_version": { "type": "string", "title": "Model Version", "description": "AlphaFold version to use: 'alphafold2' or 'alphafold3'", "default": "alphafold2" }, "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code (for simple single-chain prediction)" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file (.fasta, .fa, or .faa) (for simple single/multi-chain prediction)" }, "sequences": { "anyOf": [{ "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" }], "title": "Sequences", "description": "List of sequence entities for multi-chain prediction. For AlphaFold2: Only protein chains are supported (DNA/RNA/ligands ignored). For AlphaFold3: Full support for proteins, DNA, RNA, and ligands. Each entity can be: {'protein': {'id': 'A', 'sequence': 'PVLSCGEWQL', 'description': 'Chain A', 'modifications': [{'ptmType': 'HY3', 'ptmPosition': 1}], 'unpairedMsa': '...', 'pairedMsa': '...', 'templates': [...]}} {'dna': {'id': 'C', 'sequence': 'GACCTCT', 'modifications': [{'modificationType': '6OG', 'basePosition': 1}], 'unpairedMsa': '...'}} (AF3 only) {'rna': {'id': 'E', 'sequence': 'AGCU', 'modifications': [{'modificationType': '2MG', 'basePosition': 1}], 'unpairedMsa': '...'}} (AF3 only) {'ligand': {'id': ['F', 'G'], 'ccdCodes': ['ATP']}} or {'ligand': {'id': 'Z', 'smiles': 'CC(=O)OC1C[NH+]2CCC1CC2'}} (AF3 only)" }, "model_seeds": { "anyOf": [{ "items": { "type": "integer" }, "type": "array" }, { "type": "null" }], "title": "Model Seeds", "description": "Random seeds for AlphaFold3 prediction (default: [42])", "default": [42] } }, "type": "object", "title": "AlphaFoldInput", "description": "Input for AlphaFold2/3 protein structure prediction" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "alphafold-protein-folding" }] }, { "path": "/api/tools/predict/diffdock", "methods": [{ "method": "post", "operationId": "diffdock_protein_ligand_docking", "summary": "Diffdock Docking", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "protein_path": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Protein Path", "description": "OSS URL to protein PDB file" }, "protein_sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Protein Sequence", "description": "Protein sequence (will be folded using ESMFold if protein_path not provided)" }, "ligand": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Ligand", "description": "Ligand SMILES string or OSS URL to ligand file (.sdf, .mol2, etc.)" }, "protein_ligand_csv": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Protein Ligand Csv", "description": "OSS URL to CSV file containing multiple protein-ligand pairs with columns: complex_name, protein_path, ligand_description, protein_sequence" }, "num_poses": { "type": "integer", "title": "Num Poses", "description": "Number of poses to generate per complex (default: 10)", "default": 10 } }, "type": "object", "title": "DiffDockInput", "description": "Input for DiffDock protein-ligand docking prediction" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "diffdock-protein-ligand-docking" }] }, { "path": "/api/tools/predict/venusrem-mutation", "methods": [{ "method": "post", "operationId": "venusrem_mutation_prediction", "summary": "Venusrem Mutation", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "task": { "type": "string", "title": "Task", "description": "Prediction task: activity, binding, stability, expression, general (see venusrem_config.yaml)" }, "mode": { "type": "string", "title": "Mode", "description": "Model mode: pro for structure-based multi-model, light for sequence-based multi-model" }, "structure_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Structure File", "description": "OSS URL to structure file (required when mode=pro)" }, "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code (for mode=light)" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file (for mode=light)" }, "config": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Config", "description": "Path to venusrem_config.yaml file (optional)" } }, "type": "object", "required": ["task", "mode"], "title": "VenusREMInput", "description": "Input for VenusREM multi-model mutation prediction (pro/light)" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusrem-mutation-prediction" }] }, { "path": "/api/tools/predict/venusprime-multipoint", "methods": [{ "method": "post", "operationId": "venusprime_multipoint_prediction", "summary": "Venusprime Multipoint", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "mode": { "type": "string", "title": "Mode", "description": "Operation mode: 'train' to train models from experimental data, 'inference' to predict multi-point mutations using trained models", "default": "inference" }, "venus_mode": { "type": "string", "title": "Venus Mode", "description": "Model mode: 'light' for ridge regression (default), 'pro' for sesnet (not implemented yet)", "default": "light" }, "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Wild-type protein sequence (required for train mode if fasta_file not provided)" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file with wild-type sequence (required for train mode if sequence not provided)" }, "experiment_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Experiment File", "description": "OSS URL to CSV file with 'mutant' and 'score' columns for training (required for train mode)" }, "score_col_name": { "type": "string", "title": "Score Col Name", "description": "Name of score column in experiment_file to train" }, "model_path_list": { "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], "title": "Model Path List", "description": "List of trained model file paths or OSS URLs (required for inference mode)" }, "site": { "anyOf": [{ "items": { "type": "integer" }, "type": "array" }, { "type": "null" }], "title": "Site", "description": "Mutation site numbers for combination mutations in inference mode (default: [2, 3, 4])", "default": [2, 3, 4] }, "model_num": { "type": "integer", "title": "Model Num", "description": "Number of ensemble models to train (for train mode, default: 5)", "default": 5 }, "batch_size": { "type": "integer", "title": "Batch Size", "description": "Batch size for embedding extraction during training (for train mode, default: 4)", "default": 4 }, "inference_batch_size": { "type": "integer", "title": "Inference Batch Size", "description": "Batch size for embedding extraction during inference (for inference mode, default: 32)", "default": 32 }, "config": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Config", "description": "Path to VenusPrime config YAML file (optional, default: venusprime_config.yaml in script directory)" }, "target_server": { "type": "string", "title": "Target Server", "description": "Target server for job submission: 'slurm' or 'paracloud'", "default": "slurm" } }, "type": "object", "title": "VenusPrimeInput", "description": "Input for VenusPrime multi-point combination mutation prediction (light=ridge regression, pro=reserved)" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusprime-multipoint-prediction" }] }, { "path": "/api/tools/predict/gromacs-md", "methods": [{ "method": "post", "operationId": "gromacs_md", "summary": "Gromacs Md", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "pdb_file": { "type": "string", "title": "Pdb File", "description": "OSS URL to input PDB file" }, "force_field": { "type": "string", "title": "Force Field", "description": "Force field name (default: amber99sb-ildn)", "default": "amber99sb-ildn" }, "water_model": { "type": "string", "title": "Water Model", "description": "Water model (default: tip3p)", "default": "tip3p" }, "temp": { "type": "string", "title": "Temp", "description": "Temperature in K (default: 300)", "default": "300" }, "pressure": { "type": "string", "title": "Pressure", "description": "Pressure in bar (default: 1.0)", "default": "1.0" }, "md_steps": { "type": "string", "title": "Md Steps", "description": "Production MD steps (default: 50000, ~100ns at dt=2fs)", "default": "50000" } }, "type": "object", "required": ["pdb_file"], "title": "GromacsMdInput", "description": "Input for GROMACS MD (build system + production simulation)" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "gromacs-md" }] }, { "path": "/api/tools/predict/gromacs-analysis", "methods": [{ "method": "post", "operationId": "gromacs_analysis", "summary": "Gromacs Analysis", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "tpr_file": { "type": "string", "title": "Tpr File", "description": "OSS URL to .tpr file (from gromacs_md output)" }, "xtc_file": { "type": "string", "title": "Xtc File", "description": "OSS URL to .xtc file (from gromacs_md output)" } }, "type": "object", "required": ["tpr_file", "xtc_file"], "title": "GromacsAnalysisInput", "description": "Input for GROMACS trajectory analysis" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "gromacs-analysis" }] }, { "path": "/api/tools/predict/venusmine-mining", "methods": [{ "method": "post", "operationId": "venusmine_protein_mining", "summary": "Venusmine Mining", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "pdb_file": { "type": "string", "title": "Pdb File", "description": "OSS URL to input PDB file" }, "target_server": { "type": "string", "title": "Target Server", "description": "Target server: 'slurm' for local Slurm cluster, 'paracloud' for remote Paracloud execution (default: 'slurm')", "default": "slurm" } }, "type": "object", "required": ["pdb_file"], "title": "VenusMineInput", "description": "Input for VenusMine protein mining pipeline" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusmine-protein-mining" }] }, { "path": "/api/tools/predict/proteinmpnn-design", "methods": [{ "method": "post", "operationId": "proteinmpnn_sequence_design", "summary": "Proteinmpnn Design", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "pdb_path": { "type": "string", "title": "Pdb Path", "description": "OSS URL to input PDB file" }, "designed_chains": { "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], "title": "Designed Chains", "description": "Chain IDs to design (e.g., ['A', 'B']). If None, designs all chains" }, "fixed_chains": { "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], "title": "Fixed Chains", "description": "Chain IDs to keep fixed (e.g., ['C', 'D'])" }, "num_sequences": { "type": "integer", "title": "Num Sequences", "description": "Number of sequences to generate (default: 4)", "default": 4 }, "temperatures": { "items": { "type": "number" }, "type": "array", "title": "Temperatures", "description": "Sampling temperatures for sequence generation (default: [0.1])", "default": [0.1] }, "omit_aas": { "type": "string", "title": "Omit Aas", "description": "Amino acids to omit from design (default: 'X')", "default": "X" }, "homomer": { "type": "boolean", "title": "Homomer", "description": "Enable homomer symmetric design for multi-chain proteins (default: False)", "default": false }, "ca_only": { "type": "boolean", "title": "Ca Only", "description": "Use Cα-only mode for backbone representation (default: False)", "default": false } }, "type": "object", "required": ["pdb_path"], "title": "ProteinMPNNInput", "description": "Input for ProteinMPNN sequence design" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "proteinmpnn-sequence-design" }] }, { "path": "/api/tools/predict/rfdiffusion-design", "methods": [{ "method": "post", "operationId": "rfdiffusion_protein_design", "summary": "Rfdiffusion Design", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "input_pdb": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Input Pdb", "description": "OSS URL to input PDB file (optional for unconditional generation)" }, "contig": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Contig", "description": "Contig specification string (e.g., 'A10-20,80' for motif scaffolding)" }, "num_designs": { "type": "integer", "title": "Num Designs", "description": "Number of designs to generate (default: 1)", "default": 1 }, "length": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Length", "description": "Total design length constraint (e.g., '100' or '80-120')" }, "hotspots": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Hotspots", "description": "Hotspot residues specification for binder design (e.g., 'A10,A15,A20')" }, "partial_t": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Partial T", "description": "Noise level for partial diffusion in Angstroms (e.g., 5.0-15.0)" }, "T": { "type": "integer", "title": "T", "description": "Number of diffusion steps (default: 50)", "default": 50 }, "seed_offset": { "type": "integer", "title": "Seed Offset", "description": "Random seed offset (default: 0)", "default": 0 }, "recenter": { "type": "boolean", "title": "Recenter", "description": "Recenter structure (default: True)", "default": true }, "radius": { "type": "number", "title": "Radius", "description": "Radius for neighbor calculation (default: 10.0)", "default": 10 }, "num_recycles": { "type": "integer", "title": "Num Recycles", "description": "Number of recycles (default: 1)", "default": 1 }, "softmax_T": { "type": "number", "title": "Softmax T", "description": "Softmax temperature (default: 1e-5)", "default": 0.00001 }, "write_trb": { "type": "boolean", "title": "Write Trb", "description": "Write .trb files (default: True)", "default": true }, "cautious": { "type": "boolean", "title": "Cautious", "description": "Use cautious mode (default: True)", "default": true }, "align_motif": { "type": "boolean", "title": "Align Motif", "description": "Align motif (default: True)", "default": true }, "final_step": { "type": "integer", "title": "Final Step", "description": "Final diffusion step (default: 1)", "default": 1 }, "guide_scale": { "type": "number", "title": "Guide Scale", "description": "Guidance scale (default: 10.0)", "default": 10 } }, "type": "object", "required": ["input_pdb"], "title": "RFdiffusionInput", "description": "Input for RFdiffusion protein design" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "rfdiffusion-protein-design" }] }, { "path": "/api/tools/results/{tool_call_id}", "methods": [{ "method": "get", "operationId": "get_tool_result", "summary": "Get Tool Result", "description": "获取工具的异步执行结果。\n通过 API Key 鉴权。", "tags": ["tools-results"], "parameters": [{ "name": "tool_call_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Call Id" }, "type": "string" }], "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "id": { "type": "string", "title": "Id", "description": "工具结果ID" }, "session_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Session Id", "description": "会话ID" }, "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "工具调用ID" }, "tool_result": { "anyOf": [{}, { "type": "null" }], "title": "Tool Result", "description": "工具执行结果" }, "tool_name": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name", "description": "工具名称" }, "tool_name_desc": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name Desc", "description": "显示工具名称" }, "tool_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Type", "description": "工具类型" }, "tool_args": { "anyOf": [{ "additionalProperties": true, "type": "object" }, { "type": "null" }], "title": "Tool Args", "description": "工具参数" }, "status": { "description": "执行状态:pending(排队中), running(运行中), success(成功), error(错误)", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "slurm_tasks": { "items": { "properties": { "id": { "type": "string", "title": "Id", "description": "任务ID" }, "slurm_job_id": { "type": "string", "title": "Slurm Job Id", "description": "Slurm作业ID" }, "status": { "type": "string", "title": "Status", "description": "任务状态" }, "task_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Task Type", "description": "任务类型" }, "resource_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Resource Type", "description": "资源类型: GPU/CPU" }, "run_time": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Run Time", "description": "运行时长(秒)" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "该任务积分消耗" }, "started_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" } }, "type": "object", "required": ["id", "slurm_job_id", "status"], "title": "SlurmTaskInfo", "description": "Slurm任务信息(嵌入ToolResult响应)" }, "type": "array", "title": "Slurm Tasks", "description": "关联的Slurm任务列表" } }, "type": "object", "required": ["id", "tool_call_id", "status", "started_at"], "title": "ToolResultResponse", "description": "工具结果响应模型" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "get-tool-result" }] }, { "path": "/api/tools/results/{tool_call_id}/cancel", "methods": [{ "method": "post", "operationId": "cancel_tool_result", "summary": "Cancel Tool Result", "description": "取消处于 pending 或 running 状态的工具任务。\n如果工具包含 Slurm 任务,会先取消 Slurm 任务再更新状态。\n通过 API Key 鉴权。", "tags": ["tools-results"], "parameters": [{ "name": "tool_call_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Call Id" }, "type": "string" }], "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "id": { "type": "string", "title": "Id", "description": "工具结果ID" }, "session_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Session Id", "description": "会话ID" }, "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "工具调用ID" }, "tool_result": { "anyOf": [{}, { "type": "null" }], "title": "Tool Result", "description": "工具执行结果" }, "tool_name": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name", "description": "工具名称" }, "tool_name_desc": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name Desc", "description": "显示工具名称" }, "tool_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Type", "description": "工具类型" }, "tool_args": { "anyOf": [{ "additionalProperties": true, "type": "object" }, { "type": "null" }], "title": "Tool Args", "description": "工具参数" }, "status": { "description": "执行状态:pending(排队中), running(运行中), success(成功), error(错误)", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "slurm_tasks": { "items": { "properties": { "id": { "type": "string", "title": "Id", "description": "任务ID" }, "slurm_job_id": { "type": "string", "title": "Slurm Job Id", "description": "Slurm作业ID" }, "status": { "type": "string", "title": "Status", "description": "任务状态" }, "task_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Task Type", "description": "任务类型" }, "resource_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Resource Type", "description": "资源类型: GPU/CPU" }, "run_time": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Run Time", "description": "运行时长(秒)" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "该任务积分消耗" }, "started_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" } }, "type": "object", "required": ["id", "slurm_job_id", "status"], "title": "SlurmTaskInfo", "description": "Slurm任务信息(嵌入ToolResult响应)" }, "type": "array", "title": "Slurm Tasks", "description": "关联的Slurm任务列表" } }, "type": "object", "required": ["id", "tool_call_id", "status", "started_at"], "title": "ToolResultResponse", "description": "工具结果响应模型" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "cancel-tool-result" }] }, { "path": "/api/tools/upload/base64", "methods": [{ "method": "post", "operationId": "upload_file_base64", "summary": "Upload File Base64", "description": "上传 Base64 编码的文件到存储系统。\n用于 Agent 在调用分析工具前上传本地文件并获取 URL。", "tags": ["tools-upload"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "filename": { "type": "string", "title": "Filename", "description": "文件名,例如 'protein.fasta'" }, "content_base64": { "type": "string", "title": "Content Base64", "description": "文件的 Base64 编码内容" } }, "type": "object", "required": ["filename", "content_base64"], "title": "MCPUploadFileRequest" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "upload-file-base-64" }] }] };
|
|
18
|
+
console.log(`Searching for "${keyword}" in API operations...\n`);
|
|
19
|
+
let found = false;
|
|
20
|
+
spec.paths.forEach((p) => {
|
|
21
|
+
p.methods.forEach((m) => {
|
|
22
|
+
const searchText = `${m.commandName} ${m.operationId} ${m.summary || ''} ${m.description || ''} ${(m.tags || []).join(' ')}`.toLowerCase();
|
|
23
|
+
if (searchText.includes(keyword.toLowerCase())) {
|
|
24
|
+
console.log(`- ${m.commandName.padEnd(30)} [${m.method.toUpperCase()}] ${p.path}`);
|
|
25
|
+
if (m.summary)
|
|
26
|
+
console.log(` Summary: ${m.summary}`);
|
|
27
|
+
found = true;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
if (!found)
|
|
32
|
+
console.log('No matching operations found.');
|
|
33
|
+
});
|
|
34
|
+
// System command: Show Configuration
|
|
35
|
+
program
|
|
36
|
+
.command('config')
|
|
37
|
+
.description('Show current CLI configuration')
|
|
38
|
+
.action(() => {
|
|
39
|
+
console.log('Current Configuration:');
|
|
40
|
+
console.log(`- Base URL: ${baseUrl}`);
|
|
41
|
+
console.log(`- Base URL Env Var: API_BASE_URL`);
|
|
42
|
+
const authVars = ["API_BEARER_TOKEN"];
|
|
43
|
+
if (authVars.length > 0) {
|
|
44
|
+
console.log('\nAuthentication Environment Variables:');
|
|
45
|
+
authVars.forEach(v => console.log(`- ${v}`));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
// System command: Export Tools JSON (for LLM Function Calling)
|
|
49
|
+
program
|
|
50
|
+
.command('export-tools-json')
|
|
51
|
+
.description('Export API definitions as JSON for LLM tool calling')
|
|
52
|
+
.action(() => {
|
|
53
|
+
const spec = { "info": { "title": "VenusFactory MCP Server", "description": "Standalone MCP server for VenusFactory protein tools", "version": "0.5.0" }, "securitySchemes": [{ "name": "HTTPBearer", "type": "bearer", "envVarName": "BEARER_TOKEN" }], "paths": [{ "path": "/api/tools/predict/functional-residue", "methods": [{ "method": "post", "operationId": "predict_functional_residue", "summary": "Functional Residue", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file" }, "model_name": { "type": "string", "title": "Model Name", "description": "Model name for function prediction, Optional model names: ESM2-650M, Ankh-large, ProtT5-xl-uniref50 ", "default": "ESM2-650M" }, "task": { "type": "string", "title": "Task", "description": "Task: Activity Site, Binding Site, Conserved Site, Motif", "default": "Activity Site" } }, "type": "object", "title": "ResidueFunctionPredictionInput", "description": "Input for functional residue prediction" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "predict-functional-residue" }] }, { "path": "/api/tools/predict/venusx-functional-residue", "methods": [{ "method": "post", "operationId": "venusx_functional_residue_prediction", "summary": "Venusx Functional Residue", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file" }, "task": { "type": "string", "title": "Task", "description": "VenusX task: VenusX-Activity (activity site), VenusX-Binding (binding site), VenusX-Evo (conserved site)", "default": "VenusX-Activity" }, "mode": { "type": "string", "title": "Mode", "description": "Model mode: pro uses Ankh-large (default), light uses ESM2-650M. Model is read from venusx_config.yaml", "default": "pro" } }, "type": "object", "title": "VenusXFunctionalResiduePredictionInput", "description": "Input for VenusX functional site prediction. Uses venusx_config.yaml; default mode=pro." }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusx-functional-residue-prediction" }] }, { "path": "/api/tools/predict/venusg-protein-function", "methods": [{ "method": "post", "operationId": "venusg_protein_function_prediction", "summary": "Venusg Protein Function", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file" }, "task": { "type": "string", "title": "Task", "description": "VenusG task: VenusG-Solubility, VenusG-SubcellularLocalization, VenusG-MembraneProtein, VenusG-Metalionbinding, VenusG-Stability, VenusG-Sortingsignal, VenusG-OptimumTemperature, VenusG-Kcat, VenusG-OptimalPH", "default": "VenusG-Solubility" }, "mode": { "type": "string", "title": "Mode", "description": "Model mode: pro uses ESM2-650M, light uses ProtBert (default). Model is read from venusg_config.yaml", "default": "light" } }, "type": "object", "title": "VenusGProteinFunctionPredictionInput", "description": "Input for VenusG protein-level function prediction. Uses venusg_config.yaml; pro=ESM2-650M, light=ProtBert." }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusg-protein-function-prediction" }] }, { "path": "/api/tools/predict/protein-properties", "methods": [{ "method": "post", "operationId": "predict_protein_properties", "summary": "Protein Properties", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to PDB structure file or FASTA file" }, "task_name": { "type": "string", "title": "Task Name", "description": "Task name: Physical and chemical properties, Relative solvent accessible surface area (PDB only), SASA value (PDB only), Secondary structure (PDB only)", "default": "Physical and chemical properties" } }, "type": "object", "title": "ProteinPropertiesInput", "description": "Input for protein properties generation" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "predict-protein-properties" }] }, { "path": "/api/tools/predict/esmfold", "methods": [{ "method": "post", "operationId": "esmfold_protein_folding", "summary": "Esmfold Folding", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "sequence": { "type": "string", "title": "Sequence", "description": "Protein sequence in single letter amino acid code" }, "verbose": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Verbose", "description": "Whether to print detailed information", "default": true } }, "type": "object", "required": ["sequence"], "title": "ProteinStructurePredictionInput", "description": "Input for protein structure prediction based on ESMFold" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "esmfold-protein-folding" }] }, { "path": "/api/tools/predict/alphafold", "methods": [{ "method": "post", "operationId": "alphafold_protein_folding", "summary": "Alphafold Folding", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "model_version": { "type": "string", "title": "Model Version", "description": "AlphaFold version to use: 'alphafold2' or 'alphafold3'", "default": "alphafold2" }, "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code (for simple single-chain prediction)" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file (.fasta, .fa, or .faa) (for simple single/multi-chain prediction)" }, "sequences": { "anyOf": [{ "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" }], "title": "Sequences", "description": "List of sequence entities for multi-chain prediction. For AlphaFold2: Only protein chains are supported (DNA/RNA/ligands ignored). For AlphaFold3: Full support for proteins, DNA, RNA, and ligands. Each entity can be: {'protein': {'id': 'A', 'sequence': 'PVLSCGEWQL', 'description': 'Chain A', 'modifications': [{'ptmType': 'HY3', 'ptmPosition': 1}], 'unpairedMsa': '...', 'pairedMsa': '...', 'templates': [...]}} {'dna': {'id': 'C', 'sequence': 'GACCTCT', 'modifications': [{'modificationType': '6OG', 'basePosition': 1}], 'unpairedMsa': '...'}} (AF3 only) {'rna': {'id': 'E', 'sequence': 'AGCU', 'modifications': [{'modificationType': '2MG', 'basePosition': 1}], 'unpairedMsa': '...'}} (AF3 only) {'ligand': {'id': ['F', 'G'], 'ccdCodes': ['ATP']}} or {'ligand': {'id': 'Z', 'smiles': 'CC(=O)OC1C[NH+]2CCC1CC2'}} (AF3 only)" }, "model_seeds": { "anyOf": [{ "items": { "type": "integer" }, "type": "array" }, { "type": "null" }], "title": "Model Seeds", "description": "Random seeds for AlphaFold3 prediction (default: [42])", "default": [42] } }, "type": "object", "title": "AlphaFoldInput", "description": "Input for AlphaFold2/3 protein structure prediction" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "alphafold-protein-folding" }] }, { "path": "/api/tools/predict/diffdock", "methods": [{ "method": "post", "operationId": "diffdock_protein_ligand_docking", "summary": "Diffdock Docking", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "protein_path": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Protein Path", "description": "OSS URL to protein PDB file" }, "protein_sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Protein Sequence", "description": "Protein sequence (will be folded using ESMFold if protein_path not provided)" }, "ligand": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Ligand", "description": "Ligand SMILES string or OSS URL to ligand file (.sdf, .mol2, etc.)" }, "protein_ligand_csv": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Protein Ligand Csv", "description": "OSS URL to CSV file containing multiple protein-ligand pairs with columns: complex_name, protein_path, ligand_description, protein_sequence" }, "num_poses": { "type": "integer", "title": "Num Poses", "description": "Number of poses to generate per complex (default: 10)", "default": 10 } }, "type": "object", "title": "DiffDockInput", "description": "Input for DiffDock protein-ligand docking prediction" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "diffdock-protein-ligand-docking" }] }, { "path": "/api/tools/predict/venusrem-mutation", "methods": [{ "method": "post", "operationId": "venusrem_mutation_prediction", "summary": "Venusrem Mutation", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "task": { "type": "string", "title": "Task", "description": "Prediction task: activity, binding, stability, expression, general (see venusrem_config.yaml)" }, "mode": { "type": "string", "title": "Mode", "description": "Model mode: pro for structure-based multi-model, light for sequence-based multi-model" }, "structure_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Structure File", "description": "OSS URL to structure file (required when mode=pro)" }, "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Protein sequence in single letter amino acid code (for mode=light)" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file (for mode=light)" }, "config": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Config", "description": "Path to venusrem_config.yaml file (optional)" } }, "type": "object", "required": ["task", "mode"], "title": "VenusREMInput", "description": "Input for VenusREM multi-model mutation prediction (pro/light)" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusrem-mutation-prediction" }] }, { "path": "/api/tools/predict/venusprime-multipoint", "methods": [{ "method": "post", "operationId": "venusprime_multipoint_prediction", "summary": "Venusprime Multipoint", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "mode": { "type": "string", "title": "Mode", "description": "Operation mode: 'train' to train models from experimental data, 'inference' to predict multi-point mutations using trained models", "default": "inference" }, "venus_mode": { "type": "string", "title": "Venus Mode", "description": "Model mode: 'light' for ridge regression (default), 'pro' for sesnet (not implemented yet)", "default": "light" }, "sequence": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sequence", "description": "Wild-type protein sequence (required for train mode if fasta_file not provided)" }, "fasta_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Fasta File", "description": "OSS URL to FASTA file with wild-type sequence (required for train mode if sequence not provided)" }, "experiment_file": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Experiment File", "description": "OSS URL to CSV file with 'mutant' and 'score' columns for training (required for train mode)" }, "score_col_name": { "type": "string", "title": "Score Col Name", "description": "Name of score column in experiment_file to train" }, "model_path_list": { "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], "title": "Model Path List", "description": "List of trained model file paths or OSS URLs (required for inference mode)" }, "site": { "anyOf": [{ "items": { "type": "integer" }, "type": "array" }, { "type": "null" }], "title": "Site", "description": "Mutation site numbers for combination mutations in inference mode (default: [2, 3, 4])", "default": [2, 3, 4] }, "model_num": { "type": "integer", "title": "Model Num", "description": "Number of ensemble models to train (for train mode, default: 5)", "default": 5 }, "batch_size": { "type": "integer", "title": "Batch Size", "description": "Batch size for embedding extraction during training (for train mode, default: 4)", "default": 4 }, "inference_batch_size": { "type": "integer", "title": "Inference Batch Size", "description": "Batch size for embedding extraction during inference (for inference mode, default: 32)", "default": 32 }, "config": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Config", "description": "Path to VenusPrime config YAML file (optional, default: venusprime_config.yaml in script directory)" }, "target_server": { "type": "string", "title": "Target Server", "description": "Target server for job submission: 'slurm' or 'paracloud'", "default": "slurm" } }, "type": "object", "title": "VenusPrimeInput", "description": "Input for VenusPrime multi-point combination mutation prediction (light=ridge regression, pro=reserved)" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusprime-multipoint-prediction" }] }, { "path": "/api/tools/predict/gromacs-md", "methods": [{ "method": "post", "operationId": "gromacs_md", "summary": "Gromacs Md", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "pdb_file": { "type": "string", "title": "Pdb File", "description": "OSS URL to input PDB file" }, "force_field": { "type": "string", "title": "Force Field", "description": "Force field name (default: amber99sb-ildn)", "default": "amber99sb-ildn" }, "water_model": { "type": "string", "title": "Water Model", "description": "Water model (default: tip3p)", "default": "tip3p" }, "temp": { "type": "string", "title": "Temp", "description": "Temperature in K (default: 300)", "default": "300" }, "pressure": { "type": "string", "title": "Pressure", "description": "Pressure in bar (default: 1.0)", "default": "1.0" }, "md_steps": { "type": "string", "title": "Md Steps", "description": "Production MD steps (default: 50000, ~100ns at dt=2fs)", "default": "50000" } }, "type": "object", "required": ["pdb_file"], "title": "GromacsMdInput", "description": "Input for GROMACS MD (build system + production simulation)" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "gromacs-md" }] }, { "path": "/api/tools/predict/gromacs-analysis", "methods": [{ "method": "post", "operationId": "gromacs_analysis", "summary": "Gromacs Analysis", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "tpr_file": { "type": "string", "title": "Tpr File", "description": "OSS URL to .tpr file (from gromacs_md output)" }, "xtc_file": { "type": "string", "title": "Xtc File", "description": "OSS URL to .xtc file (from gromacs_md output)" } }, "type": "object", "required": ["tpr_file", "xtc_file"], "title": "GromacsAnalysisInput", "description": "Input for GROMACS trajectory analysis" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "gromacs-analysis" }] }, { "path": "/api/tools/predict/venusmine-mining", "methods": [{ "method": "post", "operationId": "venusmine_protein_mining", "summary": "Venusmine Mining", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "pdb_file": { "type": "string", "title": "Pdb File", "description": "OSS URL to input PDB file" }, "target_server": { "type": "string", "title": "Target Server", "description": "Target server: 'slurm' for local Slurm cluster, 'paracloud' for remote Paracloud execution (default: 'slurm')", "default": "slurm" } }, "type": "object", "required": ["pdb_file"], "title": "VenusMineInput", "description": "Input for VenusMine protein mining pipeline" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "venusmine-protein-mining" }] }, { "path": "/api/tools/predict/proteinmpnn-design", "methods": [{ "method": "post", "operationId": "proteinmpnn_sequence_design", "summary": "Proteinmpnn Design", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "pdb_path": { "type": "string", "title": "Pdb Path", "description": "OSS URL to input PDB file" }, "designed_chains": { "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], "title": "Designed Chains", "description": "Chain IDs to design (e.g., ['A', 'B']). If None, designs all chains" }, "fixed_chains": { "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], "title": "Fixed Chains", "description": "Chain IDs to keep fixed (e.g., ['C', 'D'])" }, "num_sequences": { "type": "integer", "title": "Num Sequences", "description": "Number of sequences to generate (default: 4)", "default": 4 }, "temperatures": { "items": { "type": "number" }, "type": "array", "title": "Temperatures", "description": "Sampling temperatures for sequence generation (default: [0.1])", "default": [0.1] }, "omit_aas": { "type": "string", "title": "Omit Aas", "description": "Amino acids to omit from design (default: 'X')", "default": "X" }, "homomer": { "type": "boolean", "title": "Homomer", "description": "Enable homomer symmetric design for multi-chain proteins (default: False)", "default": false }, "ca_only": { "type": "boolean", "title": "Ca Only", "description": "Use Cα-only mode for backbone representation (default: False)", "default": false } }, "type": "object", "required": ["pdb_path"], "title": "ProteinMPNNInput", "description": "Input for ProteinMPNN sequence design" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "proteinmpnn-sequence-design" }] }, { "path": "/api/tools/predict/rfdiffusion-design", "methods": [{ "method": "post", "operationId": "rfdiffusion_protein_design", "summary": "Rfdiffusion Design", "tags": ["tools-predict"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "input_pdb": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Input Pdb", "description": "OSS URL to input PDB file (optional for unconditional generation)" }, "contig": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Contig", "description": "Contig specification string (e.g., 'A10-20,80' for motif scaffolding)" }, "num_designs": { "type": "integer", "title": "Num Designs", "description": "Number of designs to generate (default: 1)", "default": 1 }, "length": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Length", "description": "Total design length constraint (e.g., '100' or '80-120')" }, "hotspots": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Hotspots", "description": "Hotspot residues specification for binder design (e.g., 'A10,A15,A20')" }, "partial_t": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Partial T", "description": "Noise level for partial diffusion in Angstroms (e.g., 5.0-15.0)" }, "T": { "type": "integer", "title": "T", "description": "Number of diffusion steps (default: 50)", "default": 50 }, "seed_offset": { "type": "integer", "title": "Seed Offset", "description": "Random seed offset (default: 0)", "default": 0 }, "recenter": { "type": "boolean", "title": "Recenter", "description": "Recenter structure (default: True)", "default": true }, "radius": { "type": "number", "title": "Radius", "description": "Radius for neighbor calculation (default: 10.0)", "default": 10 }, "num_recycles": { "type": "integer", "title": "Num Recycles", "description": "Number of recycles (default: 1)", "default": 1 }, "softmax_T": { "type": "number", "title": "Softmax T", "description": "Softmax temperature (default: 1e-5)", "default": 0.00001 }, "write_trb": { "type": "boolean", "title": "Write Trb", "description": "Write .trb files (default: True)", "default": true }, "cautious": { "type": "boolean", "title": "Cautious", "description": "Use cautious mode (default: True)", "default": true }, "align_motif": { "type": "boolean", "title": "Align Motif", "description": "Align motif (default: True)", "default": true }, "final_step": { "type": "integer", "title": "Final Step", "description": "Final diffusion step (default: 1)", "default": 1 }, "guide_scale": { "type": "number", "title": "Guide Scale", "description": "Guidance scale (default: 10.0)", "default": 10 } }, "type": "object", "required": ["input_pdb"], "title": "RFdiffusionInput", "description": "Input for RFdiffusion protein design" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "rfdiffusion-protein-design" }] }, { "path": "/api/tools/results/{tool_call_id}", "methods": [{ "method": "get", "operationId": "get_tool_result", "summary": "Get Tool Result", "description": "获取工具的异步执行结果。\n通过 API Key 鉴权。", "tags": ["tools-results"], "parameters": [{ "name": "tool_call_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Call Id" }, "type": "string" }], "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "id": { "type": "string", "title": "Id", "description": "工具结果ID" }, "session_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Session Id", "description": "会话ID" }, "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "工具调用ID" }, "tool_result": { "anyOf": [{}, { "type": "null" }], "title": "Tool Result", "description": "工具执行结果" }, "tool_name": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name", "description": "工具名称" }, "tool_name_desc": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name Desc", "description": "显示工具名称" }, "tool_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Type", "description": "工具类型" }, "tool_args": { "anyOf": [{ "additionalProperties": true, "type": "object" }, { "type": "null" }], "title": "Tool Args", "description": "工具参数" }, "status": { "description": "执行状态:pending(排队中), running(运行中), success(成功), error(错误)", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "slurm_tasks": { "items": { "properties": { "id": { "type": "string", "title": "Id", "description": "任务ID" }, "slurm_job_id": { "type": "string", "title": "Slurm Job Id", "description": "Slurm作业ID" }, "status": { "type": "string", "title": "Status", "description": "任务状态" }, "task_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Task Type", "description": "任务类型" }, "resource_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Resource Type", "description": "资源类型: GPU/CPU" }, "run_time": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Run Time", "description": "运行时长(秒)" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "该任务积分消耗" }, "started_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" } }, "type": "object", "required": ["id", "slurm_job_id", "status"], "title": "SlurmTaskInfo", "description": "Slurm任务信息(嵌入ToolResult响应)" }, "type": "array", "title": "Slurm Tasks", "description": "关联的Slurm任务列表" } }, "type": "object", "required": ["id", "tool_call_id", "status", "started_at"], "title": "ToolResultResponse", "description": "工具结果响应模型" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "get-tool-result" }] }, { "path": "/api/tools/results/{tool_call_id}/cancel", "methods": [{ "method": "post", "operationId": "cancel_tool_result", "summary": "Cancel Tool Result", "description": "取消处于 pending 或 running 状态的工具任务。\n如果工具包含 Slurm 任务,会先取消 Slurm 任务再更新状态。\n通过 API Key 鉴权。", "tags": ["tools-results"], "parameters": [{ "name": "tool_call_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Call Id" }, "type": "string" }], "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "id": { "type": "string", "title": "Id", "description": "工具结果ID" }, "session_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Session Id", "description": "会话ID" }, "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "工具调用ID" }, "tool_result": { "anyOf": [{}, { "type": "null" }], "title": "Tool Result", "description": "工具执行结果" }, "tool_name": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name", "description": "工具名称" }, "tool_name_desc": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Name Desc", "description": "显示工具名称" }, "tool_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tool Type", "description": "工具类型" }, "tool_args": { "anyOf": [{ "additionalProperties": true, "type": "object" }, { "type": "null" }], "title": "Tool Args", "description": "工具参数" }, "status": { "description": "执行状态:pending(排队中), running(运行中), success(成功), error(错误)", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "slurm_tasks": { "items": { "properties": { "id": { "type": "string", "title": "Id", "description": "任务ID" }, "slurm_job_id": { "type": "string", "title": "Slurm Job Id", "description": "Slurm作业ID" }, "status": { "type": "string", "title": "Status", "description": "任务状态" }, "task_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Task Type", "description": "任务类型" }, "resource_type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Resource Type", "description": "资源类型: GPU/CPU" }, "run_time": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Run Time", "description": "运行时长(秒)" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "该任务积分消耗" }, "started_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Started At", "description": "开始时间" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "title": "Completed At", "description": "完成时间" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "错误信息" } }, "type": "object", "required": ["id", "slurm_job_id", "status"], "title": "SlurmTaskInfo", "description": "Slurm任务信息(嵌入ToolResult响应)" }, "type": "array", "title": "Slurm Tasks", "description": "关联的Slurm任务列表" } }, "type": "object", "required": ["id", "tool_call_id", "status", "started_at"], "title": "ToolResultResponse", "description": "工具结果响应模型" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "cancel-tool-result" }] }, { "path": "/api/tools/upload/base64", "methods": [{ "method": "post", "operationId": "upload_file_base64", "summary": "Upload File Base64", "description": "上传 Base64 编码的文件到存储系统。\n用于 Agent 在调用分析工具前上传本地文件并获取 URL。", "tags": ["tools-upload"], "parameters": [], "requestBody": { "required": true, "contentType": "application/json", "schema": { "properties": { "filename": { "type": "string", "title": "Filename", "description": "文件名,例如 'protein.fasta'" }, "content_base64": { "type": "string", "title": "Content Base64", "description": "文件的 Base64 编码内容" } }, "type": "object", "required": ["filename", "content_base64"], "title": "MCPUploadFileRequest" }, "isBinary": false }, "responses": [{ "statusCode": "200", "description": "Successful Response", "contentType": "application/json", "schema": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id", "description": "系统生成的调用唯一ID" }, "status": { "description": "调用状态: running, success, error 等", "type": "string", "enum": ["pending", "running", "success", "error"], "title": "ToolResultStatus" }, "result": { "anyOf": [{}, { "type": "null" }], "title": "Result", "description": "如果即时成功,这里是工具的返回结果字典" }, "error_message": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Error Message", "description": "如果有错误,提供错误信息" }, "credits_cost": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Credits Cost", "description": "消费积分" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "执行的工具名" } }, "type": "object", "required": ["tool_call_id", "status", "tool_name"], "title": "ToolInvokeResponse" }, "isBinary": false }, { "statusCode": "422", "description": "Validation Error", "contentType": "application/json", "schema": { "properties": { "detail": { "items": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "isBinary": false }], "security": ["HTTPBearer"], "commandName": "upload-file-base-64" }] }] };
|
|
54
|
+
// Helper to simplify schema for LLM
|
|
55
|
+
const simplifySchema = (schema) => {
|
|
56
|
+
if (!schema)
|
|
57
|
+
return { type: 'string' };
|
|
58
|
+
if (schema.type === 'object' && schema.properties) {
|
|
59
|
+
const properties = {};
|
|
60
|
+
for (const [key, prop] of Object.entries(schema.properties)) {
|
|
61
|
+
properties[key] = simplifySchema(prop);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties,
|
|
66
|
+
required: schema.required,
|
|
67
|
+
description: schema.description
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (schema.type === 'array' && schema.items) {
|
|
71
|
+
return {
|
|
72
|
+
type: 'array',
|
|
73
|
+
items: simplifySchema(schema.items),
|
|
74
|
+
description: schema.description
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
type: schema.type || 'string',
|
|
79
|
+
description: schema.description,
|
|
80
|
+
enum: schema.enum
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const tools = spec.paths.flatMap((p) => p.methods.map((m) => {
|
|
84
|
+
const properties = {};
|
|
85
|
+
const required = [];
|
|
86
|
+
// Map parameters
|
|
87
|
+
m.parameters.forEach((param) => {
|
|
88
|
+
properties[param.name] = {
|
|
89
|
+
type: param.type === 'number' ? 'number' : (param.type === 'boolean' ? 'boolean' : 'string'),
|
|
90
|
+
description: param.description || '',
|
|
91
|
+
};
|
|
92
|
+
if (param.required)
|
|
93
|
+
required.push(param.name);
|
|
94
|
+
});
|
|
95
|
+
// Map request body if present
|
|
96
|
+
if (m.requestBody && m.requestBody.schema) {
|
|
97
|
+
const bodySchema = simplifySchema(m.requestBody.schema);
|
|
98
|
+
if (bodySchema.type === 'object' && bodySchema.properties) {
|
|
99
|
+
// Flatten simple objects or keep as 'body'
|
|
100
|
+
properties['body'] = bodySchema;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
properties['body'] = bodySchema;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
type: 'function',
|
|
108
|
+
function: {
|
|
109
|
+
name: m.operationId,
|
|
110
|
+
description: m.summary || m.description || `Execute ${m.method.toUpperCase()} on ${p.path}`,
|
|
111
|
+
parameters: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
properties,
|
|
114
|
+
required: required.length > 0 ? required : undefined,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
}));
|
|
119
|
+
console.log(JSON.stringify(tools, null, 2));
|
|
120
|
+
});
|
|
121
|
+
// Create API client with base URL and auth
|
|
122
|
+
const baseUrl = process.env.API_BASE_URL || 'venus.matwings.com';
|
|
123
|
+
// Register all commands
|
|
124
|
+
(0, commands_1.registerCommands)(program, baseUrl);
|
|
125
|
+
program.parse();
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated types from OpenAPI specification
|
|
3
|
+
// This file contains type definitions for API responses and requests
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
// Placeholder for generated types from schemas
|
|
6
|
+
// In future versions, this will include types extracted from components.schemas
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "matvenus-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Standalone MCP client for VenusFactory protein tools",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"matvenus-cli": "bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"author": "matwings",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/matwings/matwings-venus-cli"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"venus",
|
|
16
|
+
"matwings",
|
|
17
|
+
"matvenus",
|
|
18
|
+
"protein",
|
|
19
|
+
"bio"
|
|
20
|
+
],
|
|
21
|
+
"license": "Apache-2.0",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"bin",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"CHANGELOG.md"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"start": "node dist/index.js",
|
|
32
|
+
"prepublishOnly": "npm run build"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"commander": "^12.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^20.10.0",
|
|
39
|
+
"typescript": "^5.3.0"
|
|
40
|
+
}
|
|
41
|
+
}
|