@namewta/speculo 1.0.4 → 1.0.6

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.
Files changed (122) hide show
  1. package/README.md +1 -1
  2. package/dist/src/kernel.d.ts +23 -2
  3. package/dist/src/kernel.js +9 -0
  4. package/dist/src/kernel.js.map +1 -1
  5. package/dist/src/ops-resources.d.ts +3 -0
  6. package/dist/src/ops-resources.js +188 -0
  7. package/dist/src/ops-resources.js.map +1 -0
  8. package/dist/src/refresh.js +20 -2
  9. package/dist/src/refresh.js.map +1 -1
  10. package/dist/src/structured.js +8 -1
  11. package/dist/src/structured.js.map +1 -1
  12. package/dist/src/workflows.js +1 -1
  13. package/dist/src/workflows.js.map +1 -1
  14. package/package.json +1 -1
  15. package/template/.speculo/README.md +3 -3
  16. package/template/.speculo/kernel/README.md +3 -0
  17. package/template/.speculo/kernel/checkpoint.schema.json +138 -4
  18. package/template/commands/archive-and-consolidate.md +5 -1
  19. package/template/commands/status.md +2 -2
  20. package/template/workflows/ops/D-project-deploy/D-project-deploy.md +34 -0
  21. package/template/workflows/ops/H-host-manage/H-host-manage.md +30 -0
  22. package/template/workflows/ops/I-initialize/I-initialize.md +28 -0
  23. package/template/workflows/ops/INDEX.md +15 -17
  24. package/template/workflows/ops/README.md +59 -87
  25. package/template/workflows/ops/_state/status.json +15 -3
  26. package/template/workflows/ops/common/CAPABILITIES.md +23 -0
  27. package/template/workflows/ops/common/USAGE.md +112 -0
  28. package/template/workflows/ops/common/examples/README.md +7 -0
  29. package/template/workflows/ops/common/examples/binding.example.json +12 -0
  30. package/template/workflows/ops/common/examples/compose-app.example.json +56 -0
  31. package/template/workflows/ops/common/examples/credential.example.json +9 -0
  32. package/template/workflows/ops/common/examples/environment-request.example.json +7 -0
  33. package/template/workflows/ops/common/examples/register.example.json +44 -0
  34. package/template/workflows/ops/common/examples/shared-allocation.example.json +37 -0
  35. package/template/workflows/ops/common/rules/activation-and-memory.md +5 -20
  36. package/template/workflows/ops/common/rules/persistence-and-secrets.md +27 -0
  37. package/template/workflows/ops/common/rules/recovery.md +15 -0
  38. package/template/workflows/ops/common/rules/shared-services.md +13 -0
  39. package/template/workflows/ops/common/schemas/allocation.schema.json +92 -0
  40. package/template/workflows/ops/common/schemas/approval.schema.json +41 -21
  41. package/template/workflows/ops/common/schemas/binding.schema.json +73 -0
  42. package/template/workflows/ops/common/schemas/deployment.schema.json +244 -0
  43. package/template/workflows/ops/common/schemas/host.schema.json +88 -0
  44. package/template/workflows/ops/common/schemas/plan.schema.json +1573 -0
  45. package/template/workflows/ops/common/schemas/project.schema.json +55 -11
  46. package/template/workflows/ops/common/schemas/spec.schema.json +1032 -0
  47. package/template/workflows/ops/common/schemas/status.schema.json +758 -17
  48. package/template/workflows/ops/common/service-profiles/custom.md +5 -0
  49. package/template/workflows/ops/common/service-profiles/docker-engine.md +11 -0
  50. package/template/workflows/ops/common/service-profiles/minio.md +7 -0
  51. package/template/workflows/ops/common/service-profiles/mysql.md +7 -0
  52. package/template/workflows/ops/common/service-profiles/redis.md +7 -0
  53. package/template/workflows/ops/common/templates/CONTROLLER-RECORD.md +13 -0
  54. package/template/workflows/ops/common/templates/EXECUTION-PLAN.md +15 -0
  55. package/template/workflows/ops/common/templates/HOST-README.md +11 -0
  56. package/template/workflows/ops/common/templates/PROJECT-README.md +15 -0
  57. package/template/workflows/ops/common/tests/test_ops.py +392 -0
  58. package/template/workflows/ops/common/tools/bootstrap.ps1 +18 -0
  59. package/template/workflows/ops/common/tools/bootstrap.sh +27 -0
  60. package/template/workflows/ops/common/tools/demo-local.py +64 -0
  61. package/template/workflows/ops/common/tools/ops.py +7 -0
  62. package/template/workflows/ops/common/tools/opslib/__init__.py +2 -0
  63. package/template/workflows/ops/common/tools/opslib/__pycache__/__init__.cpython-312.pyc +0 -0
  64. package/template/workflows/ops/common/tools/opslib/__pycache__/core.cpython-312.pyc +0 -0
  65. package/template/workflows/ops/common/tools/opslib/__pycache__/model.cpython-312.pyc +0 -0
  66. package/template/workflows/ops/common/tools/opslib/agent.py +510 -0
  67. package/template/workflows/ops/common/tools/opslib/cli.py +172 -0
  68. package/template/workflows/ops/common/tools/opslib/core.py +199 -0
  69. package/template/workflows/ops/common/tools/opslib/docs.py +199 -0
  70. package/template/workflows/ops/common/tools/opslib/execution.py +248 -0
  71. package/template/workflows/ops/common/tools/opslib/host_recipes.py +67 -0
  72. package/template/workflows/ops/common/tools/opslib/model.py +199 -0
  73. package/template/workflows/ops/common/tools/opslib/native_windows.py +32 -0
  74. package/template/workflows/ops/common/tools/opslib/planner.py +497 -0
  75. package/template/workflows/ops/common/tools/opslib/services.py +47 -0
  76. package/template/workflows/ops/common/tools/opslib/sources.py +27 -0
  77. package/template/workflows/ops/common/tools/opslib/transport.py +55 -0
  78. package/template/workflows/ops/common/tools/validate-ops.mjs +32 -991
  79. package/template/workflows/ops/manifest.json +60 -1
  80. package/template/workflows/ops/runtime-contract.json +1 -6
  81. package/template/workflows/ops/A-archive-and-learn/A-archive-and-learn.md +0 -71
  82. package/template/workflows/ops/A-archive-and-learn/promotion-plan-template.md +0 -41
  83. package/template/workflows/ops/A-archive-and-learn/retrospective-template.md +0 -53
  84. package/template/workflows/ops/E-execute-and-stabilize/E-execute-and-stabilize.md +0 -82
  85. package/template/workflows/ops/E-execute-and-stabilize/attempt-summary-template.md +0 -44
  86. package/template/workflows/ops/E-execute-and-stabilize/diagnosis-template.md +0 -24
  87. package/template/workflows/ops/E-execute-and-stabilize/handoff-template.md +0 -32
  88. package/template/workflows/ops/E-execute-and-stabilize/rollback-template.md +0 -26
  89. package/template/workflows/ops/E-execute-and-stabilize/verification-state-template.json +0 -30
  90. package/template/workflows/ops/E-execute-and-stabilize/verification-template.md +0 -55
  91. package/template/workflows/ops/I-intake-and-assess/I-intake-and-assess.md +0 -73
  92. package/template/workflows/ops/I-intake-and-assess/change-status-template.json +0 -26
  93. package/template/workflows/ops/I-intake-and-assess/collector-catalog.md +0 -28
  94. package/template/workflows/ops/I-intake-and-assess/deployment-dossier-template.md +0 -62
  95. package/template/workflows/ops/I-intake-and-assess/global-change-status-template.json +0 -26
  96. package/template/workflows/ops/I-intake-and-assess/project-detection.md +0 -38
  97. package/template/workflows/ops/I-intake-and-assess/request-template.md +0 -44
  98. package/template/workflows/ops/I-intake-and-assess/system-report-template.md +0 -34
  99. package/template/workflows/ops/I-intake-and-assess/target-profile-template.json +0 -24
  100. package/template/workflows/ops/P-plan-and-approve/P-plan-and-approve.md +0 -72
  101. package/template/workflows/ops/P-plan-and-approve/plan-review-template.md +0 -78
  102. package/template/workflows/ops/_state/archive/.gitkeep +0 -1
  103. package/template/workflows/ops/_state/changes/.gitkeep +0 -1
  104. package/template/workflows/ops/common/rules/artifact-contract.md +0 -37
  105. package/template/workflows/ops/common/rules/closure-and-learning.md +0 -25
  106. package/template/workflows/ops/common/rules/evidence-and-redaction.md +0 -22
  107. package/template/workflows/ops/common/rules/execution-loop.md +0 -27
  108. package/template/workflows/ops/common/rules/path-and-scope-contract.md +0 -21
  109. package/template/workflows/ops/common/rules/plan-and-approval.md +0 -25
  110. package/template/workflows/ops/common/rules/project-and-change-scope.md +0 -20
  111. package/template/workflows/ops/common/rules/target-profile-and-release-gates.md +0 -44
  112. package/template/workflows/ops/common/schemas/attempt.schema.json +0 -42
  113. package/template/workflows/ops/common/schemas/change-status.schema.json +0 -43
  114. package/template/workflows/ops/common/schemas/deployment-model.schema.json +0 -26
  115. package/template/workflows/ops/common/schemas/implementation-plan.schema.json +0 -221
  116. package/template/workflows/ops/common/schemas/inventory-snapshot.schema.json +0 -31
  117. package/template/workflows/ops/common/schemas/journal-event.schema.json +0 -22
  118. package/template/workflows/ops/common/schemas/promotion-approval.schema.json +0 -20
  119. package/template/workflows/ops/common/schemas/promotion-manifest.schema.json +0 -22
  120. package/template/workflows/ops/common/schemas/target-profile.schema.json +0 -32
  121. package/template/workflows/ops/common/schemas/verification-state.schema.json +0 -30
  122. package/template/workflows/ops/common/tools/close-change.mjs +0 -177
@@ -0,0 +1,1032 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:ops:spec:v1",
4
+ "type": "object",
5
+ "properties": {
6
+ "schema_version": {
7
+ "const": 1
8
+ },
9
+ "worker": {
10
+ "enum": [
11
+ "I",
12
+ "H",
13
+ "D"
14
+ ]
15
+ },
16
+ "operation": {
17
+ "enum": [
18
+ "prepare",
19
+ "deploy",
20
+ "upgrade",
21
+ "rollback",
22
+ "uninstall",
23
+ "maintain",
24
+ "migrate"
25
+ ]
26
+ },
27
+ "resource_updates": {
28
+ "type": "object",
29
+ "properties": {
30
+ "hosts": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "properties": {
35
+ "host_id": {
36
+ "type": "string",
37
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
38
+ "maxLength": 80
39
+ },
40
+ "display_name": {
41
+ "type": "string",
42
+ "minLength": 1
43
+ },
44
+ "platform": {
45
+ "enum": [
46
+ "linux",
47
+ "windows",
48
+ "darwin"
49
+ ]
50
+ },
51
+ "transport": {
52
+ "enum": [
53
+ "local",
54
+ "ssh"
55
+ ]
56
+ },
57
+ "root": {
58
+ "type": "string",
59
+ "minLength": 1
60
+ },
61
+ "identity": {
62
+ "type": "string",
63
+ "pattern": "^[a-f0-9]{64}$"
64
+ },
65
+ "connection": {
66
+ "type": "object",
67
+ "properties": {
68
+ "hostname": {
69
+ "type": "string",
70
+ "minLength": 1
71
+ },
72
+ "username": {
73
+ "type": "string",
74
+ "minLength": 1
75
+ },
76
+ "port": {
77
+ "type": "integer",
78
+ "minimum": 1,
79
+ "maximum": 65535
80
+ },
81
+ "known_hosts": {
82
+ "type": "string",
83
+ "minLength": 1
84
+ },
85
+ "identity_file": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "python": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "sudo": {
94
+ "type": "boolean"
95
+ },
96
+ "shell": {
97
+ "enum": [
98
+ "posix",
99
+ "powershell"
100
+ ]
101
+ }
102
+ },
103
+ "required": [],
104
+ "additionalProperties": false
105
+ }
106
+ },
107
+ "required": [
108
+ "host_id",
109
+ "display_name",
110
+ "platform",
111
+ "transport",
112
+ "root",
113
+ "identity",
114
+ "connection"
115
+ ],
116
+ "additionalProperties": false
117
+ }
118
+ },
119
+ "projects": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object",
123
+ "properties": {
124
+ "project_id": {
125
+ "type": "string",
126
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
127
+ "maxLength": 80
128
+ },
129
+ "display_name": {
130
+ "type": "string",
131
+ "minLength": 1
132
+ },
133
+ "kind": {
134
+ "enum": [
135
+ "app",
136
+ "shared-service"
137
+ ]
138
+ },
139
+ "service_type": {
140
+ "type": [
141
+ "string",
142
+ "null"
143
+ ]
144
+ },
145
+ "source": {
146
+ "type": "object",
147
+ "properties": {
148
+ "type": {
149
+ "enum": [
150
+ "local",
151
+ "git",
152
+ "image",
153
+ "manual"
154
+ ]
155
+ },
156
+ "location": {
157
+ "type": "string",
158
+ "minLength": 1
159
+ },
160
+ "revision": {
161
+ "type": "string",
162
+ "minLength": 1
163
+ }
164
+ },
165
+ "required": [
166
+ "type",
167
+ "location",
168
+ "revision"
169
+ ],
170
+ "additionalProperties": false
171
+ }
172
+ },
173
+ "required": [
174
+ "project_id",
175
+ "display_name",
176
+ "kind",
177
+ "service_type",
178
+ "source"
179
+ ],
180
+ "additionalProperties": false
181
+ }
182
+ }
183
+ },
184
+ "required": [],
185
+ "additionalProperties": false
186
+ },
187
+ "reason": {
188
+ "type": "string",
189
+ "minLength": 1
190
+ },
191
+ "run_id": {
192
+ "type": "string",
193
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
194
+ "maxLength": 80
195
+ },
196
+ "hosts": {
197
+ "type": "array",
198
+ "items": {
199
+ "type": "string",
200
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
201
+ "maxLength": 80
202
+ }
203
+ },
204
+ "deployments": {
205
+ "type": "array",
206
+ "items": {
207
+ "type": "object",
208
+ "properties": {
209
+ "deployment_id": {
210
+ "type": "string",
211
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
212
+ "maxLength": 80
213
+ },
214
+ "project_id": {
215
+ "type": "string",
216
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
217
+ "maxLength": 80
218
+ },
219
+ "host_id": {
220
+ "type": "string",
221
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
222
+ "maxLength": 80
223
+ },
224
+ "environment": {
225
+ "type": "string",
226
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
227
+ "maxLength": 80
228
+ },
229
+ "instance": {
230
+ "type": "string",
231
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
232
+ "maxLength": 80
233
+ },
234
+ "layout": {
235
+ "enum": [
236
+ "flat",
237
+ "instances"
238
+ ]
239
+ },
240
+ "method": {
241
+ "enum": [
242
+ "compose",
243
+ "native"
244
+ ]
245
+ },
246
+ "version": {
247
+ "type": "string",
248
+ "minLength": 1
249
+ },
250
+ "files": {
251
+ "type": "array",
252
+ "items": {
253
+ "type": "object",
254
+ "properties": {
255
+ "path": {
256
+ "type": "string",
257
+ "minLength": 1
258
+ },
259
+ "content": {
260
+ "type": "string"
261
+ },
262
+ "source": {
263
+ "type": "string",
264
+ "minLength": 1
265
+ },
266
+ "mode": {
267
+ "type": "integer",
268
+ "minimum": 256,
269
+ "maximum": 493
270
+ }
271
+ },
272
+ "required": [
273
+ "path"
274
+ ],
275
+ "additionalProperties": false
276
+ }
277
+ },
278
+ "env": {
279
+ "type": "object",
280
+ "additionalProperties": {
281
+ "type": "object",
282
+ "additionalProperties": {
283
+ "type": "string"
284
+ }
285
+ }
286
+ },
287
+ "storage": {
288
+ "type": "array",
289
+ "items": {
290
+ "type": "object",
291
+ "properties": {
292
+ "component": {
293
+ "type": "string",
294
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
295
+ "maxLength": 80
296
+ },
297
+ "purpose": {
298
+ "type": "string",
299
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
300
+ "maxLength": 80
301
+ },
302
+ "area": {
303
+ "enum": [
304
+ "data",
305
+ "config",
306
+ "logs",
307
+ "backups"
308
+ ]
309
+ },
310
+ "uid": {
311
+ "type": "integer",
312
+ "minimum": 0
313
+ },
314
+ "gid": {
315
+ "type": "integer",
316
+ "minimum": 0
317
+ },
318
+ "mode": {
319
+ "type": "integer",
320
+ "minimum": 448,
321
+ "maximum": 511
322
+ }
323
+ },
324
+ "required": [
325
+ "component",
326
+ "purpose"
327
+ ],
328
+ "additionalProperties": false
329
+ }
330
+ },
331
+ "compose": {
332
+ "type": "object",
333
+ "properties": {
334
+ "services": {
335
+ "type": "object",
336
+ "additionalProperties": {
337
+ "type": "object"
338
+ }
339
+ },
340
+ "networks": {
341
+ "type": "object"
342
+ },
343
+ "name": {
344
+ "type": "string",
345
+ "minLength": 1
346
+ }
347
+ },
348
+ "required": [
349
+ "services"
350
+ ],
351
+ "additionalProperties": false
352
+ },
353
+ "native": {
354
+ "type": "object",
355
+ "properties": {
356
+ "supervisor": {
357
+ "enum": [
358
+ "systemd",
359
+ "windows-task",
360
+ "oneshot"
361
+ ]
362
+ },
363
+ "env_files": {
364
+ "type": "array",
365
+ "items": {
366
+ "type": "string",
367
+ "minLength": 1
368
+ }
369
+ },
370
+ "argv": {
371
+ "type": "array",
372
+ "items": {
373
+ "type": "string",
374
+ "minLength": 1
375
+ },
376
+ "minItems": 1
377
+ },
378
+ "environment": {
379
+ "type": "object",
380
+ "additionalProperties": {
381
+ "type": "string"
382
+ }
383
+ },
384
+ "account": {
385
+ "type": "string",
386
+ "minLength": 1
387
+ },
388
+ "run_level": {
389
+ "enum": [
390
+ "Limited",
391
+ "Highest"
392
+ ]
393
+ },
394
+ "timeout": {
395
+ "type": "integer",
396
+ "minimum": 1,
397
+ "maximum": 3600
398
+ }
399
+ },
400
+ "required": [
401
+ "supervisor",
402
+ "argv"
403
+ ],
404
+ "additionalProperties": false
405
+ },
406
+ "health": {
407
+ "type": "array",
408
+ "items": {
409
+ "type": "object",
410
+ "properties": {
411
+ "type": {
412
+ "enum": [
413
+ "tcp",
414
+ "http",
415
+ "command",
416
+ "file"
417
+ ]
418
+ },
419
+ "hostname": {
420
+ "type": "string",
421
+ "minLength": 1
422
+ },
423
+ "port": {
424
+ "type": "integer",
425
+ "minimum": 1,
426
+ "maximum": 65535
427
+ },
428
+ "url": {
429
+ "type": "string",
430
+ "minLength": 1
431
+ },
432
+ "status": {
433
+ "type": "integer"
434
+ },
435
+ "contains": {
436
+ "type": "string",
437
+ "minLength": 1
438
+ },
439
+ "argv": {
440
+ "type": "array",
441
+ "items": {
442
+ "type": "string",
443
+ "minLength": 1
444
+ },
445
+ "minItems": 1
446
+ },
447
+ "path": {
448
+ "type": "string",
449
+ "minLength": 1
450
+ },
451
+ "sha256": {
452
+ "type": "string",
453
+ "minLength": 1
454
+ },
455
+ "stdout_pattern": {
456
+ "type": "string",
457
+ "minLength": 1
458
+ },
459
+ "env": {
460
+ "type": "object",
461
+ "additionalProperties": {
462
+ "type": "string"
463
+ }
464
+ },
465
+ "timeout": {
466
+ "type": "integer",
467
+ "minimum": 1,
468
+ "maximum": 600
469
+ }
470
+ },
471
+ "required": [
472
+ "type"
473
+ ],
474
+ "additionalProperties": false
475
+ },
476
+ "minItems": 1
477
+ },
478
+ "credential_refs": {
479
+ "type": "array",
480
+ "items": {
481
+ "type": "string",
482
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
483
+ },
484
+ "uniqueItems": true
485
+ },
486
+ "backup": {
487
+ "type": "string",
488
+ "minLength": 1
489
+ },
490
+ "recovery": {
491
+ "type": "string",
492
+ "minLength": 1
493
+ },
494
+ "notes": {
495
+ "type": "array",
496
+ "items": {
497
+ "type": "string"
498
+ }
499
+ },
500
+ "adopt_existing": {
501
+ "type": "boolean"
502
+ },
503
+ "service": {
504
+ "type": "object"
505
+ }
506
+ },
507
+ "required": [
508
+ "deployment_id",
509
+ "project_id",
510
+ "host_id",
511
+ "environment",
512
+ "instance",
513
+ "layout",
514
+ "method",
515
+ "version",
516
+ "health",
517
+ "backup",
518
+ "recovery"
519
+ ],
520
+ "additionalProperties": false
521
+ }
522
+ },
523
+ "host_actions": {
524
+ "type": "array",
525
+ "items": {
526
+ "type": "object",
527
+ "properties": {
528
+ "host_id": {
529
+ "type": "string",
530
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
531
+ "maxLength": 80
532
+ },
533
+ "kind": {
534
+ "enum": [
535
+ "write-control",
536
+ "write-file",
537
+ "install-toolchain",
538
+ "command",
539
+ "quarantine",
540
+ "purge-quarantine",
541
+ "defaults",
542
+ "mkdir"
543
+ ]
544
+ },
545
+ "reason": {
546
+ "type": "string",
547
+ "minLength": 1
548
+ },
549
+ "path": {
550
+ "type": "string",
551
+ "minLength": 1
552
+ },
553
+ "content": {
554
+ "type": "string"
555
+ },
556
+ "source": {
557
+ "type": "string",
558
+ "minLength": 1
559
+ },
560
+ "argv": {
561
+ "type": "array",
562
+ "items": {
563
+ "type": "string",
564
+ "minLength": 1
565
+ },
566
+ "minItems": 1
567
+ },
568
+ "env": {
569
+ "type": "object",
570
+ "additionalProperties": {
571
+ "type": "string"
572
+ }
573
+ },
574
+ "cwd": {
575
+ "type": "string",
576
+ "minLength": 1
577
+ },
578
+ "writes": {
579
+ "type": "array",
580
+ "items": {
581
+ "type": "string",
582
+ "minLength": 1
583
+ }
584
+ },
585
+ "timeout": {
586
+ "type": "integer",
587
+ "minimum": 1,
588
+ "maximum": 7200
589
+ },
590
+ "risk": {
591
+ "enum": [
592
+ "local-reversible",
593
+ "local-destructive",
594
+ "external-mutation",
595
+ "production-critical"
596
+ ]
597
+ },
598
+ "expected_defaults": {
599
+ "type": "object"
600
+ },
601
+ "verification": {
602
+ "type": "array",
603
+ "items": {
604
+ "type": "object",
605
+ "properties": {
606
+ "type": {
607
+ "enum": [
608
+ "tcp",
609
+ "http",
610
+ "command",
611
+ "file"
612
+ ]
613
+ },
614
+ "hostname": {
615
+ "type": "string",
616
+ "minLength": 1
617
+ },
618
+ "port": {
619
+ "type": "integer",
620
+ "minimum": 1,
621
+ "maximum": 65535
622
+ },
623
+ "url": {
624
+ "type": "string",
625
+ "minLength": 1
626
+ },
627
+ "status": {
628
+ "type": "integer"
629
+ },
630
+ "contains": {
631
+ "type": "string",
632
+ "minLength": 1
633
+ },
634
+ "argv": {
635
+ "type": "array",
636
+ "items": {
637
+ "type": "string",
638
+ "minLength": 1
639
+ },
640
+ "minItems": 1
641
+ },
642
+ "path": {
643
+ "type": "string",
644
+ "minLength": 1
645
+ },
646
+ "sha256": {
647
+ "type": "string",
648
+ "minLength": 1
649
+ },
650
+ "stdout_pattern": {
651
+ "type": "string",
652
+ "minLength": 1
653
+ },
654
+ "env": {
655
+ "type": "object",
656
+ "additionalProperties": {
657
+ "type": "string"
658
+ }
659
+ },
660
+ "timeout": {
661
+ "type": "integer",
662
+ "minimum": 1,
663
+ "maximum": 600
664
+ }
665
+ },
666
+ "required": [
667
+ "type"
668
+ ],
669
+ "additionalProperties": false
670
+ },
671
+ "minItems": 1
672
+ },
673
+ "mode": {
674
+ "type": "integer",
675
+ "minimum": 256,
676
+ "maximum": 511
677
+ }
678
+ },
679
+ "required": [
680
+ "host_id",
681
+ "kind",
682
+ "reason"
683
+ ],
684
+ "additionalProperties": false
685
+ }
686
+ },
687
+ "allocations": {
688
+ "type": "array",
689
+ "items": {
690
+ "type": "object",
691
+ "properties": {
692
+ "allocation_id": {
693
+ "type": "string",
694
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
695
+ "maxLength": 80
696
+ },
697
+ "provider_deployment_id": {
698
+ "type": "string",
699
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
700
+ "maxLength": 80
701
+ },
702
+ "owner_project_id": {
703
+ "type": "string",
704
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
705
+ "maxLength": 80
706
+ },
707
+ "environment": {
708
+ "type": "string",
709
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
710
+ "maxLength": 80
711
+ },
712
+ "data_group": {
713
+ "type": "string",
714
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
715
+ "maxLength": 80
716
+ },
717
+ "resource_kind": {
718
+ "enum": [
719
+ "database",
720
+ "bucket",
721
+ "redis-acl",
722
+ "generic"
723
+ ]
724
+ },
725
+ "resource_name": {
726
+ "type": "string",
727
+ "minLength": 1
728
+ },
729
+ "credential_ref": {
730
+ "type": "string",
731
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
732
+ },
733
+ "shared_owners": {
734
+ "type": "array",
735
+ "items": {
736
+ "type": "string",
737
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
738
+ "maxLength": 80
739
+ },
740
+ "uniqueItems": true
741
+ },
742
+ "status": {
743
+ "enum": [
744
+ "planned",
745
+ "active",
746
+ "retained",
747
+ "retired"
748
+ ]
749
+ },
750
+ "recovery_scope": {
751
+ "enum": [
752
+ "logical",
753
+ "provider-wide",
754
+ "application-export",
755
+ "unverified"
756
+ ]
757
+ },
758
+ "notes": {
759
+ "type": "string",
760
+ "minLength": 1
761
+ }
762
+ },
763
+ "required": [
764
+ "allocation_id",
765
+ "provider_deployment_id",
766
+ "owner_project_id",
767
+ "environment",
768
+ "data_group",
769
+ "resource_kind",
770
+ "resource_name",
771
+ "credential_ref",
772
+ "shared_owners",
773
+ "status",
774
+ "recovery_scope",
775
+ "notes"
776
+ ],
777
+ "additionalProperties": false
778
+ }
779
+ },
780
+ "bindings": {
781
+ "type": "array",
782
+ "items": {
783
+ "type": "object",
784
+ "properties": {
785
+ "binding_id": {
786
+ "type": "string",
787
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
788
+ "maxLength": 80
789
+ },
790
+ "consumer_deployment_id": {
791
+ "type": "string",
792
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
793
+ "maxLength": 80
794
+ },
795
+ "mode": {
796
+ "enum": [
797
+ "dedicated",
798
+ "shared",
799
+ "external"
800
+ ]
801
+ },
802
+ "provider_deployment_id": {
803
+ "type": [
804
+ "string",
805
+ "null"
806
+ ]
807
+ },
808
+ "allocation_id": {
809
+ "type": [
810
+ "string",
811
+ "null"
812
+ ]
813
+ },
814
+ "endpoint": {
815
+ "type": "string",
816
+ "minLength": 1
817
+ },
818
+ "credential_ref": {
819
+ "type": "string",
820
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
821
+ },
822
+ "status": {
823
+ "enum": [
824
+ "planned",
825
+ "active",
826
+ "retired"
827
+ ]
828
+ },
829
+ "component": {
830
+ "type": "string",
831
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
832
+ "maxLength": 80
833
+ },
834
+ "network": {
835
+ "type": "string",
836
+ "minLength": 1
837
+ }
838
+ },
839
+ "required": [
840
+ "binding_id",
841
+ "consumer_deployment_id",
842
+ "mode",
843
+ "provider_deployment_id",
844
+ "allocation_id",
845
+ "endpoint",
846
+ "credential_ref",
847
+ "status",
848
+ "component",
849
+ "network"
850
+ ],
851
+ "additionalProperties": false
852
+ }
853
+ },
854
+ "provision": {
855
+ "type": "array",
856
+ "items": {
857
+ "type": "object",
858
+ "properties": {
859
+ "allocation_id": {
860
+ "type": "string",
861
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
862
+ "maxLength": 80
863
+ },
864
+ "adapter": {
865
+ "enum": [
866
+ "mysql",
867
+ "minio",
868
+ "redis",
869
+ "existing"
870
+ ]
871
+ },
872
+ "admin_credential_ref": {
873
+ "type": "string",
874
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
875
+ },
876
+ "app_username": {
877
+ "type": "string",
878
+ "minLength": 1
879
+ },
880
+ "privileges": {
881
+ "type": "array",
882
+ "items": {
883
+ "type": "string",
884
+ "minLength": 1
885
+ }
886
+ },
887
+ "prefix": {
888
+ "type": "string",
889
+ "minLength": 1
890
+ },
891
+ "existing_verification": {
892
+ "type": "object",
893
+ "properties": {
894
+ "type": {
895
+ "enum": [
896
+ "tcp",
897
+ "http",
898
+ "command",
899
+ "file"
900
+ ]
901
+ },
902
+ "hostname": {
903
+ "type": "string",
904
+ "minLength": 1
905
+ },
906
+ "port": {
907
+ "type": "integer",
908
+ "minimum": 1,
909
+ "maximum": 65535
910
+ },
911
+ "url": {
912
+ "type": "string",
913
+ "minLength": 1
914
+ },
915
+ "status": {
916
+ "type": "integer"
917
+ },
918
+ "contains": {
919
+ "type": "string",
920
+ "minLength": 1
921
+ },
922
+ "argv": {
923
+ "type": "array",
924
+ "items": {
925
+ "type": "string",
926
+ "minLength": 1
927
+ },
928
+ "minItems": 1
929
+ },
930
+ "path": {
931
+ "type": "string",
932
+ "minLength": 1
933
+ },
934
+ "sha256": {
935
+ "type": "string",
936
+ "minLength": 1
937
+ },
938
+ "stdout_pattern": {
939
+ "type": "string",
940
+ "minLength": 1
941
+ },
942
+ "env": {
943
+ "type": "object",
944
+ "additionalProperties": {
945
+ "type": "string"
946
+ }
947
+ },
948
+ "timeout": {
949
+ "type": "integer",
950
+ "minimum": 1,
951
+ "maximum": 600
952
+ }
953
+ },
954
+ "required": [
955
+ "type"
956
+ ],
957
+ "additionalProperties": false
958
+ },
959
+ "allow_secret_argv": {
960
+ "type": "boolean"
961
+ },
962
+ "client_path": {
963
+ "type": "string",
964
+ "minLength": 1
965
+ }
966
+ },
967
+ "required": [
968
+ "allocation_id",
969
+ "adapter"
970
+ ],
971
+ "additionalProperties": false
972
+ }
973
+ },
974
+ "retire_deployments": {
975
+ "type": "array",
976
+ "items": {
977
+ "type": "string",
978
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
979
+ "maxLength": 80
980
+ }
981
+ },
982
+ "retire_bindings": {
983
+ "type": "array",
984
+ "items": {
985
+ "type": "string",
986
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
987
+ "maxLength": 80
988
+ }
989
+ },
990
+ "allow_adopt_roots": {
991
+ "type": "array",
992
+ "items": {
993
+ "type": "string",
994
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
995
+ "maxLength": 80
996
+ }
997
+ },
998
+ "acknowledged_consumers": {
999
+ "type": "array",
1000
+ "items": {
1001
+ "type": "string",
1002
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
1003
+ "maxLength": 80
1004
+ }
1005
+ },
1006
+ "rollback_note": {
1007
+ "type": "string",
1008
+ "minLength": 1
1009
+ },
1010
+ "expires_hours": {
1011
+ "type": "integer",
1012
+ "minimum": 1,
1013
+ "maximum": 168
1014
+ },
1015
+ "risk": {
1016
+ "enum": [
1017
+ "local-reversible",
1018
+ "local-destructive",
1019
+ "external-mutation",
1020
+ "production-critical"
1021
+ ]
1022
+ }
1023
+ },
1024
+ "required": [
1025
+ "schema_version",
1026
+ "worker",
1027
+ "operation",
1028
+ "reason",
1029
+ "rollback_note"
1030
+ ],
1031
+ "additionalProperties": false
1032
+ }