@drisp/protocol 0.6.0 → 0.8.0

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.
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "deviceCode": {
6
+ "type": "string",
7
+ "minLength": 32,
8
+ "maxLength": 160
9
+ },
10
+ "code": {
11
+ "type": "string",
12
+ "pattern": "^[A-HJKMNP-Z2-9]{8}$"
13
+ },
14
+ "expiresAt": {
15
+ "type": "integer",
16
+ "minimum": 0,
17
+ "maximum": 9007199254740991
18
+ },
19
+ "intervalSec": {
20
+ "type": "integer",
21
+ "exclusiveMinimum": 0,
22
+ "maximum": 9007199254740991
23
+ },
24
+ "verificationUrl": {
25
+ "type": "string",
26
+ "format": "uri"
27
+ }
28
+ },
29
+ "required": [
30
+ "deviceCode",
31
+ "code",
32
+ "expiresAt",
33
+ "intervalSec",
34
+ "verificationUrl"
35
+ ],
36
+ "additionalProperties": false
37
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "installationId": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 160
9
+ },
10
+ "hostname": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 255
14
+ },
15
+ "os": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 64
19
+ },
20
+ "softwareVersion": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 128
24
+ }
25
+ },
26
+ "required": [
27
+ "installationId",
28
+ "hostname",
29
+ "os",
30
+ "softwareVersion"
31
+ ],
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,362 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "commandId": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 160
9
+ },
10
+ "hubEpoch": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 160
14
+ },
15
+ "runId": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 160
19
+ },
20
+ "sessionId": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 160
24
+ },
25
+ "runnerId": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "maxLength": 160
29
+ },
30
+ "installationId": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 160
34
+ },
35
+ "attemptId": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "maxLength": 160
39
+ },
40
+ "generation": {
41
+ "type": "integer",
42
+ "minimum": 0,
43
+ "maximum": 9007199254740991
44
+ },
45
+ "baseExecutionRevision": {
46
+ "type": "integer",
47
+ "minimum": 0,
48
+ "maximum": 9007199254740991
49
+ },
50
+ "baseHistorySeq": {
51
+ "type": "integer",
52
+ "minimum": 0,
53
+ "maximum": 9007199254740991
54
+ },
55
+ "cloudHistoryThrough": {
56
+ "type": "integer",
57
+ "minimum": 0,
58
+ "maximum": 9007199254740991
59
+ },
60
+ "purpose": {
61
+ "type": "string",
62
+ "enum": [
63
+ "start",
64
+ "resume"
65
+ ]
66
+ },
67
+ "spec": {
68
+ "type": "object",
69
+ "properties": {
70
+ "prompt": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "maxLength": 131072
74
+ },
75
+ "projectDir": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "maxLength": 4096
79
+ },
80
+ "harness": {
81
+ "type": "string",
82
+ "enum": [
83
+ "claude-code",
84
+ "codex"
85
+ ]
86
+ },
87
+ "workflow": {
88
+ "anyOf": [
89
+ {
90
+ "type": "string",
91
+ "maxLength": 512
92
+ },
93
+ {
94
+ "type": "object",
95
+ "properties": {
96
+ "name": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "maxLength": 128,
100
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"
101
+ },
102
+ "source": {
103
+ "type": "string",
104
+ "maxLength": 201,
105
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*\\/[A-Za-z0-9][A-Za-z0-9_.-]*$"
106
+ },
107
+ "ref": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "maxLength": 512
111
+ },
112
+ "version": {
113
+ "type": "string",
114
+ "minLength": 1,
115
+ "maxLength": 128,
116
+ "pattern": "^\\d[A-Za-z0-9_.+-]*$"
117
+ }
118
+ },
119
+ "required": [
120
+ "name"
121
+ ],
122
+ "additionalProperties": false
123
+ }
124
+ ]
125
+ },
126
+ "repository": {
127
+ "type": "object",
128
+ "properties": {
129
+ "bindingId": {
130
+ "type": "string",
131
+ "minLength": 1,
132
+ "maxLength": 160
133
+ },
134
+ "repositoryId": {
135
+ "type": "integer",
136
+ "exclusiveMinimum": 0,
137
+ "maximum": 9007199254740991
138
+ },
139
+ "installationId": {
140
+ "type": "integer",
141
+ "exclusiveMinimum": 0,
142
+ "maximum": 9007199254740991
143
+ },
144
+ "owner": {
145
+ "type": "string",
146
+ "minLength": 1,
147
+ "maxLength": 100,
148
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$"
149
+ },
150
+ "name": {
151
+ "type": "string",
152
+ "minLength": 1,
153
+ "maxLength": 100,
154
+ "pattern": "^(?!\\.{1,2}$)[a-zA-Z0-9_.-]+$"
155
+ },
156
+ "ref": {
157
+ "type": "string",
158
+ "minLength": 1,
159
+ "maxLength": 512,
160
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
161
+ },
162
+ "commitSha": {
163
+ "type": "string",
164
+ "pattern": "^[0-9a-f]{40}$"
165
+ },
166
+ "branch": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "maxLength": 512,
170
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
171
+ },
172
+ "workingDirectory": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "maxLength": 1024,
176
+ "pattern": "^(?:\\.|(?!\\/)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))[^\\x00-\\x1f\\x7f\\\\:]+(?<!\\/))$"
177
+ },
178
+ "setupCommands": {
179
+ "maxItems": 16,
180
+ "type": "array",
181
+ "items": {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "maxLength": 8192
185
+ }
186
+ },
187
+ "configRevision": {
188
+ "type": "integer",
189
+ "minimum": 0,
190
+ "maximum": 9007199254740991
191
+ }
192
+ },
193
+ "required": [
194
+ "bindingId",
195
+ "repositoryId",
196
+ "installationId",
197
+ "owner",
198
+ "name",
199
+ "ref",
200
+ "commitSha",
201
+ "branch",
202
+ "workingDirectory",
203
+ "setupCommands",
204
+ "configRevision"
205
+ ],
206
+ "additionalProperties": false
207
+ }
208
+ },
209
+ "required": [
210
+ "prompt",
211
+ "projectDir",
212
+ "harness"
213
+ ],
214
+ "additionalProperties": false
215
+ },
216
+ "continuation": {
217
+ "$ref": "#/$defs/__schema0"
218
+ },
219
+ "previousRun": {
220
+ "type": "object",
221
+ "properties": {
222
+ "runId": {
223
+ "type": "string",
224
+ "minLength": 1,
225
+ "maxLength": 160
226
+ },
227
+ "executionRevision": {
228
+ "type": "integer",
229
+ "minimum": 0,
230
+ "maximum": 9007199254740991
231
+ },
232
+ "historyProduced": {
233
+ "type": "integer",
234
+ "minimum": 0,
235
+ "maximum": 9007199254740991
236
+ },
237
+ "closeReason": {
238
+ "type": "string",
239
+ "const": "abandoned"
240
+ },
241
+ "checkpoint": {
242
+ "type": "object",
243
+ "properties": {
244
+ "checkpointId": {
245
+ "type": "string",
246
+ "minLength": 1,
247
+ "maxLength": 160
248
+ },
249
+ "checksum": {
250
+ "type": "string",
251
+ "pattern": "^[a-f0-9]{64}$"
252
+ }
253
+ },
254
+ "required": [
255
+ "checkpointId",
256
+ "checksum"
257
+ ],
258
+ "additionalProperties": false
259
+ }
260
+ },
261
+ "required": [
262
+ "runId",
263
+ "executionRevision",
264
+ "historyProduced"
265
+ ],
266
+ "additionalProperties": false
267
+ },
268
+ "checkpoint": {
269
+ "type": "object",
270
+ "properties": {
271
+ "checkpointId": {
272
+ "type": "string",
273
+ "minLength": 1,
274
+ "maxLength": 160
275
+ },
276
+ "checksum": {
277
+ "type": "string",
278
+ "pattern": "^[a-f0-9]{64}$"
279
+ }
280
+ },
281
+ "required": [
282
+ "checkpointId",
283
+ "checksum"
284
+ ],
285
+ "additionalProperties": false
286
+ },
287
+ "delegationToken": {
288
+ "type": "string",
289
+ "minLength": 32,
290
+ "maxLength": 256
291
+ },
292
+ "parent": {
293
+ "type": "object",
294
+ "properties": {
295
+ "runId": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "maxLength": 160
299
+ },
300
+ "tokenCap": {
301
+ "type": "integer",
302
+ "exclusiveMinimum": 0,
303
+ "maximum": 9007199254740991
304
+ }
305
+ },
306
+ "required": [
307
+ "runId",
308
+ "tokenCap"
309
+ ],
310
+ "additionalProperties": false
311
+ }
312
+ },
313
+ "required": [
314
+ "commandId",
315
+ "hubEpoch",
316
+ "runId",
317
+ "sessionId",
318
+ "runnerId",
319
+ "installationId",
320
+ "attemptId",
321
+ "generation",
322
+ "baseExecutionRevision",
323
+ "baseHistorySeq",
324
+ "cloudHistoryThrough",
325
+ "purpose",
326
+ "spec"
327
+ ],
328
+ "additionalProperties": false,
329
+ "$defs": {
330
+ "__schema0": {
331
+ "anyOf": [
332
+ {
333
+ "type": "string"
334
+ },
335
+ {
336
+ "type": "number"
337
+ },
338
+ {
339
+ "type": "boolean"
340
+ },
341
+ {
342
+ "type": "null"
343
+ },
344
+ {
345
+ "type": "array",
346
+ "items": {
347
+ "$ref": "#/$defs/__schema0"
348
+ }
349
+ },
350
+ {
351
+ "type": "object",
352
+ "propertyNames": {
353
+ "type": "string"
354
+ },
355
+ "additionalProperties": {
356
+ "$ref": "#/$defs/__schema0"
357
+ }
358
+ }
359
+ ]
360
+ }
361
+ }
362
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "kind": {
6
+ "type": "string",
7
+ "const": "permission"
8
+ },
9
+ "decision": {
10
+ "type": "string",
11
+ "enum": [
12
+ "allow",
13
+ "deny"
14
+ ]
15
+ },
16
+ "reason": {
17
+ "type": "string",
18
+ "maxLength": 4096
19
+ }
20
+ },
21
+ "required": [
22
+ "kind",
23
+ "decision"
24
+ ],
25
+ "additionalProperties": false
26
+ }