handshake S→C v2Sent immediately after the WebSocket opens. Advertises host identity, evaluator capabilities, runtime limits, and typed-command support.
{
"type": "handshake",
"protocolVersion": 2,
"host": { "name": "BepInEx", "version": "0.x", "platform": "Unity Mono" },
"evaluator": {
"name": "Mono.CSharp",
"languageVersion": "7.x",
"persistentState": true,
"supportsCompletion": true,
"cancellation": "hardAbort"
},
"availableEvaluators": ["Mono.CSharp"],
"defaultUsings": ["System"],
"helpers": ["String[] Help()"],
"control": { "supported": true, "commandsListChanged": false, "schemaValidation": false },
"limits": {
"maxMessageBytes": 4194304,
"maxQueuedCommands": 32,
"maxResultLength": 102400,
"maxEnumerableElements": 100,
"defaultEvalTimeoutMs": 10000,
"maxJobConcurrency": 1
},
"enforces": ["maxMessageBytes", "maxQueuedCommands", "maxResultLength",
"maxEnumerableElements", "maxJobConcurrency"]
} JSON Schema
{
"type": "object",
"required": [
"type",
"protocolVersion",
"host",
"evaluator",
"availableEvaluators",
"defaultUsings",
"helpers",
"control",
"limits",
"enforces"
],
"properties": {
"type": {
"type": "string",
"const": "handshake"
},
"protocolVersion": {
"type": "number",
"const": 2
},
"host": {
"type": "object",
"required": [
"name",
"version",
"platform"
],
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"platform": {
"type": "string"
}
},
"additionalProperties": false
},
"evaluator": {
"type": "object",
"required": [
"name",
"languageVersion",
"persistentState",
"supportsCompletion",
"cancellation"
],
"properties": {
"name": {
"type": "string"
},
"languageVersion": {
"type": "string"
},
"persistentState": {
"type": "boolean"
},
"supportsCompletion": {
"type": "boolean"
},
"cancellation": {
"anyOf": [
{
"type": "string",
"const": "cooperative"
},
{
"type": "string",
"const": "hardAbort"
},
{
"type": "string",
"const": "unsupported"
}
]
}
},
"additionalProperties": false
},
"availableEvaluators": {
"type": "array",
"items": {
"type": "string"
}
},
"defaultUsings": {
"type": "array",
"items": {
"type": "string"
}
},
"helpers": {
"type": "array",
"items": {
"type": "string"
}
},
"control": {
"type": "object",
"required": [
"supported",
"commandsListChanged",
"schemaValidation"
],
"properties": {
"supported": {
"type": "boolean"
},
"commandsListChanged": {
"type": "boolean"
},
"schemaValidation": {
"type": "boolean"
}
},
"additionalProperties": false
},
"limits": {
"type": "object",
"required": [
"maxMessageBytes",
"maxQueuedCommands",
"maxResultLength",
"maxEnumerableElements",
"defaultEvalTimeoutMs",
"maxJobConcurrency"
],
"properties": {
"maxMessageBytes": {
"type": "integer",
"minimum": 1
},
"maxQueuedCommands": {
"type": "integer",
"minimum": 0
},
"maxResultLength": {
"type": "integer",
"minimum": 1
},
"maxEnumerableElements": {
"type": "integer",
"minimum": 1
},
"defaultEvalTimeoutMs": {
"type": "integer",
"minimum": 1
},
"maxJobConcurrency": {
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false
},
"enforces": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "maxMessageBytes"
},
{
"type": "string",
"const": "maxQueuedCommands"
},
{
"type": "string",
"const": "maxResultLength"
},
{
"type": "string",
"const": "maxEnumerableElements"
},
{
"type": "string",
"const": "maxJobConcurrency"
}
]
}
}
},
"additionalProperties": false
}