forked from OpenCoven/coven-github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsession-brief.schema.json
More file actions
146 lines (146 loc) · 5.05 KB
/
Copy pathsession-brief.schema.json
File metadata and controls
146 lines (146 loc) · 5.05 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/OpenCoven/coven-github/docs/contracts/session-brief.schema.json",
"title": "coven-code headless session brief",
"description": "Tokenless read-context payload the adapter writes for coven-code --headless --context. Contract version 2.",
"type": "object",
"additionalProperties": false,
"required": ["contract_version", "trigger", "repo", "task", "familiar", "workspace"],
"properties": {
"contract_version": {
"type": "string",
"const": "2"
},
"trigger": {
"type": "string",
"enum": ["issue_assigned", "pr_review_comment", "issue_mention"]
},
"repo": {
"type": "object",
"additionalProperties": false,
"required": ["owner", "name", "clone_url", "default_branch"],
"properties": {
"owner": { "type": "string" },
"name": { "type": "string" },
"clone_url": {
"type": "string",
"description": "HTTPS clone URL without embedded credentials.",
"not": { "pattern": "@" }
},
"default_branch": { "type": "string" }
}
},
"task": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["kind", "issue_number", "issue_title", "issue_body"],
"properties": {
"kind": { "const": "fix_issue" },
"issue_number": { "type": "integer", "minimum": 0 },
"issue_title": { "type": "string" },
"issue_body": { "type": "string" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["kind", "pr_number", "comment_body"],
"properties": {
"kind": { "const": "address_review_comment" },
"pr_number": { "type": "integer", "minimum": 0 },
"comment_body": { "type": "string" },
"diff_hunk": { "type": ["string", "null"] }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["kind", "issue_number", "comment_body"],
"properties": {
"kind": { "const": "respond_to_mention" },
"issue_number": { "type": "integer", "minimum": 0 },
"comment_body": { "type": "string" }
}
}
]
},
"familiar": {
"type": "object",
"additionalProperties": false,
"required": ["id", "display_name", "skills"],
"properties": {
"id": { "type": "string" },
"display_name": { "type": "string" },
"model": { "type": ["string", "null"] },
"skills": { "type": "array", "items": { "type": "string" } }
}
},
"workspace": {
"type": "object",
"additionalProperties": false,
"required": ["root"],
"properties": {
"root": { "type": "string" }
}
},
"audit_instruction": {
"type": ["string", "null"],
"description": "Optional hosted-review instruction paired with review_context."
},
"review_context": {
"type": ["object", "null"],
"description": "Optional tokenless hosted-review evidence supplied by the adapter.",
"additionalProperties": false,
"required": ["kind", "files"],
"properties": {
"kind": {
"type": ["string", "null"],
"enum": ["pull_request", null]
},
"files": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["filename"],
"properties": {
"filename": { "type": "string" }
}
}
}
}
},
"memory_policy": {
"type": ["object", "null"],
"description": "Optional hosted memory governance policy (issue #6). Present only when the installation opted memory in for this repo; absent means memory is off. See docs/memory-contract.md.",
"additionalProperties": false,
"required": ["enabled", "installation_id", "repo", "trust_scope", "read_scopes", "write_scopes", "approval_required"],
"properties": {
"enabled": { "type": "boolean" },
"installation_id": { "type": "integer" },
"repo": { "type": "string" },
"trust_scope": {
"type": "string",
"enum": ["maintainer", "collaborator", "external", "fork_pr", "scheduled"]
},
"read_scopes": {
"type": "array",
"items": { "type": "string", "enum": ["repo", "tenant_shared", "familiar_global"] }
},
"write_scopes": {
"type": "array",
"items": { "type": "string", "enum": ["repo", "tenant_shared", "familiar_global"] }
},
"approval_required": { "type": "boolean" },
"retention_days": { "type": ["integer", "null"] },
"denied": {
"type": "array",
"description": "Revoked memory keys/prefixes the runtime must not read or surface (issue #6). The adapter also refuses them on the result.",
"items": { "type": "string" }
}
}
}
}
}