| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "title": "zxdb-cli Protocol Schema", |
| "description": "JSON schema for requests and responses in the zxdb-cli UDS protocol", |
| "version": 4, |
| "requests": { |
| "$defs": { |
| "AttachRequest": { |
| "description": "Request to attach to a process.", |
| "properties": { |
| "command": { |
| "const": "attach", |
| "default": "attach", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "filter": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "string" |
| } |
| ], |
| "title": "Filter" |
| } |
| }, |
| "required": [ |
| "filter" |
| ], |
| "title": "AttachRequest", |
| "type": "object" |
| }, |
| "ContinueRequest": { |
| "description": "Request to resume execution of a thread.", |
| "properties": { |
| "command": { |
| "const": "continue", |
| "default": "continue", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "thread_id": { |
| "title": "Thread Id", |
| "type": "integer" |
| }, |
| "single_thread": { |
| "anyOf": [ |
| { |
| "type": "boolean" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Single Thread" |
| } |
| }, |
| "required": [ |
| "thread_id" |
| ], |
| "title": "ContinueRequest", |
| "type": "object" |
| }, |
| "DetachRequest": { |
| "description": "Request to detach from a process.", |
| "properties": { |
| "command": { |
| "const": "detach", |
| "default": "detach", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "pid": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Pid" |
| }, |
| "all": { |
| "default": false, |
| "title": "All", |
| "type": "boolean" |
| } |
| }, |
| "title": "DetachRequest", |
| "type": "object" |
| }, |
| "GetStateRequest": { |
| "description": "Request current state of threads.", |
| "properties": { |
| "command": { |
| "const": "get-state", |
| "default": "get-state", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| } |
| }, |
| "title": "GetStateRequest", |
| "type": "object" |
| }, |
| "HelloRequest": { |
| "description": "Initial handshake request to verify protocol version.", |
| "properties": { |
| "command": { |
| "const": "hello", |
| "default": "hello", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "version": { |
| "title": "Version", |
| "type": "integer" |
| } |
| }, |
| "required": [ |
| "version" |
| ], |
| "title": "HelloRequest", |
| "type": "object" |
| }, |
| "PauseRequest": { |
| "description": "Request to pause execution of a thread.", |
| "properties": { |
| "command": { |
| "const": "pause", |
| "default": "pause", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "thread_id": { |
| "title": "Thread Id", |
| "type": "integer" |
| } |
| }, |
| "required": [ |
| "thread_id" |
| ], |
| "title": "PauseRequest", |
| "type": "object" |
| }, |
| "StackTraceRequest": { |
| "description": "Request stack trace for a thread.", |
| "properties": { |
| "command": { |
| "const": "stackTrace", |
| "default": "stackTrace", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "thread_id": { |
| "title": "Thread Id", |
| "type": "integer" |
| } |
| }, |
| "required": [ |
| "thread_id" |
| ], |
| "title": "StackTraceRequest", |
| "type": "object" |
| }, |
| "StartRequest": { |
| "description": "Request to start the debugging session.", |
| "properties": { |
| "command": { |
| "const": "start", |
| "default": "start", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "port": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Port" |
| }, |
| "connect": { |
| "default": false, |
| "title": "Connect", |
| "type": "boolean" |
| } |
| }, |
| "title": "StartRequest", |
| "type": "object" |
| }, |
| "StopRequest": { |
| "description": "Request to stop the daemon and session.", |
| "properties": { |
| "command": { |
| "const": "stop", |
| "default": "stop", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| } |
| }, |
| "title": "StopRequest", |
| "type": "object" |
| }, |
| "ThreadsRequest": { |
| "description": "Request list of threads.", |
| "properties": { |
| "command": { |
| "const": "threads", |
| "default": "threads", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Last Seen Seq" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| } |
| }, |
| "title": "ThreadsRequest", |
| "type": "object" |
| }, |
| "WaitForEventRequest": { |
| "description": "Request to wait for a debug adapter event.", |
| "properties": { |
| "command": { |
| "const": "wait-for-event", |
| "default": "wait-for-event", |
| "title": "Command", |
| "type": "string" |
| }, |
| "last_seen_seq": { |
| "title": "Last Seen Seq", |
| "type": "integer" |
| }, |
| "ack_seq": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Ack Seq" |
| }, |
| "timeout": { |
| "anyOf": [ |
| { |
| "type": "integer" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Timeout" |
| } |
| }, |
| "required": [ |
| "last_seen_seq" |
| ], |
| "title": "WaitForEventRequest", |
| "type": "object" |
| } |
| }, |
| "discriminator": { |
| "mapping": { |
| "attach": "#/$defs/AttachRequest", |
| "continue": "#/$defs/ContinueRequest", |
| "detach": "#/$defs/DetachRequest", |
| "get-state": "#/$defs/GetStateRequest", |
| "hello": "#/$defs/HelloRequest", |
| "pause": "#/$defs/PauseRequest", |
| "stackTrace": "#/$defs/StackTraceRequest", |
| "start": "#/$defs/StartRequest", |
| "stop": "#/$defs/StopRequest", |
| "threads": "#/$defs/ThreadsRequest", |
| "wait-for-event": "#/$defs/WaitForEventRequest" |
| }, |
| "propertyName": "command" |
| }, |
| "oneOf": [ |
| { |
| "$ref": "#/$defs/AttachRequest" |
| }, |
| { |
| "$ref": "#/$defs/ContinueRequest" |
| }, |
| { |
| "$ref": "#/$defs/DetachRequest" |
| }, |
| { |
| "$ref": "#/$defs/GetStateRequest" |
| }, |
| { |
| "$ref": "#/$defs/HelloRequest" |
| }, |
| { |
| "$ref": "#/$defs/PauseRequest" |
| }, |
| { |
| "$ref": "#/$defs/StackTraceRequest" |
| }, |
| { |
| "$ref": "#/$defs/StartRequest" |
| }, |
| { |
| "$ref": "#/$defs/StopRequest" |
| }, |
| { |
| "$ref": "#/$defs/ThreadsRequest" |
| }, |
| { |
| "$ref": "#/$defs/WaitForEventRequest" |
| } |
| ] |
| }, |
| "responses": { |
| "$defs": { |
| "GetStateResponse": { |
| "description": "Response for get-state command containing thread list and active\nprocesses.", |
| "properties": { |
| "threads": { |
| "items": { |
| "$ref": "#/$defs/ThreadInfo" |
| }, |
| "title": "Threads", |
| "type": "array" |
| }, |
| "processes": { |
| "anyOf": [ |
| { |
| "additionalProperties": { |
| "type": "string" |
| }, |
| "type": "object" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Processes" |
| } |
| }, |
| "required": [ |
| "threads" |
| ], |
| "title": "GetStateResponse", |
| "type": "object" |
| }, |
| "ThreadInfo": { |
| "description": "Information about a single thread.", |
| "properties": { |
| "id": { |
| "title": "Id", |
| "type": "integer" |
| }, |
| "name": { |
| "title": "Name", |
| "type": "string" |
| } |
| }, |
| "required": [ |
| "id", |
| "name" |
| ], |
| "title": "ThreadInfo", |
| "type": "object" |
| } |
| }, |
| "description": "Standard response wrapper.", |
| "properties": { |
| "success": { |
| "title": "Success", |
| "type": "boolean" |
| }, |
| "message": { |
| "anyOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Message" |
| }, |
| "body": { |
| "anyOf": [ |
| { |
| "$ref": "#/$defs/GetStateResponse" |
| }, |
| { |
| "additionalProperties": true, |
| "type": "object" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Body" |
| }, |
| "events": { |
| "anyOf": [ |
| { |
| "items": { |
| "additionalProperties": true, |
| "type": "object" |
| }, |
| "type": "array" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "default": null, |
| "title": "Events" |
| } |
| }, |
| "required": [ |
| "success" |
| ], |
| "title": "Response", |
| "type": "object" |
| } |
| } |