2026-07-22 01:29:32 -04:00
|
|
|
{
|
|
|
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
|
|
|
"$id": "https://docforge.local/schema/result-v1.json",
|
|
|
|
|
"title": "DocForge result envelope",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
|
|
|
|
"type": "object",
|
|
|
|
|
"required": ["status", "project_id", "source_hash"],
|
|
|
|
|
"properties": {
|
|
|
|
|
"status": { "const": "ok" },
|
|
|
|
|
"project_id": { "type": "string" },
|
|
|
|
|
"revision": { "type": "string" },
|
2026-07-29 04:42:55 -04:00
|
|
|
"source_hash": {
|
|
|
|
|
"type": ["string", "null"],
|
|
|
|
|
"pattern": "^[0-9a-f]{64}$"
|
|
|
|
|
},
|
2026-07-22 01:29:32 -04:00
|
|
|
"adapter": { "type": "string" }
|
2026-07-29 03:12:30 -04:00
|
|
|
},
|
|
|
|
|
"additionalProperties": true
|
2026-07-22 01:29:32 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "object",
|
|
|
|
|
"required": ["status", "error"],
|
|
|
|
|
"properties": {
|
|
|
|
|
"status": { "const": "error" },
|
2026-07-29 03:12:30 -04:00
|
|
|
"project_id": { "type": "string" },
|
|
|
|
|
"project_root_fingerprint": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"pattern": "^[0-9a-f]{16}$"
|
|
|
|
|
},
|
|
|
|
|
"adapter": { "type": "string" },
|
|
|
|
|
"server_version": { "type": "string" },
|
|
|
|
|
"revision": { "type": "string" },
|
|
|
|
|
"source_hash": {
|
|
|
|
|
"type": ["string", "null"],
|
|
|
|
|
"pattern": "^[0-9a-f]{64}$"
|
|
|
|
|
},
|
|
|
|
|
"content_warning": { "type": "string" },
|
|
|
|
|
"staleness": { "enum": ["current", "stale", "unknown"] },
|
|
|
|
|
"synchronization": { "type": "object" },
|
2026-07-22 01:29:32 -04:00
|
|
|
"error": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"required": ["code", "message", "details"],
|
|
|
|
|
"properties": {
|
|
|
|
|
"code": { "type": "string", "minLength": 1 },
|
|
|
|
|
"message": { "type": "string", "minLength": 1 },
|
|
|
|
|
"details": { "type": "object" }
|
|
|
|
|
},
|
|
|
|
|
"additionalProperties": false
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-07-29 03:12:30 -04:00
|
|
|
"additionalProperties": true
|
2026-07-22 01:29:32 -04:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|