Files
MeshChatX/docs/sep_manifest.schema.json
T

287 lines
8.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://meshchatx.com/schemas/sep_manifest.schema.json",
"title": "MeshChatX Sidecar Extension Protocol Manifest",
"description": "Draft schema for SEP v1 extension manifest files.",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"id",
"name",
"version",
"apiVersion",
"trustLevel",
"entrypoint",
"permissions",
"health",
"limits"
],
"properties": {
"schemaVersion": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"id": {
"type": "string",
"pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)+$",
"minLength": 3,
"maxLength": 128
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"description": {
"type": "string",
"maxLength": 512
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][A-Za-z0-9._-]+)?$"
},
"apiVersion": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"trustLevel": {
"type": "string",
"enum": ["first_party", "trusted_third_party", "untrusted_local"]
},
"platformProfile": {
"type": "string",
"enum": ["desktop", "android"]
},
"entrypoint": {
"type": "object",
"additionalProperties": false,
"required": ["command", "args"],
"properties": {
"command": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"args": {
"type": "array",
"items": {
"type": "string",
"maxLength": 2048
},
"maxItems": 64
},
"workingDirectory": {
"type": "string",
"maxLength": 512
},
"environment": {
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Z_][A-Z0-9_]*$"
},
"additionalProperties": {
"type": "string",
"maxLength": 4096
},
"maxProperties": 64
}
}
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"messages.read",
"messages.send",
"contacts.read",
"events.subscribe",
"tools.register",
"notifications.create"
]
},
"minItems": 0,
"maxItems": 64,
"uniqueItems": true
},
"events": {
"type": "object",
"additionalProperties": false,
"properties": {
"subscribe": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9]+(?:\\.[a-z0-9]+)+$",
"maxLength": 128
},
"maxItems": 256,
"uniqueItems": true
}
}
},
"health": {
"type": "object",
"additionalProperties": false,
"required": ["startupTimeoutMs", "heartbeatIntervalMs", "unhealthyAfterMissedHeartbeats"],
"properties": {
"startupTimeoutMs": {
"type": "integer",
"minimum": 1000,
"maximum": 120000
},
"heartbeatIntervalMs": {
"type": "integer",
"minimum": 1000,
"maximum": 120000
},
"unhealthyAfterMissedHeartbeats": {
"type": "integer",
"minimum": 1,
"maximum": 20
}
}
},
"limits": {
"type": "object",
"additionalProperties": false,
"required": ["maxRequestBytes", "maxRequestsPerSecond", "maxConcurrentRequests"],
"properties": {
"maxRequestBytes": {
"type": "integer",
"minimum": 1024,
"maximum": 4194304
},
"maxRequestsPerSecond": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"maxConcurrentRequests": {
"type": "integer",
"minimum": 1,
"maximum": 1024
}
}
},
"ui": {
"type": "object",
"additionalProperties": false,
"properties": {
"toolPanels": {
"type": "array",
"maxItems": 32,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "title", "slot"],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$",
"maxLength": 128
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"slot": {
"type": "string",
"enum": ["tools.page.primary", "tools.page.secondary", "tools.page.advanced"]
}
}
}
}
}
},
"compatibility": {
"type": "object",
"additionalProperties": false,
"properties": {
"meshchatx": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"platforms": {
"type": "array",
"items": {
"type": "string",
"enum": [
"linux-x64",
"linux-arm64",
"windows-x64",
"windows-arm64",
"macos-x64",
"macos-arm64",
"android-arm64"
]
},
"uniqueItems": true,
"maxItems": 16
}
}
},
"android": {
"type": "object",
"additionalProperties": false,
"required": ["runtimeMode", "allowBackgroundExecution"],
"properties": {
"runtimeMode": {
"type": "string",
"enum": ["packaged_module", "approved_runtime"]
},
"allowBackgroundExecution": {
"type": "boolean"
},
"maxStartupTimeMs": {
"type": "integer",
"minimum": 1000,
"maximum": 120000
},
"maxMemoryMb": {
"type": "integer",
"minimum": 16,
"maximum": 2048
}
}
},
"signing": {
"type": "object",
"additionalProperties": false,
"required": ["required", "keyId", "signature"],
"properties": {
"required": {
"type": "boolean"
},
"keyId": {
"type": "string",
"maxLength": 256
},
"signature": {
"type": "string",
"maxLength": 8192
}
}
}
},
"allOf": [
{
"if": {
"properties": {
"platformProfile": {
"const": "android"
}
},
"required": ["platformProfile"]
},
"then": {
"required": ["android"]
}
}
]
}