@wowok/agent-mcp 2.5.4 → 2.5.5

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 (53) hide show
  1. package/README.md +33 -26
  2. package/dist/knowledge/reward-confirm.d.ts +3 -0
  3. package/dist/knowledge/reward-confirm.js +30 -0
  4. package/dist/knowledge/reward-puzzle.d.ts +1 -0
  5. package/dist/knowledge/reward-puzzle.js +12 -0
  6. package/dist/knowledge/reward-risk.d.ts +4 -1
  7. package/dist/knowledge/reward-risk.js +85 -3
  8. package/dist/knowledge/tools-reference.js +5 -4
  9. package/dist/project/evaluation.d.ts +53 -0
  10. package/dist/project/evaluation.js +853 -0
  11. package/dist/project/graph-builder.d.ts +43 -0
  12. package/dist/project/graph-builder.js +572 -0
  13. package/dist/project/handlers.d.ts +152 -0
  14. package/dist/project/handlers.js +458 -0
  15. package/dist/project/index.d.ts +1 -0
  16. package/dist/project/index.js +24 -1
  17. package/dist/project/query.d.ts +1 -0
  18. package/dist/project/query.js +2 -0
  19. package/dist/project/semantic-assembler.d.ts +93 -0
  20. package/dist/project/semantic-assembler.js +345 -0
  21. package/dist/schema/call/base.js +1 -1
  22. package/dist/schema/project/index.d.ts +1558 -3885
  23. package/dist/schema/project/index.js +357 -961
  24. package/dist/schema/trust/index.d.ts +14 -14
  25. package/dist/schemas/bridge_operation.schema.json +1 -1
  26. package/dist/schemas/guard2file.schema.json +1 -1
  27. package/dist/schemas/index.json +2 -2
  28. package/dist/schemas/machineNode2file.schema.json +1 -1
  29. package/dist/schemas/onchain_operations.schema.json +5 -5
  30. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
  31. package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1
  32. package/dist/schemas/onchain_operations_contact.schema.json +1 -1
  33. package/dist/schemas/onchain_operations_demand.schema.json +1 -1
  34. package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -2
  35. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
  36. package/dist/schemas/onchain_operations_guard.schema.json +1 -1
  37. package/dist/schemas/onchain_operations_machine.schema.json +1 -1
  38. package/dist/schemas/onchain_operations_order.schema.json +1 -1
  39. package/dist/schemas/onchain_operations_payment.schema.json +1 -1
  40. package/dist/schemas/onchain_operations_permission.schema.json +1 -1
  41. package/dist/schemas/onchain_operations_personal.schema.json +1 -1
  42. package/dist/schemas/onchain_operations_progress.schema.json +1 -1
  43. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  44. package/dist/schemas/onchain_operations_repository.schema.json +1 -1
  45. package/dist/schemas/onchain_operations_reward.schema.json +1 -1
  46. package/dist/schemas/onchain_operations_service.schema.json +1 -1
  47. package/dist/schemas/onchain_operations_treasury.schema.json +1 -1
  48. package/dist/schemas/project_operation.output.json +975 -2471
  49. package/dist/schemas/project_operation.schema.json +207 -534
  50. package/dist/tools/handlers/onchain.js +97 -19
  51. package/dist/tools/handlers/project.js +34 -1046
  52. package/dist/tools/index.js +84 -55
  53. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://wowok.net/schemas/project_operation.json",
4
- "title": "Project - Namespace & Object Graph",
5
- "description": "Manage and query the local object dependency graph (DAG) built on top of local_mark tags. Actions: list_projects, list_objects, shareable, dependencies, referenced_by, pre_publish_check, cross_project_refs, graph_stats, save_graph, load_graph.",
4
+ "title": "Project - Entity Management & Evaluation",
5
+ "description": "Project management service — manage projects as first-class entities with SQLite persistence, rigid project-object relationships, three-pathway graph construction, and a dual rule-based + LLM-assisted evaluation engine. Actions: list_projects, create_project, create_project_from_onchain, update_project, get_project_detail, add_object, remove_object, create_version, build_graph, get_graph, evaluate_project, save_evaluation, compare_projects, refresh_objects, get_object_diff, assemble_context.",
6
6
  "$ref": "#/definitions/project_operation",
7
7
  "definitions": {
8
8
  "project_operation": {
@@ -18,1633 +18,150 @@
18
18
  "const": "list_projects"
19
19
  },
20
20
  "items": {
21
- "type": "array",
22
- "items": {
23
- "type": "object",
24
- "additionalProperties": {}
25
- },
26
- "description": "List of result items. Each item is an untyped record — shape varies per query."
27
- }
28
- },
29
- "required": [
30
- "action",
31
- "items"
32
- ],
33
- "additionalProperties": false
34
- },
35
- {
36
- "type": "object",
37
- "properties": {
38
- "action": {
39
- "type": "string",
40
- "const": "list_objects"
41
- },
42
- "items": {
43
- "type": "array",
44
- "items": {
45
- "type": "object",
46
- "additionalProperties": {}
47
- },
48
- "description": "List of result items. Each item is an untyped record — shape varies per query."
49
- }
50
- },
51
- "required": [
52
- "action",
53
- "items"
54
- ],
55
- "additionalProperties": false
56
- },
57
- {
58
- "type": "object",
59
- "properties": {
60
- "action": {
61
- "type": "string",
62
- "const": "shareable"
63
- },
64
- "items": {
65
- "type": "array",
66
- "items": {
67
- "type": "object",
68
- "additionalProperties": {}
69
- },
70
- "description": "List of result items. Each item is an untyped record — shape varies per query."
71
- }
72
- },
73
- "required": [
74
- "action",
75
- "items"
76
- ],
77
- "additionalProperties": false
78
- },
79
- {
80
- "type": "object",
81
- "properties": {
82
- "action": {
83
- "type": "string",
84
- "const": "dependencies"
85
- },
86
- "items": {
87
- "type": "array",
88
- "items": {
89
- "type": "object",
90
- "additionalProperties": {}
91
- },
92
- "description": "List of result items. Each item is an untyped record — shape varies per query."
93
- }
94
- },
95
- "required": [
96
- "action",
97
- "items"
98
- ],
99
- "additionalProperties": false
100
- },
101
- {
102
- "type": "object",
103
- "properties": {
104
- "action": {
105
- "type": "string",
106
- "const": "referenced_by"
107
- },
108
- "items": {
109
- "type": "array",
110
- "items": {
111
- "type": "object",
112
- "additionalProperties": {}
113
- },
114
- "description": "List of result items. Each item is an untyped record — shape varies per query."
115
- }
116
- },
117
- "required": [
118
- "action",
119
- "items"
120
- ],
121
- "additionalProperties": false
122
- },
123
- {
124
- "type": "object",
125
- "properties": {
126
- "action": {
127
- "type": "string",
128
- "const": "pre_publish_check"
129
- },
130
- "warnings": {
131
- "type": "array",
132
- "items": {
133
- "type": "string"
134
- },
135
- "description": "Pre-publish warnings. Empty array means no issues detected."
136
- }
137
- },
138
- "required": [
139
- "action",
140
- "warnings"
141
- ],
142
- "additionalProperties": false
143
- },
144
- {
145
- "type": "object",
146
- "properties": {
147
- "action": {
148
- "type": "string",
149
- "const": "cross_project_refs"
150
- },
151
- "items": {
152
- "type": "array",
153
- "items": {
154
- "type": "object",
155
- "additionalProperties": {}
156
- },
157
- "description": "List of result items. Each item is an untyped record — shape varies per query."
158
- }
159
- },
160
- "required": [
161
- "action",
162
- "items"
163
- ],
164
- "additionalProperties": false
165
- },
166
- {
167
- "type": "object",
168
- "properties": {
169
- "action": {
170
- "type": "string",
171
- "const": "graph_stats"
172
- },
173
- "stats": {
174
- "type": "object",
175
- "additionalProperties": {},
176
- "description": "Object dependency graph statistics (counts, depth, etc.)."
177
- }
178
- },
179
- "required": [
180
- "action",
181
- "stats"
182
- ],
183
- "additionalProperties": false
184
- },
185
- {
186
- "type": "object",
187
- "properties": {
188
- "action": {
189
- "type": "string",
190
- "const": "save_graph"
191
- },
192
- "saved": {
193
- "type": "boolean",
194
- "const": true,
195
- "description": "Always true — confirms the graph was saved."
196
- },
197
- "path": {
198
- "type": "string",
199
- "description": "Filesystem path where the graph was saved."
200
- }
201
- },
202
- "required": [
203
- "action",
204
- "saved",
205
- "path"
206
- ],
207
- "additionalProperties": false
208
- },
209
- {
210
- "type": "object",
211
- "properties": {
212
- "action": {
213
- "type": "string",
214
- "const": "load_graph"
215
- },
216
- "loaded": {
217
- "type": "boolean",
218
- "description": "Whether the graph was successfully loaded from disk."
219
- }
220
- },
221
- "required": [
222
- "action",
223
- "loaded"
224
- ],
225
- "additionalProperties": false
226
- },
227
- {
228
- "type": "object",
229
- "properties": {
230
- "action": {
231
- "type": "string",
232
- "const": "analyze_intent"
233
- },
234
- "intent_parsed": {
235
- "type": "object",
236
- "properties": {
237
- "primary_object": {
238
- "type": "string"
239
- },
240
- "secondary_objects": {
241
- "type": "array",
242
- "items": {
243
- "type": "string"
244
- }
245
- },
246
- "detected_scenes": {
247
- "type": "array",
248
- "items": {
249
- "type": "object",
250
- "properties": {
251
- "object": {
252
- "type": "string"
253
- },
254
- "scene_id": {
255
- "type": "string"
256
- }
257
- },
258
- "required": [
259
- "object",
260
- "scene_id"
261
- ],
262
- "additionalProperties": false
263
- }
264
- },
265
- "industry": {
266
- "type": "string"
267
- },
268
- "keyword_matches": {
269
- "type": "array",
270
- "items": {
271
- "type": "object",
272
- "properties": {
273
- "keyword": {
274
- "type": "string"
275
- },
276
- "category": {
277
- "type": "string"
278
- },
279
- "matched_objects": {
280
- "type": "array",
281
- "items": {
282
- "type": "string"
283
- }
284
- },
285
- "required_level": {
286
- "type": "string",
287
- "enum": [
288
- "R",
289
- "C",
290
- "OPTIONAL"
291
- ]
292
- },
293
- "match_count": {
294
- "type": "integer"
295
- }
296
- },
297
- "required": [
298
- "keyword",
299
- "category",
300
- "matched_objects",
301
- "required_level",
302
- "match_count"
303
- ],
304
- "additionalProperties": false
305
- }
306
- }
307
- },
308
- "required": [
309
- "primary_object",
310
- "secondary_objects",
311
- "detected_scenes",
312
- "industry",
313
- "keyword_matches"
314
- ],
315
- "additionalProperties": false
316
- },
317
- "puzzles": {
318
- "type": "object",
319
- "additionalProperties": {
320
- "type": "object",
321
- "properties": {
322
- "puzzle": {
323
- "type": "object",
324
- "additionalProperties": {},
325
- "description": "Per-object puzzle snapshot. Shape varies per object_type — see knowledge/<obj>-puzzle.ts."
326
- },
327
- "completeness": {
328
- "type": "object",
329
- "additionalProperties": {},
330
- "description": "Completeness assessment from checkPuzzleCompleteness(). Shape varies per object."
331
- },
332
- "missing_dimensions": {
333
- "type": "array",
334
- "items": {
335
- "type": "string"
336
- },
337
- "description": "Dimensions still missing for this object (e.g. ['A','B'])."
338
- }
339
- },
340
- "required": [
341
- "puzzle",
342
- "completeness",
343
- "missing_dimensions"
344
- ],
345
- "additionalProperties": false
346
- }
347
- },
348
- "overall_completeness": {
349
- "type": "string",
350
- "enum": [
351
- "complete",
352
- "partial",
353
- "empty"
354
- ]
355
- },
356
- "next_step": {
357
- "type": "string"
358
- },
359
- "recommended_creation_order": {
360
- "type": "array",
361
- "items": {
362
- "type": "string"
363
- },
364
- "description": "Recommended object creation order based on dependency topology (e.g. ['permission','progress','guard','allocation','machine','service'])."
365
- },
366
- "next_action": {
367
- "type": "string",
368
- "enum": [
369
- "aggregate_risks",
370
- "none"
371
- ],
372
- "description": "Next project_operation action to call. 'aggregate_risks' when puzzles are complete enough; 'none' if user must fill missing fields first."
373
- },
374
- "warnings": {
375
- "type": "array",
376
- "items": {
377
- "type": "string"
378
- }
379
- },
380
- "gate_validation": {
381
- "type": "object",
382
- "properties": {
383
- "stage": {
384
- "type": "integer",
385
- "minimum": 1,
386
- "maximum": 5
387
- },
388
- "passed": {
389
- "type": "boolean",
390
- "description": "True when no FAIL checks exist."
391
- },
392
- "checks": {
393
- "type": "array",
394
- "items": {
395
- "type": "object",
396
- "properties": {
397
- "dimension": {
398
- "type": "string",
399
- "enum": [
400
- "semantic",
401
- "tools",
402
- "reversibility",
403
- "risk",
404
- "isolation",
405
- "gas_budget"
406
- ]
407
- },
408
- "status": {
409
- "type": "string",
410
- "enum": [
411
- "PASS",
412
- "FAIL",
413
- "WARN"
414
- ]
415
- },
416
- "message": {
417
- "type": "string"
418
- }
419
- },
420
- "required": [
421
- "dimension",
422
- "status",
423
- "message"
424
- ],
425
- "additionalProperties": false
426
- }
427
- },
428
- "blocking_issues": {
429
- "type": "array",
430
- "items": {
431
- "type": "string"
432
- }
433
- },
434
- "warnings": {
435
- "type": "array",
436
- "items": {
437
- "type": "string"
438
- }
439
- },
440
- "can_proceed": {
441
- "type": "boolean"
442
- }
443
- },
444
- "required": [
445
- "stage",
446
- "passed",
447
- "checks",
448
- "blocking_issues",
449
- "warnings",
450
- "can_proceed"
451
- ],
452
- "additionalProperties": false,
453
- "description": "Stage gate validation result (6 dimensions: semantic/tools/reversibility/risk/isolation/gas_budget)."
454
- }
455
- },
456
- "required": [
457
- "action",
458
- "intent_parsed",
459
- "puzzles",
460
- "overall_completeness",
461
- "next_step",
462
- "recommended_creation_order",
463
- "next_action",
464
- "warnings"
465
- ],
466
- "additionalProperties": false
467
- },
468
- {
469
- "type": "object",
470
- "properties": {
471
- "action": {
472
- "type": "string",
473
- "const": "aggregate_risks"
474
- },
475
- "namespace": {
476
- "type": "object",
477
- "properties": {
478
- "prefix": {
479
- "type": "string"
480
- },
481
- "version": {
482
- "type": "string"
483
- },
484
- "industry": {
485
- "type": "string"
486
- }
487
- },
488
- "required": [
489
- "prefix",
490
- "version"
491
- ],
492
- "additionalProperties": false
493
- },
494
- "findings": {
495
- "type": "array",
496
- "items": {
497
- "type": "object",
498
- "properties": {
499
- "risk_rule_id": {
500
- "type": "string"
501
- },
502
- "object_type": {
503
- "type": "string"
504
- },
505
- "entry_id": {
506
- "type": "string"
507
- },
508
- "severity": {
509
- "type": "string",
510
- "enum": [
511
- "CRITICAL",
512
- "HIGH",
513
- "MEDIUM",
514
- "LOW",
515
- "INFO"
516
- ]
517
- },
518
- "message": {
519
- "type": "string"
520
- },
521
- "fix_suggestion": {
522
- "type": "string"
523
- },
524
- "details": {
525
- "type": "object",
526
- "properties": {
527
- "field_path": {
528
- "type": "string"
529
- },
530
- "rule_source": {
531
- "type": "string"
532
- }
533
- },
534
- "additionalProperties": false
535
- }
536
- },
537
- "required": [
538
- "risk_rule_id",
539
- "object_type",
540
- "entry_id",
541
- "severity",
542
- "message",
543
- "fix_suggestion"
544
- ],
545
- "additionalProperties": false
546
- }
547
- },
548
- "severity_summary": {
549
- "type": "object",
550
- "properties": {
551
- "CRITICAL": {
552
- "type": "integer"
553
- },
554
- "HIGH": {
555
- "type": "integer"
556
- },
557
- "MEDIUM": {
558
- "type": "integer"
559
- },
560
- "LOW": {
561
- "type": "integer"
562
- },
563
- "INFO": {
564
- "type": "integer"
565
- }
566
- },
567
- "required": [
568
- "CRITICAL",
569
- "HIGH",
570
- "MEDIUM",
571
- "LOW",
572
- "INFO"
573
- ],
574
- "additionalProperties": false
575
- },
576
- "status": {
577
- "type": "string",
578
- "enum": [
579
- "RISK_PASSED",
580
- "RISK_BLOCKED",
581
- "RISK_PENDING_CONFIRM",
582
- "RISK_CANCELLED"
583
- ]
584
- },
585
- "pending_confirmations": {
586
- "type": "array",
587
- "items": {
588
- "type": "object",
589
- "properties": {
590
- "risk_rule_id": {
591
- "type": "string"
592
- },
593
- "description": {
594
- "type": "string"
595
- },
596
- "fix_suggestion": {
597
- "type": "string"
598
- },
599
- "object_type": {
600
- "type": "string"
601
- },
602
- "entry_id": {
603
- "type": "string"
604
- }
605
- },
606
- "required": [
607
- "risk_rule_id",
608
- "description",
609
- "fix_suggestion",
610
- "object_type",
611
- "entry_id"
612
- ],
613
- "additionalProperties": false
614
- }
615
- },
616
- "fix_suggestions_grouped": {
617
- "type": "object",
618
- "additionalProperties": {
619
- "type": "array",
620
- "items": {
621
- "type": "object",
622
- "properties": {
623
- "risk_rule_id": {
624
- "type": "string"
625
- },
626
- "severity": {
627
- "type": "string",
628
- "enum": [
629
- "CRITICAL",
630
- "HIGH",
631
- "MEDIUM",
632
- "LOW",
633
- "INFO"
634
- ]
635
- },
636
- "message": {
637
- "type": "string"
638
- },
639
- "fix_suggestion": {
640
- "type": "string"
641
- },
642
- "entry_id": {
643
- "type": "string"
644
- }
645
- },
646
- "required": [
647
- "risk_rule_id",
648
- "severity",
649
- "message",
650
- "fix_suggestion",
651
- "entry_id"
652
- ],
653
- "additionalProperties": false
654
- }
655
- },
656
- "description": "Fix suggestions grouped by object_type for better readability."
657
- },
658
- "calibrated_at": {
659
- "type": "integer"
660
- },
661
- "warnings": {
662
- "type": "array",
663
- "items": {
664
- "type": "string"
665
- }
666
- },
667
- "can_proceed": {
668
- "type": "boolean",
669
- "description": "Whether the user can proceed to the next stage. False only when CRITICAL risks exist."
670
- },
671
- "next_action": {
672
- "type": "string",
673
- "enum": [
674
- "generate_deployment_doc",
675
- "fix_risks",
676
- "none"
677
- ],
678
- "description": "Next project_operation action. 'generate_deployment_doc' when can_proceed=true; 'fix_risks' when CRITICAL risks exist; 'none' for other cases."
679
- },
680
- "user_action_required": {
681
- "type": "string",
682
- "description": "Human-readable next-step guidance."
683
- },
684
- "gate_validation": {
685
- "$ref": "#/definitions/project_operation/properties/result/anyOf/10/properties/gate_validation"
686
- }
687
- },
688
- "required": [
689
- "action",
690
- "namespace",
691
- "findings",
692
- "severity_summary",
693
- "status",
694
- "calibrated_at",
695
- "warnings",
696
- "can_proceed",
697
- "next_action",
698
- "user_action_required"
699
- ],
700
- "additionalProperties": false
701
- },
702
- {
703
- "type": "object",
704
- "properties": {
705
- "action": {
706
- "type": "string",
707
- "const": "generate_deployment_doc"
708
- },
709
- "markdown": {
710
- "type": "string",
711
- "description": "Complete deployment MD document (§0-§7)"
712
- },
713
- "meta": {
714
- "type": "object",
715
- "properties": {
716
- "project_prefix": {
717
- "type": "string"
718
- },
719
- "version": {
720
- "type": "string"
721
- },
722
- "generated_at": {
723
- "type": "string",
724
- "description": "ISO timestamp"
725
- },
726
- "object_count": {
727
- "type": "integer"
728
- },
729
- "step_count": {
730
- "type": "integer"
731
- }
732
- },
733
- "required": [
734
- "project_prefix",
735
- "version",
736
- "generated_at",
737
- "object_count",
738
- "step_count"
739
- ],
740
- "additionalProperties": false
741
- },
742
- "validation": {
743
- "type": "object",
744
- "properties": {
745
- "valid": {
746
- "type": "boolean"
747
- },
748
- "checks": {
749
- "type": "array",
750
- "items": {
751
- "type": "object",
752
- "properties": {
753
- "check_id": {
754
- "type": "string"
755
- },
756
- "description": {
757
- "type": "string"
758
- },
759
- "status": {
760
- "type": "string",
761
- "enum": [
762
- "PASS",
763
- "FAIL",
764
- "WARN"
765
- ]
766
- },
767
- "notes": {
768
- "type": "string"
769
- }
770
- },
771
- "required": [
772
- "check_id",
773
- "description",
774
- "status"
775
- ],
776
- "additionalProperties": false
777
- }
778
- },
779
- "errors": {
780
- "type": "array",
781
- "items": {
782
- "type": "string"
783
- }
784
- }
785
- },
786
- "required": [
787
- "valid",
788
- "checks",
789
- "errors"
790
- ],
791
- "additionalProperties": false,
792
- "description": "Scanner validation result. Present when run_scanner=true."
793
- },
794
- "estimated_gas": {
795
- "type": "object",
796
- "properties": {
797
- "total_gas_mist": {
798
- "type": "integer",
799
- "description": "Estimated total gas in MIST (1 WOW = 10^9 MIST)."
800
- },
801
- "per_object": {
802
- "type": "array",
803
- "items": {
804
- "type": "object",
805
- "properties": {
806
- "entry_id": {
807
- "type": "string"
808
- },
809
- "object_type": {
810
- "type": "string"
811
- },
812
- "create_gas_mist": {
813
- "type": "integer"
814
- },
815
- "publish_gas_mist": {
816
- "type": "integer"
817
- }
818
- },
819
- "required": [
820
- "entry_id",
821
- "object_type",
822
- "create_gas_mist",
823
- "publish_gas_mist"
824
- ],
825
- "additionalProperties": false
826
- }
827
- },
828
- "publish_gas_mist": {
829
- "type": "integer",
830
- "description": "Gas for publish operations only."
831
- }
832
- },
833
- "required": [
834
- "total_gas_mist",
835
- "per_object",
836
- "publish_gas_mist"
837
- ],
838
- "additionalProperties": false,
839
- "description": "Gas cost estimate for deploying all objects."
840
- },
841
- "persisted": {
842
- "type": "object",
843
- "properties": {
844
- "all_files": {
845
- "type": "array",
846
- "items": {
847
- "type": "string"
848
- },
849
- "description": "Project-relative paths of all generated files (27 total)."
850
- },
851
- "all_stages_passed": {
852
- "type": "boolean",
853
- "description": "Whether all 5 stage gates passed validation."
854
- }
855
- },
856
- "required": [
857
- "all_files",
858
- "all_stages_passed"
859
- ],
860
- "additionalProperties": false,
861
- "description": "Nested-autonomy doc set persistence result (§11). Present when the doc set was successfully written to disk."
862
- },
863
- "can_proceed": {
864
- "type": "boolean",
865
- "description": "Whether the user can proceed to stage 5. False when D-errors exist."
866
- },
867
- "next_action": {
868
- "type": "string",
869
- "enum": [
870
- "trace_substeps",
871
- "fix_doc_errors",
872
- "none"
873
- ],
874
- "description": "Next project_operation action. 'trace_substeps' when can_proceed=true; 'fix_doc_errors' when D-errors exist; 'none' for other cases."
875
- },
876
- "user_action_required": {
877
- "type": "string"
878
- },
879
- "gate_validation": {
880
- "$ref": "#/definitions/project_operation/properties/result/anyOf/10/properties/gate_validation"
881
- }
882
- },
883
- "required": [
884
- "action",
885
- "markdown",
886
- "meta",
887
- "can_proceed",
888
- "next_action",
889
- "user_action_required"
890
- ],
891
- "additionalProperties": false
892
- },
893
- {
894
- "type": "object",
895
- "properties": {
896
- "action": {
897
- "type": "string",
898
- "const": "trace_substeps"
899
- },
900
- "namespace": {
901
- "type": "object",
902
- "properties": {
903
- "prefix": {
904
- "type": "string"
905
- },
906
- "version": {
907
- "type": "string"
908
- }
909
- },
910
- "required": [
911
- "prefix",
912
- "version"
913
- ],
914
- "additionalProperties": false
915
- },
916
- "network": {
917
- "type": "string",
918
- "enum": [
919
- "testnet",
920
- "mainnet"
921
- ]
922
- },
923
- "coherent": {
924
- "type": "boolean",
925
- "description": "True when no dangling/circular/missing/cross-step issues."
926
- },
927
- "dangling_inputs": {
928
- "type": "array",
929
- "items": {
930
- "type": "object",
931
- "properties": {
932
- "substep_id": {
933
- "type": "string"
934
- },
935
- "missing_ref": {
936
- "type": "string"
937
- },
938
- "field_path": {
939
- "type": "string"
940
- }
941
- },
942
- "required": [
943
- "substep_id",
944
- "missing_ref",
945
- "field_path"
946
- ],
947
- "additionalProperties": false
948
- }
949
- },
950
- "circular_refs": {
951
- "type": "array",
952
- "items": {
953
- "type": "object",
954
- "properties": {
955
- "cycle": {
956
- "type": "array",
957
- "items": {
958
- "type": "string"
959
- }
960
- }
961
- },
962
- "required": [
963
- "cycle"
964
- ],
965
- "additionalProperties": false
966
- }
967
- },
968
- "missing_outputs": {
969
- "type": "array",
970
- "items": {
971
- "type": "object",
972
- "properties": {
973
- "substep_id": {
974
- "type": "string"
975
- },
976
- "expected_field": {
977
- "type": "string"
978
- },
979
- "dependent_substeps": {
980
- "type": "array",
981
- "items": {
982
- "type": "string"
983
- }
984
- }
985
- },
986
- "required": [
987
- "substep_id",
988
- "expected_field",
989
- "dependent_substeps"
990
- ],
991
- "additionalProperties": false
992
- }
993
- },
994
- "cross_step_breaks": {
995
- "type": "array",
996
- "items": {
997
- "type": "object",
998
- "properties": {
999
- "source_step": {
1000
- "type": "string"
1001
- },
1002
- "target_step": {
1003
- "type": "string"
1004
- },
1005
- "missing_field": {
1006
- "type": "string"
1007
- }
1008
- },
1009
- "required": [
1010
- "source_step",
1011
- "target_step",
1012
- "missing_field"
1013
- ],
1014
- "additionalProperties": false
1015
- }
1016
- },
1017
- "step_details": {
1018
- "type": "array",
1019
- "items": {
1020
- "type": "object",
1021
- "properties": {
1022
- "parent_step": {
1023
- "type": "string"
1024
- },
1025
- "total_substeps": {
1026
- "type": "integer"
1027
- },
1028
- "successful": {
1029
- "type": "integer"
1030
- },
1031
- "failed": {
1032
- "type": "integer"
1033
- },
1034
- "pending": {
1035
- "type": "integer"
1036
- },
1037
- "skipped": {
1038
- "type": "integer"
1039
- },
1040
- "substep_ids": {
1041
- "type": "array",
1042
- "items": {
1043
- "type": "string"
1044
- }
1045
- }
1046
- },
1047
- "required": [
1048
- "parent_step",
1049
- "total_substeps",
1050
- "successful",
1051
- "failed",
1052
- "pending",
1053
- "skipped",
1054
- "substep_ids"
1055
- ],
1056
- "additionalProperties": false
1057
- }
1058
- },
1059
- "topological_order": {
1060
- "type": "array",
1061
- "items": {
1062
- "type": "string"
1063
- }
1064
- },
1065
- "d10_check": {
1066
- "type": "object",
1067
- "properties": {
1068
- "check_id": {
1069
- "type": "string",
1070
- "const": "D-10"
1071
- },
1072
- "description": {
1073
- "type": "string"
1074
- },
1075
- "status": {
1076
- "type": "string",
1077
- "enum": [
1078
- "PASS",
1079
- "FAIL",
1080
- "WARN"
1081
- ]
1082
- }
1083
- },
1084
- "required": [
1085
- "check_id",
1086
- "description",
1087
- "status"
1088
- ],
1089
- "additionalProperties": false
1090
- },
1091
- "can_proceed": {
1092
- "type": "boolean",
1093
- "description": "Whether deployment can complete. False when D-10 fails or substeps FAILED."
1094
- },
1095
- "next_action": {
1096
- "type": "string",
1097
- "enum": [
1098
- "deploy",
1099
- "fix_substeps",
1100
- "none"
1101
- ],
1102
- "description": "Next action. 'deploy' when can_proceed=true (execute substeps via onchain_operations); 'fix_substeps' when issues exist; 'none' when done."
1103
- },
1104
- "user_action_required": {
1105
- "type": "string"
1106
- },
1107
- "gate_validation": {
1108
- "$ref": "#/definitions/project_operation/properties/result/anyOf/10/properties/gate_validation"
1109
- }
1110
- },
1111
- "required": [
1112
- "action",
1113
- "namespace",
1114
- "network",
1115
- "coherent",
1116
- "dangling_inputs",
1117
- "circular_refs",
1118
- "missing_outputs",
1119
- "cross_step_breaks",
1120
- "step_details",
1121
- "topological_order",
1122
- "d10_check",
1123
- "can_proceed",
1124
- "next_action",
1125
- "user_action_required"
1126
- ],
1127
- "additionalProperties": false
1128
- },
1129
- {
1130
- "type": "object",
1131
- "properties": {
1132
- "action": {
1133
- "type": "string",
1134
- "const": "get_project_status"
1135
- },
1136
- "project": {
1137
- "type": "string"
1138
- },
1139
- "version": {
1140
- "type": "string"
1141
- },
1142
- "stage": {
1143
- "type": "integer",
1144
- "minimum": 1,
1145
- "maximum": 5
1146
- },
1147
- "stage_name": {
1148
- "type": "string"
1149
- },
1150
- "stage_description": {
1151
- "type": "string"
1152
- },
1153
- "next_action": {
1154
- "type": "string",
1155
- "description": "The next project_operation action to call."
1156
- },
1157
- "can_proceed": {
1158
- "type": "boolean"
1159
- },
1160
- "last_updated": {
1161
- "type": "integer",
1162
- "description": "Timestamp of last stage update (ms)."
1163
- },
1164
- "risk_status": {
1165
- "type": "string"
1166
- },
1167
- "risk_can_proceed": {
1168
- "type": "boolean"
1169
- },
1170
- "doc_generated": {
1171
- "type": "boolean"
1172
- },
1173
- "trace_coherent": {
1174
- "type": "boolean"
1175
- }
1176
- },
1177
- "required": [
1178
- "action",
1179
- "project",
1180
- "version",
1181
- "stage",
1182
- "stage_name",
1183
- "stage_description",
1184
- "next_action",
1185
- "can_proceed"
1186
- ],
1187
- "additionalProperties": false
1188
- },
1189
- {
1190
- "type": "object",
1191
- "properties": {
1192
- "action": {
1193
- "type": "string",
1194
- "const": "load_project"
1195
- },
1196
- "items": {
1197
- "type": "array",
1198
- "items": {
1199
- "type": "object",
1200
- "properties": {
1201
- "prefix": {
1202
- "type": "string"
1203
- },
1204
- "version": {
1205
- "type": "string"
1206
- },
1207
- "dir_name": {
1208
- "type": "string"
1209
- },
1210
- "initialized": {
1211
- "type": "boolean"
1212
- },
1213
- "archived": {
1214
- "type": "boolean"
1215
- },
1216
- "needs_migration": {
1217
- "type": "boolean",
1218
- "description": "Whether schema_version differs from current."
1219
- },
1220
- "forked_from": {
1221
- "type": "string"
1222
- },
1223
- "chain_exists": {
1224
- "type": "boolean",
1225
- "description": "Whether the project prefix exists on-chain."
1226
- },
1227
- "sync_status": {
1228
- "type": "string",
1229
- "enum": [
1230
- "synced",
1231
- "local_only",
1232
- "archived",
1233
- "uninitialized"
1234
- ],
1235
- "description": "Cross-validation of local filesystem vs chain truth."
1236
- }
1237
- },
1238
- "required": [
1239
- "prefix",
1240
- "version",
1241
- "dir_name",
1242
- "initialized",
1243
- "archived",
1244
- "needs_migration",
1245
- "chain_exists",
1246
- "sync_status"
1247
- ],
1248
- "additionalProperties": false
1249
- }
1250
- },
1251
- "total": {
1252
- "type": "integer"
1253
- },
1254
- "project": {
1255
- "type": "string"
1256
- },
1257
- "version": {
1258
- "type": "string"
1259
- },
1260
- "local_exists": {
1261
- "type": "boolean"
1262
- },
1263
- "manifest": {
1264
- "type": "object",
1265
- "properties": {
1266
- "schema_version": {
1267
- "type": "string"
1268
- },
1269
- "mcp_version": {
1270
- "type": "string"
1271
- },
1272
- "prefix": {
1273
- "type": "string"
1274
- },
1275
- "version": {
1276
- "type": "string"
1277
- },
1278
- "created_at": {
1279
- "type": "string"
1280
- },
1281
- "updated_at": {
1282
- "type": "string"
1283
- },
1284
- "forked_from": {
1285
- "type": "string"
1286
- },
1287
- "needs_recalibration": {
1288
- "type": "boolean"
1289
- }
1290
- },
1291
- "required": [
1292
- "schema_version",
1293
- "mcp_version",
1294
- "prefix",
1295
- "version",
1296
- "created_at",
1297
- "updated_at"
1298
- ],
1299
- "additionalProperties": false
1300
- },
1301
- "stage_state": {
1302
- "type": "object",
1303
- "properties": {
1304
- "stage": {
1305
- "type": "integer",
1306
- "minimum": 1,
1307
- "maximum": 5
1308
- },
1309
- "updated_at": {
1310
- "type": "integer"
1311
- },
1312
- "has_published_object": {
1313
- "type": "boolean"
1314
- },
1315
- "archived": {
1316
- "type": "boolean"
1317
- }
1318
- },
1319
- "additionalProperties": false
1320
- },
1321
- "sync_status": {
1322
- "type": "object",
1323
- "properties": {
1324
- "local_exists": {
1325
- "type": "boolean"
1326
- },
1327
- "initialized": {
1328
- "type": "boolean"
1329
- },
1330
- "needs_migration": {
1331
- "type": "boolean"
1332
- },
1333
- "archived": {
1334
- "type": "boolean"
1335
- }
1336
- },
1337
- "required": [
1338
- "local_exists",
1339
- "initialized",
1340
- "needs_migration",
1341
- "archived"
1342
- ],
1343
- "additionalProperties": false
1344
- },
1345
- "migration": {
1346
- "type": "object",
1347
- "properties": {
1348
- "migrated": {
1349
- "type": "boolean",
1350
- "description": "Whether a migration was performed."
1351
- },
1352
- "from_version": {
1353
- "type": "string"
1354
- },
1355
- "to_version": {
1356
- "type": "string"
1357
- },
1358
- "steps_executed": {
1359
- "type": "array",
1360
- "items": {
1361
- "type": "string"
1362
- }
1363
- },
1364
- "backup_path": {
1365
- "type": "string"
1366
- },
1367
- "needs_recalibration": {
1368
- "type": "boolean"
1369
- },
1370
- "message": {
1371
- "type": "string"
1372
- }
1373
- },
1374
- "required": [
1375
- "migrated",
1376
- "from_version",
1377
- "to_version",
1378
- "steps_executed",
1379
- "needs_recalibration",
1380
- "message"
1381
- ],
1382
- "additionalProperties": false
1383
- },
1384
- "message": {
1385
- "type": "string"
1386
- }
1387
- },
1388
- "required": [
1389
- "action"
1390
- ],
1391
- "additionalProperties": false
1392
- },
1393
- {
1394
- "type": "object",
1395
- "properties": {
1396
- "action": {
1397
- "type": "string",
1398
- "const": "fork_project"
1399
- },
1400
- "new_prefix": {
1401
- "type": "string"
1402
- },
1403
- "new_version": {
1404
- "type": "string"
1405
- },
1406
- "new_path": {
1407
- "type": "string",
1408
- "description": "Absolute filesystem path of the new project directory."
1409
- },
1410
- "forked_from": {
1411
- "type": "string",
1412
- "description": "Absolute path of the source project directory."
1413
- },
1414
- "copied_files": {
1415
- "type": "array",
1416
- "items": {
1417
- "type": "string"
1418
- },
1419
- "description": "Project-relative paths of copied files (excludes stage.json + audit.jsonl)."
1420
- },
1421
- "copied_file_count": {
1422
- "type": "integer"
1423
- },
1424
- "warning": {
1425
- "type": "string",
1426
- "description": "Project isolation notice — forked project must re-create its own objects."
1427
- },
1428
- "next_action": {
1429
- "type": "string",
1430
- "const": "analyze_intent",
1431
- "description": "The forked project starts at stage 2 (analyze_intent)."
1432
- }
1433
- },
1434
- "required": [
1435
- "action",
1436
- "new_prefix",
1437
- "new_version",
1438
- "new_path",
1439
- "forked_from",
1440
- "copied_files",
1441
- "copied_file_count",
1442
- "warning",
1443
- "next_action"
1444
- ],
1445
- "additionalProperties": false
1446
- },
1447
- {
1448
- "type": "object",
1449
- "properties": {
1450
- "action": {
1451
- "type": "string",
1452
- "const": "export_project"
1453
- },
1454
- "project": {
1455
- "type": "string"
1456
- },
1457
- "version": {
1458
- "type": "string"
1459
- },
1460
- "files": {
1461
21
  "type": "array",
1462
22
  "items": {
1463
23
  "type": "object",
1464
24
  "properties": {
1465
- "path": {
25
+ "id": {
1466
26
  "type": "string",
1467
- "description": "Project-relative file path."
27
+ "description": "Project UUID."
1468
28
  },
1469
- "size": {
1470
- "type": "integer",
1471
- "description": "File size in bytes."
1472
- },
1473
- "kind": {
29
+ "prefix": {
1474
30
  "type": "string",
1475
- "enum": [
1476
- "json",
1477
- "markdown",
1478
- "jsonl",
1479
- "other"
1480
- ]
31
+ "description": "Human-readable unique prefix."
1481
32
  },
1482
- "content": {
1483
- "type": "string",
1484
- "description": "File content (text)."
1485
- }
1486
- },
1487
- "required": [
1488
- "path",
1489
- "size",
1490
- "kind",
1491
- "content"
1492
- ],
1493
- "additionalProperties": false
1494
- }
1495
- },
1496
- "total_files": {
1497
- "type": "integer"
1498
- }
1499
- },
1500
- "required": [
1501
- "action",
1502
- "project",
1503
- "version",
1504
- "files",
1505
- "total_files"
1506
- ],
1507
- "additionalProperties": false
1508
- },
1509
- {
1510
- "type": "object",
1511
- "properties": {
1512
- "action": {
1513
- "type": "string",
1514
- "const": "get_project_files"
1515
- },
1516
- "project": {
1517
- "type": "string"
1518
- },
1519
- "version": {
1520
- "type": "string"
1521
- },
1522
- "files": {
1523
- "type": "array",
1524
- "items": {
1525
- "type": "object",
1526
- "properties": {
1527
- "path": {
33
+ "name": {
1528
34
  "type": "string",
1529
- "description": "Project-relative file path."
35
+ "description": "Display name."
36
+ },
37
+ "description": {
38
+ "type": [
39
+ "string",
40
+ "null"
41
+ ]
1530
42
  },
1531
- "size": {
1532
- "type": "integer",
1533
- "description": "File size in bytes."
43
+ "industry": {
44
+ "type": [
45
+ "string",
46
+ "null"
47
+ ]
1534
48
  },
1535
- "kind": {
49
+ "perspective": {
1536
50
  "type": "string",
1537
51
  "enum": [
1538
- "json",
1539
- "markdown",
1540
- "jsonl",
1541
- "other"
52
+ "producer",
53
+ "consumer",
54
+ "both"
1542
55
  ]
1543
56
  },
1544
- "mtime": {
1545
- "type": "integer",
1546
- "description": "Last modified time (ms)."
1547
- }
1548
- },
1549
- "required": [
1550
- "path",
1551
- "size",
1552
- "kind",
1553
- "mtime"
1554
- ],
1555
- "additionalProperties": false
1556
- }
1557
- },
1558
- "total_files": {
1559
- "type": "integer"
1560
- }
1561
- },
1562
- "required": [
1563
- "action",
1564
- "project",
1565
- "version",
1566
- "files",
1567
- "total_files"
1568
- ],
1569
- "additionalProperties": false
1570
- },
1571
- {
1572
- "type": "object",
1573
- "properties": {
1574
- "action": {
1575
- "type": "string",
1576
- "const": "validate_stage_unit"
1577
- },
1578
- "project": {
1579
- "type": "string"
1580
- },
1581
- "version": {
1582
- "type": "string"
1583
- },
1584
- "stage": {
1585
- "type": "integer",
1586
- "minimum": 1,
1587
- "maximum": 5
1588
- },
1589
- "valid": {
1590
- "type": "boolean",
1591
- "description": "True when all 4 stage unit files exist and pass consistency checks."
1592
- },
1593
- "missing_files": {
1594
- "type": "array",
1595
- "items": {
1596
- "type": "string"
1597
- },
1598
- "description": "Project-relative paths of missing stage unit files (empty if all present)."
1599
- },
1600
- "checks": {
1601
- "type": "array",
1602
- "items": {
1603
- "type": "object",
1604
- "properties": {
1605
- "check_id": {
1606
- "type": "string"
1607
- },
1608
57
  "status": {
1609
58
  "type": "string",
1610
59
  "enum": [
1611
- "pass",
1612
- "fail",
1613
- "warn"
60
+ "draft",
61
+ "active",
62
+ "inactive",
63
+ "archived"
1614
64
  ]
1615
65
  },
1616
- "message": {
1617
- "type": "string"
66
+ "labels": {
67
+ "anyOf": [
68
+ {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string"
72
+ }
73
+ },
74
+ {
75
+ "type": "null"
76
+ }
77
+ ]
78
+ },
79
+ "currentVersion": {
80
+ "type": [
81
+ "string",
82
+ "null"
83
+ ],
84
+ "description": "Current version tag (e.g. 'v1')."
85
+ },
86
+ "serviceAddress": {
87
+ "type": [
88
+ "string",
89
+ "null"
90
+ ],
91
+ "description": "Core Service on-chain address (producer projects)."
92
+ },
93
+ "defaultAccount": {
94
+ "type": [
95
+ "string",
96
+ "null"
97
+ ]
98
+ },
99
+ "network": {
100
+ "type": "string",
101
+ "description": "Network the project is bound to."
102
+ },
103
+ "createdAt": {
104
+ "type": "number"
105
+ },
106
+ "updatedAt": {
107
+ "type": "number"
108
+ },
109
+ "metadata": {
110
+ "anyOf": [
111
+ {
112
+ "type": "object",
113
+ "additionalProperties": {}
114
+ },
115
+ {
116
+ "type": "null"
117
+ }
118
+ ],
119
+ "description": "Arbitrary metadata key-value pairs or null."
120
+ },
121
+ "objectCount": {
122
+ "type": "number",
123
+ "description": "Number of objects in this project (from project_objects table)."
124
+ },
125
+ "objectTypes": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "string"
129
+ },
130
+ "description": "Distinct object types in this project (e.g. ['Service','Machine'])."
1618
131
  }
1619
132
  },
1620
133
  "required": [
1621
- "check_id",
134
+ "id",
135
+ "prefix",
136
+ "name",
137
+ "description",
138
+ "industry",
139
+ "perspective",
1622
140
  "status",
1623
- "message"
141
+ "labels",
142
+ "currentVersion",
143
+ "serviceAddress",
144
+ "defaultAccount",
145
+ "network",
146
+ "createdAt",
147
+ "updatedAt",
148
+ "metadata",
149
+ "objectCount",
150
+ "objectTypes"
1624
151
  ],
1625
152
  "additionalProperties": false
1626
- }
1627
- },
1628
- "blocking_issues": {
1629
- "type": "array",
1630
- "items": {
1631
- "type": "string"
1632
- }
153
+ },
154
+ "description": "GLM6 projects from SQLite (first-class entities, with object summary)."
1633
155
  },
1634
- "stage_passed": {
1635
- "type": "boolean",
1636
- "description": "From verification.json stage_passed field (undefined if file missing)."
156
+ "total": {
157
+ "type": "number",
158
+ "description": "Total number of projects returned."
1637
159
  }
1638
160
  },
1639
161
  "required": [
1640
162
  "action",
1641
- "project",
1642
- "version",
1643
- "stage",
1644
- "valid",
1645
- "missing_files",
1646
- "checks",
1647
- "blocking_issues"
163
+ "items",
164
+ "total"
1648
165
  ],
1649
166
  "additionalProperties": false
1650
167
  },
@@ -1653,96 +170,81 @@
1653
170
  "properties": {
1654
171
  "action": {
1655
172
  "type": "string",
1656
- "const": "get_stage_assessment"
173
+ "const": "create_project"
1657
174
  },
1658
175
  "project": {
1659
- "type": "string"
1660
- },
1661
- "version": {
1662
- "type": "string"
1663
- },
1664
- "stage": {
1665
- "type": "integer",
1666
- "minimum": 1,
1667
- "maximum": 5
1668
- },
1669
- "found": {
1670
- "type": "boolean"
1671
- },
1672
- "assessment": {
1673
176
  "type": "object",
1674
177
  "properties": {
1675
- "stage": {
1676
- "type": "integer",
1677
- "minimum": 1,
1678
- "maximum": 5
178
+ "id": {
179
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/id"
1679
180
  },
1680
- "assessed_at": {
1681
- "type": "integer"
181
+ "prefix": {
182
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/prefix"
1682
183
  },
1683
- "goal_completion": {
1684
- "type": "object",
1685
- "additionalProperties": {
1686
- "type": "number"
1687
- }
184
+ "name": {
185
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/name"
1688
186
  },
1689
- "findings": {
1690
- "type": "array",
1691
- "items": {
1692
- "type": "object",
1693
- "properties": {
1694
- "finding_id": {
1695
- "type": "string"
1696
- },
1697
- "severity": {
1698
- "type": "string",
1699
- "enum": [
1700
- "info",
1701
- "warn",
1702
- "critical"
1703
- ]
1704
- },
1705
- "criterion_id": {
1706
- "type": "string"
1707
- },
1708
- "description": {
1709
- "type": "string"
1710
- },
1711
- "evidence": {}
1712
- },
1713
- "required": [
1714
- "finding_id",
1715
- "severity",
1716
- "criterion_id",
1717
- "description"
1718
- ],
1719
- "additionalProperties": false
1720
- }
187
+ "description": {
188
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/description"
1721
189
  },
1722
- "recommendations": {
1723
- "type": "array",
1724
- "items": {
1725
- "type": "string"
1726
- }
190
+ "industry": {
191
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/industry"
192
+ },
193
+ "perspective": {
194
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/perspective"
195
+ },
196
+ "status": {
197
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/status"
198
+ },
199
+ "labels": {
200
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/labels"
201
+ },
202
+ "currentVersion": {
203
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/currentVersion"
204
+ },
205
+ "serviceAddress": {
206
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/serviceAddress"
207
+ },
208
+ "defaultAccount": {
209
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/defaultAccount"
210
+ },
211
+ "network": {
212
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/network"
213
+ },
214
+ "createdAt": {
215
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/createdAt"
216
+ },
217
+ "updatedAt": {
218
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/updatedAt"
219
+ },
220
+ "metadata": {
221
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/metadata"
1727
222
  }
1728
223
  },
1729
224
  "required": [
1730
- "stage",
1731
- "assessed_at",
1732
- "goal_completion",
1733
- "findings",
1734
- "recommendations"
225
+ "id",
226
+ "prefix",
227
+ "name",
228
+ "description",
229
+ "industry",
230
+ "perspective",
231
+ "status",
232
+ "labels",
233
+ "currentVersion",
234
+ "serviceAddress",
235
+ "defaultAccount",
236
+ "network",
237
+ "createdAt",
238
+ "updatedAt",
239
+ "metadata"
1735
240
  ],
1736
241
  "additionalProperties": false,
1737
- "description": "The stage assessment object (from assessment.json)."
242
+ "description": "The created project."
1738
243
  }
1739
244
  },
1740
245
  "required": [
1741
246
  "action",
1742
- "project",
1743
- "version",
1744
- "stage",
1745
- "found"
247
+ "project"
1746
248
  ],
1747
249
  "additionalProperties": false
1748
250
  },
@@ -1751,380 +253,173 @@
1751
253
  "properties": {
1752
254
  "action": {
1753
255
  "type": "string",
1754
- "const": "get_stage_risk_policy"
256
+ "const": "create_project_from_onchain"
1755
257
  },
1756
258
  "project": {
1757
- "type": "string"
1758
- },
1759
- "version": {
1760
- "type": "string"
1761
- },
1762
- "stage": {
1763
- "type": "integer",
1764
- "minimum": 1,
1765
- "maximum": 5
1766
- },
1767
- "found": {
1768
- "type": "boolean"
1769
- },
1770
- "risk_policy": {
1771
259
  "type": "object",
1772
260
  "properties": {
1773
- "stage": {
1774
- "type": "integer",
1775
- "minimum": 1,
1776
- "maximum": 5
1777
- },
1778
- "risks": {
1779
- "type": "array",
1780
- "items": {
1781
- "type": "object",
1782
- "properties": {
1783
- "risk_id": {
1784
- "type": "string"
1785
- },
1786
- "category": {
1787
- "type": "string",
1788
- "enum": [
1789
- "naming",
1790
- "dependency",
1791
- "operational",
1792
- "financial",
1793
- "security"
1794
- ]
1795
- },
1796
- "description": {
1797
- "type": "string"
1798
- },
1799
- "likelihood": {
1800
- "type": "string",
1801
- "enum": [
1802
- "low",
1803
- "medium",
1804
- "high"
1805
- ]
1806
- },
1807
- "impact": {
1808
- "type": "string",
1809
- "enum": [
1810
- "low",
1811
- "medium",
1812
- "high",
1813
- "critical"
1814
- ]
1815
- },
1816
- "mitigation": {
1817
- "type": "string"
1818
- },
1819
- "owner": {
1820
- "type": "string",
1821
- "enum": [
1822
- "ai",
1823
- "user",
1824
- "system"
1825
- ]
1826
- }
1827
- },
1828
- "required": [
1829
- "risk_id",
1830
- "category",
1831
- "description",
1832
- "likelihood",
1833
- "impact",
1834
- "mitigation",
1835
- "owner"
1836
- ],
1837
- "additionalProperties": false
1838
- }
261
+ "id": {
262
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/id"
1839
263
  },
1840
- "active_controls": {
1841
- "type": "array",
1842
- "items": {
1843
- "type": "object",
1844
- "properties": {
1845
- "control_id": {
1846
- "type": "string"
1847
- },
1848
- "control_type": {
1849
- "type": "string",
1850
- "enum": [
1851
- "preventive",
1852
- "detective",
1853
- "corrective"
1854
- ]
1855
- },
1856
- "target_risk": {
1857
- "type": "string"
1858
- },
1859
- "implementation": {
1860
- "type": "string"
1861
- },
1862
- "verified": {
1863
- "type": "boolean"
1864
- }
1865
- },
1866
- "required": [
1867
- "control_id",
1868
- "control_type",
1869
- "target_risk",
1870
- "implementation",
1871
- "verified"
1872
- ],
1873
- "additionalProperties": false
1874
- }
264
+ "prefix": {
265
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/prefix"
1875
266
  },
1876
- "residual_risks": {
1877
- "type": "array",
1878
- "items": {
1879
- "type": "string"
1880
- }
267
+ "name": {
268
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/name"
269
+ },
270
+ "description": {
271
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/description"
272
+ },
273
+ "industry": {
274
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/industry"
275
+ },
276
+ "perspective": {
277
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/perspective"
278
+ },
279
+ "status": {
280
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/status"
281
+ },
282
+ "labels": {
283
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/labels"
284
+ },
285
+ "currentVersion": {
286
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/currentVersion"
287
+ },
288
+ "serviceAddress": {
289
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/serviceAddress"
290
+ },
291
+ "defaultAccount": {
292
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/defaultAccount"
293
+ },
294
+ "network": {
295
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/network"
296
+ },
297
+ "createdAt": {
298
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/createdAt"
299
+ },
300
+ "updatedAt": {
301
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/updatedAt"
302
+ },
303
+ "metadata": {
304
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/metadata"
1881
305
  }
1882
306
  },
1883
307
  "required": [
1884
- "stage",
1885
- "risks",
1886
- "active_controls",
1887
- "residual_risks"
308
+ "id",
309
+ "prefix",
310
+ "name",
311
+ "description",
312
+ "industry",
313
+ "perspective",
314
+ "status",
315
+ "labels",
316
+ "currentVersion",
317
+ "serviceAddress",
318
+ "defaultAccount",
319
+ "network",
320
+ "createdAt",
321
+ "updatedAt",
322
+ "metadata"
1888
323
  ],
1889
324
  "additionalProperties": false,
1890
- "description": "The stage risk policy object (from risk-policy.json)."
1891
- }
1892
- },
1893
- "required": [
1894
- "action",
1895
- "project",
1896
- "version",
1897
- "stage",
1898
- "found"
1899
- ],
1900
- "additionalProperties": false
1901
- },
1902
- {
1903
- "type": "object",
1904
- "properties": {
1905
- "action": {
1906
- "type": "string",
1907
- "const": "get_doc_relations"
1908
- },
1909
- "project": {
1910
- "type": "string"
325
+ "description": "The created consumer project."
1911
326
  },
1912
- "version": {
1913
- "type": "string"
1914
- },
1915
- "found": {
1916
- "type": "boolean"
1917
- },
1918
- "relations": {
1919
- "type": "object",
1920
- "properties": {
1921
- "version": {
1922
- "type": "string"
1923
- },
1924
- "generated_at": {
1925
- "type": "integer"
1926
- },
1927
- "project_invariants": {
1928
- "type": "array",
1929
- "items": {
1930
- "type": "object",
1931
- "properties": {
1932
- "invariant_id": {
1933
- "type": "string"
1934
- },
1935
- "description": {
1936
- "type": "string"
1937
- },
1938
- "verified_by_stages": {
1939
- "type": "array",
1940
- "items": {
1941
- "type": "integer"
1942
- }
1943
- }
1944
- },
1945
- "required": [
1946
- "invariant_id",
1947
- "description",
1948
- "verified_by_stages"
327
+ "objects": {
328
+ "type": "array",
329
+ "items": {
330
+ "type": "object",
331
+ "properties": {
332
+ "id": {
333
+ "type": "string",
334
+ "description": "ProjectObject UUID (project_objects.id)."
335
+ },
336
+ "projectId": {
337
+ "type": "string",
338
+ "description": "Owning project UUID."
339
+ },
340
+ "objectAddress": {
341
+ "type": "string",
342
+ "description": "On-chain object address (0x...)."
343
+ },
344
+ "objectType": {
345
+ "type": [
346
+ "string",
347
+ "null"
1949
348
  ],
1950
- "additionalProperties": false
1951
- }
1952
- },
1953
- "stage_units": {
1954
- "type": "array",
1955
- "items": {
1956
- "type": "object",
1957
- "properties": {
1958
- "stage": {
1959
- "type": "integer",
1960
- "minimum": 1,
1961
- "maximum": 5
1962
- },
1963
- "goal_id": {
1964
- "type": "string"
1965
- },
1966
- "assessment_id": {
1967
- "type": "string"
1968
- },
1969
- "risk_policy_id": {
1970
- "type": "string"
1971
- },
1972
- "verification_id": {
1973
- "type": "string"
1974
- },
1975
- "artifacts": {
349
+ "description": "Object type (Service, Machine, etc.) or null if unknown."
350
+ },
351
+ "objectName": {
352
+ "type": [
353
+ "string",
354
+ "null"
355
+ ],
356
+ "description": "LocalMark name or null."
357
+ },
358
+ "role": {
359
+ "type": "string",
360
+ "enum": [
361
+ "core",
362
+ "dependency",
363
+ "reference"
364
+ ],
365
+ "description": "Object role in project."
366
+ },
367
+ "tags": {
368
+ "anyOf": [
369
+ {
1976
370
  "type": "array",
1977
371
  "items": {
1978
372
  "type": "string"
1979
373
  }
1980
- }
1981
- },
1982
- "required": [
1983
- "stage",
1984
- "goal_id",
1985
- "assessment_id",
1986
- "risk_policy_id",
1987
- "verification_id",
1988
- "artifacts"
1989
- ],
1990
- "additionalProperties": false
1991
- }
1992
- },
1993
- "derivations": {
1994
- "type": "array",
1995
- "items": {
1996
- "type": "object",
1997
- "properties": {
1998
- "source_type": {
1999
- "type": "string",
2000
- "enum": [
2001
- "project_invariant",
2002
- "project_goal"
2003
- ]
2004
- },
2005
- "source_id": {
2006
- "type": "string"
2007
374
  },
2008
- "target_type": {
2009
- "type": "string",
2010
- "enum": [
2011
- "stage_goal",
2012
- "stage_risk",
2013
- "stage_verification"
2014
- ]
2015
- },
2016
- "target_stage": {
2017
- "type": "integer",
2018
- "minimum": 1,
2019
- "maximum": 5
2020
- },
2021
- "target_id": {
2022
- "type": "string"
2023
- },
2024
- "derivation_logic": {
2025
- "type": "string"
375
+ {
376
+ "type": "null"
2026
377
  }
2027
- },
2028
- "required": [
2029
- "source_type",
2030
- "source_id",
2031
- "target_type",
2032
- "target_stage",
2033
- "target_id",
2034
- "derivation_logic"
2035
378
  ],
2036
- "additionalProperties": false
2037
- }
2038
- },
2039
- "propagation_rules": {
2040
- "type": "array",
2041
- "items": {
2042
- "type": "object",
2043
- "properties": {
2044
- "rule_id": {
2045
- "type": "string"
2046
- },
2047
- "trigger": {
379
+ "description": "Tags array or null."
380
+ },
381
+ "addedAt": {
382
+ "type": "number",
383
+ "description": "Timestamp (ms) when added to project."
384
+ },
385
+ "metadata": {
386
+ "anyOf": [
387
+ {
2048
388
  "type": "object",
2049
- "properties": {
2050
- "stage": {
2051
- "type": "integer"
2052
- },
2053
- "event": {
2054
- "type": "string",
2055
- "enum": [
2056
- "verification_passed",
2057
- "verification_failed"
2058
- ]
2059
- }
2060
- },
2061
- "required": [
2062
- "stage",
2063
- "event"
2064
- ],
2065
- "additionalProperties": false
389
+ "additionalProperties": {}
2066
390
  },
2067
- "effect": {
2068
- "type": "object",
2069
- "properties": {
2070
- "target": {
2071
- "type": "string",
2072
- "enum": [
2073
- "project_invariant",
2074
- "next_stage"
2075
- ]
2076
- },
2077
- "action": {
2078
- "type": "string",
2079
- "enum": [
2080
- "verify",
2081
- "block"
2082
- ]
2083
- }
2084
- },
2085
- "required": [
2086
- "target",
2087
- "action"
2088
- ],
2089
- "additionalProperties": false
391
+ {
392
+ "type": "null"
2090
393
  }
2091
- },
2092
- "required": [
2093
- "rule_id",
2094
- "trigger",
2095
- "effect"
2096
394
  ],
2097
- "additionalProperties": false
395
+ "description": "Arbitrary metadata key-value pairs or null."
2098
396
  }
2099
397
  },
2100
- "impact_map": {
2101
- "type": "object",
2102
- "additionalProperties": {
2103
- "type": "array",
2104
- "items": {
2105
- "type": "string"
2106
- }
2107
- }
2108
- }
398
+ "required": [
399
+ "id",
400
+ "projectId",
401
+ "objectAddress",
402
+ "objectType",
403
+ "objectName",
404
+ "role",
405
+ "tags",
406
+ "addedAt",
407
+ "metadata"
408
+ ],
409
+ "additionalProperties": false
2109
410
  },
2110
- "required": [
2111
- "version",
2112
- "generated_at",
2113
- "project_invariants",
2114
- "stage_units",
2115
- "derivations",
2116
- "propagation_rules",
2117
- "impact_map"
2118
- ],
2119
- "additionalProperties": false,
2120
- "description": "The validation chain graph (from relations.json)."
411
+ "description": "Objects discovered from on-chain Service + graph traversal."
412
+ },
413
+ "graphEdgeCount": {
414
+ "type": "number",
415
+ "description": "Number of relationship edges discovered and persisted."
2121
416
  }
2122
417
  },
2123
418
  "required": [
2124
419
  "action",
2125
420
  "project",
2126
- "version",
2127
- "found"
421
+ "objects",
422
+ "graphEdgeCount"
2128
423
  ],
2129
424
  "additionalProperties": false
2130
425
  },
@@ -2133,74 +428,81 @@
2133
428
  "properties": {
2134
429
  "action": {
2135
430
  "type": "string",
2136
- "const": "update_deployment_doc"
431
+ "const": "update_project"
2137
432
  },
2138
433
  "project": {
2139
- "type": "string"
2140
- },
2141
- "version": {
2142
- "type": "string"
2143
- },
2144
- "updated": {
2145
- "type": "boolean",
2146
- "description": "Whether the deployment doc set was regenerated."
2147
- },
2148
- "updated_files": {
2149
- "type": "array",
2150
- "items": {
2151
- "type": "string"
2152
- },
2153
- "description": "Project-relative paths of regenerated files."
2154
- },
2155
- "updated_file_count": {
2156
- "type": "integer"
2157
- },
2158
- "all_stages_passed": {
2159
- "type": "boolean",
2160
- "description": "Whether all stages passed their D-checks after the update."
2161
- },
2162
- "impact_summary": {
2163
434
  "type": "object",
2164
435
  "properties": {
2165
- "stages_affected": {
2166
- "type": "array",
2167
- "items": {
2168
- "type": "integer"
2169
- },
2170
- "description": "Stage numbers whose content changed."
436
+ "id": {
437
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/id"
2171
438
  },
2172
- "relations_rebuilt": {
2173
- "type": "boolean",
2174
- "description": "Whether relations.json was regenerated."
439
+ "prefix": {
440
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/prefix"
441
+ },
442
+ "name": {
443
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/name"
444
+ },
445
+ "description": {
446
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/description"
447
+ },
448
+ "industry": {
449
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/industry"
450
+ },
451
+ "perspective": {
452
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/perspective"
453
+ },
454
+ "status": {
455
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/status"
456
+ },
457
+ "labels": {
458
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/labels"
459
+ },
460
+ "currentVersion": {
461
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/currentVersion"
462
+ },
463
+ "serviceAddress": {
464
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/serviceAddress"
465
+ },
466
+ "defaultAccount": {
467
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/defaultAccount"
468
+ },
469
+ "network": {
470
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/network"
471
+ },
472
+ "createdAt": {
473
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/createdAt"
474
+ },
475
+ "updatedAt": {
476
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/updatedAt"
477
+ },
478
+ "metadata": {
479
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/metadata"
2175
480
  }
2176
481
  },
2177
482
  "required": [
2178
- "stages_affected",
2179
- "relations_rebuilt"
483
+ "id",
484
+ "prefix",
485
+ "name",
486
+ "description",
487
+ "industry",
488
+ "perspective",
489
+ "status",
490
+ "labels",
491
+ "currentVersion",
492
+ "serviceAddress",
493
+ "defaultAccount",
494
+ "network",
495
+ "createdAt",
496
+ "updatedAt",
497
+ "metadata"
2180
498
  ],
2181
499
  "additionalProperties": false,
2182
- "description": "Summary of what changed (based on relations.json impact analysis)."
2183
- },
2184
- "next_action": {
2185
- "type": "string",
2186
- "enum": [
2187
- "validate_validation_chain",
2188
- "trace_substeps",
2189
- "none"
2190
- ],
2191
- "description": "Next action: validate the chain after update, or proceed to trace_substeps."
500
+ "description": "The updated project."
2192
501
  }
2193
502
  },
2194
503
  "required": [
2195
504
  "action",
2196
- "project",
2197
- "version",
2198
- "updated",
2199
- "updated_files",
2200
- "updated_file_count",
2201
- "all_stages_passed",
2202
- "impact_summary",
2203
- "next_action"
505
+ "project"
2204
506
  ],
2205
507
  "additionalProperties": false
2206
508
  },
@@ -2209,154 +511,304 @@
2209
511
  "properties": {
2210
512
  "action": {
2211
513
  "type": "string",
2212
- "const": "validate_validation_chain"
514
+ "const": "get_project_detail"
2213
515
  },
2214
516
  "project": {
2215
- "type": "string"
517
+ "type": "object",
518
+ "properties": {
519
+ "id": {
520
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/id"
521
+ },
522
+ "prefix": {
523
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/prefix"
524
+ },
525
+ "name": {
526
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/name"
527
+ },
528
+ "description": {
529
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/description"
530
+ },
531
+ "industry": {
532
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/industry"
533
+ },
534
+ "perspective": {
535
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/perspective"
536
+ },
537
+ "status": {
538
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/status"
539
+ },
540
+ "labels": {
541
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/labels"
542
+ },
543
+ "currentVersion": {
544
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/currentVersion"
545
+ },
546
+ "serviceAddress": {
547
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/serviceAddress"
548
+ },
549
+ "defaultAccount": {
550
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/defaultAccount"
551
+ },
552
+ "network": {
553
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/network"
554
+ },
555
+ "createdAt": {
556
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/createdAt"
557
+ },
558
+ "updatedAt": {
559
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/updatedAt"
560
+ },
561
+ "metadata": {
562
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/0/properties/items/items/properties/metadata"
563
+ }
564
+ },
565
+ "required": [
566
+ "id",
567
+ "prefix",
568
+ "name",
569
+ "description",
570
+ "industry",
571
+ "perspective",
572
+ "status",
573
+ "labels",
574
+ "currentVersion",
575
+ "serviceAddress",
576
+ "defaultAccount",
577
+ "network",
578
+ "createdAt",
579
+ "updatedAt",
580
+ "metadata"
581
+ ],
582
+ "additionalProperties": false
2216
583
  },
2217
- "version": {
2218
- "type": "string"
584
+ "objects": {
585
+ "type": "array",
586
+ "items": {
587
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items"
588
+ },
589
+ "description": "Project objects (rigid relationships)."
2219
590
  },
2220
- "valid": {
2221
- "type": "boolean",
2222
- "description": "True when derivation, propagation, cross-stage, and impact-map checks all pass."
591
+ "graphEdgeCount": {
592
+ "type": "number",
593
+ "description": "Number of persisted graph edges."
2223
594
  },
2224
- "derivation_checks": {
595
+ "evaluations": {
2225
596
  "type": "array",
2226
597
  "items": {
2227
598
  "type": "object",
2228
599
  "properties": {
2229
- "check_id": {
600
+ "id": {
2230
601
  "type": "string"
2231
602
  },
2232
- "status": {
603
+ "evalType": {
2233
604
  "type": "string",
2234
605
  "enum": [
2235
- "pass",
2236
- "fail",
2237
- "warn"
606
+ "risk",
607
+ "trust",
608
+ "completeness",
609
+ "value",
610
+ "worth_buying"
2238
611
  ]
2239
612
  },
2240
- "message": {
2241
- "type": "string"
2242
- }
2243
- },
2244
- "required": [
2245
- "check_id",
2246
- "status",
2247
- "message"
2248
- ],
2249
- "additionalProperties": false
2250
- }
2251
- },
2252
- "propagation_checks": {
2253
- "type": "array",
2254
- "items": {
2255
- "type": "object",
2256
- "properties": {
2257
- "check_id": {
2258
- "type": "string"
613
+ "score": {
614
+ "type": [
615
+ "number",
616
+ "null"
617
+ ]
2259
618
  },
2260
- "status": {
2261
- "type": "string",
2262
- "enum": [
2263
- "pass",
2264
- "fail",
2265
- "warn"
619
+ "summary": {
620
+ "type": [
621
+ "string",
622
+ "null"
2266
623
  ]
2267
624
  },
2268
- "message": {
2269
- "type": "string"
625
+ "evaluatedAt": {
626
+ "type": "number"
2270
627
  }
2271
628
  },
2272
629
  "required": [
2273
- "check_id",
2274
- "status",
2275
- "message"
630
+ "id",
631
+ "evalType",
632
+ "score",
633
+ "summary",
634
+ "evaluatedAt"
2276
635
  ],
2277
636
  "additionalProperties": false
2278
- }
637
+ },
638
+ "description": "Stored evaluation results (most recent first)."
2279
639
  },
2280
- "cross_stage_checks": {
640
+ "versions": {
2281
641
  "type": "array",
2282
642
  "items": {
2283
643
  "type": "object",
2284
644
  "properties": {
2285
- "check_id": {
645
+ "version": {
2286
646
  "type": "string"
2287
647
  },
2288
- "status": {
2289
- "type": "string",
2290
- "enum": [
2291
- "pass",
2292
- "fail",
2293
- "warn"
648
+ "description": {
649
+ "type": [
650
+ "string",
651
+ "null"
2294
652
  ]
2295
653
  },
2296
- "message": {
2297
- "type": "string"
654
+ "createdAt": {
655
+ "type": "number"
2298
656
  }
2299
657
  },
2300
658
  "required": [
2301
- "check_id",
2302
- "status",
2303
- "message"
659
+ "version",
660
+ "description",
661
+ "createdAt"
2304
662
  ],
2305
663
  "additionalProperties": false
2306
- }
664
+ },
665
+ "description": "Project version history."
666
+ }
667
+ },
668
+ "required": [
669
+ "action",
670
+ "project",
671
+ "objects",
672
+ "graphEdgeCount",
673
+ "evaluations",
674
+ "versions"
675
+ ],
676
+ "additionalProperties": false
677
+ },
678
+ {
679
+ "type": "object",
680
+ "properties": {
681
+ "action": {
682
+ "type": "string",
683
+ "const": "add_object"
2307
684
  },
2308
- "impact_map_checks": {
2309
- "type": "array",
2310
- "items": {
2311
- "type": "object",
2312
- "properties": {
2313
- "check_id": {
2314
- "type": "string"
2315
- },
2316
- "status": {
2317
- "type": "string",
2318
- "enum": [
2319
- "pass",
2320
- "fail",
2321
- "warn"
2322
- ]
2323
- },
2324
- "message": {
2325
- "type": "string"
2326
- }
685
+ "object": {
686
+ "type": "object",
687
+ "properties": {
688
+ "id": {
689
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/id"
2327
690
  },
2328
- "required": [
2329
- "check_id",
2330
- "status",
2331
- "message"
2332
- ],
2333
- "additionalProperties": false
2334
- }
691
+ "projectId": {
692
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/projectId"
693
+ },
694
+ "objectAddress": {
695
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/objectAddress"
696
+ },
697
+ "objectType": {
698
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/objectType"
699
+ },
700
+ "objectName": {
701
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/objectName"
702
+ },
703
+ "role": {
704
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/role"
705
+ },
706
+ "tags": {
707
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/tags"
708
+ },
709
+ "addedAt": {
710
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/addedAt"
711
+ },
712
+ "metadata": {
713
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/metadata"
714
+ }
715
+ },
716
+ "required": [
717
+ "id",
718
+ "projectId",
719
+ "objectAddress",
720
+ "objectType",
721
+ "objectName",
722
+ "role",
723
+ "tags",
724
+ "addedAt",
725
+ "metadata"
726
+ ],
727
+ "additionalProperties": false,
728
+ "description": "The added project-object relationship."
729
+ }
730
+ },
731
+ "required": [
732
+ "action",
733
+ "object"
734
+ ],
735
+ "additionalProperties": false
736
+ },
737
+ {
738
+ "type": "object",
739
+ "properties": {
740
+ "action": {
741
+ "type": "string",
742
+ "const": "remove_object"
2335
743
  },
2336
- "blocking_issues": {
2337
- "type": "array",
2338
- "items": {
2339
- "type": "string"
2340
- }
744
+ "removed": {
745
+ "type": "boolean",
746
+ "const": true,
747
+ "description": "Always true — confirms removal."
748
+ }
749
+ },
750
+ "required": [
751
+ "action",
752
+ "removed"
753
+ ],
754
+ "additionalProperties": false
755
+ },
756
+ {
757
+ "type": "object",
758
+ "properties": {
759
+ "action": {
760
+ "type": "string",
761
+ "const": "update_object"
2341
762
  },
2342
- "warnings": {
2343
- "type": "array",
2344
- "items": {
2345
- "type": "string"
2346
- }
763
+ "object": {
764
+ "type": "object",
765
+ "properties": {
766
+ "id": {
767
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/id"
768
+ },
769
+ "projectId": {
770
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/projectId"
771
+ },
772
+ "objectAddress": {
773
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/objectAddress"
774
+ },
775
+ "objectType": {
776
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/objectType"
777
+ },
778
+ "objectName": {
779
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/objectName"
780
+ },
781
+ "role": {
782
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/role"
783
+ },
784
+ "tags": {
785
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/tags"
786
+ },
787
+ "addedAt": {
788
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/addedAt"
789
+ },
790
+ "metadata": {
791
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items/properties/metadata"
792
+ }
793
+ },
794
+ "required": [
795
+ "id",
796
+ "projectId",
797
+ "objectAddress",
798
+ "objectType",
799
+ "objectName",
800
+ "role",
801
+ "tags",
802
+ "addedAt",
803
+ "metadata"
804
+ ],
805
+ "additionalProperties": false,
806
+ "description": "The updated project-object relationship."
2347
807
  }
2348
808
  },
2349
809
  "required": [
2350
810
  "action",
2351
- "project",
2352
- "version",
2353
- "valid",
2354
- "derivation_checks",
2355
- "propagation_checks",
2356
- "cross_stage_checks",
2357
- "impact_map_checks",
2358
- "blocking_issues",
2359
- "warnings"
811
+ "object"
2360
812
  ],
2361
813
  "additionalProperties": false
2362
814
  },
@@ -2365,58 +817,77 @@
2365
817
  "properties": {
2366
818
  "action": {
2367
819
  "type": "string",
2368
- "const": "apply_improvement"
2369
- },
2370
- "proposal_id": {
2371
- "type": "string"
2372
- },
2373
- "previous_status": {
2374
- "type": "string"
2375
- },
2376
- "new_status": {
2377
- "type": "string"
2378
- },
2379
- "applied": {
2380
- "type": "boolean",
2381
- "description": "Whether the proposal was applied (true for approved+config_override, true for approved+source_patch producing patch file)."
820
+ "const": "create_version"
2382
821
  },
2383
- "apply_mode": {
822
+ "version": {
823
+ "type": "object",
824
+ "properties": {
825
+ "version": {
826
+ "type": "string",
827
+ "description": "Version tag (e.g. 'v2')."
828
+ },
829
+ "description": {
830
+ "type": [
831
+ "string",
832
+ "null"
833
+ ]
834
+ },
835
+ "createdAt": {
836
+ "type": "number"
837
+ }
838
+ },
839
+ "required": [
840
+ "version",
841
+ "description",
842
+ "createdAt"
843
+ ],
844
+ "additionalProperties": false
845
+ }
846
+ },
847
+ "required": [
848
+ "action",
849
+ "version"
850
+ ],
851
+ "additionalProperties": false
852
+ },
853
+ {
854
+ "type": "object",
855
+ "properties": {
856
+ "action": {
2384
857
  "type": "string",
2385
- "enum": [
2386
- "config_override",
2387
- "source_patch"
2388
- ]
858
+ "const": "build_graph"
2389
859
  },
2390
- "override_file": {
2391
- "type": "string",
2392
- "description": "Path of the override file written (config_override only)."
860
+ "nodeCount": {
861
+ "type": "number",
862
+ "description": "Total nodes in the constructed graph."
2393
863
  },
2394
- "patch_file": {
2395
- "type": "string",
2396
- "description": "Path of the patch file written (source_patch only)."
864
+ "edgeCount": {
865
+ "type": "number",
866
+ "description": "Total edges (after conflict resolution + dedup)."
2397
867
  },
2398
- "message": {
2399
- "type": "string"
868
+ "edgesBySource": {
869
+ "type": "object",
870
+ "additionalProperties": {
871
+ "type": "number"
872
+ },
873
+ "description": "Edge counts by source: { internal: N, registrar: N, potential: N }."
2400
874
  },
2401
- "next_action": {
2402
- "type": "string",
2403
- "enum": [
2404
- "get_improvement_queue",
2405
- "get_flywheel_config",
2406
- "none"
2407
- ],
2408
- "description": "Next action: check more proposals or view flywheel status."
875
+ "reputationCount": {
876
+ "type": "number",
877
+ "description": "Number of objects with Registrar reputation data."
878
+ },
879
+ "builtAt": {
880
+ "type": "number",
881
+ "description": "Build timestamp (ms)."
2409
882
  }
2410
883
  },
2411
884
  "required": [
2412
885
  "action",
2413
- "proposal_id",
2414
- "previous_status",
2415
- "new_status",
2416
- "applied",
2417
- "apply_mode",
2418
- "message",
2419
- "next_action"
886
+ "nodeCount",
887
+ "edgeCount",
888
+ "edgesBySource",
889
+ "reputationCount",
890
+ "builtAt"
2420
891
  ],
2421
892
  "additionalProperties": false
2422
893
  },
@@ -2425,103 +896,71 @@
2425
896
  "properties": {
2426
897
  "action": {
2427
898
  "type": "string",
2428
- "const": "get_improvement_queue"
899
+ "const": "get_graph"
2429
900
  },
2430
- "total": {
2431
- "type": "integer"
2432
- },
2433
- "filtered_count": {
2434
- "type": "integer"
2435
- },
2436
- "proposals": {
901
+ "edges": {
2437
902
  "type": "array",
2438
903
  "items": {
2439
904
  "type": "object",
2440
905
  "properties": {
2441
- "proposal_id": {
2442
- "type": "string"
2443
- },
2444
- "source_diagnosis_id": {
2445
- "type": "string"
2446
- },
2447
- "type": {
906
+ "sourceObject": {
2448
907
  "type": "string"
2449
908
  },
2450
- "priority": {
909
+ "targetObject": {
2451
910
  "type": "string"
2452
911
  },
2453
- "automation": {
2454
- "type": "string",
2455
- "enum": [
2456
- "full",
2457
- "semi",
2458
- "manual"
2459
- ]
2460
- },
2461
- "apply_mode": {
912
+ "edgeSource": {
2462
913
  "type": "string",
2463
914
  "enum": [
2464
- "config_override",
2465
- "source_patch"
915
+ "internal",
916
+ "registrar",
917
+ "potential"
2466
918
  ]
2467
919
  },
2468
- "override_category": {
2469
- "type": "string"
2470
- },
2471
- "title": {
2472
- "type": "string"
2473
- },
2474
- "description": {
2475
- "type": "string"
2476
- },
2477
- "target": {
920
+ "relationshipType": {
2478
921
  "type": "string"
2479
922
  },
2480
- "review_status": {
2481
- "type": "string",
2482
- "enum": [
2483
- "pending",
2484
- "approved",
2485
- "rejected",
2486
- "applied"
923
+ "fieldName": {
924
+ "type": [
925
+ "string",
926
+ "null"
2487
927
  ]
2488
928
  },
2489
- "ab_test_recommended": {
929
+ "depth": {
930
+ "type": "number"
931
+ },
932
+ "verified": {
2490
933
  "type": "boolean"
2491
934
  },
2492
- "persisted_at": {
2493
- "type": "string"
935
+ "weight": {
936
+ "type": "number"
2494
937
  },
2495
- "reviewed_at": {
2496
- "type": "string"
938
+ "direction": {
939
+ "type": [
940
+ "string",
941
+ "null"
942
+ ]
2497
943
  }
2498
944
  },
2499
945
  "required": [
2500
- "proposal_id",
2501
- "source_diagnosis_id",
2502
- "type",
2503
- "priority",
2504
- "automation",
2505
- "apply_mode",
2506
- "title",
2507
- "description",
2508
- "target",
2509
- "review_status",
2510
- "ab_test_recommended"
946
+ "sourceObject",
947
+ "targetObject",
948
+ "edgeSource",
949
+ "relationshipType",
950
+ "fieldName",
951
+ "depth",
952
+ "verified",
953
+ "weight",
954
+ "direction"
2511
955
  ],
2512
956
  "additionalProperties": false
2513
- }
2514
- },
2515
- "summary": {
2516
- "type": "string"
957
+ },
958
+ "description": "Persisted graph edges."
2517
959
  }
2518
960
  },
2519
961
  "required": [
2520
962
  "action",
2521
- "total",
2522
- "filtered_count",
2523
- "proposals",
2524
- "summary"
963
+ "edges"
2525
964
  ],
2526
965
  "additionalProperties": false
2527
966
  },
@@ -2530,98 +969,116 @@
2530
969
  "properties": {
2531
970
  "action": {
2532
971
  "type": "string",
2533
- "const": "get_flywheel_config"
972
+ "const": "evaluate_project"
2534
973
  },
2535
- "queue_path": {
2536
- "type": "string"
974
+ "evaluationType": {
975
+ "type": "string",
976
+ "enum": [
977
+ "risk",
978
+ "trust",
979
+ "completeness",
980
+ "value",
981
+ "worth_buying"
982
+ ]
2537
983
  },
2538
- "overrides_dir": {
2539
- "type": "string"
984
+ "score": {
985
+ "type": "number",
986
+ "description": "Overall score (0-100, higher = better). 0 when needsLlm=true."
2540
987
  },
2541
- "patches_dir": {
988
+ "summary": {
2542
989
  "type": "string"
2543
990
  },
2544
- "total_proposals": {
2545
- "type": "integer"
2546
- },
2547
- "pending_count": {
2548
- "type": "integer"
2549
- },
2550
- "approved_count": {
2551
- "type": "integer"
2552
- },
2553
- "applied_count": {
2554
- "type": "integer"
2555
- },
2556
- "rejected_count": {
2557
- "type": "integer"
2558
- },
2559
- "override_files": {
2560
- "type": "array",
2561
- "items": {
2562
- "type": "string"
2563
- }
2564
- },
2565
- "recent_proposals": {
991
+ "criterionScores": {
2566
992
  "type": "array",
2567
993
  "items": {
2568
994
  "type": "object",
2569
995
  "properties": {
2570
- "proposal_id": {
996
+ "name": {
2571
997
  "type": "string"
2572
998
  },
2573
- "type": {
2574
- "type": "string"
999
+ "score": {
1000
+ "type": "number"
2575
1001
  },
2576
- "priority": {
1002
+ "weight": {
1003
+ "type": "number"
1004
+ },
1005
+ "rationale": {
1006
+ "type": "string"
1007
+ }
1008
+ },
1009
+ "required": [
1010
+ "name",
1011
+ "score",
1012
+ "weight",
1013
+ "rationale"
1014
+ ],
1015
+ "additionalProperties": false
1016
+ },
1017
+ "description": "Per-criterion scores. Empty when needsLlm=true."
1018
+ },
1019
+ "findings": {
1020
+ "type": "array",
1021
+ "items": {
1022
+ "type": "object",
1023
+ "properties": {
1024
+ "criterion": {
2577
1025
  "type": "string"
2578
1026
  },
2579
- "review_status": {
1027
+ "severity": {
2580
1028
  "type": "string",
2581
1029
  "enum": [
2582
- "pending",
2583
- "approved",
2584
- "rejected",
2585
- "applied"
1030
+ "critical",
1031
+ "warning",
1032
+ "info"
2586
1033
  ]
2587
1034
  },
2588
- "title": {
1035
+ "message": {
2589
1036
  "type": "string"
1037
+ },
1038
+ "deduction": {
1039
+ "type": "number"
2590
1040
  }
2591
1041
  },
2592
1042
  "required": [
2593
- "proposal_id",
2594
- "type",
2595
- "priority",
2596
- "review_status",
2597
- "title"
1043
+ "criterion",
1044
+ "severity",
1045
+ "message",
1046
+ "deduction"
2598
1047
  ],
2599
1048
  "additionalProperties": false
2600
- }
1049
+ },
1050
+ "description": "Negative findings (deductions). Empty when needsLlm=true."
1051
+ },
1052
+ "strengths": {
1053
+ "type": "array",
1054
+ "items": {
1055
+ "type": "string"
1056
+ },
1057
+ "description": "Positive evidence. Empty when needsLlm=true."
1058
+ },
1059
+ "needsLlm": {
1060
+ "type": "boolean",
1061
+ "description": "True for worth_buying/value evaluations. When true, process the llmPrompt with an LLM and call save_evaluation to store the result."
2601
1062
  },
2602
- "reflow_status": {
1063
+ "llmPrompt": {
2603
1064
  "type": "string",
2604
- "enum": [
2605
- "active",
2606
- "idle",
2607
- "blocked"
2608
- ],
2609
- "description": "active=pending proposals exist; idle=no proposals; blocked=approved but not applied."
1065
+ "description": "Present when needsLlm=true. Send this prompt to an LLM, parse the JSON response, and call save_evaluation."
1066
+ },
1067
+ "evaluationId": {
1068
+ "type": "string",
1069
+ "description": "ID of the stored evaluation record (for rule-based types). Empty for LLM-assisted types."
2610
1070
  }
2611
1071
  },
2612
1072
  "required": [
2613
1073
  "action",
2614
- "queue_path",
2615
- "overrides_dir",
2616
- "patches_dir",
2617
- "total_proposals",
2618
- "pending_count",
2619
- "approved_count",
2620
- "applied_count",
2621
- "rejected_count",
2622
- "override_files",
2623
- "recent_proposals",
2624
- "reflow_status"
1074
+ "evaluationType",
1075
+ "score",
1076
+ "summary",
1077
+ "criterionScores",
1078
+ "findings",
1079
+ "strengths",
1080
+ "needsLlm",
1081
+ "evaluationId"
2625
1082
  ],
2626
1083
  "additionalProperties": false
2627
1084
  },
@@ -2630,101 +1087,54 @@
2630
1087
  "properties": {
2631
1088
  "action": {
2632
1089
  "type": "string",
2633
- "const": "rollback_stage"
2634
- },
2635
- "success": {
2636
- "type": "boolean",
2637
- "description": "Whether the rollback was executed (or would be, if dry_run=false)."
2638
- },
2639
- "dry_run": {
2640
- "type": "boolean",
2641
- "description": "Whether this was a policy evaluation only (no execution)."
2642
- },
2643
- "target_stage": {
2644
- "type": "integer",
2645
- "minimum": 1,
2646
- "maximum": 5
2647
- },
2648
- "previous_stage": {
2649
- "type": "integer",
2650
- "minimum": 1,
2651
- "maximum": 5
2652
- },
2653
- "allowed": {
2654
- "type": "boolean",
2655
- "description": "Whether the rollback is allowed by policy."
2656
- },
2657
- "block_reason": {
2658
- "type": "string",
2659
- "description": "Present when allowed=false — explains why rollback is blocked."
1090
+ "const": "save_evaluation"
2660
1091
  },
2661
- "files_to_clean": {
2662
- "type": "array",
2663
- "items": {
2664
- "type": "string"
2665
- },
2666
- "description": "Files/directories that will be (or were) deleted during rollback."
2667
- },
2668
- "files_cleaned": {
2669
- "type": "array",
2670
- "items": {
2671
- "type": "string"
2672
- },
2673
- "description": "Files/directories actually deleted (empty in dry_run mode)."
2674
- },
2675
- "warnings": {
2676
- "type": "array",
2677
- "items": {
2678
- "type": "string"
2679
- },
2680
- "description": "Non-blocking warnings (e.g., data loss reminder)."
2681
- },
2682
- "iteration_strategy": {
1092
+ "evaluation": {
2683
1093
  "type": "object",
2684
1094
  "properties": {
2685
- "strategy": {
1095
+ "id": {
1096
+ "type": "string"
1097
+ },
1098
+ "evalType": {
2686
1099
  "type": "string",
2687
1100
  "enum": [
2688
- "in_place",
2689
- "fork"
1101
+ "risk",
1102
+ "trust",
1103
+ "completeness",
1104
+ "value",
1105
+ "worth_buying"
2690
1106
  ]
2691
1107
  },
2692
- "reason": {
2693
- "type": "string"
1108
+ "score": {
1109
+ "type": [
1110
+ "number",
1111
+ "null"
1112
+ ]
2694
1113
  },
2695
- "fork_to_version": {
2696
- "type": "string"
1114
+ "summary": {
1115
+ "type": [
1116
+ "string",
1117
+ "null"
1118
+ ]
2697
1119
  },
2698
- "published_objects": {
2699
- "type": "array",
2700
- "items": {
2701
- "type": "string"
2702
- }
1120
+ "evaluatedAt": {
1121
+ "type": "number"
2703
1122
  }
2704
1123
  },
2705
1124
  "required": [
2706
- "strategy",
2707
- "reason"
1125
+ "id",
1126
+ "evalType",
1127
+ "score",
1128
+ "summary",
1129
+ "evaluatedAt"
2708
1130
  ],
2709
- "additionalProperties": false
2710
- },
2711
- "message": {
2712
- "type": "string",
2713
- "description": "Human-readable summary."
1131
+ "additionalProperties": false,
1132
+ "description": "The stored evaluation record."
2714
1133
  }
2715
1134
  },
2716
1135
  "required": [
2717
1136
  "action",
2718
- "success",
2719
- "dry_run",
2720
- "target_stage",
2721
- "previous_stage",
2722
- "allowed",
2723
- "files_to_clean",
2724
- "files_cleaned",
2725
- "warnings",
2726
- "iteration_strategy",
2727
- "message"
1137
+ "evaluation"
2728
1138
  ],
2729
1139
  "additionalProperties": false
2730
1140
  },
@@ -2733,83 +1143,177 @@
2733
1143
  "properties": {
2734
1144
  "action": {
2735
1145
  "type": "string",
2736
- "const": "get_reversibility"
1146
+ "const": "compare_projects"
2737
1147
  },
2738
- "query": {
2739
- "type": "object",
2740
- "properties": {
2741
- "object_type": {
2742
- "type": "string"
2743
- },
2744
- "lifecycle_state": {
2745
- "type": "string"
2746
- }
2747
- },
2748
- "additionalProperties": false,
2749
- "description": "The query parameters used (empty = full matrix returned)."
1148
+ "evaluationType": {
1149
+ "type": "string",
1150
+ "enum": [
1151
+ "risk",
1152
+ "trust",
1153
+ "completeness",
1154
+ "value",
1155
+ "worth_buying"
1156
+ ]
2750
1157
  },
2751
- "entries": {
1158
+ "ranking": {
2752
1159
  "type": "array",
2753
1160
  "items": {
2754
1161
  "type": "object",
2755
1162
  "properties": {
2756
- "object_type": {
1163
+ "projectId": {
2757
1164
  "type": "string"
2758
1165
  },
2759
- "lifecycle_state": {
2760
- "type": "string",
2761
- "enum": [
2762
- "created",
2763
- "referenced",
2764
- "published",
2765
- "bound"
1166
+ "projectName": {
1167
+ "type": "string"
1168
+ },
1169
+ "score": {
1170
+ "type": [
1171
+ "number",
1172
+ "null"
2766
1173
  ]
2767
1174
  },
2768
- "struct_reversible": {
2769
- "type": "string",
2770
- "enum": [
2771
- "reversible",
2772
- "limited",
2773
- "immutable"
1175
+ "summary": {
1176
+ "type": [
1177
+ "string",
1178
+ "null"
2774
1179
  ]
2775
1180
  },
2776
- "behavior_reversible": {
2777
- "type": "boolean"
1181
+ "evaluatedAt": {
1182
+ "type": [
1183
+ "number",
1184
+ "null"
1185
+ ]
1186
+ }
1187
+ },
1188
+ "required": [
1189
+ "projectId",
1190
+ "projectName",
1191
+ "score",
1192
+ "summary",
1193
+ "evaluatedAt"
1194
+ ],
1195
+ "additionalProperties": false
1196
+ },
1197
+ "description": "Projects sorted by score descending (nulls last)."
1198
+ },
1199
+ "bestProjectId": {
1200
+ "type": [
1201
+ "string",
1202
+ "null"
1203
+ ],
1204
+ "description": "Project ID with the highest score, or null if none have evaluations."
1205
+ }
1206
+ },
1207
+ "required": [
1208
+ "action",
1209
+ "evaluationType",
1210
+ "ranking",
1211
+ "bestProjectId"
1212
+ ],
1213
+ "additionalProperties": false
1214
+ },
1215
+ {
1216
+ "type": "object",
1217
+ "properties": {
1218
+ "action": {
1219
+ "type": "string",
1220
+ "const": "refresh_objects"
1221
+ },
1222
+ "refreshedCount": {
1223
+ "type": "number",
1224
+ "description": "Number of objects re-fetched from chain."
1225
+ },
1226
+ "failedCount": {
1227
+ "type": "number",
1228
+ "description": "Number of objects that failed to refresh."
1229
+ },
1230
+ "refreshedAt": {
1231
+ "type": "number",
1232
+ "description": "Refresh timestamp (ms)."
1233
+ }
1234
+ },
1235
+ "required": [
1236
+ "action",
1237
+ "refreshedCount",
1238
+ "failedCount",
1239
+ "refreshedAt"
1240
+ ],
1241
+ "additionalProperties": false
1242
+ },
1243
+ {
1244
+ "type": "object",
1245
+ "properties": {
1246
+ "action": {
1247
+ "type": "string",
1248
+ "const": "get_object_diff"
1249
+ },
1250
+ "address": {
1251
+ "type": "string"
1252
+ },
1253
+ "fromTime": {
1254
+ "type": "number"
1255
+ },
1256
+ "toTime": {
1257
+ "type": "number"
1258
+ },
1259
+ "changedFields": {
1260
+ "type": "array",
1261
+ "items": {
1262
+ "type": "object",
1263
+ "properties": {
1264
+ "fieldPath": {
1265
+ "type": "string",
1266
+ "description": "Dotted field path (e.g. 'machine', 'sales[0].price')."
1267
+ },
1268
+ "oldValue": {
1269
+ "description": "Previous value (null if field was added)."
2778
1270
  },
2779
- "gas_impact": {
1271
+ "newValue": {
1272
+ "description": "New value (null if field was removed)."
1273
+ },
1274
+ "changeType": {
2780
1275
  "type": "string",
2781
1276
  "enum": [
2782
- "low",
2783
- "medium",
2784
- "high",
2785
- "none"
1277
+ "added",
1278
+ "removed",
1279
+ "modified"
2786
1280
  ]
2787
- },
2788
- "explanation": {
2789
- "type": "string"
2790
1281
  }
2791
1282
  },
2792
1283
  "required": [
2793
- "object_type",
2794
- "lifecycle_state",
2795
- "struct_reversible",
2796
- "behavior_reversible",
2797
- "gas_impact",
2798
- "explanation"
1284
+ "fieldPath",
1285
+ "changeType"
2799
1286
  ],
2800
1287
  "additionalProperties": false
2801
- }
1288
+ },
1289
+ "description": "Changed fields between the two timestamps."
1290
+ }
1291
+ },
1292
+ "required": [
1293
+ "action",
1294
+ "address",
1295
+ "fromTime",
1296
+ "toTime",
1297
+ "changedFields"
1298
+ ],
1299
+ "additionalProperties": false
1300
+ },
1301
+ {
1302
+ "type": "object",
1303
+ "properties": {
1304
+ "action": {
1305
+ "type": "string",
1306
+ "const": "delete_project"
2802
1307
  },
2803
- "total": {
2804
- "type": "integer",
2805
- "description": "Number of matrix entries returned."
1308
+ "deleted": {
1309
+ "type": "boolean",
1310
+ "const": true,
1311
+ "description": "Always true — confirms deletion of the project and all associated objects, evaluations, versions, and graph edges."
2806
1312
  }
2807
1313
  },
2808
1314
  "required": [
2809
1315
  "action",
2810
- "query",
2811
- "entries",
2812
- "total"
1316
+ "deleted"
2813
1317
  ],
2814
1318
  "additionalProperties": false
2815
1319
  },