prizmkit 1.1.159 → 1.1.160

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 (77) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codebuddy/settings-adapter.js +76 -25
  3. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +9 -2
  4. package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +42 -15
  5. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
  6. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +1 -1
  7. package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +6 -6
  8. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +4 -3
  9. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +2 -2
  10. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +2 -2
  11. package/bundled/dev-pipeline/tests/test_runtime_commit.py +68 -13
  12. package/bundled/dev-pipeline/tests/test_unified_cli.py +10 -6
  13. package/bundled/rules/prizm/prizm-commit-workflow.md +7 -7
  14. package/bundled/rules/prizm/prizm-documentation.md +24 -65
  15. package/bundled/rules/prizm/prizm-progressive-loading.md +9 -8
  16. package/bundled/skills/_metadata.json +1 -1
  17. package/bundled/skills/prizmkit-code-review/SKILL.md +1 -1
  18. package/bundled/skills/prizmkit-committer/SKILL.md +48 -41
  19. package/bundled/skills/prizmkit-deploy/SKILL.md +172 -198
  20. package/bundled/skills/prizmkit-deploy/references/capability-contract.md +137 -0
  21. package/bundled/skills/prizmkit-deploy/references/deploy-record-schema.json +1053 -0
  22. package/bundled/skills/prizmkit-deploy/references/deployment-declaration-schema.json +291 -0
  23. package/bundled/skills/prizmkit-deploy/references/legacy-migration.md +90 -0
  24. package/bundled/skills/prizmkit-deploy/references/policy-and-execution.md +170 -0
  25. package/bundled/skills/prizmkit-deploy/references/real-resource-test-policy.md +73 -0
  26. package/bundled/skills/prizmkit-deploy/references/verification-and-recovery.md +164 -0
  27. package/bundled/skills/prizmkit-deploy/scripts/validate-deploy-artifact.py +371 -0
  28. package/bundled/skills/prizmkit-implement/SKILL.md +2 -2
  29. package/bundled/skills/prizmkit-init/SKILL.md +17 -17
  30. package/bundled/skills/prizmkit-init/references/update-supplement.md +5 -5
  31. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +17 -11
  32. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +95 -155
  33. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +6 -5
  34. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +4 -2
  35. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +9 -10
  36. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +6 -5
  37. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +13 -12
  38. package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -3
  39. package/bundled/skills/prizmkit-test/SKILL.md +26 -13
  40. package/bundled/skills/prizmkit-test/references/boundary-contract-and-test-double-guidance.md +8 -4
  41. package/bundled/skills/prizmkit-test/references/independent-test-review.md +7 -3
  42. package/bundled/skills/prizmkit-test/references/test-coverage-model.md +33 -10
  43. package/bundled/skills/prizmkit-test/references/test-report-template.md +33 -11
  44. package/bundled/skills/prizmkit-workflow/SKILL.md +5 -7
  45. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +5 -6
  46. package/bundled/templates/hooks/commit-intent-status.py +9 -41
  47. package/bundled/templates/hooks/commit-intent.json +3 -3
  48. package/bundled/templates/hooks/diff-prizm-docs.py +3 -1
  49. package/bundled/templates/hooks/prizm-pre-commit.py +32 -6
  50. package/bundled/templates/hooks/run-python-hook.cjs +44 -0
  51. package/bundled/templates/hooks/validate-prizm-docs.py +399 -173
  52. package/bundled/templates/project-memory-template.md +19 -19
  53. package/package.json +1 -1
  54. package/src/clean.js +6 -7
  55. package/src/gitignore-template.js +8 -12
  56. package/src/scaffold.js +125 -71
  57. package/bundled/skills/prizmkit-deploy/assets/deploy-document-template.md +0 -89
  58. package/bundled/skills/prizmkit-deploy/references/ci-cd-workflows.md +0 -145
  59. package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +0 -109
  60. package/bundled/skills/prizmkit-deploy/references/data-safety-examples.md +0 -120
  61. package/bundled/skills/prizmkit-deploy/references/database-setup.md +0 -65
  62. package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +0 -150
  63. package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +0 -78
  64. package/bundled/skills/prizmkit-deploy/references/deploy-metadata-schema.json +0 -49
  65. package/bundled/skills/prizmkit-deploy/references/deployment-modes.md +0 -50
  66. package/bundled/skills/prizmkit-deploy/references/direct-upload.md +0 -26
  67. package/bundled/skills/prizmkit-deploy/references/dns-setup.md +0 -42
  68. package/bundled/skills/prizmkit-deploy/references/docker-deploy.md +0 -31
  69. package/bundled/skills/prizmkit-deploy/references/firewall-setup.md +0 -37
  70. package/bundled/skills/prizmkit-deploy/references/live-validation-notes.md +0 -21
  71. package/bundled/skills/prizmkit-deploy/references/nginx-blue-green.md +0 -59
  72. package/bundled/skills/prizmkit-deploy/references/pending-input-schema.json +0 -164
  73. package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +0 -221
  74. package/bundled/skills/prizmkit-deploy/references/ssh-bootstrap-flow.md +0 -49
  75. package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +0 -41
  76. package/bundled/skills/prizmkit-deploy/references/ssh-takeover.md +0 -20
  77. package/bundled/skills/prizmkit-deploy/references/ssl-setup.md +0 -56
@@ -0,0 +1,1053 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://prizmkit.dev/schemas/deploy-record.schema.json",
4
+ "title": "PrizmKit Sole Local Deployment Record",
5
+ "description": "The complete non-sensitive schema for .prizmkit/deploy/deploy.json. Secret values and raw command or log output are prohibited.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "project",
11
+ "profiles",
12
+ "secret_references",
13
+ "current",
14
+ "latest_result",
15
+ "history",
16
+ "recovery",
17
+ "legacy_migration"
18
+ ],
19
+ "properties": {
20
+ "schema_version": {
21
+ "const": 1
22
+ },
23
+ "project": {
24
+ "$ref": "#/$defs/project"
25
+ },
26
+ "profiles": {
27
+ "type": "array",
28
+ "maxItems": 20,
29
+ "items": {
30
+ "$ref": "#/$defs/profile"
31
+ }
32
+ },
33
+ "secret_references": {
34
+ "type": "array",
35
+ "maxItems": 100,
36
+ "items": {
37
+ "$ref": "#/$defs/secretReference"
38
+ }
39
+ },
40
+ "current": {
41
+ "$ref": "#/$defs/currentState"
42
+ },
43
+ "latest_result": {
44
+ "oneOf": [
45
+ {
46
+ "type": "null"
47
+ },
48
+ {
49
+ "allOf": [
50
+ {
51
+ "$ref": "#/$defs/terminalResult"
52
+ },
53
+ {
54
+ "properties": {
55
+ "status": {
56
+ "const": "SUCCEEDED"
57
+ }
58
+ }
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "allOf": [
64
+ {
65
+ "$ref": "#/$defs/terminalResult"
66
+ },
67
+ {
68
+ "properties": {
69
+ "status": {
70
+ "const": "FAILED"
71
+ }
72
+ }
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ "allOf": [
78
+ {
79
+ "$ref": "#/$defs/terminalResult"
80
+ },
81
+ {
82
+ "properties": {
83
+ "status": {
84
+ "const": "BLOCKED"
85
+ }
86
+ }
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ "allOf": [
92
+ {
93
+ "$ref": "#/$defs/terminalResult"
94
+ },
95
+ {
96
+ "properties": {
97
+ "status": {
98
+ "const": "WAITING_USER"
99
+ }
100
+ }
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "allOf": [
106
+ {
107
+ "$ref": "#/$defs/terminalResult"
108
+ },
109
+ {
110
+ "properties": {
111
+ "status": {
112
+ "const": "CANCELLED"
113
+ }
114
+ }
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ },
120
+ "history": {
121
+ "type": "array",
122
+ "maxItems": 50,
123
+ "items": {
124
+ "$ref": "#/$defs/historyEntry"
125
+ }
126
+ },
127
+ "recovery": {
128
+ "oneOf": [
129
+ {
130
+ "type": "null"
131
+ },
132
+ {
133
+ "$ref": "#/$defs/recovery"
134
+ }
135
+ ]
136
+ },
137
+ "legacy_migration": {
138
+ "$ref": "#/$defs/legacyMigration"
139
+ }
140
+ },
141
+ "allOf": [
142
+ {
143
+ "if": {
144
+ "properties": {
145
+ "latest_result": {
146
+ "type": "object",
147
+ "properties": {
148
+ "status": {
149
+ "const": "WAITING_USER"
150
+ }
151
+ },
152
+ "required": [
153
+ "status"
154
+ ]
155
+ }
156
+ }
157
+ },
158
+ "then": {
159
+ "properties": {
160
+ "recovery": {
161
+ "$ref": "#/$defs/recovery"
162
+ }
163
+ }
164
+ }
165
+ },
166
+ {
167
+ "if": {
168
+ "properties": {
169
+ "latest_result": {
170
+ "type": "object",
171
+ "properties": {
172
+ "status": {
173
+ "enum": [
174
+ "SUCCEEDED",
175
+ "CANCELLED"
176
+ ]
177
+ }
178
+ },
179
+ "required": [
180
+ "status"
181
+ ]
182
+ }
183
+ }
184
+ },
185
+ "then": {
186
+ "properties": {
187
+ "recovery": {
188
+ "type": "null"
189
+ }
190
+ }
191
+ }
192
+ }
193
+ ],
194
+ "$defs": {
195
+ "operation": {
196
+ "enum": [
197
+ "deploy",
198
+ "status",
199
+ "health",
200
+ "logs",
201
+ "stop",
202
+ "restart",
203
+ "rollback",
204
+ "history",
205
+ "validate",
206
+ "diagnose",
207
+ "takeover",
208
+ "resume",
209
+ "cancel"
210
+ ]
211
+ },
212
+ "projectRelativePath": {
213
+ "type": "string",
214
+ "minLength": 1,
215
+ "maxLength": 512,
216
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*//)(?!.*\/$)(?!\\.{1,2}(?:/|$))(?!.*(?:/)\\.{1,2}(?:/|$))[^\\u0000-\\u001f\\u007f-\\u009f\\ud800-\\udfff]+$"
217
+ },
218
+ "legacyDeployPath": {
219
+ "allOf": [
220
+ {
221
+ "$ref": "#/$defs/projectRelativePath"
222
+ },
223
+ {
224
+ "pattern": "^\\.prizmkit/deploy/.+"
225
+ }
226
+ ]
227
+ },
228
+ "evidence": {
229
+ "type": "object",
230
+ "additionalProperties": false,
231
+ "required": [
232
+ "origin",
233
+ "observation",
234
+ "method",
235
+ "observed_at"
236
+ ],
237
+ "properties": {
238
+ "origin": {
239
+ "type": "string",
240
+ "minLength": 1,
241
+ "maxLength": 256
242
+ },
243
+ "observation": {
244
+ "type": "string",
245
+ "minLength": 1,
246
+ "maxLength": 512
247
+ },
248
+ "method": {
249
+ "enum": [
250
+ "direct_read",
251
+ "read_only_probe",
252
+ "official_documentation",
253
+ "user_supplied",
254
+ "legacy_preserved"
255
+ ]
256
+ },
257
+ "observed_at": {
258
+ "type": [
259
+ "string",
260
+ "null"
261
+ ],
262
+ "format": "date-time"
263
+ }
264
+ }
265
+ },
266
+ "project": {
267
+ "type": "object",
268
+ "additionalProperties": false,
269
+ "required": [
270
+ "id",
271
+ "root",
272
+ "revision",
273
+ "native_config_files",
274
+ "evidence"
275
+ ],
276
+ "properties": {
277
+ "id": {
278
+ "type": "string",
279
+ "minLength": 1,
280
+ "maxLength": 128
281
+ },
282
+ "root": {
283
+ "const": "."
284
+ },
285
+ "revision": {
286
+ "type": [
287
+ "string",
288
+ "null"
289
+ ],
290
+ "maxLength": 256
291
+ },
292
+ "native_config_files": {
293
+ "type": "array",
294
+ "maxItems": 50,
295
+ "uniqueItems": true,
296
+ "items": {
297
+ "$ref": "#/$defs/projectRelativePath"
298
+ }
299
+ },
300
+ "evidence": {
301
+ "type": "array",
302
+ "maxItems": 50,
303
+ "items": {
304
+ "$ref": "#/$defs/evidence"
305
+ }
306
+ }
307
+ }
308
+ },
309
+ "profile": {
310
+ "type": "object",
311
+ "additionalProperties": false,
312
+ "required": [
313
+ "id",
314
+ "environment",
315
+ "target_ref",
316
+ "endpoint_ref",
317
+ "actual_ports",
318
+ "native_config_files",
319
+ "evidence"
320
+ ],
321
+ "properties": {
322
+ "id": {
323
+ "type": "string",
324
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
325
+ },
326
+ "environment": {
327
+ "type": "string",
328
+ "minLength": 1,
329
+ "maxLength": 64
330
+ },
331
+ "target_ref": {
332
+ "type": "string",
333
+ "minLength": 1,
334
+ "maxLength": 256
335
+ },
336
+ "endpoint_ref": {
337
+ "type": [
338
+ "string",
339
+ "null"
340
+ ],
341
+ "maxLength": 512
342
+ },
343
+ "actual_ports": {
344
+ "type": "array",
345
+ "maxItems": 32,
346
+ "uniqueItems": true,
347
+ "items": {
348
+ "type": "integer",
349
+ "minimum": 1,
350
+ "maximum": 65535
351
+ }
352
+ },
353
+ "native_config_files": {
354
+ "type": "array",
355
+ "maxItems": 50,
356
+ "uniqueItems": true,
357
+ "items": {
358
+ "$ref": "#/$defs/projectRelativePath"
359
+ }
360
+ },
361
+ "evidence": {
362
+ "type": "array",
363
+ "maxItems": 50,
364
+ "items": {
365
+ "$ref": "#/$defs/evidence"
366
+ }
367
+ }
368
+ }
369
+ },
370
+ "secretReference": {
371
+ "type": "object",
372
+ "additionalProperties": false,
373
+ "description": "A reference and presence marker only. Secret values and hashes are forbidden.",
374
+ "required": [
375
+ "name",
376
+ "source_ref",
377
+ "required",
378
+ "present"
379
+ ],
380
+ "properties": {
381
+ "name": {
382
+ "type": "string",
383
+ "pattern": "^[A-Za-z_][A-Za-z0-9_.-]{0,127}$"
384
+ },
385
+ "source_ref": {
386
+ "type": "string",
387
+ "minLength": 1,
388
+ "maxLength": 256
389
+ },
390
+ "required": {
391
+ "type": "boolean"
392
+ },
393
+ "present": {
394
+ "enum": [
395
+ "yes",
396
+ "no",
397
+ "unknown"
398
+ ]
399
+ }
400
+ }
401
+ },
402
+ "healthCheck": {
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "required": [
406
+ "name",
407
+ "kind",
408
+ "target_ref",
409
+ "expected",
410
+ "required"
411
+ ],
412
+ "properties": {
413
+ "name": {
414
+ "type": "string",
415
+ "minLength": 1,
416
+ "maxLength": 128
417
+ },
418
+ "kind": {
419
+ "enum": [
420
+ "command",
421
+ "service_state",
422
+ "network",
423
+ "application",
424
+ "target_native"
425
+ ]
426
+ },
427
+ "target_ref": {
428
+ "type": "string",
429
+ "minLength": 1,
430
+ "maxLength": 512
431
+ },
432
+ "expected": {
433
+ "type": "string",
434
+ "minLength": 1,
435
+ "maxLength": 256
436
+ },
437
+ "required": {
438
+ "type": "boolean"
439
+ }
440
+ }
441
+ },
442
+ "rollbackReference": {
443
+ "type": "object",
444
+ "additionalProperties": false,
445
+ "required": [
446
+ "availability",
447
+ "release_identity",
448
+ "mechanism_ref",
449
+ "verified_at"
450
+ ],
451
+ "properties": {
452
+ "availability": {
453
+ "enum": [
454
+ "VERIFIED",
455
+ "UNVERIFIED",
456
+ "ABSENT",
457
+ "UNKNOWN",
458
+ "NOT_APPLICABLE"
459
+ ]
460
+ },
461
+ "release_identity": {
462
+ "type": [
463
+ "string",
464
+ "null"
465
+ ],
466
+ "maxLength": 256
467
+ },
468
+ "mechanism_ref": {
469
+ "type": [
470
+ "string",
471
+ "null"
472
+ ],
473
+ "maxLength": 512
474
+ },
475
+ "verified_at": {
476
+ "type": [
477
+ "string",
478
+ "null"
479
+ ],
480
+ "format": "date-time"
481
+ }
482
+ }
483
+ },
484
+ "currentState": {
485
+ "type": "object",
486
+ "additionalProperties": false,
487
+ "required": [
488
+ "profile_id",
489
+ "release_identity",
490
+ "live_state",
491
+ "health_boundary",
492
+ "rollback"
493
+ ],
494
+ "properties": {
495
+ "profile_id": {
496
+ "type": [
497
+ "string",
498
+ "null"
499
+ ],
500
+ "maxLength": 64
501
+ },
502
+ "release_identity": {
503
+ "type": [
504
+ "string",
505
+ "null"
506
+ ],
507
+ "maxLength": 256
508
+ },
509
+ "live_state": {
510
+ "enum": [
511
+ "LIVE",
512
+ "DEGRADED",
513
+ "OFFLINE",
514
+ "UNKNOWN",
515
+ "NOT_APPLICABLE"
516
+ ]
517
+ },
518
+ "health_boundary": {
519
+ "type": "array",
520
+ "maxItems": 32,
521
+ "items": {
522
+ "$ref": "#/$defs/healthCheck"
523
+ }
524
+ },
525
+ "rollback": {
526
+ "$ref": "#/$defs/rollbackReference"
527
+ }
528
+ }
529
+ },
530
+ "verificationLayer": {
531
+ "type": "object",
532
+ "additionalProperties": false,
533
+ "required": [
534
+ "layer",
535
+ "status",
536
+ "required",
537
+ "evidence"
538
+ ],
539
+ "properties": {
540
+ "layer": {
541
+ "enum": [
542
+ "command_or_platform",
543
+ "runtime_or_release",
544
+ "configured_health",
545
+ "external_url",
546
+ "startup_logs"
547
+ ]
548
+ },
549
+ "status": {
550
+ "enum": [
551
+ "PASSED",
552
+ "FAILED",
553
+ "INACCESSIBLE",
554
+ "NOT_APPLICABLE"
555
+ ]
556
+ },
557
+ "required": {
558
+ "type": "boolean"
559
+ },
560
+ "evidence": {
561
+ "type": "string",
562
+ "minLength": 1,
563
+ "maxLength": 512
564
+ }
565
+ }
566
+ },
567
+ "terminalResult": {
568
+ "type": "object",
569
+ "additionalProperties": false,
570
+ "required": [
571
+ "status",
572
+ "operation",
573
+ "profile_id",
574
+ "plan_id",
575
+ "started_at",
576
+ "finished_at",
577
+ "summary",
578
+ "live_state",
579
+ "release_identity",
580
+ "rollback_availability",
581
+ "verification",
582
+ "residual_resources",
583
+ "record_update",
584
+ "recovery_guidance",
585
+ "next_operations"
586
+ ],
587
+ "properties": {
588
+ "status": {
589
+ "enum": [
590
+ "SUCCEEDED",
591
+ "FAILED",
592
+ "BLOCKED",
593
+ "WAITING_USER",
594
+ "CANCELLED"
595
+ ]
596
+ },
597
+ "operation": {
598
+ "$ref": "#/$defs/operation"
599
+ },
600
+ "profile_id": {
601
+ "type": [
602
+ "string",
603
+ "null"
604
+ ],
605
+ "maxLength": 64
606
+ },
607
+ "plan_id": {
608
+ "type": [
609
+ "string",
610
+ "null"
611
+ ],
612
+ "maxLength": 128
613
+ },
614
+ "started_at": {
615
+ "type": [
616
+ "string",
617
+ "null"
618
+ ],
619
+ "format": "date-time"
620
+ },
621
+ "finished_at": {
622
+ "type": [
623
+ "string",
624
+ "null"
625
+ ],
626
+ "format": "date-time"
627
+ },
628
+ "summary": {
629
+ "type": "string",
630
+ "minLength": 1,
631
+ "maxLength": 512
632
+ },
633
+ "live_state": {
634
+ "enum": [
635
+ "LIVE",
636
+ "DEGRADED",
637
+ "OFFLINE",
638
+ "UNKNOWN",
639
+ "NOT_APPLICABLE"
640
+ ]
641
+ },
642
+ "release_identity": {
643
+ "type": [
644
+ "string",
645
+ "null"
646
+ ],
647
+ "maxLength": 256
648
+ },
649
+ "rollback_availability": {
650
+ "enum": [
651
+ "VERIFIED",
652
+ "UNVERIFIED",
653
+ "ABSENT",
654
+ "UNKNOWN",
655
+ "NOT_APPLICABLE"
656
+ ]
657
+ },
658
+ "verification": {
659
+ "type": "array",
660
+ "minItems": 5,
661
+ "maxItems": 5,
662
+ "items": {
663
+ "$ref": "#/$defs/verificationLayer"
664
+ },
665
+ "allOf": [
666
+ {
667
+ "contains": {
668
+ "properties": {
669
+ "layer": {
670
+ "const": "command_or_platform"
671
+ }
672
+ },
673
+ "required": [
674
+ "layer"
675
+ ]
676
+ },
677
+ "minContains": 1,
678
+ "maxContains": 1
679
+ },
680
+ {
681
+ "contains": {
682
+ "properties": {
683
+ "layer": {
684
+ "const": "runtime_or_release"
685
+ }
686
+ },
687
+ "required": [
688
+ "layer"
689
+ ]
690
+ },
691
+ "minContains": 1,
692
+ "maxContains": 1
693
+ },
694
+ {
695
+ "contains": {
696
+ "properties": {
697
+ "layer": {
698
+ "const": "configured_health"
699
+ }
700
+ },
701
+ "required": [
702
+ "layer"
703
+ ]
704
+ },
705
+ "minContains": 1,
706
+ "maxContains": 1
707
+ },
708
+ {
709
+ "contains": {
710
+ "properties": {
711
+ "layer": {
712
+ "const": "external_url"
713
+ }
714
+ },
715
+ "required": [
716
+ "layer"
717
+ ]
718
+ },
719
+ "minContains": 1,
720
+ "maxContains": 1
721
+ },
722
+ {
723
+ "contains": {
724
+ "properties": {
725
+ "layer": {
726
+ "const": "startup_logs"
727
+ }
728
+ },
729
+ "required": [
730
+ "layer"
731
+ ]
732
+ },
733
+ "minContains": 1,
734
+ "maxContains": 1
735
+ }
736
+ ]
737
+ },
738
+ "residual_resources": {
739
+ "type": "array",
740
+ "maxItems": 32,
741
+ "items": {
742
+ "type": "string",
743
+ "minLength": 1,
744
+ "maxLength": 256
745
+ }
746
+ },
747
+ "record_update": {
748
+ "enum": [
749
+ "UPDATED",
750
+ "UNCHANGED",
751
+ "FAILED",
752
+ "NOT_ATTEMPTED"
753
+ ]
754
+ },
755
+ "recovery_guidance": {
756
+ "type": "array",
757
+ "maxItems": 20,
758
+ "items": {
759
+ "type": "string",
760
+ "minLength": 1,
761
+ "maxLength": 512
762
+ }
763
+ },
764
+ "next_operations": {
765
+ "type": "array",
766
+ "maxItems": 20,
767
+ "items": {
768
+ "$ref": "#/$defs/operation"
769
+ }
770
+ }
771
+ },
772
+ "allOf": [
773
+ {
774
+ "if": {
775
+ "properties": {
776
+ "status": {
777
+ "const": "SUCCEEDED"
778
+ }
779
+ },
780
+ "required": [
781
+ "status"
782
+ ]
783
+ },
784
+ "then": {
785
+ "properties": {
786
+ "verification": {
787
+ "not": {
788
+ "contains": {
789
+ "properties": {
790
+ "required": {
791
+ "const": true
792
+ },
793
+ "status": {
794
+ "enum": [
795
+ "FAILED",
796
+ "INACCESSIBLE",
797
+ "NOT_APPLICABLE"
798
+ ]
799
+ }
800
+ },
801
+ "required": [
802
+ "required",
803
+ "status"
804
+ ]
805
+ }
806
+ }
807
+ }
808
+ }
809
+ }
810
+ }
811
+ ]
812
+ },
813
+ "historyEntry": {
814
+ "type": "object",
815
+ "additionalProperties": false,
816
+ "required": [
817
+ "operation_id",
818
+ "timestamp",
819
+ "operation",
820
+ "status",
821
+ "profile_id",
822
+ "release_identity",
823
+ "summary"
824
+ ],
825
+ "properties": {
826
+ "operation_id": {
827
+ "type": "string",
828
+ "minLength": 1,
829
+ "maxLength": 128
830
+ },
831
+ "timestamp": {
832
+ "type": "string",
833
+ "format": "date-time"
834
+ },
835
+ "operation": {
836
+ "$ref": "#/$defs/operation"
837
+ },
838
+ "status": {
839
+ "enum": [
840
+ "SUCCEEDED",
841
+ "FAILED",
842
+ "BLOCKED",
843
+ "WAITING_USER",
844
+ "CANCELLED"
845
+ ]
846
+ },
847
+ "profile_id": {
848
+ "type": [
849
+ "string",
850
+ "null"
851
+ ],
852
+ "maxLength": 64
853
+ },
854
+ "release_identity": {
855
+ "type": [
856
+ "string",
857
+ "null"
858
+ ],
859
+ "maxLength": 256
860
+ },
861
+ "summary": {
862
+ "type": "string",
863
+ "minLength": 1,
864
+ "maxLength": 512
865
+ }
866
+ }
867
+ },
868
+ "recovery": {
869
+ "type": "object",
870
+ "additionalProperties": false,
871
+ "required": [
872
+ "plan_id",
873
+ "immutable_plan_digest",
874
+ "operation",
875
+ "profile_id",
876
+ "last_proven_step",
877
+ "confirmations",
878
+ "pending_checkpoint",
879
+ "observations"
880
+ ],
881
+ "properties": {
882
+ "plan_id": {
883
+ "type": "string",
884
+ "minLength": 1,
885
+ "maxLength": 128
886
+ },
887
+ "immutable_plan_digest": {
888
+ "type": "string",
889
+ "pattern": "^[a-f0-9]{64}$"
890
+ },
891
+ "operation": {
892
+ "$ref": "#/$defs/operation"
893
+ },
894
+ "profile_id": {
895
+ "type": [
896
+ "string",
897
+ "null"
898
+ ],
899
+ "maxLength": 64
900
+ },
901
+ "last_proven_step": {
902
+ "type": [
903
+ "string",
904
+ "null"
905
+ ],
906
+ "maxLength": 128
907
+ },
908
+ "confirmations": {
909
+ "type": "array",
910
+ "maxItems": 20,
911
+ "items": {
912
+ "type": "object",
913
+ "additionalProperties": false,
914
+ "required": [
915
+ "kind",
916
+ "plan_digest",
917
+ "confirmed_at"
918
+ ],
919
+ "properties": {
920
+ "kind": {
921
+ "enum": [
922
+ "COMPLETE_PLAN",
923
+ "PROJECT_FILE_CHANGE",
924
+ "PRIVILEGED_OR_GLOBAL_DEPENDENCY",
925
+ "DESTRUCTIVE_OR_IRREVERSIBLE_MIGRATION",
926
+ "SHARED_INFRASTRUCTURE",
927
+ "PLAN_EXPANSION",
928
+ "UNKNOWN_WRITE_REPLAY",
929
+ "NO_RELIABLE_ROLLBACK"
930
+ ]
931
+ },
932
+ "plan_digest": {
933
+ "type": "string",
934
+ "pattern": "^[a-f0-9]{64}$"
935
+ },
936
+ "confirmed_at": {
937
+ "type": "string",
938
+ "format": "date-time"
939
+ }
940
+ }
941
+ }
942
+ },
943
+ "pending_checkpoint": {
944
+ "type": "object",
945
+ "additionalProperties": false,
946
+ "required": [
947
+ "kind",
948
+ "action",
949
+ "expected_postcondition"
950
+ ],
951
+ "properties": {
952
+ "kind": {
953
+ "enum": [
954
+ "LOGIN",
955
+ "MFA",
956
+ "BROWSER_APPROVAL",
957
+ "MANUAL_ACTION",
958
+ "CONFIRMATION",
959
+ "UNKNOWN_OUTCOME_INSPECTION"
960
+ ]
961
+ },
962
+ "action": {
963
+ "type": "string",
964
+ "minLength": 1,
965
+ "maxLength": 512
966
+ },
967
+ "expected_postcondition": {
968
+ "type": "string",
969
+ "minLength": 1,
970
+ "maxLength": 512
971
+ }
972
+ }
973
+ },
974
+ "observations": {
975
+ "type": "array",
976
+ "maxItems": 20,
977
+ "items": {
978
+ "$ref": "#/$defs/evidence"
979
+ }
980
+ }
981
+ }
982
+ },
983
+ "legacyMigration": {
984
+ "type": "object",
985
+ "additionalProperties": false,
986
+ "required": [
987
+ "scanned",
988
+ "sources",
989
+ "migrated_facts",
990
+ "conflicts",
991
+ "preserved_paths"
992
+ ],
993
+ "properties": {
994
+ "scanned": {
995
+ "type": "boolean"
996
+ },
997
+ "sources": {
998
+ "type": "array",
999
+ "maxItems": 200,
1000
+ "items": {
1001
+ "type": "object",
1002
+ "additionalProperties": false,
1003
+ "required": [
1004
+ "path",
1005
+ "status"
1006
+ ],
1007
+ "properties": {
1008
+ "path": {
1009
+ "$ref": "#/$defs/legacyDeployPath"
1010
+ },
1011
+ "status": {
1012
+ "enum": [
1013
+ "VALIDATED",
1014
+ "MIGRATED_NON_SECRET",
1015
+ "PRESERVED_UNCERTAIN",
1016
+ "PRESERVED_SECRET",
1017
+ "INVALID",
1018
+ "NOT_FOUND"
1019
+ ]
1020
+ }
1021
+ }
1022
+ }
1023
+ },
1024
+ "migrated_facts": {
1025
+ "type": "array",
1026
+ "maxItems": 100,
1027
+ "items": {
1028
+ "type": "string",
1029
+ "minLength": 1,
1030
+ "maxLength": 256
1031
+ }
1032
+ },
1033
+ "conflicts": {
1034
+ "type": "array",
1035
+ "maxItems": 100,
1036
+ "items": {
1037
+ "type": "string",
1038
+ "minLength": 1,
1039
+ "maxLength": 512
1040
+ }
1041
+ },
1042
+ "preserved_paths": {
1043
+ "type": "array",
1044
+ "maxItems": 200,
1045
+ "uniqueItems": true,
1046
+ "items": {
1047
+ "$ref": "#/$defs/legacyDeployPath"
1048
+ }
1049
+ }
1050
+ }
1051
+ }
1052
+ }
1053
+ }