@snack-ai/opencode 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schemas/spool-event.schema.json +161 -42
package/package.json
CHANGED
|
@@ -23,21 +23,65 @@
|
|
|
23
23
|
"restrictions"
|
|
24
24
|
],
|
|
25
25
|
"properties": {
|
|
26
|
-
"schema_version": {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
26
|
+
"schema_version": {
|
|
27
|
+
"const": 1
|
|
28
|
+
},
|
|
29
|
+
"event_id": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"maxLength": 200
|
|
33
|
+
},
|
|
34
|
+
"installation_id": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 200
|
|
38
|
+
},
|
|
39
|
+
"event_type": {
|
|
40
|
+
"enum": ["prompt_started", "session_idle", "session_error"]
|
|
41
|
+
},
|
|
42
|
+
"source_prompt_id": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1,
|
|
45
|
+
"maxLength": 200
|
|
46
|
+
},
|
|
47
|
+
"source_session_id": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"maxLength": 200
|
|
51
|
+
},
|
|
52
|
+
"revision": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"maxLength": 200
|
|
56
|
+
},
|
|
57
|
+
"revision_domain": {
|
|
58
|
+
"const": "opencode-plugin-v1"
|
|
59
|
+
},
|
|
60
|
+
"parser_version": {
|
|
61
|
+
"const": "opencode-plugin-v1"
|
|
62
|
+
},
|
|
63
|
+
"occurred_at": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "date-time"
|
|
66
|
+
},
|
|
67
|
+
"provider": {
|
|
68
|
+
"type": ["string", "null"],
|
|
69
|
+
"maxLength": 100
|
|
70
|
+
},
|
|
71
|
+
"model": {
|
|
72
|
+
"type": ["string", "null"],
|
|
73
|
+
"maxLength": 200
|
|
74
|
+
},
|
|
75
|
+
"completion": {
|
|
76
|
+
"enum": ["provisional", "completed"]
|
|
77
|
+
},
|
|
78
|
+
"outcome": {
|
|
79
|
+
"enum": ["success", "restricted", "excluded"]
|
|
80
|
+
},
|
|
81
|
+
"usage_slices": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"maxItems": 0
|
|
84
|
+
},
|
|
41
85
|
"restrictions": {
|
|
42
86
|
"type": "array",
|
|
43
87
|
"maxItems": 20,
|
|
@@ -49,9 +93,18 @@
|
|
|
49
93
|
"class": {
|
|
50
94
|
"enum": ["rate_limit", "usage_limit", "capacity_policy", "other_explicit_limit"]
|
|
51
95
|
},
|
|
52
|
-
"source_code": {
|
|
53
|
-
|
|
54
|
-
|
|
96
|
+
"source_code": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"maxLength": 100
|
|
100
|
+
},
|
|
101
|
+
"observed_at": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"format": "date-time"
|
|
104
|
+
},
|
|
105
|
+
"classifier_version": {
|
|
106
|
+
"const": "opencode-plugin-error-v1"
|
|
107
|
+
}
|
|
55
108
|
}
|
|
56
109
|
}
|
|
57
110
|
},
|
|
@@ -66,53 +119,119 @@
|
|
|
66
119
|
"attachment_count"
|
|
67
120
|
],
|
|
68
121
|
"properties": {
|
|
69
|
-
"analyzer_version": {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
122
|
+
"analyzer_version": {
|
|
123
|
+
"const": "opencode-input-v1"
|
|
124
|
+
},
|
|
125
|
+
"estimated_input_tokens": {
|
|
126
|
+
"type": "integer",
|
|
127
|
+
"minimum": 0
|
|
128
|
+
},
|
|
129
|
+
"line_count_bucket": {
|
|
130
|
+
"enum": ["0", "1-10", "11-50", "51-200", "201+"]
|
|
131
|
+
},
|
|
132
|
+
"code_block_count_bucket": {
|
|
133
|
+
"enum": ["0", "1", "2-4", "5+"]
|
|
134
|
+
},
|
|
135
|
+
"attachment_count": {
|
|
136
|
+
"type": "integer",
|
|
137
|
+
"minimum": 0
|
|
138
|
+
}
|
|
74
139
|
}
|
|
75
140
|
}
|
|
76
141
|
},
|
|
77
142
|
"allOf": [
|
|
78
143
|
{
|
|
79
|
-
"if": {
|
|
144
|
+
"if": {
|
|
145
|
+
"properties": {
|
|
146
|
+
"event_type": {
|
|
147
|
+
"const": "prompt_started"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"type": "object"
|
|
151
|
+
},
|
|
80
152
|
"then": {
|
|
81
153
|
"properties": {
|
|
82
|
-
"completion": {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
154
|
+
"completion": {
|
|
155
|
+
"const": "provisional"
|
|
156
|
+
},
|
|
157
|
+
"outcome": {
|
|
158
|
+
"const": "excluded"
|
|
159
|
+
},
|
|
160
|
+
"restrictions": {
|
|
161
|
+
"maxItems": 0,
|
|
162
|
+
"type": "array"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"type": "object"
|
|
86
166
|
}
|
|
87
167
|
},
|
|
88
168
|
{
|
|
89
|
-
"if": {
|
|
169
|
+
"if": {
|
|
170
|
+
"properties": {
|
|
171
|
+
"event_type": {
|
|
172
|
+
"const": "session_idle"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"type": "object"
|
|
176
|
+
},
|
|
90
177
|
"then": {
|
|
91
178
|
"properties": {
|
|
92
|
-
"completion": {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
179
|
+
"completion": {
|
|
180
|
+
"const": "completed"
|
|
181
|
+
},
|
|
182
|
+
"outcome": {
|
|
183
|
+
"const": "success"
|
|
184
|
+
},
|
|
185
|
+
"restrictions": {
|
|
186
|
+
"maxItems": 0,
|
|
187
|
+
"type": "array"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"type": "object"
|
|
96
191
|
}
|
|
97
192
|
},
|
|
98
193
|
{
|
|
99
|
-
"if": {
|
|
194
|
+
"if": {
|
|
195
|
+
"properties": {
|
|
196
|
+
"event_type": {
|
|
197
|
+
"const": "session_error"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"type": "object"
|
|
201
|
+
},
|
|
100
202
|
"then": {
|
|
101
|
-
"properties": {
|
|
203
|
+
"properties": {
|
|
204
|
+
"completion": {
|
|
205
|
+
"const": "completed"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
102
208
|
"oneOf": [
|
|
103
209
|
{
|
|
104
210
|
"properties": {
|
|
105
|
-
"outcome": {
|
|
106
|
-
|
|
107
|
-
|
|
211
|
+
"outcome": {
|
|
212
|
+
"const": "restricted"
|
|
213
|
+
},
|
|
214
|
+
"restrictions": {
|
|
215
|
+
"minItems": 1,
|
|
216
|
+
"type": "array"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"type": "object"
|
|
108
220
|
},
|
|
109
221
|
{
|
|
110
222
|
"properties": {
|
|
111
|
-
"outcome": {
|
|
112
|
-
|
|
113
|
-
|
|
223
|
+
"outcome": {
|
|
224
|
+
"const": "excluded"
|
|
225
|
+
},
|
|
226
|
+
"restrictions": {
|
|
227
|
+
"maxItems": 0,
|
|
228
|
+
"type": "array"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"type": "object"
|
|
114
232
|
}
|
|
115
|
-
]
|
|
233
|
+
],
|
|
234
|
+
"type": "object"
|
|
116
235
|
}
|
|
117
236
|
}
|
|
118
237
|
]
|