{
"$id": "https://github.com/danilo-aguiar-br/sqlite-graphrag/schemas/optimize.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "Response emitted by `sqlite-graphrag optimize` on stdout as a single JSON line.",
"properties": {
"agent_surface": { "$ref": "https://github.com/danilo-aguiar-br/sqlite-graphrag/schemas/agent-surface.schema.json#/$defs/AgentSurfaceMeta" },
"truncated": { "type": "boolean", "description": "GAP-SG-142: raised by the agent-native surface whenever it removed data from this envelope." },
"count": { "type": "integer", "minimum": 0, "description": "GAP-SG-142: emitted under --count-only, which replaces the payload. See agent-surface.schema.json#/$defs/CountOnlyEnvelope." },
"db_path": {
"type": "string"
},
"elapsed_ms": {
"description": "Handler wall-clock time in milliseconds.",
"minimum": 0,
"type": "integer"
},
"fts_rebuilt": {
"description": "Whether the FTS5 index was rebuilt during optimization.",
"type": "boolean"
},
"fts_rows_indexed": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"fts_skipped_functional": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"fts_unhealthy": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"status": {
"enum": [
"ok"
],
"type": "string"
}
},
"required": [
"db_path",
"status",
"fts_rebuilt",
"elapsed_ms"
],
"title": "OptimizeResponse",
"type": "object"
}