Plugin gRPC API

DomainPluginService is the gRPC service for external domain plugins

Proto file: plugin/grpc/protocol/domain.proto

Service Methods

MethodRequestResponseStreaming
MetadataEmptyMetadataResponseNo
InitializeInitializeRequestInitializeResponseNo
ShutdownEmptyEmptyNo
HandleHTTPHTTPRequestHTTPResponseNo
HandleWebSocketWebSocketMessageWebSocketMessageBidirectional
HealthEmptyHealthResponseNo
ConfigSchemaEmptyConfigSchemaResponseNo
RegisterGlyphsEmptyGlyphDefResponseNo
ExecuteJobExecuteJobRequestExecuteJobResponseNo
ParseAxQueryParseAxQueryRequestParseAxQueryResponseNo

Metadata

Metadata returns plugin metadata


Initialize

Initialize initializes the plugin with config and ATS endpoint. Called once per process lifetime. Plugins must handle re-init: stop previous state first. See ADR-018 for the full lifecycle contract.


Shutdown

Shutdown shuts down the plugin


HandleHTTP

HandleHTTP handles an HTTP request


HandleWebSocket

HandleWebSocket handles a WebSocket connection (bidirectional streaming). QNTX sends PING messages on the incoming stream and expects PONG responses. Plugins must read the incoming stream and reply to PING with PONG. See ADR-018 for the keepalive contract.


Health

Health checks plugin health


ConfigSchema

ConfigSchema returns the configuration schema for this plugin


RegisterGlyphs

RegisterGlyphs returns custom glyph type definitions provided by this plugin


ExecuteJob

ExecuteJob executes an async job Used by Pulse to route jobs to plugin-registered handlers


ParseAxQuery

ParseAxQuery parses an Ax query string and returns the AST as JSON. Used by kern (OCaml parser) to replace the Rust WASM parser path.


Message Types

MetadataResponse

FieldTypeDescription
namestring-
versionstring-
qntx_versionstring-
descriptionstring-
authorstring-
licensestring-

InitializeRequest

FieldTypeDescription
ats_store_endpointstringService endpoints the plugin can call back to QNTX core Format: "host:port" for TCP (e.g., "localhost:50051") Note: Database access is not provided - database is a hard boundary. Plugins should use attestations via ats_store_endpoint instead. ats_store_endpoint: gRPC endpoint for ATSStoreService Provides: Attestation creation, querying, and streaming
queue_endpointstringqueue_endpoint: gRPC endpoint for QueueService Provides: Async job enqueue, status, and management
auth_tokenstringauth_token: Simple token for authenticating with service endpoints Plugins must include this token in all service RPC calls
configmap<string, string>Plugin-specific configuration values Simple types (string, int, bool) passed as string representations Complex types (maps, slices) JSON-encoded as strings Plugins should parse and validate values appropriate to their schema
schedule_endpointstringschedule_endpoint: gRPC endpoint for ScheduleService Provides: Runtime schedule creation, pause, resume, delete
file_service_endpointstringfile_service_endpoint: gRPC endpoint for FileService Provides: Read stored files (for multimodal attachments)
llm_endpointstringllm_endpoint: gRPC endpoint for LLMService Provides: Provider-agnostic LLM chat (routed through core to provider plugins)
embedding_endpointstringembedding_endpoint: gRPC endpoint for EmbeddingService Provides: Text-to-vector embedding generation
vector_search_endpointstringvector_search_endpoint: gRPC endpoint for VectorSearchService Provides: Nearest-neighbor search over dense vector indexes (ADR-016)
ground_endpointstringground_endpoint: gRPC endpoint for GroundService Provides: Write attestations to Ground's deferred news database
search_endpointstringsearch_endpoint: gRPC endpoint for SearchService Provides: Full-text search over indexed documents (routed through core to provider plugin)
fetch_endpointstringfetch_endpoint: gRPC endpoint for FetchService Provides: HTTP GET with attestation — QNTX fetches and attests, plugins stay pure orchestration

HTTPRequest

FieldTypeDescription
methodstring-
pathstring-
headersHTTPHeader-
bodybytes-

HTTPResponse

FieldTypeDescription
status_codeint32-
headersHTTPHeader-
bodybytes-

HTTPHeader

HTTPHeader represents an HTTP header with support for multiple values. HTTP headers can have multiple values (e.g., Set-Cookie, Accept).

FieldTypeDescription
namestring-
valuesstring-

WebSocketMessage

HealthResponse

FieldTypeDescription
healthybool-
messagestring-
detailsmap<string, string>-

ConfigSchemaResponse

FieldTypeDescription
fieldsmap<string, ConfigFieldSchema>Map of config field name to schema definition

ConfigFieldSchema

FieldTypeDescription
typestringField type: "string", "number", "boolean", "array"
descriptionstringHuman-readable description of what this field does
default_valuestringDefault value (as string representation)
requiredboolWhether this field is required
min_valuestringFor number types: minimum value (optional)
max_valuestringFor number types: maximum value (optional)
patternstringFor string types: validation pattern (regex, optional)
element_typestringFor array types: element type (optional)

ScheduleInfo

ScheduleInfo describes a schedule that a plugin wants QNTX to create

FieldTypeDescription
handler_namestring-
interval_secondsint32-
enabled_by_defaultbool-
descriptionstring-
ats_codestring-

InitializeResponse

InitializeResponse is returned by Initialize RPC

FieldTypeDescription
handler_namesstringHandler names this plugin can execute Examples: ["python.script", "python.webhook", "ixgest.git"] Empty list means plugin provides no async handlers (backward compatible)
schedulesScheduleInfoSchedules this plugin wants QNTX to create QNTX will auto-create schedule.Job entries for these
llm_providerboolllm_provider indicates this plugin implements LLMProvider (Chat RPC). Core registers it as an LLM backend in the service mesh.
watchersWatcherRegistrationWatchers this plugin wants registered on its behalf. Core creates watchers with action_type=plugin_execute targeting this plugin. On match, core calls ExecuteJob with the matching attestation as payload.
vector_search_providerboolvector_search_provider indicates this plugin implements VectorSearchService (ADR-016). Core registers it as a vector search backend in the service mesh.
search_providerboolsearch_provider indicates this plugin implements SearchProvider (Search RPCs). Core registers it as the search backend in the service mesh.
embedding_providerboolembedding_provider indicates this plugin implements EmbeddingService (Embed, BatchEmbed, Cluster, ModelInfo RPCs). Core routes embedding calls to it instead of using the builtin CGO/FFI path.
http_routesRouteInfohttp_routes lists the HTTP endpoints this plugin handles via HandleHTTP. Core exposes these under /api/{plugin}/ and makes them discoverable via GET /api/plugins/routes.
python_providerboolpython_provider indicates this plugin can execute Python code. Core registers "py" glyph type when any loaded plugin declares this.

RouteInfo

RouteInfo describes an HTTP endpoint a plugin handles

FieldTypeDescription
methodstring-
pathstring-
descriptionstring-

WatcherRegistration

WatcherRegistration declares a watcher a plugin wants core to manage. Core creates/updates the watcher on Initialize and routes matches to the plugin via ExecuteJob.

FieldTypeDescription
idstring-
handler_namestring-
subjectsstring-
predicatesstring-
contextsstring-
actorsstring-
max_fires_per_secondint32-

ExecuteJobRequest

ExecuteJobRequest is sent to plugins to execute an async job

FieldTypeDescription
job_idstring-
handler_namestring-
payloadbytes-

ExecuteJobResponse

ExecuteJobResponse is returned after job execution

FieldTypeDescription
successbool-
errorstring-
resultbytes-
progress_currentint32Progress tracking (optional) - Pulse updates job.Progress
progress_totalint32-
cost_actualdoubleCost tracking (optional) - Pulse updates job.CostActual
log_entriesJobLogEntryExecution logs — written to task_logs table by PluginProxyHandler
plugin_versionstringPlugin version that produced this result (e.g., "0.2.14")

JobLogEntry

JobLogEntry is a single log line from plugin job execution

FieldTypeDescription
timestampstring-
levelstring-
messagestring-
stagestring-
metadatastring-

GlyphDefResponse

GlyphDefResponse contains custom glyph type definitions from a plugin

FieldTypeDescription
glyphsGlyphDef-

GlyphDef

GlyphDef defines a custom glyph type provided by a plugin

FieldTypeDescription
symbolstringSymbol is the glyph identifier (e.g., "⚗" for a chemistry plugin)
titlestringTitle is the human-readable name shown in the title bar
labelstringLabel is a short identifier for logs and the spawn menu
content_pathstringContentPath is the HTTP path (relative to /api/{plugin}/) that returns the HTML fragment for this glyph's content area
css_pathstringCSSPath is an optional HTTP path to a stylesheet for this glyph type
default_widthint32DefaultWidth and DefaultHeight in pixels (0 = use system default)
default_heightint32-
module_pathstringModulePath is the HTTP path to a JS/TS module exporting a render function. When set, the frontend dynamically imports it with SDK injection, bypassing the server-rendered HTML pipeline.

ParseAxQueryRequest

ParseAxQueryRequest is sent to a parser plugin to parse an Ax query string.

FieldTypeDescription
querystring-

ParseAxQueryResponse

ParseAxQueryResponse contains the parsed result as JSON matching rustAxQuery shape.

FieldTypeDescription
resultbytes-
errorstring-

← Back to API Index