-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch-response.schema.json
More file actions
82 lines (82 loc) · 2.33 KB
/
patch-response.schema.json
File metadata and controls
82 lines (82 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://aicore.dev/schemas/agent/patch-response-1.0.schema.json",
"title": "AIC Agent Patch Response v1.0",
"type": "object",
"additionalProperties": false,
"required": [
"protocol_version",
"phase",
"mode",
"ok",
"files_changed",
"applied_edits",
"conflicts",
"previews"
],
"properties": {
"protocol_version": { "const": "1.0" },
"phase": { "const": "patch" },
"mode": {
"type": "string",
"enum": ["preview", "apply"]
},
"ok": { "type": "boolean" },
"files_changed": {
"type": "array",
"items": { "type": "string" }
},
"applied_edits": {
"type": "array",
"items": { "$ref": "#/$defs/edit" }
},
"conflicts": {
"type": "array",
"items": { "$ref": "#/$defs/conflict" }
},
"previews": {
"type": "array",
"items": { "$ref": "#/$defs/preview" }
}
},
"$defs": {
"edit": {
"type": "object",
"additionalProperties": false,
"required": ["file", "start", "end", "replacement", "message", "operation_index"],
"properties": {
"file": { "type": "string" },
"start": { "type": "integer", "minimum": 0 },
"end": { "type": "integer", "minimum": 0 },
"replacement": { "type": "string" },
"message": { "type": "string" },
"operation_index": { "type": "integer", "minimum": 0 }
}
},
"preview": {
"type": "object",
"additionalProperties": false,
"required": ["file", "start", "end", "before", "after", "message", "operation_index"],
"properties": {
"file": { "type": "string" },
"start": { "type": "integer", "minimum": 0 },
"end": { "type": "integer", "minimum": 0 },
"before": { "type": "string" },
"after": { "type": "string" },
"message": { "type": "string" },
"operation_index": { "type": "integer", "minimum": 0 }
}
},
"conflict": {
"type": "object",
"additionalProperties": false,
"required": ["operation_index", "kind", "message", "file"],
"properties": {
"operation_index": { "type": "integer", "minimum": 0 },
"kind": { "type": "string" },
"message": { "type": "string" },
"file": { "type": ["string", "null"] }
}
}
}
}