feat: add isolated proposal changesets
This commit is contained in:
parent
9702ed1265
commit
8c75f4f44d
22 changed files with 2314 additions and 64 deletions
|
|
@ -8,24 +8,38 @@
|
|||
"schema_version": { "const": 1 },
|
||||
"changeset_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
|
||||
"project_id": { "type": "string" },
|
||||
"root_fingerprint": { "type": "string" },
|
||||
"base_revision": { "type": "string" },
|
||||
"root_fingerprint": { "type": "string", "pattern": "^[0-9a-f]{16}$" },
|
||||
"base_revision": { "type": "string", "minLength": 1 },
|
||||
"base_source_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
||||
"creator": { "type": "string", "minLength": 1 },
|
||||
"operations": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 10000,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["operation", "node_id", "expected_content_hash", "rationale"],
|
||||
"required": ["sequence", "operation", "node_id", "expected_content_hash", "target_source", "metadata", "content", "relationship_changes", "rationale"],
|
||||
"properties": {
|
||||
"sequence": { "type": "integer", "minimum": 1 },
|
||||
"operation": { "enum": ["create", "update", "move", "delete"] },
|
||||
"node_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
|
||||
"expected_content_hash": { "type": ["string", "null"] },
|
||||
"expected_content_hash": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" },
|
||||
"target_source": { "type": ["string", "null"] },
|
||||
"metadata": { "type": ["object", "null"] },
|
||||
"content": { "type": ["string", "null"] },
|
||||
"relationship_changes": { "type": "array" },
|
||||
"relationship_changes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["action", "source_id", "relation", "target_id"],
|
||||
"properties": {
|
||||
"action": { "enum": ["add", "remove"] },
|
||||
"source_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
|
||||
"relation": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" },
|
||||
"target_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"rationale": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"$id": "https://docforge.local/schema/project-v1.json",
|
||||
"title": "DocForge project descriptor",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "project_id", "title", "adapter", "sources", "derived", "graph"],
|
||||
"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}$" },
|
||||
|
|
@ -27,6 +27,27 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"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
|
||||
},
|
||||
"graph": {
|
||||
"type": "object",
|
||||
"required": ["allowed_relations"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue