@wowok/agent-mcp 2.6.1 → 2.6.4

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 (246) hide show
  1. package/dist/customer/customer-advice.d.ts +31 -0
  2. package/dist/customer/customer-advice.js +129 -0
  3. package/dist/customer/index.d.ts +2 -0
  4. package/dist/customer/index.js +2 -0
  5. package/dist/customer/info-puzzle.d.ts +9 -2
  6. package/dist/customer/info-puzzle.js +34 -7
  7. package/dist/customer/order-monitor.d.ts +2 -0
  8. package/dist/customer/order-monitor.js +3 -2
  9. package/dist/customer/post-purchase.d.ts +2 -0
  10. package/dist/customer/post-purchase.js +6 -5
  11. package/dist/customer/preorder-compare.d.ts +24 -0
  12. package/dist/customer/preorder-compare.js +34 -0
  13. package/dist/customer/reminder-system.d.ts +2 -0
  14. package/dist/customer/reminder-system.js +2 -1
  15. package/dist/customer/risk-assessment.js +30 -7
  16. package/dist/customer/types.d.ts +7 -0
  17. package/dist/examples/arbitration-dispute-create.json +41 -0
  18. package/dist/examples/arbitration-vote-weighted.json +35 -0
  19. package/dist/examples/arbitration-voting-guard-add.json +38 -0
  20. package/dist/examples/demand-present-service.json +33 -0
  21. package/dist/examples/gen-passport-verify-guard.json +48 -0
  22. package/dist/examples/guard-template-balance-check.json +59 -0
  23. package/dist/examples/guard-template-time-lock.json +60 -0
  24. package/dist/examples/insurance-guard-claim-timelock.json +75 -0
  25. package/dist/examples/insurance-guard-withdraw-allocation.json +96 -0
  26. package/dist/examples/insurance-machine-create-publish.json +75 -0
  27. package/dist/examples/insurance-service-allocators-publish.json +56 -0
  28. package/dist/examples/machine-multisig-threshold.json +86 -0
  29. package/dist/examples/machine-template-7node-rental.json +119 -0
  30. package/dist/examples/payment-scenario-bound.json +45 -0
  31. package/dist/examples/rental-ziroom-machine-create.json +149 -0
  32. package/dist/examples/rental-ziroom-permission-create.json +42 -0
  33. package/dist/examples/rental-ziroom-service-create.json +89 -0
  34. package/dist/examples/retail-adv-guard-customer-win-create.json +80 -0
  35. package/dist/examples/retail-adv-guard-messenger-proof-create.json +65 -0
  36. package/dist/examples/retail-adv-guard-reward-timeout-create.json +92 -0
  37. package/dist/examples/retail-adv-reward-guard-add.json +51 -0
  38. package/dist/examples/retail-myshop-allocation-activate.json +55 -0
  39. package/dist/examples/retail-myshop-arbitration-create.json +40 -0
  40. package/dist/examples/retail-myshop-contact-create.json +43 -0
  41. package/dist/examples/retail-myshop-order-create.json +56 -0
  42. package/dist/examples/retail-myshop-progress-operate.json +38 -0
  43. package/dist/examples/retail-myshop-reward-create.json +35 -0
  44. package/dist/examples/retail-myshop-service-create.json +88 -0
  45. package/dist/examples/service-discount-issue.json +46 -0
  46. package/dist/examples/threebody-guard-create.json +56 -0
  47. package/dist/examples/threebody-machine-create.json +72 -0
  48. package/dist/examples/threebody-permission-create.json +38 -0
  49. package/dist/examples/threebody-service-allocators.json +49 -0
  50. package/dist/examples/travel-guard-time-lock.json +69 -0
  51. package/dist/examples/travel-guard-weather-oracle.json +70 -0
  52. package/dist/examples/travel-machine-create.json +136 -0
  53. package/dist/examples/travel-repository-create.json +47 -0
  54. package/dist/examples/travel-service-create.json +102 -0
  55. package/dist/examples/travel-treasury-create.json +34 -0
  56. package/dist/examples/treasury-deposit.json +37 -0
  57. package/dist/examples/treasury-withdraw.json +38 -0
  58. package/dist/extensions/business-modules.d.ts +49 -0
  59. package/dist/extensions/business-modules.js +287 -0
  60. package/dist/extensions/capability-manifest.js +216 -29
  61. package/dist/extensions/constraint-registry.js +21 -19
  62. package/dist/extensions/metric-registry.js +14 -14
  63. package/dist/extensions/mode-evaluator.js +16 -16
  64. package/dist/extensions/modes.js +141 -49
  65. package/dist/extensions/registry.d.ts +16 -9
  66. package/dist/extensions/registry.js +132 -44
  67. package/dist/extensions/types.d.ts +2 -0
  68. package/dist/index.js +50 -0
  69. package/dist/knowledge/deployment-scanner.js +1 -1
  70. package/dist/knowledge/fund-layer.d.ts +138 -0
  71. package/dist/knowledge/fund-layer.js +969 -0
  72. package/dist/knowledge/guard-render.d.ts +57 -0
  73. package/dist/knowledge/guard-render.js +700 -0
  74. package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
  75. package/dist/knowledge/guard-submission-prompt.js +171 -0
  76. package/dist/knowledge/guard-templates.d.ts +10 -0
  77. package/dist/knowledge/guard-templates.js +50 -0
  78. package/dist/knowledge/index.d.ts +2 -2
  79. package/dist/knowledge/index.js +2 -2
  80. package/dist/knowledge/machine-ledger.js +1 -1
  81. package/dist/knowledge/machine-render.d.ts +41 -0
  82. package/dist/knowledge/machine-render.js +565 -0
  83. package/dist/knowledge/machine-risk.js +4 -1
  84. package/dist/knowledge/machine-templates.js +4 -4
  85. package/dist/knowledge/progress-context.js +1 -1
  86. package/dist/knowledge/progress-ledger.js +3 -3
  87. package/dist/knowledge/progress-templates.js +1 -1
  88. package/dist/knowledge/progress-translation.js +1 -1
  89. package/dist/knowledge/reward-confirm.js +2 -2
  90. package/dist/knowledge/reward-puzzle.js +1 -1
  91. package/dist/knowledge/reward-risk.js +9 -9
  92. package/dist/knowledge/reward-templates.js +2 -2
  93. package/dist/knowledge/safety-rules.d.ts +83 -1
  94. package/dist/knowledge/safety-rules.js +166 -2
  95. package/dist/knowledge/scenario-modes.d.ts +1 -1
  96. package/dist/knowledge/scenario-modes.js +13 -11
  97. package/dist/knowledge/service-confirm.d.ts +1 -1
  98. package/dist/knowledge/service-confirm.js +3 -3
  99. package/dist/knowledge/service-context.js +1 -1
  100. package/dist/knowledge/service-ledger.js +1 -1
  101. package/dist/knowledge/service-risk.d.ts +1 -1
  102. package/dist/knowledge/service-risk.js +3 -3
  103. package/dist/knowledge/service-templates.js +2 -2
  104. package/dist/knowledge/service-translation.d.ts +1 -1
  105. package/dist/knowledge/service-translation.js +7 -7
  106. package/dist/knowledge/template-registry.d.ts +48 -0
  107. package/dist/knowledge/template-registry.js +341 -0
  108. package/dist/knowledge/tool-constraints.js +6 -6
  109. package/dist/knowledge/tools-reference.js +11 -8
  110. package/dist/participation/merchant-interest.d.ts +32 -0
  111. package/dist/participation/merchant-interest.js +100 -0
  112. package/dist/participation/radar-core.d.ts +104 -0
  113. package/dist/participation/radar-core.js +269 -0
  114. package/dist/project/context-assembly.js +8 -0
  115. package/dist/project/deployment-bridge.js +6 -5
  116. package/dist/project/deployment-doc.js +5 -5
  117. package/dist/project/edit-planner.d.ts +123 -0
  118. package/dist/project/edit-planner.js +1342 -0
  119. package/dist/project/evaluation.d.ts +36 -0
  120. package/dist/project/evaluation.js +734 -68
  121. package/dist/project/game-theory.d.ts +43 -0
  122. package/dist/project/game-theory.js +177 -0
  123. package/dist/project/graph-builder.js +7 -1
  124. package/dist/project/handlers.d.ts +137 -2
  125. package/dist/project/handlers.js +423 -51
  126. package/dist/project/intent-analyzer.d.ts +71 -0
  127. package/dist/project/intent-analyzer.js +149 -0
  128. package/dist/project/machine-nodes.d.ts +2 -0
  129. package/dist/project/machine-nodes.js +36 -0
  130. package/dist/project/merchant-guide.d.ts +165 -0
  131. package/dist/project/merchant-guide.js +264 -0
  132. package/dist/project/mode-actions.d.ts +199 -0
  133. package/dist/project/mode-actions.js +309 -0
  134. package/dist/project/participation-radar.d.ts +18 -0
  135. package/dist/project/participation-radar.js +428 -0
  136. package/dist/project/pipeline-actions.d.ts +101 -0
  137. package/dist/project/pipeline-actions.js +109 -0
  138. package/dist/project/semantic-graph.d.ts +95 -0
  139. package/dist/project/semantic-graph.js +245 -0
  140. package/dist/project/stage-gate.js +4 -4
  141. package/dist/schema/call/allocation.d.ts +11 -11
  142. package/dist/schema/call/allocation.js +13 -3
  143. package/dist/schema/call/arbitration.d.ts +21 -21
  144. package/dist/schema/call/arbitration.js +30 -9
  145. package/dist/schema/call/base.d.ts +2 -2
  146. package/dist/schema/call/base.js +1 -1
  147. package/dist/schema/call/bridge.d.ts +127 -127
  148. package/dist/schema/call/bridge.js +12 -12
  149. package/dist/schema/call/contact.d.ts +3 -3
  150. package/dist/schema/call/contact.js +2 -2
  151. package/dist/schema/call/demand.d.ts +3 -3
  152. package/dist/schema/call/demand.js +2 -2
  153. package/dist/schema/call/guard.d.ts +11 -11
  154. package/dist/schema/call/guard.js +2 -2
  155. package/dist/schema/call/machine.d.ts +2072 -679
  156. package/dist/schema/call/machine.js +51 -5
  157. package/dist/schema/call/order.d.ts +7 -7
  158. package/dist/schema/call/order.js +3 -6
  159. package/dist/schema/call/payment.d.ts +3 -3
  160. package/dist/schema/call/permission.d.ts +3 -3
  161. package/dist/schema/call/permission.js +2 -2
  162. package/dist/schema/call/personal.d.ts +337 -3
  163. package/dist/schema/call/personal.js +10 -0
  164. package/dist/schema/call/progress.d.ts +177 -9
  165. package/dist/schema/call/progress.js +7 -3
  166. package/dist/schema/call/proof.d.ts +6 -6
  167. package/dist/schema/call/repository.d.ts +3 -3
  168. package/dist/schema/call/repository.js +2 -2
  169. package/dist/schema/call/reward.d.ts +57 -57
  170. package/dist/schema/call/reward.js +3 -3
  171. package/dist/schema/call/semantic.js +48 -2
  172. package/dist/schema/call/service.d.ts +285 -113
  173. package/dist/schema/call/service.js +92 -28
  174. package/dist/schema/call/treasury.d.ts +57 -57
  175. package/dist/schema/call/treasury.js +3 -3
  176. package/dist/schema/common/index.d.ts +2 -0
  177. package/dist/schema/common/index.js +46 -10
  178. package/dist/schema/local/index.js +5 -1
  179. package/dist/schema/messenger/index.js +4 -1
  180. package/dist/schema/operations.d.ts +1318 -317
  181. package/dist/schema/operations.js +76 -7
  182. package/dist/schema/project/index.d.ts +5662 -164
  183. package/dist/schema/project/index.js +1136 -5
  184. package/dist/schema/query/index.d.ts +580 -19
  185. package/dist/schema/query/index.js +88 -36
  186. package/dist/schema/schema-query/index.d.ts +59 -3
  187. package/dist/schema/schema-query/index.js +45 -6
  188. package/dist/schema/trust/index.d.ts +1012 -6
  189. package/dist/schema/trust/index.js +212 -11
  190. package/dist/schema/utils/node-parser.js +13 -0
  191. package/dist/schema/utils/object-type-utils.d.ts +12 -0
  192. package/dist/schema/utils/object-type-utils.js +35 -0
  193. package/dist/schema/utils/permission-machine-check.d.ts +49 -0
  194. package/dist/schema/utils/permission-machine-check.js +121 -0
  195. package/dist/schema/utils/skills-recommendation.d.ts +2 -0
  196. package/dist/schema/utils/skills-recommendation.js +77 -0
  197. package/dist/schema-query/index.d.ts +17 -1
  198. package/dist/schema-query/index.js +359 -3
  199. package/dist/schemas/account_operation.schema.json +1 -1
  200. package/dist/schemas/bridge_operation.schema.json +14 -7
  201. package/dist/schemas/guard2file.schema.json +2 -0
  202. package/dist/schemas/index.json +1 -1
  203. package/dist/schemas/machineNode2file.schema.json +2 -0
  204. package/dist/schemas/messenger_operation.schema.json +1 -1
  205. package/dist/schemas/onchain_events.output.json +1 -1
  206. package/dist/schemas/onchain_operations.output.json +2820 -0
  207. package/dist/schemas/onchain_operations.schema.json +255 -65
  208. package/dist/schemas/onchain_operations_allocation.schema.json +7 -6
  209. package/dist/schemas/onchain_operations_arbitration.schema.json +14 -10
  210. package/dist/schemas/onchain_operations_contact.schema.json +4 -3
  211. package/dist/schemas/onchain_operations_demand.schema.json +4 -3
  212. package/dist/schemas/onchain_operations_gen_passport.schema.json +4 -2
  213. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -0
  214. package/dist/schemas/onchain_operations_guard.schema.json +579 -1
  215. package/dist/schemas/onchain_operations_machine.schema.json +5 -4
  216. package/dist/schemas/onchain_operations_order.schema.json +7 -6
  217. package/dist/schemas/onchain_operations_payment.schema.json +2 -1
  218. package/dist/schemas/onchain_operations_permission.schema.json +3 -2
  219. package/dist/schemas/onchain_operations_personal.schema.json +37 -0
  220. package/dist/schemas/onchain_operations_progress.schema.json +91 -4
  221. package/dist/schemas/onchain_operations_proof.schema.json +2 -1
  222. package/dist/schemas/onchain_operations_repository.schema.json +4 -3
  223. package/dist/schemas/onchain_operations_reward.schema.json +7 -6
  224. package/dist/schemas/onchain_operations_service.schema.json +80 -19
  225. package/dist/schemas/onchain_operations_treasury.schema.json +5 -4
  226. package/dist/schemas/onchain_table_data.output.json +1 -1
  227. package/dist/schemas/onchain_table_data.schema.json +10 -9
  228. package/dist/schemas/project_operation.output.json +3318 -57
  229. package/dist/schemas/project_operation.schema.json +728 -4
  230. package/dist/schemas/query_toolkit.output.json +16 -16
  231. package/dist/schemas/query_toolkit.schema.json +40 -3
  232. package/dist/schemas/schema_query.output.json +65 -2
  233. package/dist/schemas/schema_query.schema.json +31 -5
  234. package/dist/schemas/trust_score.output.json +392 -1
  235. package/dist/schemas/trust_score.schema.json +275 -1
  236. package/dist/schemas/wowok_buildin_info.output.json +81 -8
  237. package/dist/schemas/wowok_buildin_info.schema.json +46 -2
  238. package/dist/tools/handlers/onchain.js +636 -6
  239. package/dist/tools/handlers/project.js +71 -2
  240. package/dist/tools/handlers/query.js +117 -2
  241. package/dist/tools/handlers/schema-query.js +65 -1
  242. package/dist/tools/handlers/trust.js +192 -6
  243. package/dist/tools/index.d.ts +8 -0
  244. package/dist/tools/index.js +229 -15
  245. package/dist/tools/wrap.js +194 -15
  246. package/package.json +2 -2
@@ -26,7 +26,272 @@
26
26
  "evaluate",
27
27
  "preorder"
28
28
  ],
29
- "description": "InfoPuzzle collection depth. browse: only Service basics + trust score; evaluate (default): + workflow/fund/trust dimensions risk assessment; preorder: + merchant behavior + market context (most thorough)."
29
+ "description": "InfoPuzzle collection depth. browse: only Service basics + trust score; evaluate (default): + workflow/fund/trust dimensions risk assessment; preorder: + full preorder advice (confidence, game strategies, preference match, industry risks, blocking reminders)."
30
+ },
31
+ "industry": {
32
+ "type": "string",
33
+ "enum": [
34
+ "freelance",
35
+ "rental",
36
+ "education",
37
+ "travel",
38
+ "subscription",
39
+ "retail"
40
+ ],
41
+ "description": "Explicit industry override for industry-specific risk checks and needs matrix. If omitted at depth=preorder, the industry is inferred from the puzzle."
42
+ },
43
+ "preferences": {
44
+ "type": "object",
45
+ "properties": {
46
+ "price_sensitivity": {
47
+ "type": "string",
48
+ "enum": [
49
+ "low",
50
+ "medium",
51
+ "high"
52
+ ]
53
+ },
54
+ "budget_range": {
55
+ "type": "object",
56
+ "properties": {
57
+ "min": {
58
+ "type": [
59
+ "string",
60
+ "number"
61
+ ],
62
+ "description": "Budget lower bound (smallest token unit)."
63
+ },
64
+ "max": {
65
+ "type": [
66
+ "string",
67
+ "number"
68
+ ],
69
+ "description": "Budget upper bound (smallest token unit)."
70
+ }
71
+ },
72
+ "required": [
73
+ "min",
74
+ "max"
75
+ ],
76
+ "additionalProperties": false
77
+ },
78
+ "value_orientation": {
79
+ "type": "string",
80
+ "enum": [
81
+ "quality",
82
+ "balanced",
83
+ "budget"
84
+ ]
85
+ },
86
+ "discount_sensitivity": {
87
+ "type": "number",
88
+ "minimum": 0,
89
+ "maximum": 1
90
+ },
91
+ "delivery_speed_priority": {
92
+ "type": "string",
93
+ "enum": [
94
+ "urgent",
95
+ "normal",
96
+ "flexible"
97
+ ]
98
+ },
99
+ "max_acceptable_cycle": {
100
+ "type": "number",
101
+ "minimum": 0,
102
+ "description": "Max acceptable delivery cycle (days)."
103
+ },
104
+ "response_time_expectation": {
105
+ "type": "number",
106
+ "minimum": 0,
107
+ "description": "Expected merchant response time (hours)."
108
+ },
109
+ "merchant_preference": {
110
+ "type": "string",
111
+ "enum": [
112
+ "established",
113
+ "emerging",
114
+ "neutral"
115
+ ]
116
+ },
117
+ "min_order_history": {
118
+ "type": "integer",
119
+ "minimum": 0
120
+ },
121
+ "bargain_hunting": {
122
+ "type": "number",
123
+ "minimum": 0,
124
+ "maximum": 1
125
+ },
126
+ "reward_seeking": {
127
+ "type": "boolean"
128
+ },
129
+ "referral_participation": {
130
+ "type": "boolean"
131
+ },
132
+ "communication_style": {
133
+ "type": "string",
134
+ "enum": [
135
+ "formal",
136
+ "casual",
137
+ "friendly"
138
+ ]
139
+ },
140
+ "transparency_demand": {
141
+ "type": "number",
142
+ "minimum": 0,
143
+ "maximum": 1
144
+ },
145
+ "after_sales_expectation": {
146
+ "type": "string",
147
+ "enum": [
148
+ "full",
149
+ "basic",
150
+ "minimal"
151
+ ]
152
+ },
153
+ "risk_appetite": {
154
+ "type": "string",
155
+ "enum": [
156
+ "conservative",
157
+ "balanced",
158
+ "aggressive"
159
+ ]
160
+ },
161
+ "min_trust_score": {
162
+ "type": "number",
163
+ "minimum": 0,
164
+ "maximum": 100
165
+ },
166
+ "require_arbitration": {
167
+ "type": "boolean"
168
+ },
169
+ "require_compensation_fund": {
170
+ "type": "boolean"
171
+ },
172
+ "preferred_industries": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "string"
176
+ }
177
+ },
178
+ "preferred_tokens": {
179
+ "type": "array",
180
+ "items": {
181
+ "type": "string"
182
+ }
183
+ },
184
+ "preferred_merchants": {
185
+ "type": "array",
186
+ "items": {
187
+ "type": "string"
188
+ }
189
+ }
190
+ },
191
+ "additionalProperties": false,
192
+ "description": "Optional user preference overrides (partial; merged over profile-derived defaults). Only used at depth=preorder for preference matching and pref-aware strategies."
193
+ },
194
+ "user_metrics": {
195
+ "type": "object",
196
+ "properties": {
197
+ "metrics": {
198
+ "type": "array",
199
+ "items": {
200
+ "type": "object",
201
+ "properties": {
202
+ "name": {
203
+ "type": "string",
204
+ "description": "Stable metric identifier (e.g. 'merchant_tenure_days')."
205
+ },
206
+ "label": {
207
+ "type": "string",
208
+ "description": "Human-readable label shown to the user."
209
+ },
210
+ "evaluator": {
211
+ "type": "string",
212
+ "enum": [
213
+ "threshold",
214
+ "ratio",
215
+ "boolean",
216
+ "presence",
217
+ "regex_match",
218
+ "custom_query"
219
+ ],
220
+ "description": "How the metric is evaluated against the puzzle context."
221
+ },
222
+ "params": {
223
+ "type": "object",
224
+ "properties": {
225
+ "path": {
226
+ "type": "string",
227
+ "description": "JSON path in the raw data context (e.g. 'service.name')."
228
+ },
229
+ "threshold": {
230
+ "type": [
231
+ "string",
232
+ "number"
233
+ ],
234
+ "description": "Threshold value (threshold/presence evaluators)."
235
+ },
236
+ "invert": {
237
+ "type": "boolean",
238
+ "description": "true: pass when value <= threshold."
239
+ },
240
+ "min": {
241
+ "type": "number",
242
+ "description": "Min ratio (ratio evaluator)."
243
+ },
244
+ "max": {
245
+ "type": "number",
246
+ "description": "Max ratio (ratio evaluator)."
247
+ },
248
+ "pattern": {
249
+ "type": "string",
250
+ "description": "Regex pattern (regex_match evaluator)."
251
+ },
252
+ "query_key": {
253
+ "type": "string",
254
+ "description": "Custom query identifier (custom_query evaluator)."
255
+ }
256
+ },
257
+ "additionalProperties": false
258
+ },
259
+ "weight": {
260
+ "type": "number",
261
+ "minimum": 0,
262
+ "maximum": 1,
263
+ "description": "Relative weight vs other user metrics (0-1)."
264
+ },
265
+ "advice_on_fail": {
266
+ "type": "string"
267
+ },
268
+ "advice_on_pass": {
269
+ "type": "string"
270
+ }
271
+ },
272
+ "required": [
273
+ "name",
274
+ "label",
275
+ "evaluator",
276
+ "params",
277
+ "weight"
278
+ ],
279
+ "additionalProperties": false
280
+ },
281
+ "minItems": 1,
282
+ "description": "User-defined scoring factors."
283
+ },
284
+ "adjustment_cap": {
285
+ "type": "number",
286
+ "exclusiveMinimum": 0,
287
+ "description": "Global cap for the composite confidence adjustment (default ±10 points)."
288
+ }
289
+ },
290
+ "required": [
291
+ "metrics"
292
+ ],
293
+ "additionalProperties": false,
294
+ "description": "Optional user-controllable scoring factors (评分体系用户可控). Evaluated at depth=preorder; the composite adjustment (±cap) nudges the order confidence score."
30
295
  },
31
296
  "network": {
32
297
  "type": "string",
@@ -35,6 +300,15 @@
35
300
  "no_cache": {
36
301
  "type": "boolean",
37
302
  "description": "Skip object cache and force a fresh on-chain query."
303
+ },
304
+ "compare_with": {
305
+ "type": "array",
306
+ "items": {
307
+ "type": "string"
308
+ },
309
+ "minItems": 1,
310
+ "maxItems": 9,
311
+ "description": "Optional candidate Service addresses/LocalMark names (1-9) for deterministic multi-service comparison. Only used at depth=preorder. The SAME preferences/user_metrics/industry are applied uniformly to all candidates; output gains a `comparison` block with per-metric bests (NO overall ranking — the buyer decides)."
38
312
  }
39
313
  },
40
314
  "required": [
@@ -69,19 +69,23 @@
69
69
  "properties": {
70
70
  "index": {
71
71
  "type": "number",
72
- "description": "Permission index"
72
+ "description": "Permission index (e.g. 315 for service.compensation_fund_deposit)"
73
73
  },
74
74
  "name": {
75
75
  "type": "string",
76
- "description": "Name"
76
+ "description": "Permission name (e.g. \"service.compensation_fund_deposit\")"
77
77
  },
78
78
  "description": {
79
79
  "type": "string",
80
- "description": "Description"
80
+ "description": "Description of what this permission allows"
81
81
  },
82
82
  "object_type": {
83
83
  "type": "string",
84
- "description": "Object type"
84
+ "description": "Object type this permission belongs to (e.g. \"Service\", \"Arbitration\")"
85
+ },
86
+ "operation": {
87
+ "type": "string",
88
+ "description": "The SDK/MCP operation field name that triggers this permission check (e.g. \"compensation_fund_add\", \"publish\", \"pause\"). Undefined for permissions with no direct Call*_Data field (e.g. \"*.new\" permissions). Use this to answer: \"What permission does operation X require?\" by filtering with {operation: \"compensation_fund_add\"}."
85
89
  }
86
90
  },
87
91
  "required": [
@@ -91,9 +95,78 @@
91
95
  "object_type"
92
96
  ],
93
97
  "additionalProperties": false,
94
- "description": "Permission info type"
98
+ "description": "Permission info type — includes the operation field name that maps to this permission, so AI can look up required permissions by operation name."
99
+ },
100
+ "description": "Built-in permissions result. Each item includes an optional \"operation\" field mapping to the SDK/MCP field name that triggers this permission."
101
+ }
102
+ },
103
+ "required": [
104
+ "info",
105
+ "result"
106
+ ],
107
+ "additionalProperties": false
108
+ },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "info": {
113
+ "type": "string",
114
+ "const": "common mistakes"
115
+ },
116
+ "result": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "object_type": {
122
+ "type": "string",
123
+ "description": "The object type this mistake applies to (e.g. \"Service\", \"Arbitration\")"
124
+ },
125
+ "operation": {
126
+ "type": "string",
127
+ "description": "The operation field name this mistake applies to (e.g. \"compensation_fund_add\", \"voting_deadline\")"
128
+ },
129
+ "category": {
130
+ "type": "string",
131
+ "enum": [
132
+ "field_name",
133
+ "unit",
134
+ "value_range",
135
+ "workflow",
136
+ "timing"
137
+ ],
138
+ "description": "Category of the mistake: field_name (wrong field name), unit (wrong unit like seconds vs ms), value_range (wrong expected value), workflow (wrong operation order), timing (wrong time constraint)"
139
+ },
140
+ "mistake": {
141
+ "type": "string",
142
+ "description": "Short description of the mistake"
143
+ },
144
+ "correct_usage": {
145
+ "type": "string",
146
+ "description": "The correct usage pattern"
147
+ },
148
+ "wrong_example": {
149
+ "type": "string",
150
+ "description": "Example of the wrong usage"
151
+ },
152
+ "correct_example": {
153
+ "type": "string",
154
+ "description": "Example of the correct usage"
155
+ }
156
+ },
157
+ "required": [
158
+ "object_type",
159
+ "operation",
160
+ "category",
161
+ "mistake",
162
+ "correct_usage",
163
+ "wrong_example",
164
+ "correct_example"
165
+ ],
166
+ "additionalProperties": false,
167
+ "description": "A known common mistake for an on-chain operation. Use this to proactively warn users before they submit a transaction."
95
168
  },
96
- "description": "Built-in permissions result"
169
+ "description": "Common mistakes result. Each item documents a known pitfall (wrong field name, wrong unit, wrong workflow order, etc.) with wrong/correct examples."
97
170
  }
98
171
  },
99
172
  "required": [
@@ -486,12 +559,12 @@
486
559
  "parameters": {
487
560
  "type": "array",
488
561
  "items": {
489
- "$ref": "#/definitions/wowok_buildin_info/properties/result/anyOf/2/properties/result/items/properties/returnType"
562
+ "$ref": "#/definitions/wowok_buildin_info/properties/result/anyOf/3/properties/result/items/properties/returnType"
490
563
  },
491
564
  "description": "Parameters for guard query"
492
565
  },
493
566
  "return": {
494
- "$ref": "#/definitions/wowok_buildin_info/properties/result/anyOf/2/properties/result/items/properties/returnType",
567
+ "$ref": "#/definitions/wowok_buildin_info/properties/result/anyOf/3/properties/result/items/properties/returnType",
495
568
  "description": "Return type for guard query"
496
569
  },
497
570
  "parameters_description": {
@@ -80,17 +80,61 @@
80
80
  "description": {
81
81
  "type": "string",
82
82
  "description": "Description filter"
83
+ },
84
+ "operation": {
85
+ "type": "string",
86
+ "description": "Filter by SDK/MCP operation field name (e.g. \"compensation_fund_add\"). Returns only permissions triggered by this operation. Use this to answer: \"What permission does operation X require?\""
87
+ }
88
+ },
89
+ "additionalProperties": false,
90
+ "description": "Filter for built-in permissions. Use operation:\"compensation_fund_add\" to find which permission a specific operation requires."
91
+ }
92
+ },
93
+ "required": [
94
+ "info"
95
+ ],
96
+ "additionalProperties": false,
97
+ "description": "Built-in permissions query. Each permission includes an optional \"operation\" field that maps to the SDK/MCP Call*_Data field name triggering it. Use this to answer: \"What permission does operation X require?\" — e.g. filter operation:\"compensation_fund_add\" returns permission index 315 (service.compensation_fund_deposit)."
98
+ },
99
+ {
100
+ "type": "object",
101
+ "properties": {
102
+ "info": {
103
+ "type": "string",
104
+ "const": "common mistakes"
105
+ },
106
+ "filter": {
107
+ "type": "object",
108
+ "properties": {
109
+ "object_type": {
110
+ "type": "string",
111
+ "description": "Filter by object type (e.g. \"Service\")"
112
+ },
113
+ "operation": {
114
+ "type": "string",
115
+ "description": "Filter by operation field name (e.g. \"compensation_fund_add\")"
116
+ },
117
+ "category": {
118
+ "type": "string",
119
+ "enum": [
120
+ "field_name",
121
+ "unit",
122
+ "value_range",
123
+ "workflow",
124
+ "timing"
125
+ ],
126
+ "description": "Filter by category (e.g. \"field_name\" for field-name mistakes, \"unit\" for unit mistakes)"
83
127
  }
84
128
  },
85
129
  "additionalProperties": false,
86
- "description": "Filter for built-in permissions"
130
+ "description": "Filter for common mistakes. Use operation:\"compensation_fund_add\" to find mistakes for a specific operation, or category:\"field_name\" for all field-name mistakes."
87
131
  }
88
132
  },
89
133
  "required": [
90
134
  "info"
91
135
  ],
92
136
  "additionalProperties": false,
93
- "description": "Built-in permissions query"
137
+ "description": "Common mistakes query. Returns known field-name, unit, value-range, workflow, and timing pitfalls for on-chain operations. Use this to proactively warn users before submitting a transaction. Example: query operation:\"compensation_fund_add\" to learn about the {amount} vs {balance} field name mistake."
94
138
  },
95
139
  {
96
140
  "type": "object",