{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "SuccessEnvelope", "description": "Versioned successful response.", "type": "object", "properties": { "data": { "description": "Operation-specific result.", "$ref": "#/$defs/InlineOrArtifact" }, "kind": { "type": "string", "const": "doctor" }, "provenance": { "description": "Reproducibility and execution context.", "$ref": "#/$defs/ToolProvenance" }, "schema_version": { "type": "integer", "const": 1 }, "warnings": { "description": "Deduplicated stable warnings.", "type": "array", "items": { "$ref": "#/$defs/Warning" } } }, "required": [ "schema_version", "kind", "provenance", "data", "warnings" ], "$defs": { "AnalysisStoreComponent": { "description": "Diagnosed Analysis Store.", "type": "object", "properties": { "path": { "description": "Resolved absolute store path.", "$ref": "#/$defs/TaggedPath" }, "source": { "description": "Resolution precedence source.", "$ref": "#/$defs/StoreSource" }, "status": { "description": "Stable readiness classification.", "$ref": "#/$defs/ComponentStatus" }, "usage": { "description": "Complete non-following store usage scan.", "$ref": "#/$defs/StorageUsage" } }, "required": [ "status", "path", "source", "usage" ] }, "AnalysisStoreProvenance": { "description": "Analysis Store provenance.", "type": "object", "properties": { "path": { "description": "Tagged absolute store path.", "$ref": "#/$defs/TaggedPath" }, "source": { "description": "Store resolution source.", "$ref": "#/$defs/StoreSource" } }, "required": [ "path", "source" ] }, "ArtifactDescriptor": { "description": "Artifact descriptor returned instead of oversized inline data.", "type": "object", "properties": { "bytes": { "description": "Exact file bytes including trailing LF.", "type": "integer", "format": "uint64", "minimum": 0 }, "contains": { "description": "Always `complete_success_response`.", "type": "string" }, "media_type": { "description": "Always `application/json`.", "type": "string" }, "path": { "description": "Tagged absolute Artifact path.", "$ref": "#/$defs/TaggedPath" }, "sha256": { "description": "SHA-256 of exact file bytes.", "$ref": "#/$defs/Digest" } }, "required": [ "path", "bytes", "sha256", "media_type", "contains" ] }, "ComponentStatus": { "description": "Doctor component readiness classification.", "oneOf": [ { "description": "Component is usable.", "type": "string", "const": "ready" }, { "description": "Component is absent.", "type": "string", "const": "missing" }, { "description": "Component version is unsupported.", "type": "string", "const": "incompatible" }, { "description": "Component configuration is invalid.", "type": "string", "const": "invalid" }, { "description": "Component storage cannot be written.", "type": "string", "const": "unwritable" } ] }, "Digest": { "description": "A lowercase SHA-256 digest.", "type": "string" }, "DoctorComponents": { "description": "Fixed installation components checked safely by `doctor`.", "type": "object", "properties": { "analysis_store": { "description": "Analysis Store.", "$ref": "#/$defs/AnalysisStoreComponent" }, "ghidra": { "description": "Ghidra launcher and adapter.", "$ref": "#/$defs/GhidraComponent" }, "java": { "description": "Java runtime.", "$ref": "#/$defs/JavaComponent" }, "sandbox": { "description": "Worker isolation backend.", "$ref": "#/$defs/SandboxComponent" } }, "required": [ "ghidra", "java", "analysis_store", "sandbox" ] }, "DoctorData": { "description": "Installation diagnosis data.", "type": "object", "properties": { "components": { "description": "Complete fixed component report.", "$ref": "#/$defs/DoctorComponents" }, "ready": { "description": "True only when every required component is ready.", "type": "boolean" } }, "required": [ "ready", "components" ] }, "GhidraComponent": { "description": "Diagnosed Ghidra installation.", "type": "object", "properties": { "launcher": { "description": "Configured official launcher.", "anyOf": [ { "$ref": "#/$defs/TaggedPath" }, { "type": "null" } ] }, "status": { "description": "Stable readiness classification.", "$ref": "#/$defs/ComponentStatus" }, "version": { "description": "Observed version when the probe ran.", "type": [ "string", "null" ] } }, "required": [ "status" ] }, "InlineOrArtifact": { "description": "Successful command data emitted inline or represented by a complete Artifact.", "anyOf": [ { "description": "Complete command-specific data.", "$ref": "#/$defs/DoctorData" }, { "description": "Bounded descriptor for the complete stored success response.", "$ref": "#/$defs/SpilledData" } ] }, "JavaComponent": { "description": "Diagnosed Java installation.", "type": "object", "properties": { "executable": { "description": "Configured Java executable.", "anyOf": [ { "$ref": "#/$defs/TaggedPath" }, { "type": "null" } ] }, "status": { "description": "Stable readiness classification.", "$ref": "#/$defs/ComponentStatus" }, "version": { "description": "Observed feature version.", "type": [ "string", "null" ] } }, "required": [ "status" ] }, "SandboxBackend": { "description": "Sandbox backend.", "oneOf": [ { "description": "Bubblewrap namespaces.", "type": "string", "const": "bubblewrap" }, { "description": "Caller-supplied isolation.", "type": "string", "const": "external" }, { "description": "Isolation disabled.", "type": "string", "const": "off" } ] }, "SandboxComponent": { "description": "Diagnosed sandbox backend.", "type": "object", "properties": { "backend": { "description": "Explicit selected backend.", "$ref": "#/$defs/SandboxBackend" }, "status": { "description": "Stable readiness classification.", "$ref": "#/$defs/ComponentStatus" }, "verification": { "description": "Verification state.", "$ref": "#/$defs/SandboxVerification" } }, "required": [ "status", "backend", "verification" ] }, "SandboxProvenance": { "description": "Worker sandbox provenance.", "type": "object", "properties": { "backend": { "description": "Selected backend.", "$ref": "#/$defs/SandboxBackend" }, "verification": { "description": "Isolation verification state.", "$ref": "#/$defs/SandboxVerification" } }, "required": [ "backend", "verification" ] }, "SandboxVerification": { "description": "Sandbox verification state.", "oneOf": [ { "description": "Verified by `ghidr`.", "type": "string", "const": "verified" }, { "description": "Declared but not verifiable by `ghidr`.", "type": "string", "const": "unverified" }, { "description": "Explicitly disabled.", "type": "string", "const": "disabled" } ] }, "SpilledData": { "description": "Public data shape returned when a complete success exceeds the inline byte budget.", "type": "object", "properties": { "artifact": { "description": "Immutable complete-success Artifact.", "$ref": "#/$defs/ArtifactDescriptor" }, "spilled": { "description": "Always true for this variant.", "type": "boolean" } }, "required": [ "spilled", "artifact" ] }, "StorageUsage": { "description": "Filesystem usage represented without implying freed space.", "type": "object", "properties": { "allocated_bytes": { "description": "Sum of Linux allocated blocks including directories.", "type": "integer", "format": "uint64", "minimum": 0 }, "logical_bytes": { "description": "Sum of file lengths.", "type": "integer", "format": "uint64", "minimum": 0 } }, "required": [ "logical_bytes", "allocated_bytes" ] }, "StoreSource": { "description": "Analysis Store resolution source.", "oneOf": [ { "description": "Explicit `--store` flag.", "type": "string", "const": "cli" }, { "description": "`GHIDR_STORE` environment variable.", "type": "string", "const": "environment" }, { "description": "Explicit `XDG_CACHE_HOME` fallback.", "type": "string", "const": "xdg" }, { "description": "Home-directory fallback.", "type": "string", "const": "home_fallback" } ] }, "TaggedPath": { "description": "A path preserving either UTF-8 text or exact Unix bytes.", "oneOf": [ { "description": "An unmodified UTF-8 path.", "type": "object", "properties": { "encoding": { "type": "string", "const": "utf8" }, "value": { "type": "string" } }, "required": [ "encoding", "value" ] }, { "description": "Standard padded Base64 over exact Unix path bytes.", "type": "object", "properties": { "encoding": { "type": "string", "const": "unix_bytes_base64" }, "value": { "type": "string" } }, "required": [ "encoding", "value" ] } ] }, "ToolProvenance": { "description": "Minimal provenance available to non-Sample operations.", "type": "object", "properties": { "adapter_protocol_version": { "description": "Rust/Java protocol version.", "type": "integer", "format": "uint32", "minimum": 0 }, "analysis_store": { "description": "Selected Analysis Store.", "$ref": "#/$defs/AnalysisStoreProvenance" }, "ghidr_version": { "description": "CLI package version.", "type": "string" }, "sandbox": { "description": "Selected sandbox policy.", "$ref": "#/$defs/SandboxProvenance" } }, "required": [ "ghidr_version", "adapter_protocol_version", "analysis_store", "sandbox" ] }, "Warning": { "description": "Stable non-fatal warning.", "type": "object", "properties": { "code": { "description": "Stable machine identifier.", "type": "string" }, "details": { "description": "Warning-specific context, always an object.", "type": "object", "additionalProperties": true }, "message": { "description": "Concise human context.", "type": "string" } }, "required": [ "code", "message", "details" ] } } }