@wowok/agent-mcp 2.3.14 → 2.3.18

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 (189) hide show
  1. package/dist/config/index.d.ts +1 -0
  2. package/dist/config/index.js +1 -0
  3. package/dist/config/runtime.d.ts +26 -0
  4. package/dist/config/runtime.js +217 -0
  5. package/dist/customer/index.d.ts +9 -0
  6. package/dist/customer/index.js +9 -0
  7. package/dist/customer/industry-risks.d.ts +40 -0
  8. package/dist/customer/industry-risks.js +438 -0
  9. package/dist/customer/info-puzzle.d.ts +102 -0
  10. package/dist/customer/info-puzzle.js +312 -0
  11. package/dist/customer/order-monitor.d.ts +75 -0
  12. package/dist/customer/order-monitor.js +327 -0
  13. package/dist/customer/order-strategy.d.ts +36 -0
  14. package/dist/customer/order-strategy.js +373 -0
  15. package/dist/customer/post-purchase.d.ts +42 -0
  16. package/dist/customer/post-purchase.js +350 -0
  17. package/dist/customer/reminder-system.d.ts +42 -0
  18. package/dist/customer/reminder-system.js +295 -0
  19. package/dist/customer/risk-assessment.d.ts +8 -0
  20. package/dist/customer/risk-assessment.js +337 -0
  21. package/dist/customer/types.d.ts +193 -0
  22. package/dist/customer/types.js +13 -0
  23. package/dist/customer/user-preferences.d.ts +70 -0
  24. package/dist/customer/user-preferences.js +460 -0
  25. package/dist/experience/experience-reuse.d.ts +10 -0
  26. package/dist/experience/experience-reuse.js +103 -0
  27. package/dist/experience/index.d.ts +6 -0
  28. package/dist/experience/index.js +5 -0
  29. package/dist/experience/intent-distill.d.ts +3 -0
  30. package/dist/experience/intent-distill.js +83 -0
  31. package/dist/experience/realtime-feedback.d.ts +5 -0
  32. package/dist/experience/realtime-feedback.js +94 -0
  33. package/dist/experience/types.d.ts +50 -0
  34. package/dist/experience/types.js +1 -0
  35. package/dist/experience/user-profile.d.ts +25 -0
  36. package/dist/experience/user-profile.js +171 -0
  37. package/dist/index.js +842 -371
  38. package/dist/knowledge/acquisition-flywheel.d.ts +53 -0
  39. package/dist/knowledge/acquisition-flywheel.js +192 -0
  40. package/dist/knowledge/arbitration-trust.d.ts +24 -0
  41. package/dist/knowledge/arbitration-trust.js +117 -0
  42. package/dist/knowledge/audit-rules.d.ts +28 -0
  43. package/dist/knowledge/audit-rules.js +141 -0
  44. package/dist/knowledge/demand-matching.d.ts +29 -0
  45. package/dist/knowledge/demand-matching.js +132 -0
  46. package/dist/knowledge/dynamic-pricing.d.ts +31 -0
  47. package/dist/knowledge/dynamic-pricing.js +87 -0
  48. package/dist/knowledge/flywheel-loop.d.ts +87 -0
  49. package/dist/knowledge/flywheel-loop.js +378 -0
  50. package/dist/knowledge/glossary.d.ts +18 -0
  51. package/dist/knowledge/glossary.js +209 -0
  52. package/dist/knowledge/guard-ledger.d.ts +19 -0
  53. package/dist/knowledge/guard-ledger.js +219 -0
  54. package/dist/knowledge/guard-puzzle.d.ts +93 -0
  55. package/dist/knowledge/guard-puzzle.js +278 -0
  56. package/dist/knowledge/guard-risk.d.ts +60 -0
  57. package/dist/knowledge/guard-risk.js +474 -0
  58. package/dist/knowledge/guard-translation.d.ts +46 -0
  59. package/dist/knowledge/guard-translation.js +487 -0
  60. package/dist/knowledge/index.d.ts +77 -0
  61. package/dist/knowledge/index.js +79 -0
  62. package/dist/knowledge/industry-evolution.d.ts +82 -0
  63. package/dist/knowledge/industry-evolution.js +323 -0
  64. package/dist/knowledge/industry-generalizer.d.ts +17 -0
  65. package/dist/knowledge/industry-generalizer.js +381 -0
  66. package/dist/knowledge/industry-registry.d.ts +48 -0
  67. package/dist/knowledge/industry-registry.js +187 -0
  68. package/dist/knowledge/intent-metrics.d.ts +42 -0
  69. package/dist/knowledge/intent-metrics.js +566 -0
  70. package/dist/knowledge/process-model.d.ts +24 -0
  71. package/dist/knowledge/process-model.js +160 -0
  72. package/dist/knowledge/reputation-rules.d.ts +42 -0
  73. package/dist/knowledge/reputation-rules.js +99 -0
  74. package/dist/knowledge/reward-templates.d.ts +25 -0
  75. package/dist/knowledge/reward-templates.js +125 -0
  76. package/dist/knowledge/safety-rules.d.ts +36 -0
  77. package/dist/knowledge/safety-rules.js +232 -0
  78. package/dist/knowledge/tool-constraints.d.ts +30 -0
  79. package/dist/knowledge/tool-constraints.js +175 -0
  80. package/dist/knowledge/trust-metrics.d.ts +37 -0
  81. package/dist/knowledge/trust-metrics.js +138 -0
  82. package/dist/loop-engineering/diagnose.d.ts +3 -2
  83. package/dist/loop-engineering/diagnose.js +94 -0
  84. package/dist/loop-engineering/improve.d.ts +1 -1
  85. package/dist/loop-engineering/improve.js +52 -1
  86. package/dist/project/graph.d.ts +71 -0
  87. package/dist/project/graph.js +314 -0
  88. package/dist/project/index.d.ts +62 -0
  89. package/dist/project/index.js +167 -0
  90. package/dist/project/namespace.d.ts +62 -0
  91. package/dist/project/namespace.js +181 -0
  92. package/dist/project/query.d.ts +40 -0
  93. package/dist/project/query.js +110 -0
  94. package/dist/safety/confirm-gate.d.ts +17 -0
  95. package/dist/safety/confirm-gate.js +88 -0
  96. package/dist/safety/index.d.ts +3 -0
  97. package/dist/safety/index.js +3 -0
  98. package/dist/safety/preview.d.ts +2 -0
  99. package/dist/safety/preview.js +36 -0
  100. package/dist/schema/call/allocation.d.ts +39 -14
  101. package/dist/schema/call/arbitration.d.ts +187 -162
  102. package/dist/schema/call/base.d.ts +1971 -87
  103. package/dist/schema/call/base.js +135 -3
  104. package/dist/schema/call/bridge-handler.js +15 -2
  105. package/dist/schema/call/bridge.d.ts +1478 -53
  106. package/dist/schema/call/bridge.js +50 -2
  107. package/dist/schema/call/contact.d.ts +25 -0
  108. package/dist/schema/call/demand.d.ts +79 -54
  109. package/dist/schema/call/guard.d.ts +125 -50
  110. package/dist/schema/call/handler.d.ts +3 -0
  111. package/dist/schema/call/handler.js +60 -14
  112. package/dist/schema/call/machine.d.ts +988 -938
  113. package/dist/schema/call/order.d.ts +25 -0
  114. package/dist/schema/call/payment.d.ts +25 -0
  115. package/dist/schema/call/permission.d.ts +244 -219
  116. package/dist/schema/call/personal.d.ts +25 -0
  117. package/dist/schema/call/progress.d.ts +25 -0
  118. package/dist/schema/call/proof.d.ts +62 -12
  119. package/dist/schema/call/proof.js +3 -3
  120. package/dist/schema/call/repository.d.ts +101 -76
  121. package/dist/schema/call/reward.d.ts +55 -30
  122. package/dist/schema/call/semantic.d.ts +10 -2
  123. package/dist/schema/call/semantic.js +616 -11
  124. package/dist/schema/call/service.d.ts +442 -417
  125. package/dist/schema/call/treasury.d.ts +25 -0
  126. package/dist/schema/common/index.js +3 -3
  127. package/dist/schema/config/index.d.ts +18 -0
  128. package/dist/schema/config/index.js +17 -0
  129. package/dist/schema/index.d.ts +6 -0
  130. package/dist/schema/index.js +5 -0
  131. package/dist/schema/local/index.d.ts +237 -81
  132. package/dist/schema/local/index.js +42 -6
  133. package/dist/schema/messenger/index.d.ts +1018 -79
  134. package/dist/schema/messenger/index.js +26 -17
  135. package/dist/schema/operations.d.ts +3192 -1746
  136. package/dist/schema/operations.js +93 -98
  137. package/dist/schema/project/index.d.ts +21 -0
  138. package/dist/schema/project/index.js +32 -0
  139. package/dist/schema/query/index.d.ts +2762 -1856
  140. package/dist/schema/query/index.js +38 -35
  141. package/dist/schema/schema-query/index.d.ts +33 -0
  142. package/dist/schema/schema-query/index.js +36 -0
  143. package/dist/schema/schema-version.d.ts +25 -0
  144. package/dist/schema/schema-version.js +76 -0
  145. package/dist/schema/trust/index.d.ts +407 -0
  146. package/dist/schema/trust/index.js +113 -0
  147. package/dist/schemas/account_operation.output.json +25 -16
  148. package/dist/schemas/account_operation.schema.json +1 -1
  149. package/dist/schemas/bridge_operation.output.json +744 -0
  150. package/dist/schemas/bridge_operation.schema.json +82 -8
  151. package/dist/schemas/config_operation.output.json +18 -0
  152. package/dist/schemas/config_operation.schema.json +34 -0
  153. package/dist/schemas/guard-node-schema.json +82 -0
  154. package/dist/schemas/guard2file.schema.json +23 -0
  155. package/dist/schemas/index.json +19 -1
  156. package/dist/schemas/local_info_operation.output.json +23 -0
  157. package/dist/schemas/local_info_operation.schema.json +1 -1
  158. package/dist/schemas/local_mark_operation.output.json +24 -1
  159. package/dist/schemas/local_mark_operation.schema.json +4 -4
  160. package/dist/schemas/machineNode2file.schema.json +23 -0
  161. package/dist/schemas/messenger_operation.output.json +752 -0
  162. package/dist/schemas/onchain_events.output.json +718 -0
  163. package/dist/schemas/onchain_operations.output.json +627 -18
  164. package/dist/schemas/onchain_operations.schema.json +115 -39
  165. package/dist/schemas/onchain_operations_allocation.schema.json +23 -0
  166. package/dist/schemas/onchain_operations_arbitration.schema.json +23 -0
  167. package/dist/schemas/onchain_operations_contact.schema.json +23 -0
  168. package/dist/schemas/onchain_operations_demand.schema.json +23 -0
  169. package/dist/schemas/onchain_operations_gen_passport.schema.json +46 -0
  170. package/dist/schemas/onchain_operations_guard.schema.json +26 -16
  171. package/dist/schemas/onchain_operations_machine.schema.json +89 -23
  172. package/dist/schemas/onchain_operations_order.schema.json +23 -0
  173. package/dist/schemas/onchain_operations_payment.schema.json +23 -0
  174. package/dist/schemas/onchain_operations_permission.schema.json +23 -0
  175. package/dist/schemas/onchain_operations_personal.schema.json +23 -0
  176. package/dist/schemas/onchain_operations_progress.schema.json +23 -0
  177. package/dist/schemas/onchain_operations_repository.schema.json +23 -0
  178. package/dist/schemas/onchain_operations_reward.schema.json +23 -0
  179. package/dist/schemas/onchain_operations_service.schema.json +23 -0
  180. package/dist/schemas/onchain_operations_treasury.schema.json +23 -0
  181. package/dist/schemas/onchain_table_data.output.json +939 -69
  182. package/dist/schemas/onchain_table_data.schema.json +2 -2
  183. package/dist/schemas/project_operation.output.json +18 -0
  184. package/dist/schemas/project_operation.schema.json +42 -0
  185. package/dist/schemas/query_toolkit.schema.json +360 -368
  186. package/dist/schemas/schema_query.schema.json +6 -3
  187. package/dist/schemas/trust_score.output.json +327 -0
  188. package/dist/schemas/trust_score.schema.json +46 -0
  189. package/package.json +2 -2
@@ -503,6 +503,724 @@
503
503
  "description": "Event query result containing list of events and pagination info, or null if no data found"
504
504
  },
505
505
  "semantic": {
506
+ "type": "object",
507
+ "properties": {
508
+ "intent": {
509
+ "type": "string",
510
+ "description": "Inferred user intent / operation goal. Constraint: snake_case string. Relation: derived from operation_type + data signals. Example: 'publish_service'"
511
+ },
512
+ "status": {
513
+ "type": "string",
514
+ "enum": [
515
+ "success",
516
+ "partial",
517
+ "failed",
518
+ "pending_input"
519
+ ],
520
+ "description": "Business-level status (not raw tx status). 'pending_input' = needs Guard submission. Example: 'success'"
521
+ },
522
+ "summary": {
523
+ "type": "string",
524
+ "description": "One-sentence human-readable summary of what happened. AI should read this first. Example: 'Successfully published Service my-shop with Machine bound'"
525
+ },
526
+ "created": {
527
+ "type": "array",
528
+ "items": {
529
+ "type": "object",
530
+ "properties": {
531
+ "id": {
532
+ "type": "string",
533
+ "description": "Object ID (64-hex with 0x prefix). Identifies the on-chain object. Example: '0xa1d4...'"
534
+ },
535
+ "name": {
536
+ "type": [
537
+ "string",
538
+ "null"
539
+ ],
540
+ "description": "Local mark name if assigned, else null. Relation: resolved via local_mark_operation. Example: 'my-shop' or null"
541
+ },
542
+ "role": {
543
+ "type": "string",
544
+ "enum": [
545
+ "Permission",
546
+ "Guard",
547
+ "Machine",
548
+ "Progress",
549
+ "Service",
550
+ "Order",
551
+ "Allocation",
552
+ "Arbitration",
553
+ "ArbCase",
554
+ "Messenger",
555
+ "Contact",
556
+ "Demand",
557
+ "Reward",
558
+ "Personal",
559
+ "Repository",
560
+ "Treasury",
561
+ "Discount",
562
+ "Other"
563
+ ],
564
+ "description": "Business role of the object in the dependency graph. Constraint: enum of 18 values. Relation: derived from objectType last segment; drives Plan/Verify Loop positioning. Example: 'Service'"
565
+ },
566
+ "relation": {
567
+ "type": "object",
568
+ "properties": {
569
+ "parent": {
570
+ "type": [
571
+ "string",
572
+ "null"
573
+ ],
574
+ "description": "Parent object ID, if this object belongs to another (e.g. Machine belongs to Service). Example: '0x123...' or null"
575
+ },
576
+ "relation_type": {
577
+ "type": "string",
578
+ "enum": [
579
+ "machine_of",
580
+ "guard_of",
581
+ "allocator_of",
582
+ "permission_of",
583
+ "progress_of",
584
+ "allocation_of",
585
+ "arb_of",
586
+ "other"
587
+ ],
588
+ "description": "How this object relates to its parent. Example: 'machine_of'"
589
+ }
590
+ },
591
+ "additionalProperties": false,
592
+ "description": "Relationship to another object in the dependency graph"
593
+ },
594
+ "immutable": {
595
+ "type": "boolean",
596
+ "description": "Whether the object has entered an immutable state (e.g. Service published). Constraint: true after publish. Example: true"
597
+ }
598
+ },
599
+ "required": [
600
+ "id",
601
+ "role"
602
+ ],
603
+ "additionalProperties": false,
604
+ "description": "An object tagged with its business role and relationship within the object dependency graph"
605
+ },
606
+ "description": "Objects newly created in this operation, tagged with roles"
607
+ },
608
+ "modified": {
609
+ "type": "array",
610
+ "items": {
611
+ "$ref": "#/definitions/onchain_events/properties/semantic/properties/created/items"
612
+ },
613
+ "description": "Objects mutated in this operation, tagged with roles"
614
+ },
615
+ "released": {
616
+ "type": "array",
617
+ "items": {
618
+ "type": "object",
619
+ "properties": {
620
+ "amount": {
621
+ "type": "string",
622
+ "description": "Amount change as stringified integer (smallest unit). Negative=spend, positive=receive. Example: '-10000000000'"
623
+ },
624
+ "coinType": {
625
+ "type": "string",
626
+ "description": "Coin type tag (format: {address}::{module}::{struct}). Example: '0x2::wow::WOW'"
627
+ },
628
+ "role": {
629
+ "type": "string",
630
+ "enum": [
631
+ "payment",
632
+ "refund",
633
+ "change",
634
+ "compensation",
635
+ "reward",
636
+ "gas",
637
+ "deposit",
638
+ "release",
639
+ "other"
640
+ ],
641
+ "description": "Business role of this fund movement. Constraint: enum of 9 values. Relation: derived from operation context. Example: 'payment'"
642
+ },
643
+ "from": {
644
+ "type": [
645
+ "string",
646
+ "null"
647
+ ],
648
+ "description": "Sender address if known. Example: '0xabc...' or null"
649
+ },
650
+ "to": {
651
+ "type": [
652
+ "string",
653
+ "null"
654
+ ],
655
+ "description": "Recipient address if known. Example: '0xdef...' or null"
656
+ }
657
+ },
658
+ "required": [
659
+ "amount",
660
+ "coinType",
661
+ "role"
662
+ ],
663
+ "additionalProperties": false,
664
+ "description": "A fund movement tagged with its business role"
665
+ },
666
+ "description": "Fund movements in this operation, tagged with roles"
667
+ },
668
+ "events": {
669
+ "type": "array",
670
+ "items": {
671
+ "type": "object",
672
+ "properties": {
673
+ "event_type": {
674
+ "type": "string",
675
+ "description": "Raw on-chain event type tag. Example: '0x2::service::ServicePublishedEvent'"
676
+ },
677
+ "business_meaning": {
678
+ "type": "string",
679
+ "description": "Human-readable business meaning. Example: 'Service has been published and is now immutable'"
680
+ },
681
+ "category": {
682
+ "type": "string",
683
+ "enum": [
684
+ "lifecycle",
685
+ "state_change",
686
+ "fund_flow",
687
+ "permission",
688
+ "guard",
689
+ "other"
690
+ ],
691
+ "description": "Business category. Constraint: enum of 6 values. Example: 'lifecycle'"
692
+ },
693
+ "related_object": {
694
+ "type": "string",
695
+ "description": "Object ID the event relates to, if extractable. Example: '0x123...'"
696
+ },
697
+ "side_effect": {
698
+ "type": "string",
699
+ "description": "Side effect description for AI. Example: 'Customers can now place orders against this Service'"
700
+ }
701
+ },
702
+ "required": [
703
+ "event_type",
704
+ "business_meaning",
705
+ "category"
706
+ ],
707
+ "additionalProperties": false,
708
+ "description": "An on-chain event annotated with business semantics"
709
+ },
710
+ "description": "On-chain events annotated with business semantics (S-8)"
711
+ },
712
+ "next_actions": {
713
+ "type": "array",
714
+ "items": {
715
+ "type": "object",
716
+ "properties": {
717
+ "action": {
718
+ "type": "string",
719
+ "description": "Recommended next action. Example: 'add sales products'"
720
+ },
721
+ "reason": {
722
+ "type": "string",
723
+ "description": "Why this action is recommended. Example: 'Service has no products; customers cannot order'"
724
+ },
725
+ "tool": {
726
+ "type": "string",
727
+ "description": "MCP tool to use, if applicable. Example: 'onchain_operations'"
728
+ },
729
+ "prerequisite": {
730
+ "type": "string",
731
+ "description": "Condition that must hold before this action. Example: 'Service must be created first'"
732
+ },
733
+ "priority": {
734
+ "type": "string",
735
+ "enum": [
736
+ "required",
737
+ "recommended",
738
+ "optional"
739
+ ],
740
+ "description": "Priority. Constraint: enum. Example: 'required'"
741
+ }
742
+ },
743
+ "required": [
744
+ "action",
745
+ "reason",
746
+ "priority"
747
+ ],
748
+ "additionalProperties": false,
749
+ "description": "A recommended next action with priority and rationale"
750
+ },
751
+ "description": "Recommended next actions to drive the workflow forward"
752
+ },
753
+ "warnings": {
754
+ "type": "array",
755
+ "items": {
756
+ "type": "string"
757
+ },
758
+ "description": "Business-level warnings. Example: 'order_allocators not configured; order funds cannot be distributed'"
759
+ },
760
+ "experience": {
761
+ "type": "object",
762
+ "properties": {
763
+ "advice": {
764
+ "type": "string",
765
+ "description": "Advice from past experience. Example: 'Last time you forgot to set buy_guard; add it before publishing'"
766
+ },
767
+ "avoid": {
768
+ "type": "array",
769
+ "items": {
770
+ "type": "string"
771
+ },
772
+ "description": "Pitfalls to avoid based on history. Example: ['Guard rejection on delivery_proof']"
773
+ },
774
+ "relevance": {
775
+ "type": "number",
776
+ "minimum": 0,
777
+ "maximum": 1,
778
+ "description": "Relevance score 0-1 of the matched experience. Example: 0.85"
779
+ },
780
+ "matched_scenario": {
781
+ "type": "string",
782
+ "description": "Matched historical scenario. Example: 'publish_service_freelance'"
783
+ }
784
+ },
785
+ "additionalProperties": false,
786
+ "description": "Experience layer feedback from past operations (Phase 2 议题 2)"
787
+ },
788
+ "service_status": {
789
+ "type": "object",
790
+ "properties": {
791
+ "active": {
792
+ "type": "array",
793
+ "items": {
794
+ "type": "string"
795
+ },
796
+ "description": "Phase 2 services currently active (enabled). Example: ['confirm_gate','project_service','experience_layer']"
797
+ },
798
+ "inactive": {
799
+ "type": "array",
800
+ "items": {
801
+ "type": "string"
802
+ },
803
+ "description": "Phase 2 services currently inactive (can be toggled via config_operation). Example: ['harness','graph_persist']"
804
+ }
805
+ },
806
+ "required": [
807
+ "active"
808
+ ],
809
+ "additionalProperties": false,
810
+ "description": "Phase 2 runtime service status (populated when semantic_rich is enabled). Lets AI see active services in each response."
811
+ },
812
+ "customer_advice": {
813
+ "type": "object",
814
+ "properties": {
815
+ "risk_score": {
816
+ "type": "number",
817
+ "minimum": 0,
818
+ "maximum": 100,
819
+ "description": "Composite risk score 0-100 (higher = safer). Relation: from risk-assessment.ts 4-dimension scoring. Example: 75"
820
+ },
821
+ "risk_level": {
822
+ "type": "string",
823
+ "enum": [
824
+ "low",
825
+ "medium_low",
826
+ "medium_high",
827
+ "high"
828
+ ],
829
+ "description": "Risk level bucket. 'high' = strongly discourage purchase. Example: 'medium_high'"
830
+ },
831
+ "recommendations": {
832
+ "type": "array",
833
+ "items": {
834
+ "type": "string"
835
+ },
836
+ "description": "Actionable recommendations for the buyer. Example: ['要求商家配置仲裁','通过 Messenger 协商退款条款']"
837
+ },
838
+ "reminders": {
839
+ "type": "array",
840
+ "items": {
841
+ "type": "object",
842
+ "properties": {
843
+ "id": {
844
+ "type": "string",
845
+ "description": "Reminder rule id. Example: 'high_risk_score'"
846
+ },
847
+ "stage": {
848
+ "type": "string",
849
+ "enum": [
850
+ "browse",
851
+ "evaluate",
852
+ "preorder",
853
+ "in_progress",
854
+ "complete",
855
+ "after_sale"
856
+ ],
857
+ "description": "Order lifecycle stage when this reminder fires. Example: 'evaluate'"
858
+ },
859
+ "priority": {
860
+ "type": "string",
861
+ "enum": [
862
+ "required",
863
+ "recommended",
864
+ "info",
865
+ "reminder"
866
+ ],
867
+ "description": "Priority. 'required' = blocks purchase; 'recommended' = strong caution. Example: 'required'"
868
+ },
869
+ "message": {
870
+ "type": "string",
871
+ "description": "Human-readable reminder message. Example: '🔴 综合风险分 25/100,强烈建议不购买'"
872
+ },
873
+ "action": {
874
+ "type": "string",
875
+ "description": "Suggested next action. Example: 'require merchant to bind Arbitration before ordering'"
876
+ }
877
+ },
878
+ "required": [
879
+ "id",
880
+ "stage",
881
+ "priority",
882
+ "message"
883
+ ],
884
+ "additionalProperties": false,
885
+ "description": "A buyer-side reminder triggered at a specific order lifecycle stage (Phase 3 C-3)."
886
+ },
887
+ "description": "Stage-specific reminders (deduped, sorted by priority, capped to 3 high-risk). Example: [{priority:'required', message:'🔴 模糊 Guard 必须人工审查'}]"
888
+ },
889
+ "preference_match": {
890
+ "type": "object",
891
+ "properties": {
892
+ "score": {
893
+ "type": "number",
894
+ "minimum": 0,
895
+ "maximum": 100,
896
+ "description": "Match score 0-100 (higher = better fit). Example: 75"
897
+ },
898
+ "matches": {
899
+ "type": "array",
900
+ "items": {
901
+ "type": "string"
902
+ },
903
+ "description": "Aspects that match user preferences. Example: ['价格低于均价 10%','有仲裁']"
904
+ },
905
+ "mismatches": {
906
+ "type": "array",
907
+ "items": {
908
+ "type": "string"
909
+ },
910
+ "description": "Aspects that mismatch user preferences. Example: ['交付周期超出期望']"
911
+ }
912
+ },
913
+ "required": [
914
+ "score",
915
+ "matches",
916
+ "mismatches"
917
+ ],
918
+ "additionalProperties": false,
919
+ "description": "Service-to-preference match (populated when user preferences exist). Example: {score:75, matches:[...], mismatches:[...]}"
920
+ }
921
+ },
922
+ "required": [
923
+ "recommendations",
924
+ "reminders"
925
+ ],
926
+ "additionalProperties": false,
927
+ "description": "Buyer-side advice (Phase 3 C-3.3). Populated when customer_intelligence service is enabled AND operation is order/query on a Service. Contains risk_score, recommendations, reminders, and preference_match."
928
+ },
929
+ "evolution_context": {
930
+ "type": "object",
931
+ "properties": {
932
+ "industry_signal": {
933
+ "type": "string",
934
+ "description": "Industry evolution signal summary. Example: '行业健康度 82/100(healthy);累积 25 个行业信号'"
935
+ },
936
+ "evolution_advice": {
937
+ "type": "string",
938
+ "description": "Evolution advice for the current operation. Example: '建议强制配置仲裁 + 赔偿金 + 交付 Guard'"
939
+ },
940
+ "confidence": {
941
+ "type": "number",
942
+ "minimum": 0,
943
+ "maximum": 1,
944
+ "description": "Confidence of the evolution context 0-1. <0.5 means no data yet. Example: 0.75"
945
+ },
946
+ "health_score": {
947
+ "type": "number",
948
+ "minimum": 0,
949
+ "maximum": 100,
950
+ "description": "Industry health score 0-100 if available. Example: 82"
951
+ },
952
+ "pending_suggestions": {
953
+ "type": "integer",
954
+ "minimum": 0,
955
+ "description": "Count of pending industry update suggestions (filtered by role if role is set). Example: 3"
956
+ },
957
+ "intent": {
958
+ "type": "string",
959
+ "enum": [
960
+ "default",
961
+ "growth",
962
+ "retention",
963
+ "compliance",
964
+ "efficiency",
965
+ "trust_building",
966
+ "custom"
967
+ ],
968
+ "description": "Phase 4 P4-6.C: Current business intent driving the scoring model. Absent = 'default'. Example: 'growth'"
969
+ },
970
+ "role_advice": {
971
+ "type": "array",
972
+ "items": {
973
+ "type": "string"
974
+ },
975
+ "description": "Phase 4 P4-6.C: Role-targeted advice strings (user/merchant/arbitrator). Example: ['强化忠诚度飞轮','优化首单转化']"
976
+ },
977
+ "role": {
978
+ "type": "string",
979
+ "enum": [
980
+ "user",
981
+ "merchant",
982
+ "arbitrator"
983
+ ],
984
+ "description": "Phase 4 P4-6.C: Role used for advice routing. Example: 'merchant'"
985
+ }
986
+ },
987
+ "required": [
988
+ "confidence"
989
+ ],
990
+ "additionalProperties": false,
991
+ "description": "Phase 4 industry evolution context (populated when industry_evolution service is enabled). Provides AI with industry health signals and evolution advice."
992
+ },
993
+ "guard_advice": {
994
+ "type": "object",
995
+ "properties": {
996
+ "current_round": {
997
+ "type": "string",
998
+ "enum": [
999
+ "R1",
1000
+ "R2",
1001
+ "R3",
1002
+ "R4",
1003
+ "R5",
1004
+ "R6",
1005
+ "R7",
1006
+ "R8",
1007
+ "R9",
1008
+ "R10"
1009
+ ],
1010
+ "description": "Current R1-R10 dialogue round. R1=intent, R2=table, R3=tree, R4=rely, R5=binding, R6=review, R7=CREATE, R8=test, R9=bind, R10=verify. Example: 'R3'"
1011
+ },
1012
+ "puzzle_status": {
1013
+ "type": "object",
1014
+ "properties": {
1015
+ "intent": {
1016
+ "type": "boolean",
1017
+ "description": "Intent dimension complete (action + rule + failure conditions)"
1018
+ },
1019
+ "binding": {
1020
+ "type": "boolean",
1021
+ "description": "Binding dimension complete (host object + field + circular ref)"
1022
+ },
1023
+ "data": {
1024
+ "type": "boolean",
1025
+ "description": "Data dimension complete (table entries + witnesses)"
1026
+ },
1027
+ "query": {
1028
+ "type": "boolean",
1029
+ "description": "Query dimension complete (query instructions if needed)"
1030
+ },
1031
+ "logic": {
1032
+ "type": "boolean",
1033
+ "description": "Logic dimension complete (root node returns Bool)"
1034
+ },
1035
+ "constraints": {
1036
+ "type": "boolean",
1037
+ "description": "Constraints dimension complete (10 Pitfalls checked)"
1038
+ }
1039
+ },
1040
+ "required": [
1041
+ "intent",
1042
+ "binding",
1043
+ "data",
1044
+ "query",
1045
+ "logic",
1046
+ "constraints"
1047
+ ],
1048
+ "additionalProperties": false,
1049
+ "description": "Information puzzle completeness (6 dimensions). Missing dimensions need user input before CREATE."
1050
+ },
1051
+ "matched_scene": {
1052
+ "type": "string",
1053
+ "description": "Matched Guard scene id from the 8 binding scenarios ledger. Example: 'machine_forward_guard'"
1054
+ },
1055
+ "scene_description": {
1056
+ "type": "string",
1057
+ "description": "Human-readable scene description. Example: '工作流节点推进验证(Forward.guard)'"
1058
+ },
1059
+ "scene_constraints": {
1060
+ "type": "array",
1061
+ "items": {
1062
+ "type": "string"
1063
+ },
1064
+ "description": "Special constraints for the matched scene. Example: ['Machine 发布后 Forward.guard 不可修改']"
1065
+ },
1066
+ "suggested_patterns": {
1067
+ "type": "array",
1068
+ "items": {
1069
+ "type": "string"
1070
+ },
1071
+ "description": "Suggested Guard patterns based on user intent. Example: ['时间锁','进度状态检查']"
1072
+ },
1073
+ "available_queries": {
1074
+ "type": "array",
1075
+ "items": {
1076
+ "type": "object",
1077
+ "properties": {
1078
+ "id": {
1079
+ "type": "integer",
1080
+ "description": "Query instruction ID. Example: 1253"
1081
+ },
1082
+ "name": {
1083
+ "type": "string",
1084
+ "description": "Query instruction name. Example: 'progress.current_node_name'"
1085
+ },
1086
+ "objectType": {
1087
+ "type": "string",
1088
+ "description": "Target object type. Example: 'Progress'"
1089
+ },
1090
+ "returnType": {
1091
+ "type": "string",
1092
+ "description": "Return value type. Example: 'String'"
1093
+ },
1094
+ "description": {
1095
+ "type": "string",
1096
+ "description": "Query description"
1097
+ }
1098
+ },
1099
+ "required": [
1100
+ "id",
1101
+ "name",
1102
+ "objectType",
1103
+ "returnType"
1104
+ ],
1105
+ "additionalProperties": false,
1106
+ "description": "A Guard query instruction available for the current context (subset of GUARDQUERY 375 entries)."
1107
+ },
1108
+ "description": "Available query instructions for the current context (subset of 375 GUARDQUERY entries)"
1109
+ },
1110
+ "risk_warnings": {
1111
+ "type": "array",
1112
+ "items": {
1113
+ "type": "string"
1114
+ },
1115
+ "description": "Risk warnings for the current Guard design. Example: ['Guard 创建后不可修改','时间锁测试用 1000ms']"
1116
+ },
1117
+ "pending_questions": {
1118
+ "type": "array",
1119
+ "items": {
1120
+ "type": "string"
1121
+ },
1122
+ "description": "Questions for the user to complete the puzzle. Example: ['Guard 将绑定到哪个 Host Object?']"
1123
+ },
1124
+ "confirmation_text": {
1125
+ "type": "string",
1126
+ "description": "Structured semantic confirmation text for user review (generated when puzzle is complete). User must explicitly confirm before CREATE."
1127
+ },
1128
+ "test_result": {
1129
+ "type": "object",
1130
+ "properties": {
1131
+ "status": {
1132
+ "type": "string",
1133
+ "enum": [
1134
+ "pass",
1135
+ "fail",
1136
+ "not_tested"
1137
+ ]
1138
+ },
1139
+ "failure_node": {
1140
+ "type": "string",
1141
+ "description": "Node that caused failure (if fail)"
1142
+ },
1143
+ "passport_id": {
1144
+ "type": "string",
1145
+ "description": "Generated Passport ID (if pass)"
1146
+ }
1147
+ },
1148
+ "required": [
1149
+ "status"
1150
+ ],
1151
+ "additionalProperties": false,
1152
+ "description": "gen_passport static test result. Must pass before CREATE."
1153
+ },
1154
+ "risk_assessment": {
1155
+ "type": "object",
1156
+ "properties": {
1157
+ "overall_risk": {
1158
+ "type": "string",
1159
+ "enum": [
1160
+ "critical",
1161
+ "high",
1162
+ "medium",
1163
+ "low",
1164
+ "info"
1165
+ ],
1166
+ "description": "Overall risk level (highest from all risks)"
1167
+ },
1168
+ "risk_count": {
1169
+ "type": "integer",
1170
+ "description": "Total number of detected risks"
1171
+ },
1172
+ "critical_count": {
1173
+ "type": "integer",
1174
+ "description": "Number of critical risks"
1175
+ },
1176
+ "high_count": {
1177
+ "type": "integer",
1178
+ "description": "Number of high risks"
1179
+ },
1180
+ "needs_human_review": {
1181
+ "type": "boolean",
1182
+ "description": "Whether human review is required (critical or 2+ high risks)"
1183
+ },
1184
+ "top_risks": {
1185
+ "type": "array",
1186
+ "items": {
1187
+ "type": "string"
1188
+ },
1189
+ "description": "Top risk titles (critical and high, max 3)"
1190
+ },
1191
+ "stakeholder_advice": {
1192
+ "type": "object",
1193
+ "additionalProperties": {
1194
+ "type": "array",
1195
+ "items": {
1196
+ "type": "string"
1197
+ }
1198
+ },
1199
+ "description": "Per-stakeholder advice. Key=stakeholder (customer/provider/arbitrator/claimant), value=advice list"
1200
+ }
1201
+ },
1202
+ "required": [
1203
+ "overall_risk",
1204
+ "risk_count",
1205
+ "critical_count",
1206
+ "high_count",
1207
+ "needs_human_review",
1208
+ "top_risks"
1209
+ ],
1210
+ "additionalProperties": false,
1211
+ "description": "Business-layer risk assessment (game theory, data source trust, logic gaps). Populated during Guard design to warn about business risks beyond syntax."
1212
+ }
1213
+ },
1214
+ "additionalProperties": false,
1215
+ "description": "Phase 5 Guard capability advice (populated when user intent involves Guard). Provides puzzle status, scene matching, suggested patterns, available queries, risk warnings, and confirmation text. AI uses this to guide Guard design dialogue (R1-R10)."
1216
+ }
1217
+ },
1218
+ "required": [
1219
+ "intent",
1220
+ "status",
1221
+ "summary"
1222
+ ],
1223
+ "additionalProperties": false,
506
1224
  "description": "Business semantic summary for the event query"
507
1225
  }
508
1226
  },