@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
@@ -1,30 +1,771 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:speculo:ops:status:v2",
4
- "title": "Ops Global Status",
3
+ "$id": "urn:speculo:ops:status:v3",
5
4
  "type": "object",
6
- "required": ["schema_version", "workflow", "active", "archived"],
7
5
  "properties": {
8
- "schema_version": {"const": 2},
9
- "workflow": {"const": "ops"},
10
- "active": {"type": "array", "items": {"$ref": "#/$defs/entry"}, "uniqueItems": true},
11
- "archived": {"type": "array", "items": {"$ref": "#/$defs/entry"}, "uniqueItems": true}
6
+ "schema_version": {
7
+ "const": 3
8
+ },
9
+ "workflow": {
10
+ "const": "ops"
11
+ },
12
+ "revision": {
13
+ "type": "integer",
14
+ "minimum": 0
15
+ },
16
+ "controller": {
17
+ "oneOf": [
18
+ {
19
+ "type": "object",
20
+ "properties": {
21
+ "controller_id": {
22
+ "type": "string",
23
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
24
+ "maxLength": 80
25
+ },
26
+ "state_root": {
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "created_at": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ }
34
+ },
35
+ "required": [
36
+ "controller_id",
37
+ "state_root",
38
+ "created_at"
39
+ ],
40
+ "additionalProperties": false
41
+ },
42
+ {
43
+ "type": "null"
44
+ }
45
+ ]
46
+ },
47
+ "hosts": {
48
+ "type": "object",
49
+ "propertyNames": {
50
+ "type": "string",
51
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
52
+ "maxLength": 80
53
+ },
54
+ "additionalProperties": {
55
+ "$ref": "#/$defs/host"
56
+ }
57
+ },
58
+ "projects": {
59
+ "type": "object",
60
+ "propertyNames": {
61
+ "type": "string",
62
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
63
+ "maxLength": 80
64
+ },
65
+ "additionalProperties": {
66
+ "$ref": "#/$defs/project"
67
+ }
68
+ },
69
+ "deployments": {
70
+ "type": "object",
71
+ "propertyNames": {
72
+ "type": "string",
73
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
74
+ "maxLength": 80
75
+ },
76
+ "additionalProperties": {
77
+ "$ref": "#/$defs/deployment"
78
+ }
79
+ },
80
+ "allocations": {
81
+ "type": "object",
82
+ "propertyNames": {
83
+ "type": "string",
84
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
85
+ "maxLength": 80
86
+ },
87
+ "additionalProperties": {
88
+ "$ref": "#/$defs/allocation"
89
+ }
90
+ },
91
+ "bindings": {
92
+ "type": "object",
93
+ "propertyNames": {
94
+ "type": "string",
95
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
96
+ "maxLength": 80
97
+ },
98
+ "additionalProperties": {
99
+ "$ref": "#/$defs/binding"
100
+ }
101
+ },
102
+ "releases": {
103
+ "type": "object",
104
+ "propertyNames": {
105
+ "type": "string",
106
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
107
+ "maxLength": 80
108
+ },
109
+ "additionalProperties": {
110
+ "type": "object",
111
+ "properties": {
112
+ "run_id": {
113
+ "type": "string",
114
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
115
+ "maxLength": 80
116
+ },
117
+ "worker": {
118
+ "enum": [
119
+ "I",
120
+ "H",
121
+ "D"
122
+ ]
123
+ },
124
+ "status": {
125
+ "enum": [
126
+ "planned",
127
+ "approved",
128
+ "executing",
129
+ "partial",
130
+ "failed",
131
+ "unknown",
132
+ "docs_pending",
133
+ "completed"
134
+ ]
135
+ },
136
+ "plan_path": {
137
+ "type": "string",
138
+ "minLength": 1
139
+ },
140
+ "host_ids": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string",
144
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
145
+ "maxLength": 80
146
+ }
147
+ },
148
+ "deployment_ids": {
149
+ "type": "array",
150
+ "items": {
151
+ "type": "string",
152
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
153
+ "maxLength": 80
154
+ }
155
+ },
156
+ "updated_at": {
157
+ "type": "string",
158
+ "minLength": 1
159
+ },
160
+ "results": {
161
+ "type": "object"
162
+ }
163
+ },
164
+ "required": [
165
+ "run_id",
166
+ "worker",
167
+ "status",
168
+ "plan_path",
169
+ "host_ids",
170
+ "deployment_ids",
171
+ "updated_at",
172
+ "results"
173
+ ],
174
+ "additionalProperties": false
175
+ }
176
+ },
177
+ "policies": {
178
+ "type": "object",
179
+ "properties": {
180
+ "server_readme_credentials": {
181
+ "type": "boolean"
182
+ },
183
+ "server_operations": {
184
+ "type": "boolean"
185
+ },
186
+ "strict_docker_root": {
187
+ "const": true
188
+ }
189
+ },
190
+ "required": [
191
+ "server_readme_credentials",
192
+ "server_operations",
193
+ "strict_docker_root"
194
+ ],
195
+ "additionalProperties": false
196
+ },
197
+ "updated_at": {
198
+ "type": [
199
+ "string",
200
+ "null"
201
+ ]
202
+ }
12
203
  },
204
+ "required": [
205
+ "schema_version",
206
+ "workflow",
207
+ "revision",
208
+ "controller",
209
+ "hosts",
210
+ "projects",
211
+ "deployments",
212
+ "allocations",
213
+ "bindings",
214
+ "releases",
215
+ "policies",
216
+ "updated_at"
217
+ ],
218
+ "additionalProperties": false,
13
219
  "$defs": {
14
- "entry": {
220
+ "host": {
15
221
  "type": "object",
16
- "required": ["scope", "project_id", "change"],
17
222
  "properties": {
18
- "scope": {"enum": ["global", "project"]},
19
- "project_id": {"type": ["string", "null"], "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
20
- "change": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"}
223
+ "host_id": {
224
+ "type": "string",
225
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
226
+ "maxLength": 80
227
+ },
228
+ "display_name": {
229
+ "type": "string",
230
+ "minLength": 1
231
+ },
232
+ "platform": {
233
+ "enum": [
234
+ "linux",
235
+ "windows",
236
+ "darwin"
237
+ ]
238
+ },
239
+ "transport": {
240
+ "enum": [
241
+ "local",
242
+ "ssh"
243
+ ]
244
+ },
245
+ "root": {
246
+ "type": "string",
247
+ "minLength": 1
248
+ },
249
+ "identity": {
250
+ "type": "string",
251
+ "pattern": "^[a-f0-9]{64}$"
252
+ },
253
+ "connection": {
254
+ "type": "object",
255
+ "properties": {
256
+ "hostname": {
257
+ "type": "string",
258
+ "minLength": 1
259
+ },
260
+ "username": {
261
+ "type": "string",
262
+ "minLength": 1
263
+ },
264
+ "port": {
265
+ "type": "integer",
266
+ "minimum": 1,
267
+ "maximum": 65535
268
+ },
269
+ "known_hosts": {
270
+ "type": "string",
271
+ "minLength": 1
272
+ },
273
+ "identity_file": {
274
+ "type": "string",
275
+ "minLength": 1
276
+ },
277
+ "python": {
278
+ "type": "string",
279
+ "minLength": 1
280
+ },
281
+ "sudo": {
282
+ "type": "boolean"
283
+ },
284
+ "shell": {
285
+ "enum": [
286
+ "posix",
287
+ "powershell"
288
+ ]
289
+ }
290
+ },
291
+ "required": [],
292
+ "additionalProperties": false
293
+ }
21
294
  },
22
- "allOf": [
23
- {"if": {"properties": {"scope": {"const": "global"}}}, "then": {"properties": {"project_id": {"const": null}}}},
24
- {"if": {"properties": {"scope": {"const": "project"}}}, "then": {"properties": {"project_id": {"type": "string"}}}}
295
+ "required": [
296
+ "host_id",
297
+ "display_name",
298
+ "platform",
299
+ "transport",
300
+ "root",
301
+ "identity",
302
+ "connection"
303
+ ],
304
+ "additionalProperties": false
305
+ },
306
+ "project": {
307
+ "type": "object",
308
+ "properties": {
309
+ "project_id": {
310
+ "type": "string",
311
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
312
+ "maxLength": 80
313
+ },
314
+ "display_name": {
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "kind": {
319
+ "enum": [
320
+ "app",
321
+ "shared-service"
322
+ ]
323
+ },
324
+ "service_type": {
325
+ "type": [
326
+ "string",
327
+ "null"
328
+ ]
329
+ },
330
+ "source": {
331
+ "type": "object",
332
+ "properties": {
333
+ "type": {
334
+ "enum": [
335
+ "local",
336
+ "git",
337
+ "image",
338
+ "manual"
339
+ ]
340
+ },
341
+ "location": {
342
+ "type": "string",
343
+ "minLength": 1
344
+ },
345
+ "revision": {
346
+ "type": "string",
347
+ "minLength": 1
348
+ }
349
+ },
350
+ "required": [
351
+ "type",
352
+ "location",
353
+ "revision"
354
+ ],
355
+ "additionalProperties": false
356
+ }
357
+ },
358
+ "required": [
359
+ "project_id",
360
+ "display_name",
361
+ "kind",
362
+ "service_type",
363
+ "source"
364
+ ],
365
+ "additionalProperties": false
366
+ },
367
+ "deployment": {
368
+ "type": "object",
369
+ "properties": {
370
+ "deployment_id": {
371
+ "type": "string",
372
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
373
+ "maxLength": 80
374
+ },
375
+ "project_id": {
376
+ "type": "string",
377
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
378
+ "maxLength": 80
379
+ },
380
+ "host_id": {
381
+ "type": "string",
382
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
383
+ "maxLength": 80
384
+ },
385
+ "environment": {
386
+ "type": "string",
387
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
388
+ "maxLength": 80
389
+ },
390
+ "instance": {
391
+ "type": "string",
392
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
393
+ "maxLength": 80
394
+ },
395
+ "layout": {
396
+ "enum": [
397
+ "flat",
398
+ "instances"
399
+ ]
400
+ },
401
+ "method": {
402
+ "enum": [
403
+ "compose",
404
+ "native"
405
+ ]
406
+ },
407
+ "version": {
408
+ "type": "string",
409
+ "minLength": 1
410
+ },
411
+ "observed_version": {
412
+ "type": [
413
+ "string",
414
+ "null"
415
+ ]
416
+ },
417
+ "root": {
418
+ "type": "string",
419
+ "minLength": 1
420
+ },
421
+ "status": {
422
+ "enum": [
423
+ "planned",
424
+ "running",
425
+ "configured",
426
+ "docs_pending",
427
+ "completed",
428
+ "failed",
429
+ "unknown",
430
+ "retired"
431
+ ]
432
+ },
433
+ "installed_at": {
434
+ "type": [
435
+ "string",
436
+ "null"
437
+ ]
438
+ },
439
+ "updated_at": {
440
+ "type": [
441
+ "string",
442
+ "null"
443
+ ]
444
+ },
445
+ "run_id": {
446
+ "type": [
447
+ "string",
448
+ "null"
449
+ ]
450
+ },
451
+ "compose_name": {
452
+ "type": [
453
+ "string",
454
+ "null"
455
+ ]
456
+ },
457
+ "storage": {
458
+ "type": "array",
459
+ "items": {
460
+ "type": "object",
461
+ "properties": {
462
+ "component": {
463
+ "type": "string",
464
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
465
+ "maxLength": 80
466
+ },
467
+ "purpose": {
468
+ "type": "string",
469
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
470
+ "maxLength": 80
471
+ },
472
+ "path": {
473
+ "type": "string",
474
+ "minLength": 1
475
+ },
476
+ "owner": {
477
+ "type": "string"
478
+ }
479
+ },
480
+ "required": [
481
+ "component",
482
+ "purpose",
483
+ "path"
484
+ ],
485
+ "additionalProperties": false
486
+ }
487
+ },
488
+ "commands": {
489
+ "type": "object",
490
+ "properties": {
491
+ "start": {
492
+ "type": "array",
493
+ "items": {
494
+ "type": "array",
495
+ "items": {
496
+ "type": "string",
497
+ "minLength": 1
498
+ }
499
+ }
500
+ },
501
+ "stop": {
502
+ "type": "array",
503
+ "items": {
504
+ "type": "array",
505
+ "items": {
506
+ "type": "string",
507
+ "minLength": 1
508
+ }
509
+ }
510
+ },
511
+ "verify": {
512
+ "type": "array",
513
+ "items": {
514
+ "type": "array",
515
+ "items": {
516
+ "type": "string",
517
+ "minLength": 1
518
+ }
519
+ }
520
+ }
521
+ },
522
+ "required": [
523
+ "start",
524
+ "stop",
525
+ "verify"
526
+ ],
527
+ "additionalProperties": false
528
+ },
529
+ "credential_refs": {
530
+ "type": "array",
531
+ "items": {
532
+ "type": "string",
533
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
534
+ },
535
+ "uniqueItems": true
536
+ },
537
+ "backup": {
538
+ "type": "string",
539
+ "minLength": 1
540
+ },
541
+ "recovery": {
542
+ "type": "string",
543
+ "minLength": 1
544
+ },
545
+ "notes": {
546
+ "type": "array",
547
+ "items": {
548
+ "type": "string"
549
+ }
550
+ },
551
+ "source": {
552
+ "type": "object",
553
+ "properties": {
554
+ "type": {
555
+ "enum": [
556
+ "local",
557
+ "git",
558
+ "image",
559
+ "manual"
560
+ ]
561
+ },
562
+ "location": {
563
+ "type": "string",
564
+ "minLength": 1
565
+ },
566
+ "revision": {
567
+ "type": "string",
568
+ "minLength": 1
569
+ }
570
+ },
571
+ "required": [
572
+ "type",
573
+ "location",
574
+ "revision"
575
+ ],
576
+ "additionalProperties": false
577
+ },
578
+ "service": {
579
+ "type": "object"
580
+ }
581
+ },
582
+ "required": [
583
+ "deployment_id",
584
+ "project_id",
585
+ "host_id",
586
+ "environment",
587
+ "instance",
588
+ "layout",
589
+ "method",
590
+ "version",
591
+ "observed_version",
592
+ "root",
593
+ "status",
594
+ "installed_at",
595
+ "updated_at",
596
+ "run_id",
597
+ "compose_name",
598
+ "storage",
599
+ "commands",
600
+ "credential_refs",
601
+ "backup",
602
+ "recovery",
603
+ "notes",
604
+ "source",
605
+ "service"
606
+ ],
607
+ "additionalProperties": false
608
+ },
609
+ "allocation": {
610
+ "type": "object",
611
+ "properties": {
612
+ "allocation_id": {
613
+ "type": "string",
614
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
615
+ "maxLength": 80
616
+ },
617
+ "provider_deployment_id": {
618
+ "type": "string",
619
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
620
+ "maxLength": 80
621
+ },
622
+ "owner_project_id": {
623
+ "type": "string",
624
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
625
+ "maxLength": 80
626
+ },
627
+ "environment": {
628
+ "type": "string",
629
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
630
+ "maxLength": 80
631
+ },
632
+ "data_group": {
633
+ "type": "string",
634
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
635
+ "maxLength": 80
636
+ },
637
+ "resource_kind": {
638
+ "enum": [
639
+ "database",
640
+ "bucket",
641
+ "redis-acl",
642
+ "generic"
643
+ ]
644
+ },
645
+ "resource_name": {
646
+ "type": "string",
647
+ "minLength": 1
648
+ },
649
+ "credential_ref": {
650
+ "type": "string",
651
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
652
+ },
653
+ "shared_owners": {
654
+ "type": "array",
655
+ "items": {
656
+ "type": "string",
657
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
658
+ "maxLength": 80
659
+ },
660
+ "uniqueItems": true
661
+ },
662
+ "status": {
663
+ "enum": [
664
+ "planned",
665
+ "active",
666
+ "retained",
667
+ "retired"
668
+ ]
669
+ },
670
+ "recovery_scope": {
671
+ "enum": [
672
+ "logical",
673
+ "provider-wide",
674
+ "application-export",
675
+ "unverified"
676
+ ]
677
+ },
678
+ "notes": {
679
+ "type": "string",
680
+ "minLength": 1
681
+ }
682
+ },
683
+ "required": [
684
+ "allocation_id",
685
+ "provider_deployment_id",
686
+ "owner_project_id",
687
+ "environment",
688
+ "data_group",
689
+ "resource_kind",
690
+ "resource_name",
691
+ "credential_ref",
692
+ "shared_owners",
693
+ "status",
694
+ "recovery_scope",
695
+ "notes"
696
+ ],
697
+ "additionalProperties": false
698
+ },
699
+ "binding": {
700
+ "type": "object",
701
+ "properties": {
702
+ "binding_id": {
703
+ "type": "string",
704
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
705
+ "maxLength": 80
706
+ },
707
+ "consumer_deployment_id": {
708
+ "type": "string",
709
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
710
+ "maxLength": 80
711
+ },
712
+ "mode": {
713
+ "enum": [
714
+ "dedicated",
715
+ "shared",
716
+ "external"
717
+ ]
718
+ },
719
+ "provider_deployment_id": {
720
+ "type": [
721
+ "string",
722
+ "null"
723
+ ]
724
+ },
725
+ "allocation_id": {
726
+ "type": [
727
+ "string",
728
+ "null"
729
+ ]
730
+ },
731
+ "endpoint": {
732
+ "type": "string",
733
+ "minLength": 1
734
+ },
735
+ "credential_ref": {
736
+ "type": "string",
737
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
738
+ },
739
+ "status": {
740
+ "enum": [
741
+ "planned",
742
+ "active",
743
+ "retired"
744
+ ]
745
+ },
746
+ "component": {
747
+ "type": "string",
748
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
749
+ "maxLength": 80
750
+ },
751
+ "network": {
752
+ "type": "string",
753
+ "minLength": 1
754
+ }
755
+ },
756
+ "required": [
757
+ "binding_id",
758
+ "consumer_deployment_id",
759
+ "mode",
760
+ "provider_deployment_id",
761
+ "allocation_id",
762
+ "endpoint",
763
+ "credential_ref",
764
+ "status",
765
+ "component",
766
+ "network"
25
767
  ],
26
768
  "additionalProperties": false
27
769
  }
28
- },
29
- "additionalProperties": false
770
+ }
30
771
  }