@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
@@ -1020,14 +1020,7 @@
1020
1020
  },
1021
1021
  "parsedJson": {
1022
1022
  "type": "object",
1023
- "additionalProperties": {
1024
- "type": [
1025
- "string",
1026
- "number",
1027
- "boolean",
1028
- "null"
1029
- ]
1030
- },
1023
+ "additionalProperties": {},
1031
1024
  "description": "Parsed JSON value of the event"
1032
1025
  },
1033
1026
  "sender": {
@@ -1097,14 +1090,7 @@
1097
1090
  },
1098
1091
  "parsedJson": {
1099
1092
  "type": "object",
1100
- "additionalProperties": {
1101
- "type": [
1102
- "string",
1103
- "number",
1104
- "boolean",
1105
- "null"
1106
- ]
1107
- },
1093
+ "additionalProperties": {},
1108
1094
  "description": "Parsed JSON value of the event"
1109
1095
  },
1110
1096
  "sender": {
@@ -1626,13 +1612,18 @@
1626
1612
  "permission_denied",
1627
1613
  "immutable_violation",
1628
1614
  "network_error",
1615
+ "rate_limit",
1616
+ "gas_exceeded",
1617
+ "bcs_error",
1618
+ "signature_error",
1619
+ "config_error",
1629
1620
  "unknown"
1630
1621
  ],
1631
- "description": "Error classification for programmatic recovery. Constraint: enum of 9 values. Relation: drives Recover Loop strategy selection. Example: 'insufficient_balance'"
1622
+ "description": "Error classification for programmatic recovery. Constraint: enum of 14 values. Relation: drives Recover Loop strategy selection. Example: 'insufficient_balance'"
1632
1623
  },
1633
1624
  "retryable": {
1634
1625
  "type": "boolean",
1635
- "description": "Whether the same call can be retried as-is. Constraint: true only for network_error and insufficient_balance. Example: true"
1626
+ "description": "Whether the same call can be retried as-is. Constraint: true for network_error, rate_limit, gas_exceeded, and insufficient_balance. Example: true"
1636
1627
  },
1637
1628
  "recovery_hint": {
1638
1629
  "type": "string",
@@ -1782,6 +1773,121 @@
1782
1773
  "type"
1783
1774
  ],
1784
1775
  "additionalProperties": false
1776
+ },
1777
+ {
1778
+ "type": "object",
1779
+ "properties": {
1780
+ "type": {
1781
+ "type": "string",
1782
+ "const": "pending_confirmation",
1783
+ "description": "Discriminator. The operation was NOT executed; it is blocked pending user confirmation. Re-call with env.confirmed=true to proceed, or modify/cancel."
1784
+ },
1785
+ "preview": {
1786
+ "type": "object",
1787
+ "properties": {
1788
+ "level": {
1789
+ "type": "string",
1790
+ "enum": [
1791
+ "none",
1792
+ "standard",
1793
+ "amount",
1794
+ "publish",
1795
+ "irreversible"
1796
+ ],
1797
+ "description": "Confirmation level. 'irreversible' = cannot be undone (arb verdict, payment). 'publish' = locks immutable fields. 'amount' = amount-sensitive. 'standard' = default-value warnings."
1798
+ },
1799
+ "operation": {
1800
+ "type": "string",
1801
+ "description": "operation_type that triggered the gate. Example: 'payment'"
1802
+ },
1803
+ "object": {
1804
+ "anyOf": [
1805
+ {
1806
+ "type": "string"
1807
+ },
1808
+ {
1809
+ "type": "object",
1810
+ "additionalProperties": {}
1811
+ },
1812
+ {
1813
+ "type": "null"
1814
+ }
1815
+ ],
1816
+ "description": "Object name/id involved (string for existing, object for new creation). Example: 'myshop_service' or {name: 'myshop_service'}"
1817
+ },
1818
+ "network": {
1819
+ "type": "string",
1820
+ "description": "Network in use. Example: 'mainnet'"
1821
+ },
1822
+ "account": {
1823
+ "type": "string",
1824
+ "description": "Signing account ('' = default). Example: '' or '0xabc...'"
1825
+ },
1826
+ "amount": {
1827
+ "type": "object",
1828
+ "properties": {
1829
+ "value": {
1830
+ "type": "string",
1831
+ "description": "Smallest-unit value as string. Example: '2500000000'"
1832
+ },
1833
+ "token": {
1834
+ "type": "string",
1835
+ "description": "Coin type tag. Example: '0x2::wow::WOW'"
1836
+ },
1837
+ "human_readable": {
1838
+ "type": "string",
1839
+ "description": "Human-readable amount. Example: '2.5 WOW'"
1840
+ },
1841
+ "recipient": {
1842
+ "type": "string",
1843
+ "description": "Recipient address if known. Example: '0xdef...'"
1844
+ }
1845
+ },
1846
+ "required": [
1847
+ "value",
1848
+ "token",
1849
+ "human_readable"
1850
+ ],
1851
+ "additionalProperties": false,
1852
+ "description": "Amount info for amount-level confirmations."
1853
+ },
1854
+ "immutable_after": {
1855
+ "type": "array",
1856
+ "items": {
1857
+ "type": "string"
1858
+ },
1859
+ "description": "Fields that become immutable after this op (for publish). Example: ['machine','order_allocators']"
1860
+ },
1861
+ "warnings": {
1862
+ "type": "array",
1863
+ "items": {
1864
+ "type": "string"
1865
+ },
1866
+ "description": "Default-value warnings. Example: ['Using default account (env.account=\"\")']"
1867
+ },
1868
+ "irreversible": {
1869
+ "type": "boolean",
1870
+ "description": "True when the operation cannot be reverted. Example: true"
1871
+ }
1872
+ },
1873
+ "required": [
1874
+ "level",
1875
+ "operation"
1876
+ ],
1877
+ "additionalProperties": false,
1878
+ "description": "Preview of the operation awaiting confirmation."
1879
+ },
1880
+ "rule_id": {
1881
+ "type": "string",
1882
+ "description": "Id of the confirmation rule that matched. Example: 'publish_immutable'"
1883
+ }
1884
+ },
1885
+ "required": [
1886
+ "type",
1887
+ "preview"
1888
+ ],
1889
+ "additionalProperties": false,
1890
+ "description": "Pending confirmation. The ConfirmGate blocked the operation. Read preview first; if user consents, re-invoke the SAME call with env.confirmed=true."
1785
1891
  }
1786
1892
  ],
1787
1893
  "description": "Discriminated result. Check result.type first: 'transaction'|'submission'|'error'|'data'|'null'. Each variant has different fields."
@@ -2044,6 +2150,463 @@
2044
2150
  "type": "string"
2045
2151
  },
2046
2152
  "description": "Business-level warnings. Example: 'order_allocators not configured; order funds cannot be distributed'"
2153
+ },
2154
+ "experience": {
2155
+ "type": "object",
2156
+ "properties": {
2157
+ "advice": {
2158
+ "type": "string",
2159
+ "description": "Advice from past experience. Example: 'Last time you forgot to set buy_guard; add it before publishing'"
2160
+ },
2161
+ "avoid": {
2162
+ "type": "array",
2163
+ "items": {
2164
+ "type": "string"
2165
+ },
2166
+ "description": "Pitfalls to avoid based on history. Example: ['Guard rejection on delivery_proof']"
2167
+ },
2168
+ "relevance": {
2169
+ "type": "number",
2170
+ "minimum": 0,
2171
+ "maximum": 1,
2172
+ "description": "Relevance score 0-1 of the matched experience. Example: 0.85"
2173
+ },
2174
+ "matched_scenario": {
2175
+ "type": "string",
2176
+ "description": "Matched historical scenario. Example: 'publish_service_freelance'"
2177
+ }
2178
+ },
2179
+ "additionalProperties": false,
2180
+ "description": "Experience layer feedback from past operations (Phase 2 议题 2)"
2181
+ },
2182
+ "service_status": {
2183
+ "type": "object",
2184
+ "properties": {
2185
+ "active": {
2186
+ "type": "array",
2187
+ "items": {
2188
+ "type": "string"
2189
+ },
2190
+ "description": "Phase 2 services currently active (enabled). Example: ['confirm_gate','project_service','experience_layer']"
2191
+ },
2192
+ "inactive": {
2193
+ "type": "array",
2194
+ "items": {
2195
+ "type": "string"
2196
+ },
2197
+ "description": "Phase 2 services currently inactive (can be toggled via config_operation). Example: ['harness','graph_persist']"
2198
+ }
2199
+ },
2200
+ "required": [
2201
+ "active"
2202
+ ],
2203
+ "additionalProperties": false,
2204
+ "description": "Phase 2 runtime service status (populated when semantic_rich is enabled). Lets AI see active services in each response."
2205
+ },
2206
+ "customer_advice": {
2207
+ "type": "object",
2208
+ "properties": {
2209
+ "risk_score": {
2210
+ "type": "number",
2211
+ "minimum": 0,
2212
+ "maximum": 100,
2213
+ "description": "Composite risk score 0-100 (higher = safer). Relation: from risk-assessment.ts 4-dimension scoring. Example: 75"
2214
+ },
2215
+ "risk_level": {
2216
+ "type": "string",
2217
+ "enum": [
2218
+ "low",
2219
+ "medium_low",
2220
+ "medium_high",
2221
+ "high"
2222
+ ],
2223
+ "description": "Risk level bucket. 'high' = strongly discourage purchase. Example: 'medium_high'"
2224
+ },
2225
+ "recommendations": {
2226
+ "type": "array",
2227
+ "items": {
2228
+ "type": "string"
2229
+ },
2230
+ "description": "Actionable recommendations for the buyer. Example: ['要求商家配置仲裁','通过 Messenger 协商退款条款']"
2231
+ },
2232
+ "reminders": {
2233
+ "type": "array",
2234
+ "items": {
2235
+ "type": "object",
2236
+ "properties": {
2237
+ "id": {
2238
+ "type": "string",
2239
+ "description": "Reminder rule id. Example: 'high_risk_score'"
2240
+ },
2241
+ "stage": {
2242
+ "type": "string",
2243
+ "enum": [
2244
+ "browse",
2245
+ "evaluate",
2246
+ "preorder",
2247
+ "in_progress",
2248
+ "complete",
2249
+ "after_sale"
2250
+ ],
2251
+ "description": "Order lifecycle stage when this reminder fires. Example: 'evaluate'"
2252
+ },
2253
+ "priority": {
2254
+ "type": "string",
2255
+ "enum": [
2256
+ "required",
2257
+ "recommended",
2258
+ "info",
2259
+ "reminder"
2260
+ ],
2261
+ "description": "Priority. 'required' = blocks purchase; 'recommended' = strong caution. Example: 'required'"
2262
+ },
2263
+ "message": {
2264
+ "type": "string",
2265
+ "description": "Human-readable reminder message. Example: '🔴 综合风险分 25/100,强烈建议不购买'"
2266
+ },
2267
+ "action": {
2268
+ "type": "string",
2269
+ "description": "Suggested next action. Example: 'require merchant to bind Arbitration before ordering'"
2270
+ }
2271
+ },
2272
+ "required": [
2273
+ "id",
2274
+ "stage",
2275
+ "priority",
2276
+ "message"
2277
+ ],
2278
+ "additionalProperties": false,
2279
+ "description": "A buyer-side reminder triggered at a specific order lifecycle stage (Phase 3 C-3)."
2280
+ },
2281
+ "description": "Stage-specific reminders (deduped, sorted by priority, capped to 3 high-risk). Example: [{priority:'required', message:'🔴 模糊 Guard 必须人工审查'}]"
2282
+ },
2283
+ "preference_match": {
2284
+ "type": "object",
2285
+ "properties": {
2286
+ "score": {
2287
+ "type": "number",
2288
+ "minimum": 0,
2289
+ "maximum": 100,
2290
+ "description": "Match score 0-100 (higher = better fit). Example: 75"
2291
+ },
2292
+ "matches": {
2293
+ "type": "array",
2294
+ "items": {
2295
+ "type": "string"
2296
+ },
2297
+ "description": "Aspects that match user preferences. Example: ['价格低于均价 10%','有仲裁']"
2298
+ },
2299
+ "mismatches": {
2300
+ "type": "array",
2301
+ "items": {
2302
+ "type": "string"
2303
+ },
2304
+ "description": "Aspects that mismatch user preferences. Example: ['交付周期超出期望']"
2305
+ }
2306
+ },
2307
+ "required": [
2308
+ "score",
2309
+ "matches",
2310
+ "mismatches"
2311
+ ],
2312
+ "additionalProperties": false,
2313
+ "description": "Service-to-preference match (populated when user preferences exist). Example: {score:75, matches:[...], mismatches:[...]}"
2314
+ }
2315
+ },
2316
+ "required": [
2317
+ "recommendations",
2318
+ "reminders"
2319
+ ],
2320
+ "additionalProperties": false,
2321
+ "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."
2322
+ },
2323
+ "evolution_context": {
2324
+ "type": "object",
2325
+ "properties": {
2326
+ "industry_signal": {
2327
+ "type": "string",
2328
+ "description": "Industry evolution signal summary. Example: '行业健康度 82/100(healthy);累积 25 个行业信号'"
2329
+ },
2330
+ "evolution_advice": {
2331
+ "type": "string",
2332
+ "description": "Evolution advice for the current operation. Example: '建议强制配置仲裁 + 赔偿金 + 交付 Guard'"
2333
+ },
2334
+ "confidence": {
2335
+ "type": "number",
2336
+ "minimum": 0,
2337
+ "maximum": 1,
2338
+ "description": "Confidence of the evolution context 0-1. <0.5 means no data yet. Example: 0.75"
2339
+ },
2340
+ "health_score": {
2341
+ "type": "number",
2342
+ "minimum": 0,
2343
+ "maximum": 100,
2344
+ "description": "Industry health score 0-100 if available. Example: 82"
2345
+ },
2346
+ "pending_suggestions": {
2347
+ "type": "integer",
2348
+ "minimum": 0,
2349
+ "description": "Count of pending industry update suggestions (filtered by role if role is set). Example: 3"
2350
+ },
2351
+ "intent": {
2352
+ "type": "string",
2353
+ "enum": [
2354
+ "default",
2355
+ "growth",
2356
+ "retention",
2357
+ "compliance",
2358
+ "efficiency",
2359
+ "trust_building",
2360
+ "custom"
2361
+ ],
2362
+ "description": "Phase 4 P4-6.C: Current business intent driving the scoring model. Absent = 'default'. Example: 'growth'"
2363
+ },
2364
+ "role_advice": {
2365
+ "type": "array",
2366
+ "items": {
2367
+ "type": "string"
2368
+ },
2369
+ "description": "Phase 4 P4-6.C: Role-targeted advice strings (user/merchant/arbitrator). Example: ['强化忠诚度飞轮','优化首单转化']"
2370
+ },
2371
+ "role": {
2372
+ "type": "string",
2373
+ "enum": [
2374
+ "user",
2375
+ "merchant",
2376
+ "arbitrator"
2377
+ ],
2378
+ "description": "Phase 4 P4-6.C: Role used for advice routing. Example: 'merchant'"
2379
+ }
2380
+ },
2381
+ "required": [
2382
+ "confidence"
2383
+ ],
2384
+ "additionalProperties": false,
2385
+ "description": "Phase 4 industry evolution context (populated when industry_evolution service is enabled). Provides AI with industry health signals and evolution advice."
2386
+ },
2387
+ "guard_advice": {
2388
+ "type": "object",
2389
+ "properties": {
2390
+ "current_round": {
2391
+ "type": "string",
2392
+ "enum": [
2393
+ "R1",
2394
+ "R2",
2395
+ "R3",
2396
+ "R4",
2397
+ "R5",
2398
+ "R6",
2399
+ "R7",
2400
+ "R8",
2401
+ "R9",
2402
+ "R10"
2403
+ ],
2404
+ "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'"
2405
+ },
2406
+ "puzzle_status": {
2407
+ "type": "object",
2408
+ "properties": {
2409
+ "intent": {
2410
+ "type": "boolean",
2411
+ "description": "Intent dimension complete (action + rule + failure conditions)"
2412
+ },
2413
+ "binding": {
2414
+ "type": "boolean",
2415
+ "description": "Binding dimension complete (host object + field + circular ref)"
2416
+ },
2417
+ "data": {
2418
+ "type": "boolean",
2419
+ "description": "Data dimension complete (table entries + witnesses)"
2420
+ },
2421
+ "query": {
2422
+ "type": "boolean",
2423
+ "description": "Query dimension complete (query instructions if needed)"
2424
+ },
2425
+ "logic": {
2426
+ "type": "boolean",
2427
+ "description": "Logic dimension complete (root node returns Bool)"
2428
+ },
2429
+ "constraints": {
2430
+ "type": "boolean",
2431
+ "description": "Constraints dimension complete (10 Pitfalls checked)"
2432
+ }
2433
+ },
2434
+ "required": [
2435
+ "intent",
2436
+ "binding",
2437
+ "data",
2438
+ "query",
2439
+ "logic",
2440
+ "constraints"
2441
+ ],
2442
+ "additionalProperties": false,
2443
+ "description": "Information puzzle completeness (6 dimensions). Missing dimensions need user input before CREATE."
2444
+ },
2445
+ "matched_scene": {
2446
+ "type": "string",
2447
+ "description": "Matched Guard scene id from the 8 binding scenarios ledger. Example: 'machine_forward_guard'"
2448
+ },
2449
+ "scene_description": {
2450
+ "type": "string",
2451
+ "description": "Human-readable scene description. Example: '工作流节点推进验证(Forward.guard)'"
2452
+ },
2453
+ "scene_constraints": {
2454
+ "type": "array",
2455
+ "items": {
2456
+ "type": "string"
2457
+ },
2458
+ "description": "Special constraints for the matched scene. Example: ['Machine 发布后 Forward.guard 不可修改']"
2459
+ },
2460
+ "suggested_patterns": {
2461
+ "type": "array",
2462
+ "items": {
2463
+ "type": "string"
2464
+ },
2465
+ "description": "Suggested Guard patterns based on user intent. Example: ['时间锁','进度状态检查']"
2466
+ },
2467
+ "available_queries": {
2468
+ "type": "array",
2469
+ "items": {
2470
+ "type": "object",
2471
+ "properties": {
2472
+ "id": {
2473
+ "type": "integer",
2474
+ "description": "Query instruction ID. Example: 1253"
2475
+ },
2476
+ "name": {
2477
+ "type": "string",
2478
+ "description": "Query instruction name. Example: 'progress.current_node_name'"
2479
+ },
2480
+ "objectType": {
2481
+ "type": "string",
2482
+ "description": "Target object type. Example: 'Progress'"
2483
+ },
2484
+ "returnType": {
2485
+ "type": "string",
2486
+ "description": "Return value type. Example: 'String'"
2487
+ },
2488
+ "description": {
2489
+ "type": "string",
2490
+ "description": "Query description"
2491
+ }
2492
+ },
2493
+ "required": [
2494
+ "id",
2495
+ "name",
2496
+ "objectType",
2497
+ "returnType"
2498
+ ],
2499
+ "additionalProperties": false,
2500
+ "description": "A Guard query instruction available for the current context (subset of GUARDQUERY 375 entries)."
2501
+ },
2502
+ "description": "Available query instructions for the current context (subset of 375 GUARDQUERY entries)"
2503
+ },
2504
+ "risk_warnings": {
2505
+ "type": "array",
2506
+ "items": {
2507
+ "type": "string"
2508
+ },
2509
+ "description": "Risk warnings for the current Guard design. Example: ['Guard 创建后不可修改','时间锁测试用 1000ms']"
2510
+ },
2511
+ "pending_questions": {
2512
+ "type": "array",
2513
+ "items": {
2514
+ "type": "string"
2515
+ },
2516
+ "description": "Questions for the user to complete the puzzle. Example: ['Guard 将绑定到哪个 Host Object?']"
2517
+ },
2518
+ "confirmation_text": {
2519
+ "type": "string",
2520
+ "description": "Structured semantic confirmation text for user review (generated when puzzle is complete). User must explicitly confirm before CREATE."
2521
+ },
2522
+ "test_result": {
2523
+ "type": "object",
2524
+ "properties": {
2525
+ "status": {
2526
+ "type": "string",
2527
+ "enum": [
2528
+ "pass",
2529
+ "fail",
2530
+ "not_tested"
2531
+ ]
2532
+ },
2533
+ "failure_node": {
2534
+ "type": "string",
2535
+ "description": "Node that caused failure (if fail)"
2536
+ },
2537
+ "passport_id": {
2538
+ "type": "string",
2539
+ "description": "Generated Passport ID (if pass)"
2540
+ }
2541
+ },
2542
+ "required": [
2543
+ "status"
2544
+ ],
2545
+ "additionalProperties": false,
2546
+ "description": "gen_passport static test result. Must pass before CREATE."
2547
+ },
2548
+ "risk_assessment": {
2549
+ "type": "object",
2550
+ "properties": {
2551
+ "overall_risk": {
2552
+ "type": "string",
2553
+ "enum": [
2554
+ "critical",
2555
+ "high",
2556
+ "medium",
2557
+ "low",
2558
+ "info"
2559
+ ],
2560
+ "description": "Overall risk level (highest from all risks)"
2561
+ },
2562
+ "risk_count": {
2563
+ "type": "integer",
2564
+ "description": "Total number of detected risks"
2565
+ },
2566
+ "critical_count": {
2567
+ "type": "integer",
2568
+ "description": "Number of critical risks"
2569
+ },
2570
+ "high_count": {
2571
+ "type": "integer",
2572
+ "description": "Number of high risks"
2573
+ },
2574
+ "needs_human_review": {
2575
+ "type": "boolean",
2576
+ "description": "Whether human review is required (critical or 2+ high risks)"
2577
+ },
2578
+ "top_risks": {
2579
+ "type": "array",
2580
+ "items": {
2581
+ "type": "string"
2582
+ },
2583
+ "description": "Top risk titles (critical and high, max 3)"
2584
+ },
2585
+ "stakeholder_advice": {
2586
+ "type": "object",
2587
+ "additionalProperties": {
2588
+ "type": "array",
2589
+ "items": {
2590
+ "type": "string"
2591
+ }
2592
+ },
2593
+ "description": "Per-stakeholder advice. Key=stakeholder (customer/provider/arbitrator/claimant), value=advice list"
2594
+ }
2595
+ },
2596
+ "required": [
2597
+ "overall_risk",
2598
+ "risk_count",
2599
+ "critical_count",
2600
+ "high_count",
2601
+ "needs_human_review",
2602
+ "top_risks"
2603
+ ],
2604
+ "additionalProperties": false,
2605
+ "description": "Business-layer risk assessment (game theory, data source trust, logic gaps). Populated during Guard design to warn about business risks beyond syntax."
2606
+ }
2607
+ },
2608
+ "additionalProperties": false,
2609
+ "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)."
2047
2610
  }
2048
2611
  },
2049
2612
  "required": [
@@ -2197,6 +2760,52 @@
2197
2760
  ],
2198
2761
  "additionalProperties": false,
2199
2762
  "description": "L4 Harness report (Verify + Recover). Present only when the Harness is injected and an Expected Result was declared for this operation. Relation: produced by handler.ts calling harness.verify() and harness.recover(). Example: {verify:{status:'fail', mismatches:[...]}, recovery:{strategy:'recreate'}}"
2763
+ },
2764
+ "schema_warning": {
2765
+ "type": "object",
2766
+ "properties": {
2767
+ "compatible": {
2768
+ "type": "boolean",
2769
+ "description": "Whether the client schema version is compatible with the server."
2770
+ },
2771
+ "warnings": {
2772
+ "type": "array",
2773
+ "items": {
2774
+ "type": "string"
2775
+ },
2776
+ "description": "Schema compatibility warnings or errors."
2777
+ },
2778
+ "client_version": {
2779
+ "type": "string",
2780
+ "description": "The client schema version that was checked."
2781
+ },
2782
+ "server_versions": {
2783
+ "type": "object",
2784
+ "properties": {
2785
+ "sdk": {
2786
+ "type": "string",
2787
+ "description": "Server-side SDK schema version."
2788
+ },
2789
+ "mcp": {
2790
+ "type": "string",
2791
+ "description": "Server-side MCP tool schema version."
2792
+ }
2793
+ },
2794
+ "required": [
2795
+ "sdk",
2796
+ "mcp"
2797
+ ],
2798
+ "additionalProperties": false,
2799
+ "description": "Server-side schema versions."
2800
+ }
2801
+ },
2802
+ "required": [
2803
+ "compatible",
2804
+ "warnings",
2805
+ "server_versions"
2806
+ ],
2807
+ "additionalProperties": false,
2808
+ "description": "Schema compatibility warning. Present only when client_schema_version is provided in env and a mismatch is detected."
2200
2809
  }
2201
2810
  },
2202
2811
  "required": [