File size: 48,066 Bytes
f440f03
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
use axum::{extract::State, Json};
use serde::Serialize;

use crate::app_state::AppState;

const MASTER_MODEL: &str = "Maris Core Reasoning";

#[derive(Serialize, Clone)]
pub struct MasterModelInfo {
    pub name: &'static str,
    pub role: &'static str,
    pub routing_strategy: &'static str,
    pub primary_capabilities: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct SpecialistBranch {
    pub capability: &'static str,
    pub branch: &'static str,
    pub kind: &'static str,
    pub profile: &'static str,
    pub model: &'static str,
    pub endpoint: &'static str,
    pub studio: &'static str,
    pub description: &'static str,
}

#[derive(Serialize, Clone)]
pub struct VisionModule {
    pub capability: &'static str,
    pub title: &'static str,
    pub stage: &'static str,
    pub outputs: Vec<&'static str>,
    pub summary: &'static str,
}

#[derive(Serialize, Clone)]
pub struct CapabilityEntry {
    pub id: &'static str,
    pub title: &'static str,
    pub surface: &'static str,
    pub runtime: &'static str,
    pub lifecycle: &'static str,
    pub summary: &'static str,
}

#[derive(Serialize, Clone)]
pub struct CapabilityDomain {
    pub domain: &'static str,
    pub description: &'static str,
    pub capabilities: Vec<CapabilityEntry>,
}

#[derive(Serialize, Clone)]
pub struct GovernanceSection {
    pub tenancy_model: Vec<&'static str>,
    pub permissions_model: Vec<&'static str>,
    pub audit_model: Vec<&'static str>,
    pub policy_model: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct EventModel {
    pub timeline_stream: &'static str,
    pub event_types: Vec<&'static str>,
    pub metrics: Vec<&'static str>,
    pub usage_dimensions: Vec<&'static str>,
    pub cost_dimensions: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct MemoryMode {
    pub id: &'static str,
    pub title: &'static str,
    pub inputs: Vec<&'static str>,
    pub controls: Vec<&'static str>,
    pub summary: &'static str,
}

#[derive(Serialize, Clone)]
pub struct MemoryManifest {
    pub graph_model: &'static str,
    pub ingestion_pipeline: Vec<&'static str>,
    pub retrieval_policies: Vec<&'static str>,
    pub modes: Vec<MemoryMode>,
}

#[derive(Serialize, Clone)]
pub struct ToolManifest {
    pub id: &'static str,
    pub title: &'static str,
    pub version: &'static str,
    pub category: &'static str,
    pub runtime: &'static str,
    pub permissions: Vec<&'static str>,
    pub sandbox: &'static str,
    pub quota: &'static str,
    pub health: &'static str,
    pub summary: &'static str,
}

#[derive(Serialize, Clone)]
pub struct ToolingManifest {
    pub runtime_contract: Vec<&'static str>,
    pub discovery: Vec<&'static str>,
    pub tools: Vec<ToolManifest>,
}

#[derive(Serialize, Clone)]
pub struct AutonomousRuntimeManifest {
    pub stream_transport: &'static str,
    pub operator_surfaces: Vec<&'static str>,
    pub agent_roles: Vec<&'static str>,
    pub replay_features: Vec<&'static str>,
    pub approval_features: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct EvalSuiteManifest {
    pub id: &'static str,
    pub title: &'static str,
    pub focus: &'static str,
    pub cadence: &'static str,
    pub automation: &'static str,
    pub signals: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct RegressionSuiteManifest {
    pub id: &'static str,
    pub title: &'static str,
    pub scope: &'static str,
    pub trigger: &'static str,
    pub summary: &'static str,
}

#[derive(Serialize, Clone)]
pub struct OutcomeMetricManifest {
    pub id: &'static str,
    pub title: &'static str,
    pub weight_percent: u8,
    pub summary: &'static str,
}

#[derive(Serialize, Clone)]
pub struct ClosedLoopManifest {
    pub failure_sources: Vec<&'static str>,
    pub recommendation_targets: Vec<&'static str>,
    pub safe_optimization_controls: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct LeaderboardManifest {
    pub title: &'static str,
    pub ranking_dimensions: Vec<&'static str>,
    pub refresh_policy: &'static str,
    pub benchmark_surfaces: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct SelfImprovementManifest {
    pub eval_suites: Vec<EvalSuiteManifest>,
    pub regression_suites: Vec<RegressionSuiteManifest>,
    pub outcome_metrics: Vec<OutcomeMetricManifest>,
    pub closed_loop: ClosedLoopManifest,
    pub leaderboard: LeaderboardManifest,
}

#[derive(Serialize, Clone)]
pub struct RuntimeCapability {
    pub id: &'static str,
    pub title: &'static str,
    pub scope: &'static str,
    pub summary: &'static str,
}

#[derive(Serialize, Clone)]
pub struct ProcessRuntimeManifest {
    pub runtime_surfaces: Vec<&'static str>,
    pub background_capabilities: Vec<RuntimeCapability>,
    pub secrets_handling: Vec<&'static str>,
    pub environment_profiles: Vec<&'static str>,
    pub artifact_store: Vec<&'static str>,
    pub workspace_model: Vec<&'static str>,
    pub operations_console: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct PluginPlatformManifest {
    pub manifest_contract: Vec<&'static str>,
    pub review_process: Vec<&'static str>,
    pub signature_trust: Vec<&'static str>,
    pub permissions_model: Vec<&'static str>,
    pub billing_hooks: Vec<&'static str>,
    pub lifecycle_management: Vec<&'static str>,
    pub admin_approval_model: Vec<&'static str>,
    pub listing_metadata: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct TranslationLayerManifest {
    pub translation_planes: Vec<&'static str>,
    pub locale_aware_ux: Vec<&'static str>,
    pub prompt_normalization: Vec<&'static str>,
    pub cross_lingual_memory: Vec<&'static str>,
    pub multimodal_consistency: Vec<&'static str>,
    pub terminology_dictionaries: Vec<&'static str>,
    pub persona_localization: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct PlatformContractObject {
    pub id: &'static str,
    pub title: &'static str,
    pub summary: &'static str,
    pub primary_store: &'static str,
    pub api_contract: &'static str,
}

#[derive(Serialize, Clone)]
pub struct PlatformContractsManifest {
    pub schema_path: &'static str,
    pub sdk_contracts: Vec<&'static str>,
    pub timeline_model: Vec<&'static str>,
    pub core_objects: Vec<PlatformContractObject>,
}

#[derive(Serialize, Clone)]
pub struct HealthSignalManifest {
    pub id: &'static str,
    pub title: &'static str,
    pub track: &'static str,
    pub recovery_levers: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct DiagnosticsManifest {
    pub incident_fields: Vec<&'static str>,
    pub health_signals: Vec<HealthSignalManifest>,
    pub guardrail_actions: Vec<&'static str>,
    pub degradation_modes: Vec<&'static str>,
    pub recovery_actions: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct CloudCapabilityManifest {
    pub identity_objects: Vec<&'static str>,
    pub access_controls: Vec<&'static str>,
    pub billing_objects: Vec<&'static str>,
    pub compliance_controls: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct RoboticsCapabilityManifest {
    pub separation_boundary: Vec<&'static str>,
    pub device_registry: Vec<&'static str>,
    pub execution_plane: Vec<&'static str>,
    pub safety_controls: Vec<&'static str>,
    pub simulator_workflow: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct OperatorOsManifest {
    pub centers: Vec<&'static str>,
    pub shared_models: Vec<&'static str>,
    pub shell_properties: Vec<&'static str>,
    pub external_contracts: Vec<&'static str>,
}

#[derive(Serialize, Clone)]
pub struct SystemInfo {
    pub name: &'static str,
    pub description: &'static str,
    pub capabilities: Vec<&'static str>,
    pub model: &'static str,
    pub author: String,
    pub orchestration_mode: &'static str,
    pub master_model: MasterModelInfo,
    pub branches: Vec<SpecialistBranch>,
    pub vision_stack: Vec<VisionModule>,
    pub vision_guardrails: Vec<&'static str>,
    pub capability_registry: Vec<CapabilityDomain>,
    pub governance: GovernanceSection,
    pub event_model: EventModel,
    pub memory_manifest: MemoryManifest,
    pub tooling_manifest: ToolingManifest,
    pub autonomous_runtime: AutonomousRuntimeManifest,
    pub self_improvement: SelfImprovementManifest,
    pub process_runtime: ProcessRuntimeManifest,
    pub plugin_platform: PluginPlatformManifest,
    pub translation_layer: TranslationLayerManifest,
    pub platform_contracts: PlatformContractsManifest,
    pub diagnostics: DiagnosticsManifest,
    pub cloud: CloudCapabilityManifest,
    pub robotics: RoboticsCapabilityManifest,
    pub operator_os: OperatorOsManifest,
}

pub async fn system_info(State(state): State<AppState>) -> Json<SystemInfo> {
    Json(build_platform_manifest(build_author(&state)))
}

pub fn build_author(state: &AppState) -> String {
    format!(
        "{} — {}",
        state
            .settings
            .owner_display_name
            .clone()
            .unwrap_or_else(|| "Māris".to_string()),
        state.settings.owner_title
    )
}

pub fn build_platform_manifest(author: String) -> SystemInfo {
    let branches = vec![
        SpecialistBranch {
            capability: "text_chat",
            branch: "master",
            kind: "master",
            profile: "general",
            model: MASTER_MODEL,
            endpoint: "/api/chat",
            studio: "/chat",
            description: "Galvenais reasoning un sarunu atzars ikdienas dialogam.",
        },
        SpecialistBranch {
            capability: "code_generation",
            branch: "coder",
            kind: "adapter",
            profile: "coder",
            model: MASTER_MODEL,
            endpoint: "/api/code",
            studio: "/code",
            description: "Programmēšanas atzars tehniskiem uzdevumiem un koda ģenerēšanai.",
        },
        SpecialistBranch {
            capability: "autonomous_tasks",
            branch: "planner",
            kind: "adapter",
            profile: "planner",
            model: MASTER_MODEL,
            endpoint: "/api/autonomous/start",
            studio: "/autonomous",
            description: "Plānošanas atzars ilgākiem mērķiem un secīgiem uzdevumiem.",
        },
        SpecialistBranch {
            capability: "voice_conversation",
            branch: "voice",
            kind: "specialist_model",
            profile: "voice",
            model: "Maris Voice Runtime",
            endpoint: "/api/voice/synthesize",
            studio: "/voice",
            description: "Balss atzars STT/TTS darbībām un runas sesijām.",
        },
        SpecialistBranch {
            capability: "image_generation",
            branch: "vision",
            kind: "specialist_model",
            profile: "image",
            model: "Maris Vision Canvas",
            endpoint: "/api/images",
            studio: "/images",
            description: "Attēlu ģenerēšanas modelis vizuālajai produkcijai.",
        },
        SpecialistBranch {
            capability: "music_generation",
            branch: "music",
            kind: "specialist_model",
            profile: "music",
            model: "Maris Audio Composer",
            endpoint: "/api/music",
            studio: "/music",
            description: "Mūzikas ģenerēšanas modelis audio kompozīcijai.",
        },
        SpecialistBranch {
            capability: "video_generation",
            branch: "video",
            kind: "specialist_model",
            profile: "video",
            model: "Maris Motion Studio",
            endpoint: "/api/video",
            studio: "/video",
            description: "Video ģenerēšanas modelis renderiem un klipiem.",
        },
    ];

    let vision_stack = vec![
        VisionModule {
            capability: "object_detection",
            title: "Object detection",
            stage: "core",
            outputs: vec!["bounding boxes", "classes", "confidence"],
            summary: "Atrod cilvēkus, mašīnas, telefonus, krēslus un citus objektus vienā kadrā.",
        },
        VisionModule {
            capability: "object_tracking",
            title: "Object tracking",
            stage: "core",
            outputs: vec!["track IDs", "trajectories", "speed hints"],
            summary: "Seko objektiem laikā un saglabā identitāti starp kadriem.",
        },
        VisionModule {
            capability: "segmentation",
            title: "Segmentation",
            stage: "core",
            outputs: vec!["instance masks", "semantic masks", "polygons"],
            summary: "Dod precīzas objektu formas, ne tikai rāmjus ap tiem.",
        },
        VisionModule {
            capability: "pose_estimation",
            title: "Pose estimation",
            stage: "core",
            outputs: vec!["body keypoints", "hand keypoints", "skeleton graph"],
            summary: "Atpazīst ķermeņa pozu, žestus, pointing un skatiena virziena kontekstu.",
        },
        VisionModule {
            capability: "face_detection",
            title: "Face detection",
            stage: "core",
            outputs: vec!["face boxes", "landmarks", "quality score"],
            summary: "Atrod sejas un novērtē to kvalitāti tālākai analīzei.",
        },
        VisionModule {
            capability: "face_recognition",
            title: "Face recognition",
            stage: "restricted",
            outputs: vec!["identity match", "embedding", "audit event"],
            summary: "Atšķir cilvēkus tikai ar skaidru piekrišanu, audit trail un juridisku kontroli.",
        },
        VisionModule {
            capability: "action_recognition",
            title: "Action recognition",
            stage: "core",
            outputs: vec!["action label", "temporal window", "confidence"],
            summary: "Nosaka darbības, piemēram, skrien, sēž, ceļ, met, filmē vai runā.",
        },
        VisionModule {
            capability: "scene_understanding",
            title: "Scene understanding",
            stage: "core",
            outputs: vec![
                "relationship graph",
                "natural language summary",
                "risk tags",
            ],
            summary: "Sasaista objektus, darbības un telpiskās attiecības vienotā aprakstā.",
        },
        VisionModule {
            capability: "ocr_document_ai",
            title: "OCR + document understanding",
            stage: "advanced",
            outputs: vec!["recognized text", "layout blocks", "structured fields"],
            summary: "Izlasa tekstu no bildēm, dokumentiem, ekrāniem un plakātiem.",
        },
        VisionModule {
            capability: "visual_grounding",
            title: "Visual grounding",
            stage: "advanced",
            outputs: vec!["phrase-to-region links", "point targets", "evidence regions"],
            summary: "Savieno tekstu ar precīzu vietu attēlā, lai AI zinātu par ko runā.",
        },
        VisionModule {
            capability: "depth_estimation",
            title: "Depth estimation",
            stage: "advanced",
            outputs: vec!["depth map", "distance bands", "3D cues"],
            summary: "Novērtē attālumu, dziļumu un 3D telpas struktūru no kadra.",
        },
        VisionModule {
            capability: "anomaly_detection",
            title: "Anomaly detection",
            stage: "advanced",
            outputs: vec!["anomaly score", "hotspots", "alert label"],
            summary: "Pamana neparastus notikumus, kustības vai bīstamas situācijas.",
        },
        VisionModule {
            capability: "re_identification",
            title: "Re-identification",
            stage: "advanced",
            outputs: vec!["cross-camera match", "track continuity", "confidence"],
            summary: "Savieno vienu un to pašu cilvēku vai objektu starp dažādām kamerām.",
        },
        VisionModule {
            capability: "multi_camera_fusion",
            title: "Multi-camera fusion",
            stage: "advanced",
            outputs: vec!["global scene map", "cross-view tracks", "coverage gaps"],
            summary: "Apvieno vairākas kameras vienā kopīgā telpas un notikumu skatā.",
        },
    ];

    let capability_registry = vec![
        CapabilityDomain {
            domain: "agents",
            description: "Vienota agentu sistēma ar planner, executor, reviewer un operator lomām.",
            capabilities: vec![
                CapabilityEntry {
                    id: "autonomous_sessions",
                    title: "Autonomous sessions",
                    surface: "/api/autonomous/*",
                    runtime: "backend-rust + core-python",
                    lifecycle: "streaming",
                    summary: "Live goal planning, task graph, timeline replay un checkpoint resume.",
                },
                CapabilityEntry {
                    id: "persona_routing",
                    title: "Persona routing",
                    surface: "/api/chat + /api/autonomous/start",
                    runtime: "backend-rust + core-python",
                    lifecycle: "request + stream",
                    summary: "Chat un autonomous sesijās izmanto konsekventus persona-aware modeļus.",
                },
            ],
        },
        CapabilityDomain {
            domain: "memory",
            description: "Multimodāls atmiņas grafiks ar sesijām, embeddings un operatora kontroli.",
            capabilities: vec![
                CapabilityEntry {
                    id: "short_term_memory",
                    title: "Short-term memory",
                    surface: "memory/short_term",
                    runtime: "python",
                    lifecycle: "session-scoped",
                    summary: "Ātrs konteksta buferis aktīvām sesijām un agent replay stāvoklim.",
                },
                CapabilityEntry {
                    id: "long_term_memory",
                    title: "Long-term memory",
                    surface: "memory/long_term + Postgres",
                    runtime: "python + postgres",
                    lifecycle: "persistent",
                    summary: "Persistenta atmiņa ar provenance, metadata un retrieval policy slāni.",
                },
                CapabilityEntry {
                    id: "vector_memory",
                    title: "Vector memory",
                    surface: "memory/vector_store",
                    runtime: "python",
                    lifecycle: "semantic",
                    summary: "Embedding meklēšana tekstam, audio, attēliem un notikumu reprezentācijām.",
                },
            ],
        },
        CapabilityDomain {
            domain: "tools",
            description: "Standardizēts tool runtime ar permission, quota, sandbox un tracing līgumu.",
            capabilities: vec![
                CapabilityEntry {
                    id: "browser_automation",
                    title: "Browser automation",
                    surface: "core-python browser automation",
                    runtime: "python + playwright",
                    lifecycle: "interactive",
                    summary: "Navigate, click, fill, screenshot un extraction darbības ar drošības kontroli.",
                },
                CapabilityEntry {
                    id: "repo_editor",
                    title: "Repo editor",
                    surface: "tools/code/repo_editor.py",
                    runtime: "python",
                    lifecycle: "sandboxed",
                    summary: "Repo read/write darbības ar future plugin SDK-ready manifestu.",
                },
                CapabilityEntry {
                    id: "filesystem_ops",
                    title: "Filesystem ops",
                    surface: "tools/filesystem/fs_ops.py",
                    runtime: "python",
                    lifecycle: "sandboxed",
                    summary: "Drošas failu sistēmas darbības ar atļauto direktoriju un quotas konceptu.",
                },
            ],
        },
        CapabilityDomain {
            domain: "modalities",
            description: "Voice, vision, code un creative studijas vienotā capability reģistrā.",
            capabilities: vec![
                CapabilityEntry {
                    id: "voice_runtime",
                    title: "Voice runtime",
                    surface: "/api/voice/* + voice-rust",
                    runtime: "rust + python",
                    lifecycle: "realtime",
                    summary: "STT/TTS un emotion-aware voice sesijas ar websocket runtime.",
                },
                CapabilityEntry {
                    id: "vision_stack",
                    title: "Vision stack",
                    surface: "/api/vision/*",
                    runtime: "backend-rust + python",
                    lifecycle: "event-driven",
                    summary: "Vision inference, eventing un guardrails zem viena sistēmas manifests slāņa.",
                },
                CapabilityEntry {
                    id: "code_studio",
                    title: "Code studio",
                    surface: "/api/code",
                    runtime: "backend-rust + python",
                    lifecycle: "request",
                    summary: "Programmēšanas ģenerēšana un labošana ar routing uz specializēto branch.",
                },
            ],
        },
    ];

    let governance = GovernanceSection {
        tenancy_model: vec![
            "Owner-only admin identitāte ar skaidru bootstrap ceļu.",
            "Sesijas, lietotāji, agent runs un usage events ir tenant-ready paplašināšanai.",
            "Frontend un backend izmanto vienotu command center virsmu visiem moduļiem.",
        ],
        permissions_model: vec![
            "JWT access + refresh session modelis ar role, scopes un owner flag.",
            "Tooling un vision spējas tiek projektētas ar explicit permission un sandbox līgumu.",
            "High-risk darbības paredz human-in-the-loop approval un operator visibility.",
        ],
        audit_model: vec![
            "Audit logi, credential audit un system events glabā actor, entity un izmaiņu kontekstu.",
            "Usage un tool telemetry tiek sasaistīta ar sesiju un feature dimensijām.",
            "Face recognition un sensitīvie scenāriji pieprasa audit trail un policy enforcement.",
        ],
        policy_model: vec![
            "Policy slānis definē datu minimizāciju, encryption un operator escalation noteikumus.",
            "Autonomous runtime izmanto checkpoint + resume kā drošu failover politiku.",
            "Manifestā tiek publicēti sandbox, quota un approval nosacījumi katram tool.",
        ],
    };

    let event_model = EventModel {
        timeline_stream: "/api/autonomous/status/:id/stream",
        event_types: vec![
            "session.started",
            "task_graph.ready",
            "task.started",
            "task.completed",
            "task.retrying",
            "approval.requested",
            "session.completed",
            "session.interrupt",
        ],
        metrics: vec![
            "latency_ms",
            "queue_depth",
            "attempts",
            "progress_percent",
            "transport_mode",
        ],
        usage_dimensions: vec![
            "feature_name",
            "model_name",
            "tokens_in",
            "tokens_out",
            "latency_ms",
        ],
        cost_dimensions: vec![
            "tool_calls",
            "model_runtime",
            "media_generation",
            "operator_review",
            "storage",
        ],
    };

    let memory_manifest = MemoryManifest {
        graph_model: "short-term + episodic + semantic + procedural + operator memory graph",
        ingestion_pipeline: vec![
            "chat + voice transcripts",
            "image/video outputs",
            "tool call request/response traces",
            "autonomous timeline events",
            "system and usage events",
        ],
        retrieval_policies: vec![
            "salience scoring",
            "deduplication",
            "entity linking",
            "persona-aware retrieval",
            "operator forget/delete control",
        ],
        modes: vec![
            MemoryMode {
                id: "short_term",
                title: "Short-term",
                inputs: vec!["chat turns", "task state", "voice context"],
                controls: vec!["ttl", "session reset", "context budget"],
                summary: "Aktīvās sesijas darba atmiņa ātrai reasoning un streaming plūsmai.",
            },
            MemoryMode {
                id: "episodic",
                title: "Episodic",
                inputs: vec!["sessions", "agent runs", "timeline replay"],
                controls: vec!["session replay", "checkpoint history", "delete"],
                summary: "Saglabā pilnas sesijas un autonomous replay artefaktus ar provenance.",
            },
            MemoryMode {
                id: "semantic",
                title: "Semantic",
                inputs: vec!["embeddings", "documents", "summaries"],
                controls: vec!["retrieval policy", "ranking", "re-embed"],
                summary: "Semantiskā meklēšana starp zināšanām, faktiem un multimodāliem artefaktiem.",
            },
            MemoryMode {
                id: "procedural",
                title: "Procedural",
                inputs: vec!["tool manifests", "playbooks", "validation flows"],
                controls: vec!["versioning", "rollout", "policy gates"],
                summary: "Saglabā izpildes playbookus, tool contracts un operatora procedūras.",
            },
            MemoryMode {
                id: "operator",
                title: "Operator",
                inputs: vec!["approvals", "annotations", "audit evidence"],
                controls: vec!["forget", "delete", "approval status"],
                summary: "Operatora lēmumi un anotācijas, kas ietekmē sesijas drošību un pārskatāmību.",
            },
        ],
    };

    let tooling_manifest = ToolingManifest {
        runtime_contract: vec![
            "manifest + schema",
            "permissions + quota",
            "sandbox level",
            "health + tracing",
            "cost accounting",
        ],
        discovery: vec![
            "platform manifest catalog",
            "tool versioning",
            "operator visibility",
            "future plugin SDK surface",
        ],
        tools: vec![
            ToolManifest {
                id: "browser_automation",
                title: "Browser Automation",
                version: "2.0",
                category: "operations",
                runtime: "core-python",
                permissions: vec![
                    "browser.navigate",
                    "browser.click",
                    "browser.fill",
                    "browser.capture",
                ],
                sandbox: "interactive",
                quota: "session-scoped",
                health: "stream-aware",
                summary: "Live browser operator tooling ar traceable step-by-step darbībām.",
            },
            ToolManifest {
                id: "repo_editor",
                title: "Repo Editor",
                version: "1.0",
                category: "developer",
                runtime: "python",
                permissions: vec!["repo.read", "repo.write"],
                sandbox: "workspace",
                quota: "artifact-scoped",
                health: "policy-gated",
                summary: "Koda rediģēšanas virsma ar auditējamu izcelsmi un plugin-ready contract.",
            },
            ToolManifest {
                id: "filesystem_ops",
                title: "Filesystem Ops",
                version: "1.0",
                category: "operations",
                runtime: "python",
                permissions: vec!["fs.read", "fs.write", "fs.list"],
                sandbox: "safe_dirs",
                quota: "directory-scoped",
                health: "guarded",
                summary: "Drošas FS darbības ar direktoriju politiku un nākotnes quota enforcement.",
            },
            ToolManifest {
                id: "web_search",
                title: "Web Search",
                version: "1.0",
                category: "research",
                runtime: "python",
                permissions: vec!["network.search"],
                sandbox: "outbound_http",
                quota: "request-scoped",
                health: "fallback-capable",
                summary: "Research rīks ar izsekojamu request/response footprintu.",
            },
        ],
    };

    let autonomous_runtime = AutonomousRuntimeManifest {
        stream_transport: "SSE with polling fallback and replay cursor metadata",
        operator_surfaces: vec![
            "live trace",
            "task graph",
            "approval queue",
            "checkpoint replay",
        ],
        agent_roles: vec!["planner", "executor", "reviewer", "operator"],
        replay_features: vec![
            "timeline cursor",
            "session checkpoints",
            "resume token",
            "failover mode",
        ],
        approval_features: vec![
            "interruptible events",
            "operator review",
            "auto-approved local runtime",
            "recovery checkpoint",
        ],
    };

    let self_improvement = SelfImprovementManifest {
        eval_suites: vec![
            EvalSuiteManifest {
                id: "agent_quality_eval",
                title: "Agent quality evals",
                focus: "Correctness, policy adherence un operator satisfaction katram aģentam.",
                cadence: "per task outcome + nightly sweeps",
                automation: "auto-scored with human override",
                signals: vec![
                    "task outcome score",
                    "approval interventions",
                    "policy incidents",
                    "operator rating",
                ],
            },
            EvalSuiteManifest {
                id: "tool_runtime_eval",
                title: "Tool runtime evals",
                focus: "Latency, reliability un sandbox compliance katram rīkam.",
                cadence: "streaming + release gates",
                automation: "trace-driven",
                signals: vec![
                    "latency_ms",
                    "retry rate",
                    "error budget",
                    "artifact completeness",
                ],
            },
        ],
        regression_suites: vec![
            RegressionSuiteManifest {
                id: "task_regression_grid",
                title: "Task regression grid",
                scope: "prompt + tool + policy + memory changes",
                trigger: "every release candidate and failed-session cluster",
                summary: "Stabila benchmark matrica ar zelta uzdevumiem, drošības pārbaudēm un persona režīmiem.",
            },
            RegressionSuiteManifest {
                id: "cross_modal_regressions",
                title: "Cross-modal regressions",
                scope: "chat, voice, autonomous un vision plūsmas",
                trigger: "schema or routing changes",
                summary: "Pārbauda tulkošanas un multimodālās konsekvences degradāciju starp virsmām.",
            },
        ],
        outcome_metrics: vec![
            OutcomeMetricManifest {
                id: "correctness",
                title: "Correctness",
                weight_percent: 40,
                summary: "Vai aģents sasniedza uzdevuma mērķi bez būtiskām kļūdām.",
            },
            OutcomeMetricManifest {
                id: "reliability",
                title: "Reliability",
                weight_percent: 20,
                summary: "Vai plūsma izpildījās bez retry spirālēm un regressijām.",
            },
            OutcomeMetricManifest {
                id: "tool_efficiency",
                title: "Tool efficiency",
                weight_percent: 20,
                summary: "Vai izmantotie rīki un resursi bija ekonomiski un pamatoti.",
            },
            OutcomeMetricManifest {
                id: "operator_trust",
                title: "Operator trust",
                weight_percent: 20,
                summary: "Cik daudz approval, pārredzamības un uzticības signālu bija nepieciešams.",
            },
        ],
        closed_loop: ClosedLoopManifest {
            failure_sources: vec![
                "failed sessions",
                "approval escalations",
                "tool regressions",
                "memory misses",
            ],
            recommendation_targets: vec!["prompt", "policy", "tool", "memory"],
            safe_optimization_controls: vec![
                "shadow deployment",
                "human review threshold",
                "rollback-ready variants",
                "policy envelope tests",
            ],
        },
        leaderboard: LeaderboardManifest {
            title: "Agent + tool leaderboard",
            ranking_dimensions: vec![
                "avg outcome score",
                "stability",
                "latency",
                "regression pass rate",
            ],
            refresh_policy: "near-real-time with release benchmark snapshots",
            benchmark_surfaces: vec![
                "operations console",
                "admin studio",
                "system manifest",
                "future public benchmarks",
            ],
        },
    };

    let process_runtime = ProcessRuntimeManifest {
        runtime_surfaces: vec![
            "browser",
            "filesystem",
            "repo editor",
            "background jobs",
            "queues",
            "schedulers",
        ],
        background_capabilities: vec![
            RuntimeCapability {
                id: "job_runtime",
                title: "Job runtime",
                scope: "interactive + background",
                summary: "Pilns process/job runtime ar queued, running, completed un failed stāvokļiem.",
            },
            RuntimeCapability {
                id: "artifact_store",
                title: "Artifact store",
                scope: "session + workspace",
                summary: "Artefaktu glabāšana ar metadatiem, retention un provenance pēdu.",
            },
            RuntimeCapability {
                id: "workspace_sessions",
                title: "Long-lived workspace sessions",
                scope: "resource-governed",
                summary: "Ilgdzīvojošas darba telpas ar resursu limitiem, profiliem un restartējamu stāvokli.",
            },
        ],
        secrets_handling: vec![
            "env-backed secrets",
            "owner-only visibility",
            "rotation-aware credentials",
            "audit-friendly access",
        ],
        environment_profiles: vec![
            "local sandbox",
            "railway production",
            "gpu worker",
            "autonomous operator",
        ],
        artifact_store: vec![
            "session outputs",
            "timeline snapshots",
            "tool traces",
            "benchmark evidence",
        ],
        workspace_model: vec![
            "session affinity",
            "quota enforcement",
            "background resumption",
            "resource budget tracking",
        ],
        operations_console: vec![
            "queue health",
            "leaderboard",
            "recommendations",
            "runtime telemetry",
            "plugin governance",
        ],
    };

    let plugin_platform = PluginPlatformManifest {
        manifest_contract: vec![
            "plugin manifest",
            "declared permissions",
            "lifecycle hooks",
            "version metadata",
        ],
        review_process: vec![
            "submission review",
            "policy scan",
            "signature verification",
            "admin approval",
        ],
        signature_trust: vec![
            "first-party signatures",
            "trusted publisher chain",
            "revocation list",
            "install-time integrity check",
        ],
        permissions_model: vec![
            "capability scoped",
            "install-time grants",
            "runtime enforcement",
            "audit visibility",
        ],
        billing_hooks: vec![
            "usage metering",
            "subscription hooks",
            "quota accounting",
            "support plan metadata",
        ],
        lifecycle_management: vec![
            "install",
            "update",
            "remove",
            "disable",
            "rollback",
        ],
        admin_approval_model: vec![
            "owner approval for sensitive plugins",
            "workspace-level allowlists",
            "org policy overrides",
        ],
        listing_metadata: vec![
            "docs",
            "ratings",
            "telemetry",
            "support contacts",
            "publisher profile",
        ],
    };

    let translation_layer = TranslationLayerManifest {
        translation_planes: vec![
            "human language ↔ tool schemas",
            "agent intents ↔ runtime actions",
            "multimodal inputs ↔ normalized prompts",
        ],
        locale_aware_ux: vec![
            "localized labels",
            "format-aware timestamps",
            "region-friendly defaults",
            "persona-sensitive tone",
        ],
        prompt_normalization: vec![
            "intent extraction",
            "schema normalization",
            "domain terminology expansion",
            "safety canonicalization",
        ],
        cross_lingual_memory: vec![
            "language-tagged memories",
            "semantic retrieval across locales",
            "translation-linked evidence chains",
        ],
        multimodal_consistency: vec![
            "chat",
            "voice",
            "autonomous",
            "vision",
            "shared translation contract",
        ],
        terminology_dictionaries: vec![
            "product glossary",
            "domain-specific lexicons",
            "operator playbook terms",
        ],
        persona_localization: vec![
            "persona-aware localization",
            "style-preserving translation",
            "locale-specific prompt overlays",
        ],
    };

    let platform_contracts = PlatformContractsManifest {
        schema_path: "/shared/schemas/platform_contract_schema.json",
        sdk_contracts: vec![
            "manifest-first API/SDK contract",
            "timeline event envelope shared by diagnostics, billing un robotics",
            "workspace/session/artifact identity propagation",
        ],
        timeline_model: vec![
            "event_id + parent_event_id",
            "workspace/session/task/tool correlation",
            "diagnostic + billing + robotics provenance tags",
            "recovery and approval actions on the same timeline",
        ],
        core_objects: vec![
            PlatformContractObject {
                id: "identity",
                title: "Cross-module identity",
                summary: "Users, orgs, teams, service accounts un scoped access vienā modelī.",
                primary_store: "PostgreSQL identity + access tables",
                api_contract: "identity.v1",
            },
            PlatformContractObject {
                id: "session_task_tool",
                title: "Session / task / tool execution",
                summary: "Agent runtime ieraksti ar confidence, uncertainty, failure_reason un next_best_action.",
                primary_store: "agent_sessions, agent_tasks, agent_tool_calls",
                api_contract: "runtime.execution.v1",
            },
            PlatformContractObject {
                id: "workspace_artifact",
                title: "Workspace + artifact",
                summary: "Ilgdzīvojošas darba telpas, artefakti, retention un notifications operator OS virskārtai.",
                primary_store: "workspaces, workspace_artifacts, operator_notifications",
                api_contract: "workspace.v1",
            },
            PlatformContractObject {
                id: "diagnostics_billing_robotics",
                title: "Diagnostics / billing / fleet events",
                summary: "Persistēts event/timeline modelis ar incidentiem, ledger ierakstiem un fleet asset metadatiem.",
                primary_store: "diagnostic_*, billing_ledger_events, fleet_assets",
                api_contract: "platform.events.v1",
            },
        ],
    };

    let diagnostics = DiagnosticsManifest {
        incident_fields: vec![
            "confidence",
            "uncertainty",
            "failure_reason",
            "next_best_action",
            "root_cause_summary",
            "recovery_action",
        ],
        health_signals: vec![
            HealthSignalManifest {
                id: "model_drift",
                title: "Model drift",
                track: "Eval quality, branch score deviations un outcome regression clusters.",
                recovery_levers: vec![
                    "shadow rollback",
                    "eval gate tightening",
                    "persona/prompt variant isolation",
                ],
            },
            HealthSignalManifest {
                id: "latency_spikes",
                title: "Latency spikes",
                track: "Tool latency, queue backlog un degraded runtime windows.",
                recovery_levers: vec![
                    "throughput limiting",
                    "fallback routing",
                    "priority-based scheduling",
                ],
            },
            HealthSignalManifest {
                id: "memory_quality",
                title: "Memory quality",
                track: "Memory misses, retrieval confidence un stale-context incidents.",
                recovery_levers: vec![
                    "memory refresh",
                    "evidence pinning",
                    "retrieval policy tuning",
                ],
            },
            HealthSignalManifest {
                id: "tool_instability",
                title: "Tool instability",
                track: "Retry bursts, tool failures un guardrail-triggered disablements.",
                recovery_levers: vec![
                    "tool disable",
                    "approval escalation",
                    "safe-mode routing",
                ],
            },
        ],
        guardrail_actions: vec![
            "fallback mode",
            "tool disable",
            "approval escalation",
            "throughput limiting",
            "safe-mode",
        ],
        degradation_modes: vec![
            "observing",
            "degraded",
            "recovering",
            "operator-approval-only",
        ],
        recovery_actions: vec![
            "reroute to healthy model branch",
            "pause unstable tool",
            "rebuild memory context",
            "require simulator-first execution",
        ],
    };

    let cloud = CloudCapabilityManifest {
        identity_objects: vec![
            "organizations",
            "teams",
            "memberships",
            "service accounts",
            "scoped API keys",
        ],
        access_controls: vec![
            "usage plans",
            "feature entitlements",
            "workspace quotas",
            "audit-ready role grants",
        ],
        billing_objects: vec![
            "billing accounts",
            "ledger events",
            "subscriptions",
            "invoices",
            "cost visibility",
        ],
        compliance_controls: vec![
            "audit trail",
            "data export",
            "retention controls",
            "provider-ready payment metadata",
        ],
    };

    let robotics = RoboticsCapabilityManifest {
        separation_boundary: vec![
            "robotics capability layer outside core chat",
            "dedicated policy boundary",
            "simulator-first execution path",
        ],
        device_registry: vec![
            "fleet asset registry",
            "device identity",
            "telemetry metadata",
            "operator ownership",
        ],
        execution_plane: vec![
            "command bus",
            "telemetry ingestion",
            "sensor fusion",
            "remote supervision",
        ],
        safety_controls: vec![
            "safety interlocks",
            "operator approvals",
            "runtime guardrails",
            "incident-linked shutdown paths",
        ],
        simulator_workflow: vec![
            "simulate",
            "review",
            "approve",
            "physical execution",
        ],
    };

    let operator_os = OperatorOsManifest {
        centers: vec![
            "command center",
            "memory center",
            "agent studio",
            "tool store",
            "diagnostics",
            "billing",
            "fleet management",
        ],
        shared_models: vec![
            "identity",
            "workspace",
            "session",
            "notifications",
            "artifacts",
        ],
        shell_properties: vec![
            "shared global nav",
            "workspace persistence",
            "context switching",
            "cross-module alerts",
        ],
        external_contracts: vec![
            "public API",
            "SDK",
            "manifest contract",
            "ecosystem integration hooks",
        ],
    };

    SystemInfo {
        name: "Maris AI",
        description: "Dzīvs platformas manifests ar capability registry, governance slāņiem un operatora runtime karti.",
        capabilities: vec![
            "text_chat",
            "voice_conversation",
            "image_generation",
            "music_generation",
            "video_generation",
            "code_generation",
            "autonomous_tasks",
            "memory_graph",
            "tool_runtime",
        ],
        model: MASTER_MODEL,
        author,
        orchestration_mode: "platform_manifest_with_specialist_branches",
        master_model: MasterModelInfo {
            name: MASTER_MODEL,
            role: "Galvenais reasoning, governance un koordinācijas modelis",
            routing_strategy: "platform_manifest_with_specialist_branches",
            primary_capabilities: vec![
                "conversation",
                "reasoning",
                "planning",
                "tool_routing",
                "memory_context",
                "policy_awareness",
                "operator_escalation",
            ],
        },
        branches,
        vision_stack,
        vision_guardrails: vec![
            "Face recognition jāizmanto tikai ar skaidru juridisku pamatu, piekrišanu un audit trail.",
            "Biometriskos un sensitīvos datus jāglabā minimāli, šifrēti un ar piekļuves kontroli.",
            "Augsta riska scenārijos vajag human-in-the-loop pārbaudi pirms automātiskas rīcības.",
            "Raw video pēc noklusējuma jāminimizē; priekšroka dodama eventiem, snapshotiem un timeline artefaktiem.",
        ],
        capability_registry,
        governance,
        event_model,
        memory_manifest,
        tooling_manifest,
        autonomous_runtime,
        self_improvement,
        process_runtime,
        plugin_platform,
        translation_layer,
        platform_contracts,
        diagnostics,
        cloud,
        robotics,
        operator_os,
    }
}