mp_ensureConnection
Verify and establish a connection to WeChat Mini Program automation sessions. Configure connection settings or force reconnection when needed for development tasks.
Instructions
检查小程序自动化会话是否就绪。可选择覆盖连接设置或强制重连。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| reconnect | No |
Input Schema (JSON Schema)
{
"properties": {
"connection": {
"additionalProperties": false,
"properties": {
"account": {
"minLength": 1,
"type": "string"
},
"args": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"not": {}
}
]
},
"autoClose": {
"type": "boolean"
},
"cliPath": {
"minLength": 1,
"type": "string"
},
"cwd": {
"minLength": 1,
"type": "string"
},
"mode": {
"enum": [
"launch",
"connect"
],
"type": "string"
},
"port": {
"exclusiveMinimum": 0,
"type": "integer"
},
"projectPath": {
"minLength": 1,
"type": "string"
},
"ticket": {
"minLength": 1,
"type": "string"
},
"timeout": {
"exclusiveMinimum": 0,
"type": "integer"
},
"trustProject": {
"type": "boolean"
},
"wsEndpoint": {
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"reconnect": {
"default": false,
"type": "boolean"
}
},
"type": "object"
}