@mccaskie-labs/workbench-config 0.0.0-stage → 0.1.1

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,414 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "$schema": {
6
+ "type": "string",
7
+ "const": "./schema.json"
8
+ },
9
+ "format": {
10
+ "type": "number",
11
+ "const": 1
12
+ },
13
+ "component": {
14
+ "type": "string",
15
+ "enum": [
16
+ "gateway",
17
+ "ai",
18
+ "images",
19
+ "image-search",
20
+ "config",
21
+ "email",
22
+ "email-inbound",
23
+ "email-sending",
24
+ "database",
25
+ "workers",
26
+ "domains",
27
+ "dns",
28
+ "analytics",
29
+ "access",
30
+ "r2",
31
+ "kv",
32
+ "github"
33
+ ]
34
+ },
35
+ "title": {
36
+ "type": "string",
37
+ "minLength": 1
38
+ },
39
+ "summary": {
40
+ "type": "string",
41
+ "minLength": 1
42
+ },
43
+ "status": {
44
+ "type": "string",
45
+ "enum": [
46
+ "planned",
47
+ "built",
48
+ "deprecated"
49
+ ]
50
+ },
51
+ "surfaces": {
52
+ "type": "object",
53
+ "properties": {
54
+ "gateway": {
55
+ "minItems": 1,
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string",
59
+ "pattern": "^(GET|POST|PUT|PATCH|DELETE) \\/\\S*$"
60
+ }
61
+ },
62
+ "tools": {
63
+ "minItems": 1,
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string",
67
+ "pattern": "^[a-z]+_[a-z0-9_]+$"
68
+ }
69
+ },
70
+ "package": {
71
+ "minItems": 1,
72
+ "type": "array",
73
+ "items": {
74
+ "type": "string",
75
+ "minLength": 1
76
+ }
77
+ }
78
+ },
79
+ "additionalProperties": false
80
+ },
81
+ "config": {
82
+ "minItems": 1,
83
+ "type": "array",
84
+ "items": {
85
+ "type": "object",
86
+ "properties": {
87
+ "name": {
88
+ "type": "string",
89
+ "pattern": "^[A-Z][A-Z0-9_]*$"
90
+ },
91
+ "required": {
92
+ "type": "boolean"
93
+ },
94
+ "secret": {
95
+ "type": "boolean"
96
+ },
97
+ "default": {
98
+ "type": [
99
+ "string",
100
+ "number",
101
+ "boolean"
102
+ ]
103
+ },
104
+ "environments": {
105
+ "minItems": 1,
106
+ "type": "array",
107
+ "items": {
108
+ "type": "string",
109
+ "enum": [
110
+ "development",
111
+ "staging",
112
+ "production"
113
+ ]
114
+ }
115
+ },
116
+ "description": {
117
+ "type": "string",
118
+ "minLength": 1
119
+ }
120
+ },
121
+ "required": [
122
+ "name",
123
+ "required",
124
+ "secret",
125
+ "environments",
126
+ "description"
127
+ ],
128
+ "additionalProperties": false
129
+ }
130
+ },
131
+ "allowed": {
132
+ "type": "object",
133
+ "propertyNames": {
134
+ "type": "string"
135
+ },
136
+ "additionalProperties": {}
137
+ },
138
+ "limits": {
139
+ "minItems": 1,
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "properties": {
144
+ "id": {
145
+ "type": "string",
146
+ "pattern": "^[a-z0-9][a-z0-9.-]*$"
147
+ },
148
+ "value": {
149
+ "type": [
150
+ "string",
151
+ "number"
152
+ ]
153
+ },
154
+ "unit": {
155
+ "type": "string",
156
+ "minLength": 1
157
+ },
158
+ "per": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ },
162
+ "enforced_by": {
163
+ "type": "string",
164
+ "enum": [
165
+ "types",
166
+ "gateway",
167
+ "control",
168
+ "database"
169
+ ]
170
+ },
171
+ "refusal": {
172
+ "type": "string",
173
+ "pattern": "^[a-z][a-z0-9_]*$"
174
+ }
175
+ },
176
+ "required": [
177
+ "id",
178
+ "value",
179
+ "unit",
180
+ "per",
181
+ "enforced_by"
182
+ ],
183
+ "additionalProperties": false
184
+ }
185
+ },
186
+ "actions": {
187
+ "minItems": 1,
188
+ "type": "array",
189
+ "items": {
190
+ "type": "object",
191
+ "properties": {
192
+ "tool": {
193
+ "type": "string",
194
+ "pattern": "^[a-z]+_[a-z0-9_]+$"
195
+ },
196
+ "gate": {
197
+ "type": "string",
198
+ "enum": [
199
+ "free",
200
+ "two_step",
201
+ "two_step_on_production",
202
+ "two_step_when"
203
+ ]
204
+ },
205
+ "when": {
206
+ "type": "string",
207
+ "minLength": 1
208
+ },
209
+ "ships": {
210
+ "type": "string",
211
+ "enum": [
212
+ "3",
213
+ "4",
214
+ "later"
215
+ ]
216
+ }
217
+ },
218
+ "required": [
219
+ "tool",
220
+ "gate",
221
+ "ships"
222
+ ],
223
+ "additionalProperties": false
224
+ }
225
+ },
226
+ "errors": {
227
+ "minItems": 1,
228
+ "type": "array",
229
+ "items": {
230
+ "type": "object",
231
+ "properties": {
232
+ "code": {
233
+ "type": "string",
234
+ "pattern": "^[a-z][a-z0-9_]*$"
235
+ },
236
+ "http": {
237
+ "type": "integer",
238
+ "minimum": 400,
239
+ "maximum": 599
240
+ },
241
+ "retryable": {
242
+ "type": "boolean"
243
+ },
244
+ "meaning": {
245
+ "type": "string",
246
+ "minLength": 1
247
+ }
248
+ },
249
+ "required": [
250
+ "code",
251
+ "http",
252
+ "retryable",
253
+ "meaning"
254
+ ],
255
+ "additionalProperties": false
256
+ }
257
+ },
258
+ "rules": {
259
+ "minItems": 1,
260
+ "type": "array",
261
+ "items": {
262
+ "type": "object",
263
+ "properties": {
264
+ "id": {
265
+ "type": "string",
266
+ "pattern": "^[a-z0-9][a-z0-9.-]*$"
267
+ },
268
+ "kind": {
269
+ "type": "string",
270
+ "enum": [
271
+ "must",
272
+ "must_not"
273
+ ]
274
+ },
275
+ "text": {
276
+ "type": "string",
277
+ "minLength": 1
278
+ },
279
+ "enforced_by": {
280
+ "type": "string",
281
+ "enum": [
282
+ "types",
283
+ "gateway",
284
+ "control",
285
+ "database",
286
+ "review"
287
+ ]
288
+ },
289
+ "probe": {
290
+ "type": "string",
291
+ "pattern": "^[a-z0-9][a-z0-9.-]*$"
292
+ }
293
+ },
294
+ "required": [
295
+ "id",
296
+ "kind",
297
+ "text",
298
+ "enforced_by",
299
+ "probe"
300
+ ],
301
+ "additionalProperties": false
302
+ }
303
+ },
304
+ "examples": {
305
+ "minItems": 1,
306
+ "type": "array",
307
+ "items": {
308
+ "type": "object",
309
+ "properties": {
310
+ "id": {
311
+ "type": "string",
312
+ "pattern": "^[a-z0-9][a-z0-9.-]*$"
313
+ },
314
+ "title": {
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "lang": {
319
+ "type": "string",
320
+ "enum": [
321
+ "ts",
322
+ "js",
323
+ "sh",
324
+ "ps1",
325
+ "json",
326
+ "sql"
327
+ ]
328
+ },
329
+ "code": {
330
+ "type": "string",
331
+ "minLength": 1
332
+ },
333
+ "probe": {
334
+ "type": "string",
335
+ "pattern": "^[a-z0-9][a-z0-9.-]*$"
336
+ }
337
+ },
338
+ "required": [
339
+ "id",
340
+ "title",
341
+ "lang",
342
+ "code",
343
+ "probe"
344
+ ],
345
+ "additionalProperties": false
346
+ }
347
+ },
348
+ "probes": {
349
+ "minItems": 1,
350
+ "type": "array",
351
+ "items": {
352
+ "type": "object",
353
+ "properties": {
354
+ "id": {
355
+ "type": "string",
356
+ "pattern": "^[a-z0-9][a-z0-9.-]*$"
357
+ },
358
+ "half": {
359
+ "type": "string",
360
+ "enum": [
361
+ "runtime",
362
+ "drill"
363
+ ]
364
+ },
365
+ "expect": {
366
+ "type": "string",
367
+ "enum": [
368
+ "pass",
369
+ "refused_as_expected"
370
+ ]
371
+ },
372
+ "refusal": {
373
+ "type": "string",
374
+ "pattern": "^[a-z][a-z0-9_]*$"
375
+ },
376
+ "smoke": {
377
+ "type": "boolean"
378
+ },
379
+ "cost_hint_usd": {
380
+ "type": "number",
381
+ "minimum": 0
382
+ },
383
+ "two_step": {
384
+ "type": "boolean"
385
+ },
386
+ "note": {
387
+ "type": "string",
388
+ "minLength": 1
389
+ }
390
+ },
391
+ "required": [
392
+ "id",
393
+ "half",
394
+ "expect"
395
+ ],
396
+ "additionalProperties": false
397
+ }
398
+ }
399
+ },
400
+ "required": [
401
+ "$schema",
402
+ "format",
403
+ "component",
404
+ "title",
405
+ "summary",
406
+ "status",
407
+ "surfaces",
408
+ "rules",
409
+ "probes"
410
+ ],
411
+ "additionalProperties": false,
412
+ "title": "Workbench capabilities manifest",
413
+ "description": "Generated from capabilitySchema in @mccaskie-labs/workbench-config by `npm run capabilities:build`. Do not edit."
414
+ }