@wowok/agent-mcp 2.3.16 → 2.4.1

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 (136) hide show
  1. package/dist/customer/index.d.ts +9 -0
  2. package/dist/customer/index.js +9 -0
  3. package/dist/customer/industry-risks.d.ts +4 -0
  4. package/dist/customer/industry-risks.js +45 -31
  5. package/dist/customer/order-monitor.js +57 -57
  6. package/dist/customer/order-strategy.js +89 -89
  7. package/dist/customer/post-purchase.js +97 -97
  8. package/dist/customer/reminder-system.js +26 -26
  9. package/dist/customer/risk-assessment.js +46 -46
  10. package/dist/customer/types.d.ts +4 -4
  11. package/dist/customer/types.js +4 -4
  12. package/dist/customer/user-preferences.d.ts +3 -0
  13. package/dist/customer/user-preferences.js +59 -50
  14. package/dist/experience/intent-distill.js +6 -6
  15. package/dist/experience/realtime-feedback.js +17 -0
  16. package/dist/index.js +360 -273
  17. package/dist/knowledge/acquisition-flywheel.d.ts +3 -0
  18. package/dist/knowledge/acquisition-flywheel.js +73 -64
  19. package/dist/knowledge/arbitration-trust.js +10 -10
  20. package/dist/knowledge/demand-matching.js +8 -8
  21. package/dist/knowledge/dynamic-pricing.js +18 -18
  22. package/dist/knowledge/flywheel-loop.js +11 -11
  23. package/dist/knowledge/glossary.js +22 -22
  24. package/dist/knowledge/guard-ledger.d.ts +19 -0
  25. package/dist/knowledge/guard-ledger.js +246 -0
  26. package/dist/knowledge/guard-lint.d.ts +76 -0
  27. package/dist/knowledge/guard-lint.js +590 -0
  28. package/dist/knowledge/guard-puzzle.d.ts +188 -0
  29. package/dist/knowledge/guard-puzzle.js +804 -0
  30. package/dist/knowledge/guard-risk.d.ts +67 -0
  31. package/dist/knowledge/guard-risk.js +1046 -0
  32. package/dist/knowledge/guard-templates.d.ts +37 -0
  33. package/dist/knowledge/guard-templates.js +329 -0
  34. package/dist/knowledge/guard-translation.d.ts +58 -0
  35. package/dist/knowledge/guard-translation.js +1118 -0
  36. package/dist/knowledge/index.d.ts +17 -0
  37. package/dist/knowledge/index.js +17 -0
  38. package/dist/knowledge/industry-evolution.js +29 -29
  39. package/dist/knowledge/industry-generalizer.js +52 -52
  40. package/dist/knowledge/industry-registry.d.ts +1 -2
  41. package/dist/knowledge/industry-registry.js +43 -36
  42. package/dist/knowledge/intent-metrics.js +67 -67
  43. package/dist/knowledge/process-model.js +80 -80
  44. package/dist/knowledge/reputation-rules.js +9 -9
  45. package/dist/knowledge/reward-templates.js +51 -51
  46. package/dist/knowledge/safety-rules.js +63 -2
  47. package/dist/knowledge/tool-constraints.js +17 -11
  48. package/dist/knowledge/trust-metrics.js +26 -26
  49. package/dist/safety/confirm-gate.d.ts +4 -2
  50. package/dist/safety/confirm-gate.js +48 -4
  51. package/dist/schema/call/allocation.d.ts +24 -14
  52. package/dist/schema/call/arbitration.d.ts +142 -132
  53. package/dist/schema/call/base.d.ts +901 -43
  54. package/dist/schema/call/base.js +77 -13
  55. package/dist/schema/call/bridge-handler.js +15 -2
  56. package/dist/schema/call/bridge.d.ts +795 -27
  57. package/dist/schema/call/bridge.js +37 -0
  58. package/dist/schema/call/contact.d.ts +10 -0
  59. package/dist/schema/call/demand.d.ts +94 -84
  60. package/dist/schema/call/guard.d.ts +229 -46
  61. package/dist/schema/call/guard.js +50 -0
  62. package/dist/schema/call/handler.js +46 -14
  63. package/dist/schema/call/machine.d.ts +158 -138
  64. package/dist/schema/call/order.d.ts +10 -0
  65. package/dist/schema/call/payment.d.ts +10 -0
  66. package/dist/schema/call/permission.d.ts +314 -304
  67. package/dist/schema/call/personal.d.ts +10 -0
  68. package/dist/schema/call/progress.d.ts +10 -0
  69. package/dist/schema/call/proof.d.ts +20 -0
  70. package/dist/schema/call/repository.d.ts +32 -22
  71. package/dist/schema/call/reward.d.ts +10 -0
  72. package/dist/schema/call/semantic.d.ts +9 -2
  73. package/dist/schema/call/semantic.js +617 -25
  74. package/dist/schema/call/service.d.ts +20 -10
  75. package/dist/schema/call/treasury.d.ts +10 -0
  76. package/dist/schema/config/index.d.ts +18 -0
  77. package/dist/schema/config/index.js +17 -0
  78. package/dist/schema/index.d.ts +6 -0
  79. package/dist/schema/index.js +5 -0
  80. package/dist/schema/local/index.d.ts +9 -9
  81. package/dist/schema/local/index.js +9 -0
  82. package/dist/schema/local/wip.d.ts +39 -19
  83. package/dist/schema/local/wip.js +5 -5
  84. package/dist/schema/messenger/index.d.ts +376 -55
  85. package/dist/schema/messenger/index.js +19 -19
  86. package/dist/schema/operations.d.ts +1881 -681
  87. package/dist/schema/operations.js +91 -96
  88. package/dist/schema/project/index.d.ts +21 -0
  89. package/dist/schema/project/index.js +32 -0
  90. package/dist/schema/query/index.d.ts +1074 -168
  91. package/dist/schema/query/index.js +8 -8
  92. package/dist/schema/schema-query/index.d.ts +33 -0
  93. package/dist/schema/schema-query/index.js +36 -0
  94. package/dist/schema/schema-version.d.ts +25 -0
  95. package/dist/schema/schema-version.js +76 -0
  96. package/dist/schema/trust/index.d.ts +407 -0
  97. package/dist/schema/trust/index.js +113 -0
  98. package/dist/schema/utils/guard-parser.js +4 -4
  99. package/dist/schema/utils/node-parser.js +14 -14
  100. package/dist/schemas/bridge_operation.output.json +233 -9
  101. package/dist/schemas/bridge_operation.schema.json +67 -8
  102. package/dist/schemas/config_operation.output.json +18 -0
  103. package/dist/schemas/config_operation.schema.json +34 -0
  104. package/dist/schemas/guard-node-schema.json +82 -0
  105. package/dist/schemas/guard2file.schema.json +8 -0
  106. package/dist/schemas/index.json +19 -1
  107. package/dist/schemas/machineNode2file.schema.json +8 -0
  108. package/dist/schemas/messenger_operation.output.json +236 -10
  109. package/dist/schemas/onchain_events.output.json +718 -0
  110. package/dist/schemas/onchain_operations.output.json +286 -11
  111. package/dist/schemas/onchain_operations.schema.json +19 -16
  112. package/dist/schemas/onchain_operations_allocation.schema.json +8 -0
  113. package/dist/schemas/onchain_operations_arbitration.schema.json +8 -0
  114. package/dist/schemas/onchain_operations_contact.schema.json +8 -0
  115. package/dist/schemas/onchain_operations_demand.schema.json +8 -0
  116. package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -0
  117. package/dist/schemas/onchain_operations_guard.schema.json +11 -16
  118. package/dist/schemas/onchain_operations_machine.schema.json +8 -0
  119. package/dist/schemas/onchain_operations_order.schema.json +8 -0
  120. package/dist/schemas/onchain_operations_payment.schema.json +8 -0
  121. package/dist/schemas/onchain_operations_permission.schema.json +8 -0
  122. package/dist/schemas/onchain_operations_personal.schema.json +8 -0
  123. package/dist/schemas/onchain_operations_progress.schema.json +8 -0
  124. package/dist/schemas/onchain_operations_repository.schema.json +8 -0
  125. package/dist/schemas/onchain_operations_reward.schema.json +8 -0
  126. package/dist/schemas/onchain_operations_service.schema.json +8 -0
  127. package/dist/schemas/onchain_operations_treasury.schema.json +8 -0
  128. package/dist/schemas/onchain_table_data.output.json +718 -0
  129. package/dist/schemas/project_operation.output.json +18 -0
  130. package/dist/schemas/project_operation.schema.json +42 -0
  131. package/dist/schemas/query_toolkit.schema.json +360 -368
  132. package/dist/schemas/schema_query.schema.json +6 -3
  133. package/dist/schemas/trust_score.output.json +327 -0
  134. package/dist/schemas/trust_score.schema.json +46 -0
  135. package/dist/schemas/wip_file.output.json +24 -1
  136. package/package.json +2 -2
@@ -24,6 +24,9 @@ export interface TrustDescriptionParams {
24
24
  }
25
25
  export declare const ACQUISITION_FLYWHEEL_VERSION = 1;
26
26
  export declare const INDUSTRY_FLYWHEELS: AcquisitionFlywheel[];
27
+ export declare function _setRegistryLookup(fn: ((industry: string) => {
28
+ flywheel?: AcquisitionFlywheel;
29
+ } | undefined) | null): void;
27
30
  export declare function getFlywheelForIndustry(industry: string): AcquisitionFlywheel | undefined;
28
31
  export declare function listIndustries(): string[];
29
32
  export declare function suggestAcquisitionActions(industry: string): FlywheelAction[];
@@ -3,95 +3,104 @@ export const INDUSTRY_FLYWHEELS = [
3
3
  {
4
4
  industry: "freelance",
5
5
  trustSellingPoints: [
6
- "交付验收 + 资金托管 + 仲裁保障",
7
- "流程透明:Machine 定义清晰的交付节点",
8
- "compensation_fund 资金安全保障客户权益",
6
+ "Delivery acceptance + fund escrow + arbitration guarantee",
7
+ "Transparent process: Machine defines clear delivery nodes",
8
+ "compensation_fund secures customer rights",
9
9
  ],
10
10
  keyActions: [
11
- { action: "设置 Reward 首单奖励", purpose: "吸引新客户下单", mutableField: "rewards", metricToWatch: "新客下单率" },
12
- { action: "累计金额阶梯 Reward", purpose: "激励复购", mutableField: "rewards", metricToWatch: "复购率" },
13
- { action: "调整 Machine 节点", purpose: "优化交付流程速度", mutableField: "description", metricToWatch: "平均完成时间" },
14
- { action: "增加 compensation_fund", purpose: "提升信任分", mutableField: "compensation_fund", metricToWatch: "信任分" },
11
+ { action: "Set Reward first-order bonus", purpose: "Attract new customers to place orders", mutableField: "rewards", metricToWatch: "New customer order rate" },
12
+ { action: "Cumulative-spend tiered Reward", purpose: "Incentivize repurchase", mutableField: "rewards", metricToWatch: "Repurchase rate" },
13
+ { action: "Adjust Machine nodes", purpose: "Optimize delivery process speed", mutableField: "description", metricToWatch: "Average completion time" },
14
+ { action: "Increase compensation_fund", purpose: "Improve trust score", mutableField: "compensation_fund", metricToWatch: "Trust score" },
15
15
  ],
16
- rewardStrategy: "首单奖励 + 累计金额阶梯(如满 5 单送折扣)",
17
- discountStrategy: "包月折扣 + 长期合作优惠",
18
- trustDescription: "资金托管 + 交付验收 + 仲裁保障",
16
+ rewardStrategy: "First-order reward + cumulative-spend tiered reward (e.g. discount after 5 orders)",
17
+ discountStrategy: "Monthly discount + long-term cooperation discount",
18
+ trustDescription: "Fund escrow + delivery acceptance + arbitration guarantee",
19
19
  },
20
20
  {
21
21
  industry: "rental",
22
22
  trustSellingPoints: [
23
- "押金托管 + 损伤 Guard + 退还流程",
24
- "Guard 验证物品状况,防纠纷",
25
- "compensation_fund 覆盖损坏风险",
23
+ "Deposit escrow + damage Guard + return process",
24
+ "Guard verifies item condition to prevent disputes",
25
+ "compensation_fund covers damage risk",
26
26
  ],
27
27
  keyActions: [
28
- { action: "设置 Discount 长租优惠", purpose: "激励长期租赁", mutableField: "discount", metricToWatch: "长租比例" },
29
- { action: "信用累计 Reward", purpose: "多次租赁信用积累", mutableField: "rewards", metricToWatch: "复租率" },
30
- { action: "配置损伤 Guard", purpose: "降低纠纷率", mutableField: "buy_guard", metricToWatch: "纠纷率" },
31
- { action: "增加 compensation_fund", purpose: "覆盖损坏风险", mutableField: "compensation_fund", metricToWatch: "信任分" },
28
+ { action: "Set Discount long-term rental bonus", purpose: "Incentivize long-term rental", mutableField: "discount", metricToWatch: "Long-term rental ratio" },
29
+ { action: "Credit-accumulation Reward", purpose: "Multi-rental credit accumulation", mutableField: "rewards", metricToWatch: "Re-rental rate" },
30
+ { action: "Configure damage Guard", purpose: "Reduce dispute rate", mutableField: "buy_guard", metricToWatch: "Dispute rate" },
31
+ { action: "Increase compensation_fund", purpose: "Cover damage risk", mutableField: "compensation_fund", metricToWatch: "Trust score" },
32
32
  ],
33
- rewardStrategy: "信用累计 + 长租折扣 + 推荐返现",
34
- discountStrategy: "月租 9 + 季租 8 + 年租 7 ",
35
- trustDescription: "押金托管 + Guard 验证 + 退还保障",
33
+ rewardStrategy: "Credit accumulation + long-term rental discount + referral cashback",
34
+ discountStrategy: "Monthly 10% off + quarterly 20% off + annual 30% off",
35
+ trustDescription: "Deposit escrow + Guard verification + return guarantee",
36
36
  },
37
37
  {
38
38
  industry: "education",
39
39
  trustSellingPoints: [
40
- "课程进度透明 + 退款 Guard",
41
- "Machine 定义学习阶段和验收节点",
40
+ "Transparent course progress + refund Guard",
41
+ "Machine defines learning stages and acceptance nodes",
42
42
  ],
43
43
  keyActions: [
44
- { action: "设置里程碑 Reward", purpose: "激励完成课程", mutableField: "rewards", metricToWatch: "完课率" },
45
- { action: "推荐返现 Reward", purpose: "裂变获客", mutableField: "rewards", metricToWatch: "推荐率" },
44
+ { action: "Set milestone Reward", purpose: "Incentivize course completion", mutableField: "rewards", metricToWatch: "Course completion rate" },
45
+ { action: "Referral cashback Reward", purpose: "Viral acquisition", mutableField: "rewards", metricToWatch: "Referral rate" },
46
46
  ],
47
- rewardStrategy: "里程碑奖励 + 推荐返现 + 试听折扣",
48
- discountStrategy: "早鸟价 + 团购价 + 助学折扣",
49
- trustDescription: "进度透明 + 退款保障 + 验收节点",
47
+ rewardStrategy: "Milestone reward + referral cashback + trial-class discount",
48
+ discountStrategy: "Early-bird price + group-buy price + student-aid discount",
49
+ trustDescription: "Transparent progress + refund guarantee + acceptance nodes",
50
50
  },
51
51
  {
52
52
  industry: "travel",
53
53
  trustSellingPoints: [
54
- "行程托管 + 取消 Guard + 仲裁保障",
55
- "Guard 验证行程变更条件",
54
+ "Itinerary escrow + cancellation Guard + arbitration guarantee",
55
+ "Guard verifies itinerary change conditions",
56
56
  ],
57
57
  keyActions: [
58
- { action: "限时闪购 Reward", purpose: "清仓促销", mutableField: "rewards", metricToWatch: "转化率" },
59
- { action: "消费返现 Reward", purpose: "提升复购", mutableField: "rewards", metricToWatch: "复购率" },
58
+ { action: "Limited-time flash-sale Reward", purpose: "Clearance promotion", mutableField: "rewards", metricToWatch: "Conversion rate" },
59
+ { action: "Spend cashback Reward", purpose: "Improve repurchase", mutableField: "rewards", metricToWatch: "Repurchase rate" },
60
60
  ],
61
- rewardStrategy: "限时闪购 + 消费返现 + 推荐返佣",
62
- discountStrategy: "早鸟价 + 拼团价 + 会员价",
63
- trustDescription: "行程托管 + 取消保障 + 仲裁",
61
+ rewardStrategy: "Limited-time flash sale + spend cashback + referral commission",
62
+ discountStrategy: "Early-bird price + group-buy price + member price",
63
+ trustDescription: "Itinerary escrow + cancellation guarantee + arbitration",
64
64
  },
65
65
  {
66
66
  industry: "subscription",
67
67
  trustSellingPoints: [
68
- "订阅透明 + 自动续费 Guard + 随时取消",
69
- "Machine 定义计费周期和自动扣款",
68
+ "Transparent subscription + auto-renewal Guard + cancel anytime",
69
+ "Machine defines billing cycles and auto-debit",
70
70
  ],
71
71
  keyActions: [
72
- { action: "忠诚度 Reward", purpose: "长期留存", mutableField: "rewards", metricToWatch: "续费率" },
73
- { action: "推荐返现 Reward", purpose: "裂变获客", mutableField: "rewards", metricToWatch: "推荐率" },
72
+ { action: "Loyalty Reward", purpose: "Long-term retention", mutableField: "rewards", metricToWatch: "Renewal rate" },
73
+ { action: "Referral cashback Reward", purpose: "Viral acquisition", mutableField: "rewards", metricToWatch: "Referral rate" },
74
74
  ],
75
- rewardStrategy: "忠诚度奖励 + 推荐返现 + 首月折扣",
76
- discountStrategy: "年付折扣 + 团队折扣 + 升级折扣",
77
- trustDescription: "订阅透明 + 续费保障 + 随时取消",
75
+ rewardStrategy: "Loyalty reward + referral cashback + first-month discount",
76
+ discountStrategy: "Annual discount + team discount + upgrade discount",
77
+ trustDescription: "Transparent subscription + renewal guarantee + cancel anytime",
78
78
  },
79
79
  {
80
80
  industry: "retail",
81
81
  trustSellingPoints: [
82
- "交易托管 + 物流 Guard + 退款保障",
83
- "Guard 验证发货和收货",
82
+ "Transaction escrow + logistics Guard + refund guarantee",
83
+ "Guard verifies shipping and receipt",
84
84
  ],
85
85
  keyActions: [
86
- { action: "首单折扣", purpose: "吸引新客", mutableField: "discount", metricToWatch: "新客下单率" },
87
- { action: "消费返现 Reward", purpose: "提升复购", mutableField: "rewards", metricToWatch: "复购率" },
86
+ { action: "First-order discount", purpose: "Attract new customers", mutableField: "discount", metricToWatch: "New customer order rate" },
87
+ { action: "Spend cashback Reward", purpose: "Improve repurchase", mutableField: "rewards", metricToWatch: "Repurchase rate" },
88
88
  ],
89
- rewardStrategy: "首单折扣 + 消费返现 + 满减",
90
- discountStrategy: "满减 + 限时折扣 + 会员价",
91
- trustDescription: "交易托管 + 物流 Guard + 退款保障",
89
+ rewardStrategy: "First-order discount + spend cashback + spend-threshold discount",
90
+ discountStrategy: "Spend-threshold discount + limited-time discount + member price",
91
+ trustDescription: "Transaction escrow + logistics Guard + refund guarantee",
92
92
  },
93
93
  ];
94
+ let _registryLookup = null;
95
+ export function _setRegistryLookup(fn) {
96
+ _registryLookup = fn;
97
+ }
94
98
  export function getFlywheelForIndustry(industry) {
99
+ if (_registryLookup) {
100
+ const profile = _registryLookup(industry);
101
+ if (profile?.flywheel)
102
+ return profile.flywheel;
103
+ }
95
104
  return INDUSTRY_FLYWHEELS.find((f) => f.industry === industry.toLowerCase());
96
105
  }
97
106
  export function listIndustries() {
@@ -110,29 +119,29 @@ export function generateTrustDescription(params) {
110
119
  }
111
120
  }
112
121
  if (params.orderCount !== undefined && params.orderCount > 0) {
113
- parts.push(`已完成 ${params.orderCount} 单`);
122
+ parts.push(`Completed ${params.orderCount} orders`);
114
123
  }
115
124
  if (params.completedRate !== undefined) {
116
- parts.push(`完成率 ${Math.round(params.completedRate * 100)}%`);
125
+ parts.push(`Completion rate ${Math.round(params.completedRate * 100)}%`);
117
126
  }
118
127
  if (params.avgCompletionTime !== undefined) {
119
128
  if (params.avgCompletionTime < 1) {
120
- parts.push(`平均完成时间 ${Math.round(params.avgCompletionTime * 60)} 分钟`);
129
+ parts.push(`Average completion time ${Math.round(params.avgCompletionTime * 60)} minutes`);
121
130
  }
122
131
  else {
123
- parts.push(`平均完成时间 ${Math.round(params.avgCompletionTime)} 小时`);
132
+ parts.push(`Average completion time ${Math.round(params.avgCompletionTime)} hours`);
124
133
  }
125
134
  }
126
135
  if (params.hasCompensationFund) {
127
- parts.push("赔偿金充足");
136
+ parts.push("Sufficient compensation fund");
128
137
  }
129
138
  if (params.hasArbitration) {
130
- parts.push("第三方仲裁保障");
139
+ parts.push("Third-party arbitration guarantee");
131
140
  }
132
141
  if (params.reviewCount !== undefined && params.reviewCount > 0 && params.reviewLikeRate !== undefined) {
133
- parts.push(`好评率 ${Math.round(params.reviewLikeRate * 100)}% (${params.reviewCount} 条评价)`);
142
+ parts.push(`Like rate ${Math.round(params.reviewLikeRate * 100)}% (${params.reviewCount} reviews)`);
134
143
  }
135
- return parts.join("") || "暂无信任数据";
144
+ return parts.join("; ") || "No trust data available";
136
145
  }
137
146
  export function buildAcquisitionDashboard(params) {
138
147
  const { orderCount, completedRate, avgCompletionTime, repeatCustomerRate, reviewLikeRate, reviewCount } = params;
@@ -145,27 +154,27 @@ export function buildAcquisitionDashboard(params) {
145
154
  stage = "growing";
146
155
  const suggestions = [];
147
156
  if (stage === "cold_start") {
148
- suggestions.push("冷启动阶段:设置首单 Reward 吸引新客户");
149
- suggestions.push("增加 compensation_fund 提升初始信任");
157
+ suggestions.push("Cold-start stage: set first-order Reward to attract new customers");
158
+ suggestions.push("Increase compensation_fund to boost initial trust");
150
159
  }
151
160
  else if (stage === "growing") {
152
- suggestions.push("成长阶段:设置推荐返现 Reward 裂变获客");
161
+ suggestions.push("Growing stage: set referral cashback Reward for viral acquisition");
153
162
  if (repeatCustomerRate !== undefined && repeatCustomerRate < 0.2) {
154
- suggestions.push("复购率偏低,考虑设置累计金额阶梯 Reward");
163
+ suggestions.push("Repurchase rate is low; consider setting cumulative-spend tiered Reward");
155
164
  }
156
165
  }
157
166
  else if (stage === "mature") {
158
167
  if (reviewLikeRate !== undefined && reviewLikeRate > 0.8) {
159
- suggestions.push("好评率高,可在 description 中突出信任指标");
168
+ suggestions.push("High like rate; you can highlight trust metrics in the description");
160
169
  }
161
170
  if (repeatCustomerRate !== undefined && repeatCustomerRate > 0.3) {
162
- suggestions.push("复购率高,考虑设置忠诚度 Reward 激励长期客户");
171
+ suggestions.push("High repurchase rate; consider setting loyalty Reward to incentivize long-term customers");
163
172
  }
164
173
  }
165
174
  else {
166
- suggestions.push("优化阶段:精细化调整定价和 Reward 策略");
175
+ suggestions.push("Optimization stage: fine-tune pricing and Reward strategies");
167
176
  if (avgCompletionTime !== undefined && avgCompletionTime > 48) {
168
- suggestions.push("完成时间偏长,考虑优化 Machine 流程");
177
+ suggestions.push("Completion time is long; consider optimizing the Machine process");
169
178
  }
170
179
  }
171
180
  return {
@@ -87,31 +87,31 @@ function scoreLevel(score) {
87
87
  function buildWarnings(score, metrics, components) {
88
88
  const warnings = [];
89
89
  if (score < 50) {
90
- warnings.push(`仲裁员信任分较低 (${score}/100, ${scoreLevel(score)})。` +
91
- `建议客户谨慎选择此仲裁员。数据使用权在用户,系统不阻止使用。`);
90
+ warnings.push(`Arbitrator trust score is low (${score}/100, ${scoreLevel(score)}). ` +
91
+ `Customers should choose this arbitrator with caution. The user retains data usage authority; the system does not block usage.`);
92
92
  }
93
93
  if (metrics.disputedVerdicts > 0 && metrics.totalCases > 0) {
94
94
  const disputeRate = metrics.disputedVerdicts / metrics.totalCases;
95
95
  if (disputeRate > 0.3) {
96
- warnings.push(`争议率较高 (${(disputeRate * 100).toFixed(1)}%):` +
97
- `${metrics.disputedVerdicts}/${metrics.totalCases} 案件出现争议。`);
96
+ warnings.push(`High dispute rate (${(disputeRate * 100).toFixed(1)}%): ` +
97
+ `${metrics.disputedVerdicts}/${metrics.totalCases} cases had disputes.`);
98
98
  }
99
99
  }
100
100
  if (!metrics.hasVerifiedIdentity) {
101
- warnings.push("仲裁员未验证链上身份(无 Personal 对象),建议核实其真实性。");
101
+ warnings.push("Arbitrator has not verified on-chain identity (no Personal object); recommend verifying authenticity.");
102
102
  }
103
103
  if (metrics.avgResponseHours > 72) {
104
- warnings.push(`仲裁员平均响应时间较长 (${metrics.avgResponseHours}h),可能影响纠纷解决效率。`);
104
+ warnings.push(`Arbitrator average response time is long (${metrics.avgResponseHours}h), which may affect dispute resolution efficiency.`);
105
105
  }
106
106
  return warnings;
107
107
  }
108
108
  export function quickRiskAssessment(score) {
109
109
  const level = scoreLevel(score);
110
110
  switch (level) {
111
- case "high_risk": return "高风险:建议更换仲裁员或增加补偿金保障";
112
- case "caution": return "注意:信任分偏低,建议谨慎评估";
113
- case "moderate": return "中等信任:可接受,建议持续观察";
114
- case "trusted": return "高信任:仲裁员表现良好";
111
+ case "high_risk": return "High risk: recommend changing arbitrator or adding compensation fund protection";
112
+ case "caution": return "Caution: trust score is low, recommend careful evaluation";
113
+ case "moderate": return "Moderate trust: acceptable, recommend continued observation";
114
+ case "trusted": return "High trust: arbitrator performs well";
115
115
  }
116
116
  }
117
117
  export const ARBITRATION_TRUST_VERSION = 1;
@@ -23,41 +23,41 @@ function computeMatchScore(demand, service) {
23
23
  const tagScore = computeTagScore(demand.tags, service.tags);
24
24
  score += tagScore;
25
25
  if (tagScore >= WEIGHTS.tags * 0.8) {
26
- reasons.push(`tags 匹配度高 (${tagScore}/${WEIGHTS.tags})`);
26
+ reasons.push(`High tags match (${tagScore}/${WEIGHTS.tags})`);
27
27
  }
28
28
  const priceScore = computePriceScore(demand.maxPrice, service.price);
29
29
  score += priceScore;
30
30
  if (priceScore === WEIGHTS.price) {
31
- reasons.push(`价格在预算范围内`);
31
+ reasons.push(`Price within budget`);
32
32
  }
33
33
  else if (priceScore === 0 && demand.maxPrice && service.price) {
34
- warnings.push(`价格超出预算 (${service.price} > ${demand.maxPrice})`);
34
+ warnings.push(`Price exceeds budget (${service.price} > ${demand.maxPrice})`);
35
35
  }
36
36
  const scenarioScore = computeScenarioScore(demand.scenario, service.scenario);
37
37
  score += scenarioScore;
38
38
  if (scenarioScore === WEIGHTS.scenario) {
39
- reasons.push(`行业场景匹配 (${service.scenario})`);
39
+ reasons.push(`Industry scenario matches (${service.scenario})`);
40
40
  }
41
41
  const trustScore = computeTrustScore(service.trustScore, demand.minTrustScore);
42
42
  score += trustScore;
43
43
  if (service.trustScore !== undefined) {
44
44
  if (service.trustScore >= 75) {
45
- reasons.push(`信任分高 (${service.trustScore}/100)`);
45
+ reasons.push(`High trust score (${service.trustScore}/100)`);
46
46
  }
47
47
  else if (service.trustScore < 50) {
48
- warnings.push(`信任分较低 (${service.trustScore}/100)`);
48
+ warnings.push(`Low trust score (${service.trustScore}/100)`);
49
49
  }
50
50
  }
51
51
  const locationScore = computeLocationScore(demand.location, service.location);
52
52
  score += locationScore;
53
53
  if (locationScore === WEIGHTS.location && demand.location) {
54
- reasons.push(`地理位置匹配 (${service.location})`);
54
+ reasons.push(`Geographic location matches (${service.location})`);
55
55
  }
56
56
  const keywordScore = computeKeywordScore(demand.keywords, service.description);
57
57
  score += keywordScore;
58
58
  if (demand.minTrustScore !== undefined && service.trustScore !== undefined) {
59
59
  if (service.trustScore < demand.minTrustScore) {
60
- warnings.push(`信任分低于要求 (${service.trustScore} < ${demand.minTrustScore})`);
60
+ warnings.push(`Trust score below requirement (${service.trustScore} < ${demand.minTrustScore})`);
61
61
  score -= 10;
62
62
  }
63
63
  }
@@ -1,16 +1,16 @@
1
1
  export const DYNAMIC_PRICING_VERSION = 1;
2
2
  export const MUTABLE_FIELDS = [
3
- { field: "sales", purpose: "调整产品/价格", mutableAfterPublish: true, adjustmentMechanism: "Service.sales 可变", metricToWatch: "下单率" },
4
- { field: "discount", purpose: "营销促销", mutableAfterPublish: true, adjustmentMechanism: "add/set/destroy", metricToWatch: "转化率" },
5
- { field: "description", purpose: "信任说明", mutableAfterPublish: true, adjustmentMechanism: "可变", metricToWatch: "浏览时长" },
6
- { field: "rewards", purpose: "Reward 营销活动", mutableAfterPublish: true, adjustmentMechanism: "add/remove", metricToWatch: "复购率" },
7
- { field: "arbitrations", purpose: "仲裁升级", mutableAfterPublish: true, adjustmentMechanism: "可变", metricToWatch: "仲裁率" },
8
- { field: "compensation_fund", purpose: "增信", mutableAfterPublish: true, adjustmentMechanism: "add", metricToWatch: "信任分" },
9
- { field: "buy_guard", purpose: "购买门槛", mutableAfterPublish: true, adjustmentMechanism: "可变", metricToWatch: "下单率" },
10
- { field: "pause", purpose: "暂停/恢复", mutableAfterPublish: true, adjustmentMechanism: "可变", metricToWatch: "库存状态" },
11
- { field: "machine", purpose: "流程模板", mutableAfterPublish: false, adjustmentMechanism: "publish 后锁定,需新建 Service", metricToWatch: "流程速度" },
12
- { field: "order_allocators", purpose: "资金分配", mutableAfterPublish: false, adjustmentMechanism: "publish 后锁定,需新建 Service", metricToWatch: "分配公平性" },
13
- { field: "type_parameter", purpose: "支付代币", mutableAfterPublish: false, adjustmentMechanism: "不可变,可新建 Service + Reward 引导迁移", metricToWatch: "代币偏好" },
3
+ { field: "sales", purpose: "Adjust product/price", mutableAfterPublish: true, adjustmentMechanism: "Service.sales mutable", metricToWatch: "Order rate" },
4
+ { field: "discount", purpose: "Marketing promotion", mutableAfterPublish: true, adjustmentMechanism: "add/set/destroy", metricToWatch: "Conversion rate" },
5
+ { field: "description", purpose: "Trust description", mutableAfterPublish: true, adjustmentMechanism: "mutable", metricToWatch: "Browse duration" },
6
+ { field: "rewards", purpose: "Reward marketing campaigns", mutableAfterPublish: true, adjustmentMechanism: "add/remove", metricToWatch: "Repeat rate" },
7
+ { field: "arbitrations", purpose: "Arbitration upgrade", mutableAfterPublish: true, adjustmentMechanism: "mutable", metricToWatch: "Arbitration rate" },
8
+ { field: "compensation_fund", purpose: "Trust enhancement", mutableAfterPublish: true, adjustmentMechanism: "add", metricToWatch: "Trust score" },
9
+ { field: "buy_guard", purpose: "Purchase threshold", mutableAfterPublish: true, adjustmentMechanism: "mutable", metricToWatch: "Order rate" },
10
+ { field: "pause", purpose: "Pause/resume", mutableAfterPublish: true, adjustmentMechanism: "mutable", metricToWatch: "Inventory status" },
11
+ { field: "machine", purpose: "Workflow template", mutableAfterPublish: false, adjustmentMechanism: "Locked after publish, new Service required", metricToWatch: "Process speed" },
12
+ { field: "order_allocators", purpose: "Fund allocation", mutableAfterPublish: false, adjustmentMechanism: "Locked after publish, new Service required", metricToWatch: "Allocation fairness" },
13
+ { field: "type_parameter", purpose: "Payment token", mutableAfterPublish: false, adjustmentMechanism: "Immutable, can create new Service + Reward to guide migration", metricToWatch: "Token preference" },
14
14
  ];
15
15
  export function suggestPricing(signals) {
16
16
  const { supplyCount, demandCount, avgPrice, myPrice, competitorPrices, recentOrderCount, repeatCustomerRate } = signals;
@@ -20,7 +20,7 @@ export function suggestPricing(signals) {
20
20
  return {
21
21
  action: "increase",
22
22
  adjustmentPercent: increasePercent,
23
- reason: `需求/供给比 ${supplyDemandRatio.toFixed(1)},市场供不应求,建议涨价 ${increasePercent}%`,
23
+ reason: `Demand/supply ratio ${supplyDemandRatio.toFixed(1)}, market demand exceeds supply, suggest price increase of ${increasePercent}%`,
24
24
  confidence: Math.min(0.9, 0.5 + supplyDemandRatio * 0.1),
25
25
  };
26
26
  }
@@ -29,7 +29,7 @@ export function suggestPricing(signals) {
29
29
  return {
30
30
  action: "decrease",
31
31
  adjustmentPercent: decreasePercent,
32
- reason: `需求/供给比 ${supplyDemandRatio.toFixed(1)},市场供过于求,建议降价 ${decreasePercent}% 以提升竞争力`,
32
+ reason: `Demand/supply ratio ${supplyDemandRatio.toFixed(1)}, market supply exceeds demand, suggest price decrease of ${decreasePercent}% to improve competitiveness`,
33
33
  confidence: Math.min(0.85, 0.5 + (1 - supplyDemandRatio) * 0.15),
34
34
  };
35
35
  }
@@ -42,7 +42,7 @@ export function suggestPricing(signals) {
42
42
  return {
43
43
  action: "decrease",
44
44
  adjustmentPercent: 10,
45
- reason: `当前价格高于市场均价 20%+,建议降价以提升竞争力`,
45
+ reason: `Current price is 20%+ above market average, suggest price decrease to improve competitiveness`,
46
46
  confidence: 0.7,
47
47
  };
48
48
  }
@@ -50,7 +50,7 @@ export function suggestPricing(signals) {
50
50
  return {
51
51
  action: "increase",
52
52
  adjustmentPercent: 10,
53
- reason: `当前价格低于市场均价 20%+,有涨价空间`,
53
+ reason: `Current price is 20%+ below market average, room for price increase`,
54
54
  confidence: 0.65,
55
55
  };
56
56
  }
@@ -61,7 +61,7 @@ export function suggestPricing(signals) {
61
61
  if (repeatCustomerRate !== undefined && repeatCustomerRate > 0.4) {
62
62
  return {
63
63
  action: "maintain",
64
- reason: `复购率 ${Math.round(repeatCustomerRate * 100)}%,定价策略有效,建议维持`,
64
+ reason: `Repeat customer rate ${Math.round(repeatCustomerRate * 100)}%, pricing strategy effective, suggest maintaining`,
65
65
  confidence: 0.8,
66
66
  };
67
67
  }
@@ -69,13 +69,13 @@ export function suggestPricing(signals) {
69
69
  return {
70
70
  action: "decrease",
71
71
  adjustmentPercent: 5,
72
- reason: `复购率仅 ${Math.round(repeatCustomerRate * 100)}%,建议小幅降价或增加 Reward 吸引复购`,
72
+ reason: `Repeat customer rate only ${Math.round(repeatCustomerRate * 100)}%, suggest slight price decrease or add Reward to attract repeat purchases`,
73
73
  confidence: 0.6,
74
74
  };
75
75
  }
76
76
  return {
77
77
  action: "maintain",
78
- reason: "市场供需平衡,建议维持当前定价",
78
+ reason: "Market supply and demand balanced, suggest maintaining current pricing",
79
79
  confidence: 0.5,
80
80
  };
81
81
  }
@@ -204,7 +204,7 @@ export function injectEvolutionContext(_semantic, industry, role) {
204
204
  if (!profile) {
205
205
  return {
206
206
  confidence: 0,
207
- industry_signal: `行业 ${resolved} 尚未注册,建议通过泛化引擎合成画像`,
207
+ industry_signal: `Industry ${resolved} is not yet registered; recommend synthesizing a profile via the generalizer engine`,
208
208
  };
209
209
  }
210
210
  const health = latestHealth.get(resolved);
@@ -216,30 +216,30 @@ export function injectEvolutionContext(_semantic, industry, role) {
216
216
  let advice;
217
217
  let confidence = 0.5;
218
218
  if (health) {
219
- parts.push(`行业健康度 ${health.health_score}/100(${health.level})`);
219
+ parts.push(`Industry health ${health.health_score}/100 (${health.level})`);
220
220
  confidence = Math.max(confidence, 0.7);
221
221
  if (health.weaknesses.length > 0) {
222
- advice = `弱项:${health.weaknesses[0]}`;
222
+ advice = `Weakness: ${health.weaknesses[0]}`;
223
223
  }
224
224
  if (health.recommendations.length > 0) {
225
225
  advice = advice
226
- ? `${advice};建议:${health.recommendations[0]}`
227
- : `建议:${health.recommendations[0]}`;
226
+ ? `${advice}; recommendation: ${health.recommendations[0]}`
227
+ : `Recommendation: ${health.recommendations[0]}`;
228
228
  }
229
229
  }
230
230
  if (metrics && metrics.anomalies.length > 0) {
231
- parts.push(`异常:${metrics.anomalies[0]}`);
231
+ parts.push(`Anomaly: ${metrics.anomalies[0]}`);
232
232
  confidence = Math.max(confidence, 0.8);
233
233
  }
234
234
  if (signalCount > 0) {
235
- parts.push(`累积 ${signalCount} 个行业信号`);
235
+ parts.push(`Accumulated ${signalCount} industry signals`);
236
236
  }
237
237
  if (intent !== "default") {
238
- parts.push(`当前意图:${intent}`);
238
+ parts.push(`Current intent: ${intent}`);
239
239
  }
240
240
  if (!advice && suggestions.length > 0) {
241
241
  const highPriority = suggestions.find((s) => s.priority === "high") ?? suggestions[0];
242
- advice = `${highPriority.suggestion_type}:${highPriority.evidence}`;
242
+ advice = `${highPriority.suggestion_type}: ${highPriority.evidence}`;
243
243
  confidence = Math.max(confidence, highPriority.confidence);
244
244
  }
245
245
  let roleAdvice;
@@ -253,11 +253,11 @@ export function injectEvolutionContext(_semantic, industry, role) {
253
253
  filteredSuggestions = filterSuggestionsByRole(suggestions, role, triggers);
254
254
  if (filteredSuggestions.length > 0) {
255
255
  const topRole = filteredSuggestions.find((s) => s.priority === "high") ?? filteredSuggestions[0];
256
- advice = `${topRole.suggestion_type}(${role}):${topRole.evidence}`;
256
+ advice = `${topRole.suggestion_type} (${role}): ${topRole.evidence}`;
257
257
  }
258
258
  }
259
259
  return {
260
- industry_signal: parts.length > 0 ? parts.join("") : undefined,
260
+ industry_signal: parts.length > 0 ? parts.join("; ") : undefined,
261
261
  evolution_advice: advice,
262
262
  confidence,
263
263
  health_score: health?.health_score,