feat: establish read-only DocForge MCP foundation
This commit is contained in:
commit
9702ed1265
32 changed files with 3323 additions and 0 deletions
46
schemas/project.schema.json
Normal file
46
schemas/project.schema.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://docforge.local/schema/project-v1.json",
|
||||
"title": "DocForge project descriptor",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "project_id", "title", "adapter", "sources", "derived", "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
|
||||
},
|
||||
"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" },
|
||||
"profiles": { "type": "array" }
|
||||
},
|
||||
"$defs": {
|
||||
"relativePath": { "type": "string", "minLength": 1, "not": { "pattern": "(^/|(^|/)\\.\\.(/|$))" } },
|
||||
"pathList": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/relativePath" } }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue