1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages
DocForge2/schemas/project.schema.json

189 lines
7.4 KiB
JSON
Raw Permalink Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docforge.local/schema/project-v1.json",
"title": "DocForge project descriptor",
"type": "object",
2026-07-22 02:58:51 -04:00
"required": ["schema_version", "project_id", "title", "adapter", "sources", "derived", "changesets", "graph"],
"properties": {
"schema_version": { "const": 1 },
"project_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
"title": { "type": "string", "minLength": 1 },
"adapter": { "type": "string", "minLength": 1 },
"sources": {
"type": "object",
"required": ["content_roots", "authority_files"],
"properties": {
"content_roots": { "$ref": "#/$defs/pathList" },
"authority_files": { "$ref": "#/$defs/pathList" }
},
"additionalProperties": false
},
"derived": {
"type": "object",
"required": ["cache_root", "index"],
"properties": {
"cache_root": { "$ref": "#/$defs/relativePath" },
"index": { "$ref": "#/$defs/relativePath" }
},
"additionalProperties": false
},
2026-07-22 02:58:51 -04:00
"changesets": {
"type": "object",
"required": ["root", "writers"],
"properties": {
"root": { "$ref": "#/$defs/relativePath" },
"writers": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "families", "operations"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
"families": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
"operations": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["create", "update", "move", "delete"] } }
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"render": {
"type": "object",
"required": ["template_root", "preview_root", "views"],
"properties": {
"template_root": { "$ref": "#/$defs/relativePath" },
"preview_root": { "$ref": "#/$defs/relativePath" },
"views": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["id", "renderer", "template", "output", "title", "families"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
"renderer": { "const": "generic_html" },
"template": { "$ref": "#/$defs/relativePath" },
"output": { "allOf": [{ "$ref": "#/$defs/relativePath" }, { "pattern": "\\.html$" }] },
"title": { "type": "string", "minLength": 1 },
"families": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
2026-07-29 11:37:33 -04:00
"graph_render": {
"type": "object",
"required": ["output_root", "views"],
"properties": {
"output_root": { "$ref": "#/$defs/relativePath" },
"views": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["id", "renderer", "output", "title"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
"renderer": { "const": "portable_graph_html" },
"output": {
"allOf": [
{ "$ref": "#/$defs/relativePath" },
{ "pattern": "\\.html$" }
]
},
"title": { "type": "string", "minLength": 1, "maxLength": 1024 },
"root": { "type": "string", "minLength": 1, "maxLength": 1024 },
"query": { "type": "string", "minLength": 1, "maxLength": 10000 },
"initial_mode": { "enum": ["nodes", "flow", "web"] },
"depth": { "type": "integer", "minimum": 1, "maximum": 32 },
"max_nodes": { "type": "integer", "minimum": 1, "maximum": 1000 },
"max_edges": { "type": "integer", "minimum": 0, "maximum": 4000 },
"max_work": { "type": "integer", "minimum": 1, "maximum": 1000000 },
"families": {
"type": "array",
"maxItems": 64,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1, "maxLength": 1024 }
},
"relations": {
"type": "array",
"maxItems": 64,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1, "maxLength": 1024 }
},
"authorities": {
"type": "array",
"maxItems": 64,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1, "maxLength": 1024 }
},
"statuses": {
"type": "array",
"maxItems": 64,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1, "maxLength": 1024 }
},
"tags": {
"type": "array",
"maxItems": 64,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1, "maxLength": 1024 }
},
"include_logic": { "const": false }
},
"oneOf": [
{
"required": ["root"],
"not": { "required": ["query"] }
},
{
"required": ["query"],
"not": { "required": ["root"] }
}
],
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"graph": {
"type": "object",
"required": ["allowed_relations"],
"properties": {
"allowed_relations": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" } }
},
"additionalProperties": false
},
"limits": {
"type": "object",
"properties": {
"max_source_bytes": { "$ref": "#/$defs/positiveInteger" },
"max_nodes": { "$ref": "#/$defs/positiveInteger" },
"max_query_chars": { "$ref": "#/$defs/positiveInteger" },
"max_results": { "$ref": "#/$defs/positiveInteger" },
"max_traversal_depth": { "$ref": "#/$defs/positiveInteger" },
"max_context_tokens": { "$ref": "#/$defs/positiveInteger" },
"max_tool_output_chars": { "$ref": "#/$defs/positiveInteger" },
"max_changesets": { "$ref": "#/$defs/positiveInteger" },
"max_changeset_operations": { "$ref": "#/$defs/positiveInteger" },
"max_changeset_bytes": { "$ref": "#/$defs/positiveInteger" },
"max_render_views": { "$ref": "#/$defs/positiveInteger" },
"max_template_bytes": { "$ref": "#/$defs/positiveInteger" },
"max_render_bytes": { "$ref": "#/$defs/positiveInteger" }
},
"additionalProperties": false
},
"profiles": { "type": "array" }
},
"$defs": {
"relativePath": { "type": "string", "minLength": 1, "not": { "pattern": "(^/|(^|/)\\.\\.(/|$))" } },
"pathList": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/relativePath" } },
"positiveInteger": { "type": "integer", "minimum": 1 }
},
"additionalProperties": false
}