@wowok/agent-mcp 2.7.2 → 2.7.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 (383) hide show
  1. package/dist/config/runtime.js +1 -1
  2. package/dist/customer/account-events.d.ts +32 -0
  3. package/dist/customer/account-events.js +1 -0
  4. package/dist/customer/customer-advice.d.ts +1 -0
  5. package/dist/customer/customer-advice.js +1 -1
  6. package/dist/customer/info-puzzle.js +1 -1
  7. package/dist/customer/order-strategy.d.ts +1 -1
  8. package/dist/customer/reminder-system.d.ts +2 -0
  9. package/dist/customer/reminder-system.js +1 -1
  10. package/dist/customer/risk-assessment.d.ts +1 -0
  11. package/dist/customer/risk-assessment.js +1 -1
  12. package/dist/customer/types.d.ts +2 -0
  13. package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
  14. package/dist/evaluation/builtins/arbitration-score.js +1 -0
  15. package/dist/evaluation/builtins/index.d.ts +1 -0
  16. package/dist/evaluation/builtins/index.js +1 -1
  17. package/dist/evaluation/category-match-rules.d.ts +30 -0
  18. package/dist/evaluation/category-match-rules.js +1 -0
  19. package/dist/evaluation/engine.js +1 -1
  20. package/dist/evaluation/extract.js +1 -1
  21. package/dist/evaluation/index.d.ts +1 -0
  22. package/dist/evaluation/index.js +1 -1
  23. package/dist/evaluation/location-match.d.ts +42 -0
  24. package/dist/evaluation/location-match.js +1 -0
  25. package/dist/evaluation/path-reasoning.d.ts +35 -0
  26. package/dist/evaluation/path-reasoning.js +1 -0
  27. package/dist/evaluation/region.d.ts +6 -0
  28. package/dist/evaluation/region.js +1 -1
  29. package/dist/evaluation/types.d.ts +17 -0
  30. package/dist/experience/realtime-feedback.js +1 -1
  31. package/dist/experience/user-profile.d.ts +1 -1
  32. package/dist/extensions/index.d.ts +6 -0
  33. package/dist/extensions/index.js +1 -1
  34. package/dist/extensions/industry-layers.d.ts +75 -0
  35. package/dist/extensions/industry-layers.js +1 -0
  36. package/dist/extensions/industry-pack.d.ts +105 -0
  37. package/dist/extensions/industry-pack.js +1 -0
  38. package/dist/extensions/metric-registry.js +1 -1
  39. package/dist/extensions/mode-evaluator.d.ts +1 -1
  40. package/dist/extensions/registry.d.ts +1 -0
  41. package/dist/extensions/registry.js +1 -1
  42. package/dist/graph/base.d.ts +8 -0
  43. package/dist/graph/base.js +1 -0
  44. package/dist/harness/index.d.ts +1 -0
  45. package/dist/harness/index.js +1 -1
  46. package/dist/harness/plan.d.ts +2 -0
  47. package/dist/harness/plan.js +1 -1
  48. package/dist/harness/recover.d.ts +1 -1
  49. package/dist/harness/types.d.ts +2 -3
  50. package/dist/index.js +1 -1
  51. package/dist/knowledge/allocation-confirm.js +1 -1
  52. package/dist/knowledge/anti-cheat.d.ts +37 -0
  53. package/dist/knowledge/anti-cheat.js +1 -0
  54. package/dist/knowledge/arb-confirm.d.ts +28 -0
  55. package/dist/knowledge/arb-confirm.js +1 -0
  56. package/dist/knowledge/arb-translation.d.ts +48 -0
  57. package/dist/knowledge/arb-translation.js +1 -0
  58. package/dist/knowledge/arbitration-context.js +1 -1
  59. package/dist/knowledge/arbitration-ledger.js +1 -1
  60. package/dist/knowledge/bridge-confirm.d.ts +26 -0
  61. package/dist/knowledge/bridge-confirm.js +1 -0
  62. package/dist/knowledge/bridge-translation.d.ts +37 -0
  63. package/dist/knowledge/bridge-translation.js +1 -0
  64. package/dist/knowledge/contact-confirm.d.ts +27 -0
  65. package/dist/knowledge/contact-confirm.js +1 -0
  66. package/dist/knowledge/contact-translation.d.ts +39 -0
  67. package/dist/knowledge/contact-translation.js +1 -0
  68. package/dist/knowledge/demand-confirm.js +1 -1
  69. package/dist/knowledge/demand-context.d.ts +17 -0
  70. package/dist/knowledge/demand-context.js +1 -0
  71. package/dist/knowledge/demand-ledger.d.ts +26 -0
  72. package/dist/knowledge/demand-ledger.js +1 -0
  73. package/dist/knowledge/demand-puzzle.d.ts +29 -0
  74. package/dist/knowledge/demand-puzzle.js +1 -0
  75. package/dist/knowledge/demand-risk.js +1 -1
  76. package/dist/knowledge/demand-templates.d.ts +12 -0
  77. package/dist/knowledge/demand-templates.js +1 -0
  78. package/dist/knowledge/demand-translation.js +1 -1
  79. package/dist/knowledge/deployment-scanner.js +1 -1
  80. package/dist/knowledge/evidence-review.d.ts +12 -0
  81. package/dist/knowledge/evidence-review.js +1 -0
  82. package/dist/knowledge/examples-scanner-cli.js +1 -1
  83. package/dist/knowledge/examples-scanner.js +1 -1
  84. package/dist/knowledge/flywheel-loop.d.ts +0 -1
  85. package/dist/knowledge/flywheel-loop.js +1 -1
  86. package/dist/knowledge/guard-design-patterns.js +1 -1
  87. package/dist/knowledge/guard-migration.d.ts +1 -1
  88. package/dist/knowledge/index.d.ts +71 -3
  89. package/dist/knowledge/index.js +1 -1
  90. package/dist/knowledge/industry-registry.js +1 -1
  91. package/dist/knowledge/machine-render.js +1 -1
  92. package/dist/knowledge/market-metrics.d.ts +12 -0
  93. package/dist/knowledge/market-metrics.js +1 -0
  94. package/dist/knowledge/market-operations.d.ts +46 -0
  95. package/dist/knowledge/market-operations.js +1 -0
  96. package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
  97. package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
  98. package/dist/knowledge/mcp-schema-audit.js +1 -1
  99. package/dist/knowledge/onchain-constants.d.ts +2 -2
  100. package/dist/knowledge/onchain-constants.js +1 -1
  101. package/dist/knowledge/payment-confirm.d.ts +26 -0
  102. package/dist/knowledge/payment-confirm.js +1 -0
  103. package/dist/knowledge/payment-risk.js +1 -1
  104. package/dist/knowledge/payment-translation.d.ts +37 -0
  105. package/dist/knowledge/payment-translation.js +1 -0
  106. package/dist/knowledge/permission-context.d.ts +11 -0
  107. package/dist/knowledge/permission-context.js +1 -1
  108. package/dist/knowledge/permission-ledger.d.ts +11 -0
  109. package/dist/knowledge/permission-ledger.js +1 -1
  110. package/dist/knowledge/personal-confirm.d.ts +29 -0
  111. package/dist/knowledge/personal-confirm.js +1 -0
  112. package/dist/knowledge/personal-risk.js +1 -1
  113. package/dist/knowledge/personal-translation.d.ts +37 -0
  114. package/dist/knowledge/personal-translation.js +1 -0
  115. package/dist/knowledge/process-model.d.ts +1 -11
  116. package/dist/knowledge/process-model.js +1 -1
  117. package/dist/knowledge/progress-ledger.js +1 -1
  118. package/dist/knowledge/progress-risk.js +1 -1
  119. package/dist/knowledge/progress-templates.js +1 -1
  120. package/dist/knowledge/progress-translation.js +1 -1
  121. package/dist/knowledge/proof-context.d.ts +17 -0
  122. package/dist/knowledge/proof-context.js +1 -0
  123. package/dist/knowledge/proof-ledger.d.ts +34 -0
  124. package/dist/knowledge/proof-ledger.js +1 -0
  125. package/dist/knowledge/proof-puzzle.d.ts +35 -0
  126. package/dist/knowledge/proof-puzzle.js +1 -0
  127. package/dist/knowledge/proof-templates.d.ts +22 -0
  128. package/dist/knowledge/proof-templates.js +1 -0
  129. package/dist/knowledge/registrar-confirm.d.ts +26 -0
  130. package/dist/knowledge/registrar-confirm.js +1 -0
  131. package/dist/knowledge/registrar-risk.js +1 -1
  132. package/dist/knowledge/registrar-translation.d.ts +37 -0
  133. package/dist/knowledge/registrar-translation.js +1 -0
  134. package/dist/knowledge/repository-context.d.ts +12 -0
  135. package/dist/knowledge/repository-context.js +1 -0
  136. package/dist/knowledge/repository-ledger.d.ts +25 -0
  137. package/dist/knowledge/repository-ledger.js +1 -0
  138. package/dist/knowledge/repository-puzzle.d.ts +30 -0
  139. package/dist/knowledge/repository-puzzle.js +1 -0
  140. package/dist/knowledge/repository-templates.d.ts +14 -0
  141. package/dist/knowledge/repository-templates.js +1 -0
  142. package/dist/knowledge/resource-confirm.d.ts +25 -0
  143. package/dist/knowledge/resource-confirm.js +1 -0
  144. package/dist/knowledge/resource-translation.d.ts +37 -0
  145. package/dist/knowledge/resource-translation.js +1 -0
  146. package/dist/knowledge/reward-context.d.ts +2 -2
  147. package/dist/knowledge/reward-ledger.js +1 -1
  148. package/dist/knowledge/reward-translation.js +1 -1
  149. package/dist/knowledge/safety-rules.d.ts +1 -0
  150. package/dist/knowledge/safety-rules.js +1 -1
  151. package/dist/knowledge/service-risk.d.ts +1 -1
  152. package/dist/knowledge/service-risk.js +1 -1
  153. package/dist/knowledge/template-registry.js +1 -1
  154. package/dist/knowledge/tools-reference.js +1 -1
  155. package/dist/knowledge/treasury-context.d.ts +1 -1
  156. package/dist/knowledge/treasury-context.js +1 -1
  157. package/dist/knowledge/treasury-ledger.js +1 -1
  158. package/dist/knowledge/treasury-risk.js +1 -1
  159. package/dist/knowledge/universal-template.d.ts +22 -0
  160. package/dist/knowledge/universal-template.js +1 -0
  161. package/dist/knowledge/util-confirm.d.ts +24 -0
  162. package/dist/knowledge/util-confirm.js +1 -0
  163. package/dist/knowledge/util-risk.js +1 -1
  164. package/dist/knowledge/util-translation.d.ts +39 -0
  165. package/dist/knowledge/util-translation.js +1 -0
  166. package/dist/knowledge/workflow-guidance.d.ts +180 -0
  167. package/dist/knowledge/workflow-guidance.js +1 -0
  168. package/dist/participation/employee-kpi.d.ts +25 -0
  169. package/dist/participation/employee-kpi.js +1 -0
  170. package/dist/participation/employee-store.d.ts +16 -0
  171. package/dist/participation/employee-store.js +1 -0
  172. package/dist/participation/index.d.ts +2 -0
  173. package/dist/participation/index.js +1 -0
  174. package/dist/persona/defaults.js +1 -1
  175. package/dist/persona/index.d.ts +9 -2
  176. package/dist/persona/index.js +1 -1
  177. package/dist/persona/local-region.d.ts +20 -0
  178. package/dist/persona/local-region.js +1 -0
  179. package/dist/persona/model.js +1 -1
  180. package/dist/persona/overrides.d.ts +10 -0
  181. package/dist/persona/overrides.js +1 -0
  182. package/dist/persona/pack-personae.d.ts +11 -0
  183. package/dist/persona/pack-personae.js +1 -0
  184. package/dist/persona/strategy-intent.d.ts +20 -0
  185. package/dist/persona/strategy-intent.js +1 -0
  186. package/dist/persona/types.d.ts +3 -1
  187. package/dist/project/business-puzzle.d.ts +1 -1
  188. package/dist/project/business-puzzle.js +1 -1
  189. package/dist/project/deployment-doc.js +1 -1
  190. package/dist/project/edit-planner.js +1 -1
  191. package/dist/project/evaluation.d.ts +37 -1
  192. package/dist/project/evaluation.js +1 -1
  193. package/dist/project/graph-builder.d.ts +2 -2
  194. package/dist/project/graph-builder.js +1 -1
  195. package/dist/project/graph.d.ts +3 -6
  196. package/dist/project/handlers.d.ts +33 -2
  197. package/dist/project/handlers.js +1 -1
  198. package/dist/project/index.d.ts +1 -0
  199. package/dist/project/index.js +1 -1
  200. package/dist/project/merchant-guide.d.ts +19 -0
  201. package/dist/project/merchant-guide.js +1 -1
  202. package/dist/project/mode-actions.js +1 -1
  203. package/dist/project/rollback-policy.js +1 -1
  204. package/dist/project/semantic-assembler.d.ts +2 -2
  205. package/dist/project/semantic-assembler.js +1 -1
  206. package/dist/project/semantic-graph.d.ts +3 -5
  207. package/dist/project/workflow-design-assessment.d.ts +24 -0
  208. package/dist/project/workflow-design-assessment.js +1 -0
  209. package/dist/safety/confirm-gate.d.ts +1 -1
  210. package/dist/safety/confirm-gate.js +1 -1
  211. package/dist/schema/call/allocation.d.ts +186 -1385
  212. package/dist/schema/call/arbitration.d.ts +272 -1871
  213. package/dist/schema/call/base.d.ts +1831 -9076
  214. package/dist/schema/call/base.js +1 -1
  215. package/dist/schema/call/bridge.d.ts +911 -3171
  216. package/dist/schema/call/contact.d.ts +135 -931
  217. package/dist/schema/call/demand.d.ts +164 -1194
  218. package/dist/schema/call/guard.d.ts +298 -1140
  219. package/dist/schema/call/guard.js +1 -1
  220. package/dist/schema/call/machine.d.ts +459 -5403
  221. package/dist/schema/call/machine.js +1 -1
  222. package/dist/schema/call/order.d.ts +137 -844
  223. package/dist/schema/call/payment.d.ts +74 -561
  224. package/dist/schema/call/permission.d.ts +335 -2791
  225. package/dist/schema/call/personal.d.ts +227 -1814
  226. package/dist/schema/call/progress.d.ts +140 -843
  227. package/dist/schema/call/proof.d.ts +42 -258
  228. package/dist/schema/call/repository.d.ts +324 -2222
  229. package/dist/schema/call/reward.d.ts +153 -1183
  230. package/dist/schema/call/semantic.js +1 -1
  231. package/dist/schema/call/service.d.ts +376 -3431
  232. package/dist/schema/call/treasury.d.ts +252 -2158
  233. package/dist/schema/common/index.d.ts +222 -697
  234. package/dist/schema/common/index.js +1 -1
  235. package/dist/schema/config/index.d.ts +18 -161
  236. package/dist/schema/employee/index.d.ts +99 -0
  237. package/dist/schema/employee/index.js +1 -0
  238. package/dist/schema/evaluation/index.d.ts +1035 -3918
  239. package/dist/schema/evaluation/index.js +1 -1
  240. package/dist/schema/index.d.ts +5 -0
  241. package/dist/schema/index.js +1 -1
  242. package/dist/schema/industry-pack/index.d.ts +132 -0
  243. package/dist/schema/industry-pack/index.js +1 -0
  244. package/dist/schema/intent-radar/index.d.ts +92 -245
  245. package/dist/schema/intent-radar/index.js +1 -1
  246. package/dist/schema/local/index.d.ts +2045 -18080
  247. package/dist/schema/local/index.js +1 -1
  248. package/dist/schema/local/wip.d.ts +61 -651
  249. package/dist/schema/local/wip.js +1 -1
  250. package/dist/schema/messenger/index.d.ts +949 -5557
  251. package/dist/schema/messenger/index.js +1 -1
  252. package/dist/schema/operations.d.ts +3168 -26468
  253. package/dist/schema/operations.js +1 -1
  254. package/dist/schema/permission/index.d.ts +121 -0
  255. package/dist/schema/permission/index.js +1 -0
  256. package/dist/schema/persona/index.d.ts +469 -1820
  257. package/dist/schema/persona/index.js +1 -1
  258. package/dist/schema/project/index.d.ts +1023 -8450
  259. package/dist/schema/project/index.js +1 -1
  260. package/dist/schema/query/index.d.ts +12121 -75556
  261. package/dist/schema/query/index.js +1 -1
  262. package/dist/schema/schema-query/index.d.ts +35 -98
  263. package/dist/schema/schema-query/index.js +1 -1
  264. package/dist/schema/schema-version.js +1 -1
  265. package/dist/schema/task-status.d.ts +26 -132
  266. package/dist/schema/trust/index.d.ts +194 -1290
  267. package/dist/schema/utils/guard-parser.js +1 -1
  268. package/dist/schema/utils/node-parser.js +1 -1
  269. package/dist/schema/utils/skills-recommendation.d.ts +1 -0
  270. package/dist/schema/utils/skills-recommendation.js +1 -1
  271. package/dist/schema/workflow/index.d.ts +161 -0
  272. package/dist/schema/workflow/index.js +1 -0
  273. package/dist/schema/workspace/index.d.ts +69 -0
  274. package/dist/schema/workspace/index.js +1 -0
  275. package/dist/{schema-query → schema-query-impl}/index.js +1 -1
  276. package/dist/schemas/account_operation.output.json +3147 -1655
  277. package/dist/schemas/account_operation.schema.json +225 -218
  278. package/dist/schemas/bridge_operation.output.json +1168 -653
  279. package/dist/schemas/bridge_operation.schema.json +736 -504
  280. package/dist/schemas/config_operation.output.json +185 -179
  281. package/dist/schemas/config_operation.schema.json +21 -26
  282. package/dist/schemas/employee_operation.output.json +207 -0
  283. package/dist/schemas/employee_operation.schema.json +176 -0
  284. package/dist/schemas/evaluation_operation.output.json +2268 -601
  285. package/dist/schemas/evaluation_operation.schema.json +2919 -787
  286. package/dist/schemas/guard2file.output.json +58 -64
  287. package/dist/schemas/guard2file.schema.json +79 -81
  288. package/dist/schemas/index.json +41 -11
  289. package/dist/schemas/industry_pack_operation.output.json +594 -0
  290. package/dist/schemas/industry_pack_operation.schema.json +55 -0
  291. package/dist/schemas/intent_radar.output.json +275 -203
  292. package/dist/schemas/intent_radar.schema.json +124 -126
  293. package/dist/schemas/local_info_operation.output.json +1174 -660
  294. package/dist/schemas/local_info_operation.schema.json +119 -125
  295. package/dist/schemas/local_mark_operation.output.json +1239 -692
  296. package/dist/schemas/local_mark_operation.schema.json +91 -96
  297. package/dist/schemas/machineNode2file.output.json +63 -69
  298. package/dist/schemas/machineNode2file.schema.json +79 -81
  299. package/dist/schemas/messenger_operation.output.json +2722 -1531
  300. package/dist/schemas/messenger_operation.schema.json +1482 -1264
  301. package/dist/schemas/onchain_events.output.json +2590 -978
  302. package/dist/schemas/onchain_events.schema.json +117 -99
  303. package/dist/schemas/onchain_operations.output.json +3957 -2312
  304. package/dist/schemas/onchain_operations.schema.json +20799 -9285
  305. package/dist/schemas/onchain_operations_allocation.schema.json +171 -107
  306. package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
  307. package/dist/schemas/onchain_operations_contact.schema.json +129 -90
  308. package/dist/schemas/onchain_operations_demand.schema.json +170 -112
  309. package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
  310. package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
  311. package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
  312. package/dist/schemas/onchain_operations_machine.schema.json +536 -163
  313. package/dist/schemas/onchain_operations_order.schema.json +126 -96
  314. package/dist/schemas/onchain_operations_payment.schema.json +82 -67
  315. package/dist/schemas/onchain_operations_permission.schema.json +331 -93
  316. package/dist/schemas/onchain_operations_personal.schema.json +636 -96
  317. package/dist/schemas/onchain_operations_progress.schema.json +125 -92
  318. package/dist/schemas/onchain_operations_proof.schema.json +76 -69
  319. package/dist/schemas/onchain_operations_repository.schema.json +636 -249
  320. package/dist/schemas/onchain_operations_reward.schema.json +218 -108
  321. package/dist/schemas/onchain_operations_service.schema.json +678 -220
  322. package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
  323. package/dist/schemas/onchain_table_data.output.json +6833 -2432
  324. package/dist/schemas/onchain_table_data.schema.json +684 -417
  325. package/dist/schemas/permission_operation.output.json +173 -0
  326. package/dist/schemas/permission_operation.schema.json +39 -0
  327. package/dist/schemas/persona_operation.output.json +1568 -268
  328. package/dist/schemas/persona_operation.schema.json +346 -205
  329. package/dist/schemas/project_operation.output.json +6922 -5132
  330. package/dist/schemas/project_operation.schema.json +1050 -1020
  331. package/dist/schemas/query_task_status.output.json +195 -99
  332. package/dist/schemas/query_task_status.schema.json +12 -18
  333. package/dist/schemas/query_toolkit.output.json +18862 -14561
  334. package/dist/schemas/query_toolkit.schema.json +614 -522
  335. package/dist/schemas/schema_query.output.json +127 -129
  336. package/dist/schemas/schema_query.schema.json +64 -69
  337. package/dist/schemas/trust_score.output.json +678 -587
  338. package/dist/schemas/trust_score.schema.json +289 -277
  339. package/dist/schemas/wip_file.output.json +116 -124
  340. package/dist/schemas/wip_file.schema.json +142 -143
  341. package/dist/schemas/workflow_operation.output.json +164 -0
  342. package/dist/schemas/workflow_operation.schema.json +116 -0
  343. package/dist/schemas/workspace_operation.output.json +277 -0
  344. package/dist/schemas/workspace_operation.schema.json +45 -0
  345. package/dist/schemas/wowok_buildin_info.output.json +1682 -844
  346. package/dist/schemas/wowok_buildin_info.schema.json +576 -526
  347. package/dist/tools/handlers/bridge.d.ts +8 -1
  348. package/dist/tools/handlers/bridge.js +1 -1
  349. package/dist/tools/handlers/config.js +1 -1
  350. package/dist/tools/handlers/employee.d.ts +2 -0
  351. package/dist/tools/handlers/employee.js +1 -0
  352. package/dist/tools/handlers/evaluation.js +1 -1
  353. package/dist/tools/handlers/file-export.js +1 -1
  354. package/dist/tools/handlers/industry-pack.d.ts +2 -0
  355. package/dist/tools/handlers/industry-pack.js +1 -0
  356. package/dist/tools/handlers/onchain.js +1 -1
  357. package/dist/tools/handlers/permission.d.ts +2 -0
  358. package/dist/tools/handlers/permission.js +1 -0
  359. package/dist/tools/handlers/persona.js +1 -1
  360. package/dist/tools/handlers/project.js +1 -1
  361. package/dist/tools/handlers/query.js +1 -1
  362. package/dist/tools/handlers/schema-query.js +1 -1
  363. package/dist/tools/handlers/trust.js +1 -1
  364. package/dist/tools/handlers/wip.js +1 -1
  365. package/dist/tools/handlers/workflow.d.ts +2 -0
  366. package/dist/tools/handlers/workflow.js +1 -0
  367. package/dist/tools/handlers/workspace.d.ts +4 -0
  368. package/dist/tools/handlers/workspace.js +1 -0
  369. package/dist/tools/index.d.ts +2 -1
  370. package/dist/tools/index.js +1 -1
  371. package/dist/tools/rules-hook.d.ts +1 -1
  372. package/dist/tools/rules-hook.js +1 -1
  373. package/dist/tools/shared.d.ts +1 -1
  374. package/dist/tools/shared.js +1 -1
  375. package/dist/tools/types.d.ts +2 -1
  376. package/package.json +4 -5
  377. package/dist/knowledge/arbitration-trust.d.ts +0 -24
  378. package/dist/knowledge/arbitration-trust.js +0 -1
  379. package/dist/schema/call/bridge-handler.d.ts +0 -8
  380. package/dist/schema/call/bridge-handler.js +0 -1
  381. package/dist/schema/sync-layer4.d.ts +0 -21
  382. package/dist/schema/sync-layer4.js +0 -1
  383. /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
@@ -1,782 +1,2449 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://wowok.net/schemas/evaluation_operation.json",
3
+ "$id": "https://wowok.net/schemas/evaluation_operation.output.json",
4
4
  "title": "Evaluation - Pluggable Business Intelligence",
5
5
  "description": "Run pluggable business evaluations (data sources + rules + user injection). Actions: arb_game (Arb 7-state best-move), node_game (Progress node best-move), capability_gap (demand-vs-service capability gaps), compose_service (combine services to cover a demand), demand_match (rank services for a demand), service_match (rank demands for a service). Read-only — returns ranked recommendations / scores with reasoning.",
6
- "$ref": "#/definitions/evaluation_operation",
7
- "definitions": {
8
- "evaluation_operation": {
9
- "type": "object",
10
- "properties": {
11
- "result": {
12
- "anyOf": [
13
- {
6
+ "type": "object",
7
+ "properties": {
8
+ "result": {
9
+ "oneOf": [
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "action": {
14
+ "type": "string",
15
+ "const": "arb_game"
16
+ },
17
+ "status": {
18
+ "type": "string",
19
+ "enum": [
20
+ "Principal_confirming",
21
+ "Arbitrator_confirming",
22
+ "Voting",
23
+ "Arbitrated",
24
+ "Objectionable",
25
+ "Finished",
26
+ "Withdrawn"
27
+ ]
28
+ },
29
+ "perspective": {
30
+ "type": "string",
31
+ "enum": [
32
+ "customer",
33
+ "merchant",
34
+ "arbitrator"
35
+ ]
36
+ },
37
+ "actions": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "properties": {
42
+ "action": {
43
+ "type": "string",
44
+ "description": "Recommended move (e.g. 'confirm', 'vote', 'objection', 'arb_withdraw')."
45
+ },
46
+ "favorability": {
47
+ "type": "integer",
48
+ "minimum": 0,
49
+ "maximum": 100,
50
+ "description": "Favorability 0-100 for the perspective."
51
+ },
52
+ "gain_score": {
53
+ "type": "integer",
54
+ "minimum": 0,
55
+ "maximum": 9007199254740991,
56
+ "description": "Gain points (收益)."
57
+ },
58
+ "risk_score": {
59
+ "type": "integer",
60
+ "minimum": 0,
61
+ "maximum": 9007199254740991,
62
+ "description": "Risk points (风险, appetite-adjusted)."
63
+ },
64
+ "is_optimal": {
65
+ "type": "boolean",
66
+ "description": "True when this is the top recommended move."
67
+ },
68
+ "payoff_note": {
69
+ "type": "string",
70
+ "description": "What the move achieves."
71
+ },
72
+ "risk": {
73
+ "type": "string",
74
+ "enum": [
75
+ "low",
76
+ "medium",
77
+ "high"
78
+ ],
79
+ "description": "Risk of the move."
80
+ }
81
+ },
82
+ "required": [
83
+ "action",
84
+ "favorability",
85
+ "gain_score",
86
+ "risk_score",
87
+ "is_optimal",
88
+ "payoff_note",
89
+ "risk"
90
+ ],
91
+ "additionalProperties": false
92
+ }
93
+ },
94
+ "summary": {
95
+ "type": "string"
96
+ }
97
+ },
98
+ "required": [
99
+ "action",
100
+ "status",
101
+ "perspective",
102
+ "actions",
103
+ "summary"
104
+ ],
105
+ "additionalProperties": false
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "action": {
111
+ "type": "string",
112
+ "const": "node_game"
113
+ },
114
+ "current_node": {
115
+ "type": "string"
116
+ },
117
+ "perspective": {
118
+ "type": "string",
119
+ "enum": [
120
+ "merchant",
121
+ "customer",
122
+ "prospect",
123
+ "supplier",
124
+ "collaborator",
125
+ "arbitrator"
126
+ ]
127
+ },
128
+ "actions": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "object",
132
+ "properties": {
133
+ "forward": {
134
+ "type": "string",
135
+ "description": "Forward (operation) name."
136
+ },
137
+ "to_node": {
138
+ "type": "string",
139
+ "description": "Target node after execution."
140
+ },
141
+ "execution_path": {
142
+ "type": "string",
143
+ "enum": [
144
+ "order_holder",
145
+ "permission",
146
+ "named_operator",
147
+ "not_available"
148
+ ],
149
+ "description": "How the account may execute it."
150
+ },
151
+ "guard": {
152
+ "description": "Guard address gating this forward.",
153
+ "type": "string"
154
+ },
155
+ "favorability": {
156
+ "type": "integer",
157
+ "minimum": 0,
158
+ "maximum": 100,
159
+ "description": "Net favorability 0-100 for the perspective (gain − risk)."
160
+ },
161
+ "gain_score": {
162
+ "type": "integer",
163
+ "minimum": 0,
164
+ "maximum": 9007199254740991,
165
+ "description": "Gain points (收益)."
166
+ },
167
+ "risk_score": {
168
+ "type": "integer",
169
+ "minimum": 0,
170
+ "maximum": 9007199254740991,
171
+ "description": "Risk points (风险, appetite-adjusted)."
172
+ },
173
+ "is_optimal": {
174
+ "type": "boolean",
175
+ "description": "True when this is the top recommended move."
176
+ },
177
+ "payoff_note": {
178
+ "type": "string",
179
+ "description": "What the move achieves."
180
+ },
181
+ "risk": {
182
+ "type": "string",
183
+ "enum": [
184
+ "low",
185
+ "medium",
186
+ "high"
187
+ ],
188
+ "description": "Risk of the move."
189
+ }
190
+ },
191
+ "required": [
192
+ "forward",
193
+ "to_node",
194
+ "execution_path",
195
+ "favorability",
196
+ "gain_score",
197
+ "risk_score",
198
+ "is_optimal",
199
+ "payoff_note",
200
+ "risk"
201
+ ],
202
+ "additionalProperties": false
203
+ }
204
+ },
205
+ "cooperation": {
14
206
  "type": "object",
15
207
  "properties": {
16
- "action": {
17
- "type": "string",
18
- "const": "arb_game"
208
+ "threshold": {
209
+ "type": "integer",
210
+ "minimum": 1,
211
+ "maximum": 9007199254740991,
212
+ "description": "Pair threshold (accumulated forward weights to advance)."
19
213
  },
20
- "status": {
21
- "type": "string",
22
- "enum": [
23
- "Principal_confirming",
24
- "Arbitrator_confirming",
25
- "Voting",
26
- "Arbitrated",
27
- "Objectionable",
28
- "Finished",
29
- "Withdrawn"
30
- ]
214
+ "my_weight": {
215
+ "type": "integer",
216
+ "minimum": 0,
217
+ "maximum": 9007199254740991,
218
+ "description": "Weight THIS role can contribute."
31
219
  },
32
- "perspective": {
33
- "type": "string",
34
- "enum": [
35
- "customer",
36
- "merchant",
37
- "arbitrator"
38
- ]
220
+ "needed_from_others": {
221
+ "type": "integer",
222
+ "minimum": 0,
223
+ "maximum": 9007199254740991,
224
+ "description": "Weight still needed from other roles (0 = can advance alone)."
39
225
  },
40
- "actions": {
226
+ "collaborators": {
41
227
  "type": "array",
42
228
  "items": {
43
- "type": "object",
44
- "properties": {
45
- "action": {
46
- "type": "string",
47
- "description": "Recommended move (e.g. 'confirm', 'vote', 'objection', 'arb_withdraw')."
48
- },
49
- "favorability": {
50
- "type": "integer",
51
- "minimum": 0,
52
- "maximum": 100,
53
- "description": "Favorability 0-100 for the perspective."
54
- },
55
- "gain_score": {
56
- "type": "integer",
57
- "minimum": 0,
58
- "description": "Gain points (收益)."
59
- },
60
- "risk_score": {
61
- "type": "integer",
62
- "minimum": 0,
63
- "description": "Risk points (风险, appetite-adjusted)."
64
- },
65
- "is_optimal": {
66
- "type": "boolean",
67
- "description": "True when this is the top recommended move."
68
- },
69
- "payoff_note": {
70
- "type": "string",
71
- "description": "What the move achieves."
72
- },
73
- "risk": {
74
- "type": "string",
75
- "enum": [
76
- "low",
77
- "medium",
78
- "high"
79
- ],
80
- "description": "Risk of the move."
81
- }
229
+ "type": "string"
230
+ },
231
+ "description": "Roles that must cooperate to reach the threshold."
232
+ },
233
+ "allocation": {
234
+ "description": "Allocation waterfall — how funds split once the node advances (利益分配).",
235
+ "type": "object",
236
+ "properties": {
237
+ "recipient_slots": {
238
+ "type": "integer",
239
+ "minimum": 0,
240
+ "maximum": 9007199254740991,
241
+ "description": "Total recipient slots across allocators."
82
242
  },
83
- "required": [
84
- "action",
85
- "favorability",
86
- "gain_score",
87
- "risk_score",
88
- "is_optimal",
89
- "payoff_note",
90
- "risk"
91
- ],
92
- "additionalProperties": false
93
- }
243
+ "guard_gated_slots": {
244
+ "type": "integer",
245
+ "minimum": 0,
246
+ "maximum": 9007199254740991,
247
+ "description": "Slots resolved at settlement by a Guard."
248
+ },
249
+ "direct_to_me_slots": {
250
+ "type": "integer",
251
+ "minimum": 0,
252
+ "maximum": 9007199254740991,
253
+ "description": "Slots paying directly to this role."
254
+ },
255
+ "to_payer_slots": {
256
+ "type": "integer",
257
+ "minimum": 0,
258
+ "maximum": 9007199254740991,
259
+ "description": "Slots routing back to the payer (refund-oriented)."
260
+ }
261
+ },
262
+ "required": [
263
+ "recipient_slots",
264
+ "guard_gated_slots",
265
+ "direct_to_me_slots",
266
+ "to_payer_slots"
267
+ ],
268
+ "additionalProperties": false
94
269
  },
95
- "summary": {
270
+ "allocation_note": {
271
+ "description": "Human-readable利益分配说明.",
96
272
  "type": "string"
97
273
  }
98
274
  },
99
275
  "required": [
100
- "action",
101
- "status",
102
- "perspective",
103
- "actions",
104
- "summary"
276
+ "threshold",
277
+ "my_weight",
278
+ "needed_from_others",
279
+ "collaborators"
105
280
  ],
106
281
  "additionalProperties": false
107
282
  },
108
- {
283
+ "value_at_stake": {
284
+ "description": "Escrowed order amount (smallest-unit string) — the monetary value at stake.",
285
+ "type": "string"
286
+ },
287
+ "risk_exposure": {
288
+ "description": "Compensation_fund (smallest-unit string) — the monetary risk exposure backing indemnity.",
289
+ "type": "string"
290
+ },
291
+ "summary": {
292
+ "type": "string"
293
+ }
294
+ },
295
+ "required": [
296
+ "action",
297
+ "current_node",
298
+ "perspective",
299
+ "actions",
300
+ "summary"
301
+ ],
302
+ "additionalProperties": false
303
+ },
304
+ {
305
+ "type": "object",
306
+ "properties": {
307
+ "action": {
308
+ "type": "string",
309
+ "const": "capability_gap"
310
+ },
311
+ "report": {
109
312
  "type": "object",
110
313
  "properties": {
111
- "action": {
112
- "type": "string",
113
- "const": "node_game"
114
- },
115
- "current_node": {
314
+ "entity_id": {
116
315
  "type": "string"
117
316
  },
118
- "perspective": {
119
- "type": "string",
120
- "enum": [
121
- "merchant",
122
- "customer",
123
- "prospect",
124
- "supplier",
125
- "collaborator",
126
- "arbitrator"
127
- ]
128
- },
129
- "actions": {
317
+ "satisfied": {
130
318
  "type": "array",
131
319
  "items": {
132
320
  "type": "object",
133
321
  "properties": {
134
- "forward": {
322
+ "dimension": {
135
323
  "type": "string",
136
- "description": "Forward (operation) name."
324
+ "description": "Capability dimension (has_arbitration / region / price / ...)."
137
325
  },
138
- "to_node": {
326
+ "requirement": {
139
327
  "type": "string",
140
- "description": "Target node after execution."
328
+ "description": "What the demand requires."
141
329
  },
142
- "execution_path": {
330
+ "provided": {
143
331
  "type": "string",
144
- "enum": [
145
- "order_holder",
146
- "permission",
147
- "named_operator",
148
- "not_available"
149
- ],
150
- "description": "How the account may execute it."
332
+ "description": "What the service provides."
151
333
  },
152
- "guard": {
334
+ "status": {
153
335
  "type": "string",
154
- "description": "Guard address gating this forward."
336
+ "enum": [
337
+ "satisfied",
338
+ "partial",
339
+ "missing"
340
+ ]
155
341
  },
156
- "favorability": {
157
- "type": "integer",
158
- "minimum": 0,
159
- "maximum": 100,
160
- "description": "Net favorability 0-100 for the perspective (gain − risk)."
342
+ "impact": {
343
+ "type": "string",
344
+ "enum": [
345
+ "critical",
346
+ "major",
347
+ "minor"
348
+ ]
161
349
  },
162
- "gain_score": {
163
- "type": "integer",
164
- "minimum": 0,
165
- "description": "Gain points (收益)."
350
+ "suggestion": {
351
+ "type": "string",
352
+ "description": "Actionable suggestion."
353
+ }
354
+ },
355
+ "required": [
356
+ "dimension",
357
+ "requirement",
358
+ "provided",
359
+ "status",
360
+ "impact",
361
+ "suggestion"
362
+ ],
363
+ "additionalProperties": false
364
+ }
365
+ },
366
+ "missing": {
367
+ "type": "array",
368
+ "items": {
369
+ "type": "object",
370
+ "properties": {
371
+ "dimension": {
372
+ "type": "string",
373
+ "description": "Capability dimension (has_arbitration / region / price / ...)."
166
374
  },
167
- "risk_score": {
168
- "type": "integer",
169
- "minimum": 0,
170
- "description": "Risk points (风险, appetite-adjusted)."
375
+ "requirement": {
376
+ "type": "string",
377
+ "description": "What the demand requires."
171
378
  },
172
- "is_optimal": {
173
- "type": "boolean",
174
- "description": "True when this is the top recommended move."
379
+ "provided": {
380
+ "type": "string",
381
+ "description": "What the service provides."
175
382
  },
176
- "payoff_note": {
383
+ "status": {
177
384
  "type": "string",
178
- "description": "What the move achieves."
385
+ "enum": [
386
+ "satisfied",
387
+ "partial",
388
+ "missing"
389
+ ]
179
390
  },
180
- "risk": {
391
+ "impact": {
181
392
  "type": "string",
182
393
  "enum": [
183
- "low",
184
- "medium",
185
- "high"
186
- ],
187
- "description": "Risk of the move."
394
+ "critical",
395
+ "major",
396
+ "minor"
397
+ ]
398
+ },
399
+ "suggestion": {
400
+ "type": "string",
401
+ "description": "Actionable suggestion."
188
402
  }
189
403
  },
190
404
  "required": [
191
- "forward",
192
- "to_node",
193
- "execution_path",
194
- "favorability",
195
- "gain_score",
196
- "risk_score",
197
- "is_optimal",
198
- "payoff_note",
199
- "risk"
405
+ "dimension",
406
+ "requirement",
407
+ "provided",
408
+ "status",
409
+ "impact",
410
+ "suggestion"
200
411
  ],
201
412
  "additionalProperties": false
202
413
  }
203
414
  },
204
- "cooperation": {
205
- "type": "object",
206
- "properties": {
207
- "threshold": {
208
- "type": "integer",
209
- "minimum": 1,
210
- "description": "Pair threshold (accumulated forward weights to advance)."
211
- },
212
- "my_weight": {
213
- "type": "integer",
214
- "minimum": 0,
215
- "description": "Weight THIS role can contribute."
216
- },
217
- "needed_from_others": {
218
- "type": "integer",
219
- "minimum": 0,
220
- "description": "Weight still needed from other roles (0 = can advance alone)."
221
- },
222
- "collaborators": {
223
- "type": "array",
224
- "items": {
415
+ "coverage_score": {
416
+ "type": "integer",
417
+ "minimum": 0,
418
+ "maximum": 100
419
+ },
420
+ "summary": {
421
+ "type": "string"
422
+ }
423
+ },
424
+ "required": [
425
+ "entity_id",
426
+ "satisfied",
427
+ "missing",
428
+ "coverage_score",
429
+ "summary"
430
+ ],
431
+ "additionalProperties": false
432
+ }
433
+ },
434
+ "required": [
435
+ "action",
436
+ "report"
437
+ ],
438
+ "additionalProperties": false
439
+ },
440
+ {
441
+ "type": "object",
442
+ "properties": {
443
+ "action": {
444
+ "type": "string",
445
+ "const": "compose_service"
446
+ },
447
+ "plan": {
448
+ "type": "object",
449
+ "properties": {
450
+ "demand": {
451
+ "type": "string"
452
+ },
453
+ "services": {
454
+ "type": "array",
455
+ "items": {
456
+ "type": "object",
457
+ "properties": {
458
+ "id": {
225
459
  "type": "string"
226
460
  },
227
- "description": "Roles that must cooperate to reach the threshold."
228
- },
229
- "allocation": {
230
- "type": "object",
231
- "properties": {
232
- "recipient_slots": {
233
- "type": "integer",
234
- "minimum": 0,
235
- "description": "Total recipient slots across allocators."
236
- },
237
- "guard_gated_slots": {
238
- "type": "integer",
239
- "minimum": 0,
240
- "description": "Slots resolved at settlement by a Guard."
241
- },
242
- "direct_to_me_slots": {
243
- "type": "integer",
244
- "minimum": 0,
245
- "description": "Slots paying directly to this role."
246
- },
247
- "to_payer_slots": {
248
- "type": "integer",
249
- "minimum": 0,
250
- "description": "Slots routing back to the payer (refund-oriented)."
461
+ "covered": {
462
+ "type": "array",
463
+ "items": {
464
+ "type": "string"
251
465
  }
252
- },
253
- "required": [
254
- "recipient_slots",
255
- "guard_gated_slots",
256
- "direct_to_me_slots",
257
- "to_payer_slots"
258
- ],
259
- "additionalProperties": false,
260
- "description": "Allocation waterfall — how funds split once the node advances (利益分配)."
466
+ }
261
467
  },
262
- "allocation_note": {
263
- "type": "string",
264
- "description": "Human-readable利益分配说明."
265
- }
266
- },
267
- "required": [
268
- "threshold",
269
- "my_weight",
270
- "needed_from_others",
271
- "collaborators"
272
- ],
273
- "additionalProperties": false
468
+ "required": [
469
+ "id",
470
+ "covered"
471
+ ],
472
+ "additionalProperties": false
473
+ }
274
474
  },
275
- "value_at_stake": {
276
- "type": "string",
277
- "description": "Escrowed order amount (smallest-unit string) — the monetary value at stake."
475
+ "coverage_score": {
476
+ "type": "integer",
477
+ "minimum": 0,
478
+ "maximum": 100
479
+ },
480
+ "remaining_missing": {
481
+ "type": "array",
482
+ "items": {
483
+ "type": "string"
484
+ }
278
485
  },
279
- "risk_exposure": {
486
+ "feasibility": {
280
487
  "type": "string",
281
- "description": "Compensation_fund (smallest-unit string) — the monetary risk exposure backing indemnity."
488
+ "enum": [
489
+ "ready",
490
+ "needs_supply_chain",
491
+ "infeasible"
492
+ ]
282
493
  },
283
494
  "summary": {
284
495
  "type": "string"
285
496
  }
286
497
  },
287
498
  "required": [
288
- "action",
289
- "current_node",
290
- "perspective",
291
- "actions",
499
+ "demand",
500
+ "services",
501
+ "coverage_score",
502
+ "remaining_missing",
503
+ "feasibility",
292
504
  "summary"
293
505
  ],
294
506
  "additionalProperties": false
507
+ }
508
+ },
509
+ "required": [
510
+ "action",
511
+ "plan"
512
+ ],
513
+ "additionalProperties": false
514
+ },
515
+ {
516
+ "type": "object",
517
+ "properties": {
518
+ "action": {
519
+ "type": "string",
520
+ "const": "demand_match"
295
521
  },
296
- {
297
- "type": "object",
298
- "properties": {
299
- "action": {
300
- "type": "string",
301
- "const": "capability_gap"
302
- },
303
- "report": {
304
- "type": "object",
305
- "properties": {
306
- "entity_id": {
307
- "type": "string"
308
- },
309
- "satisfied": {
310
- "type": "array",
311
- "items": {
312
- "type": "object",
313
- "properties": {
314
- "dimension": {
315
- "type": "string",
316
- "description": "Capability dimension (has_arbitration / region / price / ...)."
317
- },
318
- "requirement": {
319
- "type": "string",
320
- "description": "What the demand requires."
522
+ "matches": {
523
+ "type": "array",
524
+ "items": {
525
+ "type": "object",
526
+ "properties": {
527
+ "service": {
528
+ "type": "object",
529
+ "properties": {
530
+ "object": {
531
+ "type": "string",
532
+ "description": "Service object address."
533
+ },
534
+ "description": {
535
+ "type": "string"
536
+ },
537
+ "location": {
538
+ "type": "string"
539
+ },
540
+ "sales": {
541
+ "type": "array",
542
+ "items": {
543
+ "type": "object",
544
+ "properties": {
545
+ "name": {
546
+ "type": "string"
547
+ },
548
+ "price": {
549
+ "type": "string",
550
+ "description": "Smallest-unit amount (string)."
551
+ },
552
+ "wip_hash": {
553
+ "type": "string"
554
+ }
321
555
  },
322
- "provided": {
323
- "type": "string",
324
- "description": "What the service provides."
556
+ "required": [
557
+ "price"
558
+ ],
559
+ "additionalProperties": false
560
+ }
561
+ },
562
+ "arbitrations": {
563
+ "type": "array",
564
+ "items": {
565
+ "type": "string"
566
+ }
567
+ },
568
+ "compensation_fund": {
569
+ "description": "Smallest-unit amount (string).",
570
+ "type": "string"
571
+ },
572
+ "buy_guard": {
573
+ "anyOf": [
574
+ {
575
+ "type": "string"
325
576
  },
326
- "status": {
327
- "type": "string",
328
- "enum": [
329
- "satisfied",
330
- "partial",
331
- "missing"
332
- ]
577
+ {
578
+ "type": "null"
579
+ }
580
+ ]
581
+ },
582
+ "machine": {
583
+ "anyOf": [
584
+ {
585
+ "type": "string"
333
586
  },
334
- "impact": {
335
- "type": "string",
336
- "enum": [
337
- "critical",
338
- "major",
339
- "minor"
340
- ]
587
+ {
588
+ "type": "null"
589
+ }
590
+ ]
591
+ },
592
+ "um": {
593
+ "anyOf": [
594
+ {
595
+ "type": "string"
341
596
  },
342
- "suggestion": {
343
- "type": "string",
344
- "description": "Actionable suggestion."
597
+ {
598
+ "type": "null"
345
599
  }
346
- },
347
- "required": [
348
- "dimension",
349
- "requirement",
350
- "provided",
351
- "status",
352
- "impact",
353
- "suggestion"
354
- ],
355
- "additionalProperties": false
356
- }
357
- },
358
- "missing": {
359
- "type": "array",
360
- "items": {
361
- "$ref": "#/definitions/evaluation_operation/properties/result/anyOf/2/properties/report/properties/satisfied/items"
600
+ ]
601
+ },
602
+ "bPublished": {
603
+ "type": "boolean"
604
+ },
605
+ "bPaused": {
606
+ "type": "boolean"
607
+ },
608
+ "owner": {
609
+ "type": "string"
362
610
  }
363
611
  },
364
- "coverage_score": {
365
- "type": "integer",
366
- "minimum": 0,
367
- "maximum": 100
368
- },
369
- "summary": {
370
- "type": "string"
371
- }
612
+ "required": [
613
+ "object",
614
+ "description",
615
+ "location"
616
+ ],
617
+ "additionalProperties": false
372
618
  },
373
- "required": [
374
- "entity_id",
375
- "satisfied",
376
- "missing",
377
- "coverage_score",
378
- "summary"
379
- ],
380
- "additionalProperties": false
381
- }
382
- },
619
+ "result": {
620
+ "type": "object",
621
+ "properties": {
622
+ "evaluation_id": {
623
+ "type": "string"
624
+ },
625
+ "total": {
626
+ "type": "integer",
627
+ "minimum": 0,
628
+ "maximum": 100
629
+ },
630
+ "level": {
631
+ "type": "string",
632
+ "enum": [
633
+ "low",
634
+ "medium_low",
635
+ "medium_high",
636
+ "high"
637
+ ]
638
+ },
639
+ "breakdown": {
640
+ "type": "array",
641
+ "items": {
642
+ "type": "object",
643
+ "properties": {
644
+ "rule_id": {
645
+ "type": "string"
646
+ },
647
+ "dimension": {
648
+ "type": "string"
649
+ },
650
+ "score": {
651
+ "type": "number"
652
+ },
653
+ "weight": {
654
+ "type": "number"
655
+ },
656
+ "reason": {
657
+ "type": "string"
658
+ },
659
+ "matched": {
660
+ "type": "array",
661
+ "items": {
662
+ "type": "string"
663
+ }
664
+ },
665
+ "mismatched": {
666
+ "type": "array",
667
+ "items": {
668
+ "type": "string"
669
+ }
670
+ },
671
+ "red_flag": {
672
+ "type": "boolean"
673
+ }
674
+ },
675
+ "required": [
676
+ "rule_id",
677
+ "dimension",
678
+ "score",
679
+ "weight"
680
+ ],
681
+ "additionalProperties": false
682
+ }
683
+ },
684
+ "red_flags": {
685
+ "type": "array",
686
+ "items": {
687
+ "type": "string"
688
+ }
689
+ },
690
+ "blocked": {
691
+ "type": "boolean"
692
+ },
693
+ "trace": {
694
+ "type": "array",
695
+ "items": {
696
+ "type": "object",
697
+ "properties": {
698
+ "kind": {
699
+ "type": "string",
700
+ "enum": [
701
+ "data_source",
702
+ "rule",
703
+ "override"
704
+ ]
705
+ },
706
+ "id": {
707
+ "type": "string"
708
+ },
709
+ "detail": {
710
+ "type": "string"
711
+ }
712
+ },
713
+ "required": [
714
+ "kind",
715
+ "id",
716
+ "detail"
717
+ ],
718
+ "additionalProperties": false
719
+ }
720
+ },
721
+ "summary": {
722
+ "type": "string"
723
+ }
724
+ },
725
+ "required": [
726
+ "evaluation_id",
727
+ "total",
728
+ "level",
729
+ "breakdown",
730
+ "red_flags",
731
+ "blocked",
732
+ "trace",
733
+ "summary"
734
+ ],
735
+ "additionalProperties": false
736
+ }
737
+ },
738
+ "required": [
739
+ "service",
740
+ "result"
741
+ ],
742
+ "additionalProperties": false
743
+ }
744
+ }
745
+ },
746
+ "required": [
747
+ "action",
748
+ "matches"
749
+ ],
750
+ "additionalProperties": false
751
+ },
752
+ {
753
+ "type": "object",
754
+ "properties": {
755
+ "action": {
756
+ "type": "string",
757
+ "const": "service_match"
758
+ },
759
+ "matches": {
760
+ "type": "array",
761
+ "items": {
762
+ "type": "object",
763
+ "properties": {
764
+ "demand": {
765
+ "type": "object",
766
+ "properties": {
767
+ "object": {
768
+ "type": "string",
769
+ "description": "Demand object address."
770
+ },
771
+ "description": {
772
+ "type": "string"
773
+ },
774
+ "location": {
775
+ "type": "string"
776
+ },
777
+ "rewards": {
778
+ "type": "array",
779
+ "items": {
780
+ "type": "string"
781
+ }
782
+ },
783
+ "um": {
784
+ "anyOf": [
785
+ {
786
+ "type": "string"
787
+ },
788
+ {
789
+ "type": "null"
790
+ }
791
+ ]
792
+ },
793
+ "owner": {
794
+ "type": "string"
795
+ }
796
+ },
797
+ "required": [
798
+ "object",
799
+ "description",
800
+ "location"
801
+ ],
802
+ "additionalProperties": false
803
+ },
804
+ "result": {
805
+ "type": "object",
806
+ "properties": {
807
+ "evaluation_id": {
808
+ "type": "string"
809
+ },
810
+ "total": {
811
+ "type": "integer",
812
+ "minimum": 0,
813
+ "maximum": 100
814
+ },
815
+ "level": {
816
+ "type": "string",
817
+ "enum": [
818
+ "low",
819
+ "medium_low",
820
+ "medium_high",
821
+ "high"
822
+ ]
823
+ },
824
+ "breakdown": {
825
+ "type": "array",
826
+ "items": {
827
+ "type": "object",
828
+ "properties": {
829
+ "rule_id": {
830
+ "type": "string"
831
+ },
832
+ "dimension": {
833
+ "type": "string"
834
+ },
835
+ "score": {
836
+ "type": "number"
837
+ },
838
+ "weight": {
839
+ "type": "number"
840
+ },
841
+ "reason": {
842
+ "type": "string"
843
+ },
844
+ "matched": {
845
+ "type": "array",
846
+ "items": {
847
+ "type": "string"
848
+ }
849
+ },
850
+ "mismatched": {
851
+ "type": "array",
852
+ "items": {
853
+ "type": "string"
854
+ }
855
+ },
856
+ "red_flag": {
857
+ "type": "boolean"
858
+ }
859
+ },
860
+ "required": [
861
+ "rule_id",
862
+ "dimension",
863
+ "score",
864
+ "weight"
865
+ ],
866
+ "additionalProperties": false
867
+ }
868
+ },
869
+ "red_flags": {
870
+ "type": "array",
871
+ "items": {
872
+ "type": "string"
873
+ }
874
+ },
875
+ "blocked": {
876
+ "type": "boolean"
877
+ },
878
+ "trace": {
879
+ "type": "array",
880
+ "items": {
881
+ "type": "object",
882
+ "properties": {
883
+ "kind": {
884
+ "type": "string",
885
+ "enum": [
886
+ "data_source",
887
+ "rule",
888
+ "override"
889
+ ]
890
+ },
891
+ "id": {
892
+ "type": "string"
893
+ },
894
+ "detail": {
895
+ "type": "string"
896
+ }
897
+ },
898
+ "required": [
899
+ "kind",
900
+ "id",
901
+ "detail"
902
+ ],
903
+ "additionalProperties": false
904
+ }
905
+ },
906
+ "summary": {
907
+ "type": "string"
908
+ }
909
+ },
910
+ "required": [
911
+ "evaluation_id",
912
+ "total",
913
+ "level",
914
+ "breakdown",
915
+ "red_flags",
916
+ "blocked",
917
+ "trace",
918
+ "summary"
919
+ ],
920
+ "additionalProperties": false
921
+ }
922
+ },
923
+ "required": [
924
+ "demand",
925
+ "result"
926
+ ],
927
+ "additionalProperties": false
928
+ }
929
+ }
930
+ },
931
+ "required": [
932
+ "action",
933
+ "matches"
934
+ ],
935
+ "additionalProperties": false
936
+ },
937
+ {
938
+ "type": "object",
939
+ "properties": {
940
+ "action": {
941
+ "type": "string",
942
+ "const": "service_risk"
943
+ },
944
+ "result": {
945
+ "type": "object",
946
+ "properties": {
947
+ "evaluation_id": {
948
+ "type": "string"
949
+ },
950
+ "total": {
951
+ "type": "integer",
952
+ "minimum": 0,
953
+ "maximum": 100
954
+ },
955
+ "level": {
956
+ "type": "string",
957
+ "enum": [
958
+ "low",
959
+ "medium_low",
960
+ "medium_high",
961
+ "high"
962
+ ]
963
+ },
964
+ "breakdown": {
965
+ "type": "array",
966
+ "items": {
967
+ "type": "object",
968
+ "properties": {
969
+ "rule_id": {
970
+ "type": "string"
971
+ },
972
+ "dimension": {
973
+ "type": "string"
974
+ },
975
+ "score": {
976
+ "type": "number"
977
+ },
978
+ "weight": {
979
+ "type": "number"
980
+ },
981
+ "reason": {
982
+ "type": "string"
983
+ },
984
+ "matched": {
985
+ "type": "array",
986
+ "items": {
987
+ "type": "string"
988
+ }
989
+ },
990
+ "mismatched": {
991
+ "type": "array",
992
+ "items": {
993
+ "type": "string"
994
+ }
995
+ },
996
+ "red_flag": {
997
+ "type": "boolean"
998
+ }
999
+ },
1000
+ "required": [
1001
+ "rule_id",
1002
+ "dimension",
1003
+ "score",
1004
+ "weight"
1005
+ ],
1006
+ "additionalProperties": false
1007
+ }
1008
+ },
1009
+ "red_flags": {
1010
+ "type": "array",
1011
+ "items": {
1012
+ "type": "string"
1013
+ }
1014
+ },
1015
+ "blocked": {
1016
+ "type": "boolean"
1017
+ },
1018
+ "trace": {
1019
+ "type": "array",
1020
+ "items": {
1021
+ "type": "object",
1022
+ "properties": {
1023
+ "kind": {
1024
+ "type": "string",
1025
+ "enum": [
1026
+ "data_source",
1027
+ "rule",
1028
+ "override"
1029
+ ]
1030
+ },
1031
+ "id": {
1032
+ "type": "string"
1033
+ },
1034
+ "detail": {
1035
+ "type": "string"
1036
+ }
1037
+ },
1038
+ "required": [
1039
+ "kind",
1040
+ "id",
1041
+ "detail"
1042
+ ],
1043
+ "additionalProperties": false
1044
+ }
1045
+ },
1046
+ "summary": {
1047
+ "type": "string"
1048
+ }
1049
+ },
383
1050
  "required": [
384
- "action",
385
- "report"
1051
+ "evaluation_id",
1052
+ "total",
1053
+ "level",
1054
+ "breakdown",
1055
+ "red_flags",
1056
+ "blocked",
1057
+ "trace",
1058
+ "summary"
386
1059
  ],
387
1060
  "additionalProperties": false
1061
+ }
1062
+ },
1063
+ "required": [
1064
+ "action",
1065
+ "result"
1066
+ ],
1067
+ "additionalProperties": false
1068
+ },
1069
+ {
1070
+ "type": "object",
1071
+ "properties": {
1072
+ "action": {
1073
+ "type": "string",
1074
+ "const": "path_reasoning"
388
1075
  },
389
- {
1076
+ "current_node": {
1077
+ "type": "string"
1078
+ },
1079
+ "perspective": {
1080
+ "type": "string",
1081
+ "enum": [
1082
+ "merchant",
1083
+ "customer",
1084
+ "prospect",
1085
+ "supplier",
1086
+ "collaborator",
1087
+ "arbitrator"
1088
+ ]
1089
+ },
1090
+ "ranked_paths": {
1091
+ "type": "array",
1092
+ "items": {
1093
+ "type": "object",
1094
+ "properties": {
1095
+ "id": {
1096
+ "type": "string"
1097
+ },
1098
+ "nodes": {
1099
+ "type": "array",
1100
+ "items": {
1101
+ "type": "string"
1102
+ }
1103
+ },
1104
+ "forwards": {
1105
+ "type": "array",
1106
+ "items": {
1107
+ "type": "string"
1108
+ }
1109
+ },
1110
+ "terminal": {
1111
+ "type": "string",
1112
+ "enum": [
1113
+ "completed",
1114
+ "refunded",
1115
+ "open"
1116
+ ]
1117
+ },
1118
+ "guard_gates": {
1119
+ "type": "integer",
1120
+ "minimum": 0,
1121
+ "maximum": 9007199254740991
1122
+ },
1123
+ "length": {
1124
+ "type": "integer",
1125
+ "minimum": 0,
1126
+ "maximum": 9007199254740991
1127
+ },
1128
+ "terminal_value": {
1129
+ "type": "integer",
1130
+ "minimum": 0,
1131
+ "maximum": 100
1132
+ },
1133
+ "gain_score": {
1134
+ "type": "integer",
1135
+ "minimum": 0,
1136
+ "maximum": 9007199254740991
1137
+ },
1138
+ "risk_score": {
1139
+ "type": "integer",
1140
+ "minimum": 0,
1141
+ "maximum": 9007199254740991
1142
+ },
1143
+ "score": {
1144
+ "type": "integer",
1145
+ "minimum": 0,
1146
+ "maximum": 100
1147
+ },
1148
+ "rationale": {
1149
+ "type": "string"
1150
+ }
1151
+ },
1152
+ "required": [
1153
+ "id",
1154
+ "nodes",
1155
+ "forwards",
1156
+ "terminal",
1157
+ "guard_gates",
1158
+ "length",
1159
+ "terminal_value",
1160
+ "gain_score",
1161
+ "risk_score",
1162
+ "score",
1163
+ "rationale"
1164
+ ],
1165
+ "additionalProperties": false
1166
+ }
1167
+ },
1168
+ "optimal_path": {
390
1169
  "type": "object",
391
1170
  "properties": {
392
- "action": {
1171
+ "id": {
1172
+ "type": "string"
1173
+ },
1174
+ "nodes": {
1175
+ "type": "array",
1176
+ "items": {
1177
+ "type": "string"
1178
+ }
1179
+ },
1180
+ "forwards": {
1181
+ "type": "array",
1182
+ "items": {
1183
+ "type": "string"
1184
+ }
1185
+ },
1186
+ "terminal": {
1187
+ "type": "string",
1188
+ "enum": [
1189
+ "completed",
1190
+ "refunded",
1191
+ "open"
1192
+ ]
1193
+ },
1194
+ "guard_gates": {
1195
+ "type": "integer",
1196
+ "minimum": 0,
1197
+ "maximum": 9007199254740991
1198
+ },
1199
+ "length": {
1200
+ "type": "integer",
1201
+ "minimum": 0,
1202
+ "maximum": 9007199254740991
1203
+ },
1204
+ "terminal_value": {
1205
+ "type": "integer",
1206
+ "minimum": 0,
1207
+ "maximum": 100
1208
+ },
1209
+ "gain_score": {
1210
+ "type": "integer",
1211
+ "minimum": 0,
1212
+ "maximum": 9007199254740991
1213
+ },
1214
+ "risk_score": {
1215
+ "type": "integer",
1216
+ "minimum": 0,
1217
+ "maximum": 9007199254740991
1218
+ },
1219
+ "score": {
1220
+ "type": "integer",
1221
+ "minimum": 0,
1222
+ "maximum": 100
1223
+ },
1224
+ "rationale": {
1225
+ "type": "string"
1226
+ }
1227
+ },
1228
+ "required": [
1229
+ "id",
1230
+ "nodes",
1231
+ "forwards",
1232
+ "terminal",
1233
+ "guard_gates",
1234
+ "length",
1235
+ "terminal_value",
1236
+ "gain_score",
1237
+ "risk_score",
1238
+ "score",
1239
+ "rationale"
1240
+ ],
1241
+ "additionalProperties": false
1242
+ },
1243
+ "foregone_terminals": {
1244
+ "type": "array",
1245
+ "items": {
1246
+ "type": "string"
1247
+ }
1248
+ },
1249
+ "summary": {
1250
+ "type": "string"
1251
+ }
1252
+ },
1253
+ "required": [
1254
+ "action",
1255
+ "current_node",
1256
+ "perspective",
1257
+ "ranked_paths",
1258
+ "foregone_terminals",
1259
+ "summary"
1260
+ ],
1261
+ "additionalProperties": false
1262
+ },
1263
+ {
1264
+ "type": "object",
1265
+ "properties": {
1266
+ "action": {
1267
+ "type": "string",
1268
+ "const": "evidence_review"
1269
+ },
1270
+ "review": {
1271
+ "type": "object",
1272
+ "properties": {
1273
+ "status": {
393
1274
  "type": "string",
394
- "const": "compose_service"
1275
+ "enum": [
1276
+ "auto_pass",
1277
+ "auto_reject",
1278
+ "manual_review"
1279
+ ],
1280
+ "description": "Review gate verdict."
395
1281
  },
396
- "plan": {
1282
+ "reason": {
1283
+ "type": "string",
1284
+ "description": "Deterministic reason for the verdict."
1285
+ }
1286
+ },
1287
+ "required": [
1288
+ "status",
1289
+ "reason"
1290
+ ],
1291
+ "additionalProperties": false
1292
+ }
1293
+ },
1294
+ "required": [
1295
+ "action",
1296
+ "review"
1297
+ ],
1298
+ "additionalProperties": false
1299
+ },
1300
+ {
1301
+ "type": "object",
1302
+ "properties": {
1303
+ "action": {
1304
+ "type": "string",
1305
+ "const": "discover_services"
1306
+ },
1307
+ "sensitivity": {
1308
+ "type": "string",
1309
+ "enum": [
1310
+ "strict",
1311
+ "near",
1312
+ "logistics"
1313
+ ],
1314
+ "description": "Sensitivity in effect (explicit or inferred)."
1315
+ },
1316
+ "inference_signals": {
1317
+ "type": "array",
1318
+ "items": {
1319
+ "type": "string"
1320
+ },
1321
+ "description": "Keyword signals that drove sensitivity inference (empty when explicit)."
1322
+ },
1323
+ "services": {
1324
+ "type": "array",
1325
+ "items": {
1326
+ "type": "object",
1327
+ "properties": {
1328
+ "object": {
1329
+ "type": "string",
1330
+ "description": "Service object address."
1331
+ },
1332
+ "name": {
1333
+ "type": "string"
1334
+ },
1335
+ "location": {
1336
+ "description": "Service.location raw string; absent = merchant location hygiene issue.",
1337
+ "type": "string"
1338
+ },
1339
+ "relation": {
1340
+ "type": "string",
1341
+ "enum": [
1342
+ "exact",
1343
+ "contains",
1344
+ "overlap",
1345
+ "compatible",
1346
+ "mismatch"
1347
+ ]
1348
+ },
1349
+ "satisfied": {
1350
+ "type": "boolean",
1351
+ "description": "Passed the location gate under the sensitivity."
1352
+ },
1353
+ "score": {
1354
+ "type": "number",
1355
+ "minimum": 0,
1356
+ "maximum": 1
1357
+ },
1358
+ "reason": {
1359
+ "type": "string"
1360
+ }
1361
+ },
1362
+ "required": [
1363
+ "object",
1364
+ "relation",
1365
+ "satisfied",
1366
+ "score",
1367
+ "reason"
1368
+ ],
1369
+ "additionalProperties": false
1370
+ },
1371
+ "description": "Services ranked by location fit (satisfied first, score desc)."
1372
+ },
1373
+ "total_enumerated": {
1374
+ "type": "integer",
1375
+ "minimum": 0,
1376
+ "maximum": 9007199254740991,
1377
+ "description": "Shared Services enumerated on-chain before filtering."
1378
+ },
1379
+ "has_more": {
1380
+ "type": "boolean",
1381
+ "description": "True = enumeration truncated at max_objects (partial universe)."
1382
+ },
1383
+ "scope_advice": {
1384
+ "type": "object",
1385
+ "properties": {
1386
+ "search_terms": {
1387
+ "type": "array",
1388
+ "items": {
1389
+ "type": "string"
1390
+ },
1391
+ "description": "Terms to widen enumeration with (location_any)."
1392
+ },
1393
+ "ai_enrichment_note": {
1394
+ "type": "string",
1395
+ "description": "How the AI should expand scope (public web data, consent-gated)."
1396
+ }
1397
+ },
1398
+ "required": [
1399
+ "search_terms",
1400
+ "ai_enrichment_note"
1401
+ ],
1402
+ "additionalProperties": false
1403
+ }
1404
+ },
1405
+ "required": [
1406
+ "action",
1407
+ "sensitivity",
1408
+ "inference_signals",
1409
+ "services",
1410
+ "total_enumerated",
1411
+ "has_more",
1412
+ "scope_advice"
1413
+ ],
1414
+ "additionalProperties": false
1415
+ },
1416
+ {
1417
+ "type": "object",
1418
+ "properties": {
1419
+ "action": {
1420
+ "type": "string",
1421
+ "const": "discover_demands"
1422
+ },
1423
+ "demands": {
1424
+ "type": "array",
1425
+ "items": {
1426
+ "type": "object",
1427
+ "properties": {
1428
+ "object": {
1429
+ "type": "string",
1430
+ "description": "Demand object address."
1431
+ },
1432
+ "description": {
1433
+ "type": "string",
1434
+ "description": "Demand description."
1435
+ },
1436
+ "location": {
1437
+ "type": "string",
1438
+ "description": "Demand location."
1439
+ },
1440
+ "presenters_count": {
1441
+ "type": "number",
1442
+ "description": "Number of merchants who already presented to this demand."
1443
+ },
1444
+ "permission": {
1445
+ "type": "string",
1446
+ "description": "Demand owner permission object."
1447
+ }
1448
+ },
1449
+ "required": [
1450
+ "object",
1451
+ "description",
1452
+ "location",
1453
+ "presenters_count",
1454
+ "permission"
1455
+ ],
1456
+ "additionalProperties": false
1457
+ },
1458
+ "description": "Shared Demands enumerated on-chain (client-side location filtered)."
1459
+ },
1460
+ "total_enumerated": {
1461
+ "type": "integer",
1462
+ "minimum": 0,
1463
+ "maximum": 9007199254740991,
1464
+ "description": "Shared Demands enumerated on-chain before filtering."
1465
+ },
1466
+ "has_more": {
1467
+ "type": "boolean",
1468
+ "description": "True = enumeration truncated at max_objects (partial universe)."
1469
+ }
1470
+ },
1471
+ "required": [
1472
+ "action",
1473
+ "demands",
1474
+ "total_enumerated",
1475
+ "has_more"
1476
+ ],
1477
+ "additionalProperties": false
1478
+ },
1479
+ {
1480
+ "type": "object",
1481
+ "properties": {
1482
+ "action": {
1483
+ "type": "string",
1484
+ "const": "market_operations"
1485
+ },
1486
+ "result": {
1487
+ "anyOf": [
1488
+ {
397
1489
  "type": "object",
398
1490
  "properties": {
399
- "demand": {
1491
+ "due_diligence": {
1492
+ "type": "integer",
1493
+ "minimum": 0,
1494
+ "maximum": 9007199254740991
1495
+ },
1496
+ "orders": {
1497
+ "type": "integer",
1498
+ "minimum": 0,
1499
+ "maximum": 9007199254740991
1500
+ },
1501
+ "completed": {
1502
+ "type": "integer",
1503
+ "minimum": 0,
1504
+ "maximum": 9007199254740991
1505
+ },
1506
+ "reviews": {
1507
+ "type": "integer",
1508
+ "minimum": 0,
1509
+ "maximum": 9007199254740991
1510
+ },
1511
+ "dd_to_order_rate": {
1512
+ "type": "number"
1513
+ },
1514
+ "order_completion_rate": {
1515
+ "type": "number"
1516
+ },
1517
+ "completion_to_review_rate": {
1518
+ "type": "number"
1519
+ }
1520
+ },
1521
+ "required": [
1522
+ "due_diligence",
1523
+ "orders",
1524
+ "completed",
1525
+ "reviews",
1526
+ "dd_to_order_rate",
1527
+ "order_completion_rate",
1528
+ "completion_to_review_rate"
1529
+ ],
1530
+ "additionalProperties": false
1531
+ },
1532
+ {
1533
+ "type": "object",
1534
+ "properties": {
1535
+ "referrals": {
1536
+ "type": "integer",
1537
+ "minimum": 0,
1538
+ "maximum": 9007199254740991
1539
+ },
1540
+ "closed_referrals": {
1541
+ "type": "integer",
1542
+ "minimum": 0,
1543
+ "maximum": 9007199254740991
1544
+ },
1545
+ "gmv": {
400
1546
  "type": "string"
401
1547
  },
402
- "services": {
1548
+ "by_referrer": {
403
1549
  "type": "array",
404
1550
  "items": {
405
1551
  "type": "object",
406
1552
  "properties": {
407
- "id": {
1553
+ "referrer": {
408
1554
  "type": "string"
409
1555
  },
410
- "covered": {
411
- "type": "array",
412
- "items": {
413
- "type": "string"
414
- }
1556
+ "referrals": {
1557
+ "type": "integer",
1558
+ "minimum": 0,
1559
+ "maximum": 9007199254740991
1560
+ },
1561
+ "gmv": {
1562
+ "type": "string"
415
1563
  }
416
1564
  },
417
1565
  "required": [
418
- "id",
419
- "covered"
1566
+ "referrer",
1567
+ "referrals",
1568
+ "gmv"
420
1569
  ],
421
1570
  "additionalProperties": false
422
1571
  }
423
- },
424
- "coverage_score": {
425
- "type": "integer",
426
- "minimum": 0,
427
- "maximum": 100
428
- },
429
- "remaining_missing": {
430
- "type": "array",
431
- "items": {
1572
+ }
1573
+ },
1574
+ "required": [
1575
+ "referrals",
1576
+ "closed_referrals",
1577
+ "gmv",
1578
+ "by_referrer"
1579
+ ],
1580
+ "additionalProperties": false
1581
+ },
1582
+ {
1583
+ "type": "array",
1584
+ "items": {
1585
+ "type": "object",
1586
+ "properties": {
1587
+ "customer": {
432
1588
  "type": "string"
1589
+ },
1590
+ "order_count": {
1591
+ "type": "integer",
1592
+ "minimum": 0,
1593
+ "maximum": 9007199254740991
1594
+ },
1595
+ "last_order_time": {
1596
+ "anyOf": [
1597
+ {
1598
+ "type": "number"
1599
+ },
1600
+ {
1601
+ "type": "null"
1602
+ }
1603
+ ]
1604
+ },
1605
+ "dispute_count": {
1606
+ "type": "integer",
1607
+ "minimum": 0,
1608
+ "maximum": 9007199254740991
433
1609
  }
434
1610
  },
435
- "feasibility": {
1611
+ "required": [
1612
+ "customer",
1613
+ "order_count",
1614
+ "last_order_time",
1615
+ "dispute_count"
1616
+ ],
1617
+ "additionalProperties": false
1618
+ }
1619
+ },
1620
+ {
1621
+ "type": "object",
1622
+ "properties": {
1623
+ "action": {
436
1624
  "type": "string",
437
1625
  "enum": [
438
- "ready",
439
- "needs_supply_chain",
440
- "infeasible"
1626
+ "increase",
1627
+ "decrease",
1628
+ "maintain"
441
1629
  ]
442
1630
  },
443
- "summary": {
1631
+ "suggestedRange": {
1632
+ "type": "object",
1633
+ "properties": {
1634
+ "min": {
1635
+ "type": "string"
1636
+ },
1637
+ "max": {
1638
+ "type": "string"
1639
+ }
1640
+ },
1641
+ "required": [
1642
+ "min",
1643
+ "max"
1644
+ ],
1645
+ "additionalProperties": false
1646
+ },
1647
+ "reason": {
444
1648
  "type": "string"
1649
+ },
1650
+ "confidence": {
1651
+ "type": "number",
1652
+ "minimum": 0,
1653
+ "maximum": 1
1654
+ },
1655
+ "adjustmentPercent": {
1656
+ "type": "number"
445
1657
  }
446
1658
  },
447
1659
  "required": [
448
- "demand",
449
- "services",
450
- "coverage_score",
451
- "remaining_missing",
452
- "feasibility",
453
- "summary"
1660
+ "action",
1661
+ "reason",
1662
+ "confidence"
454
1663
  ],
455
1664
  "additionalProperties": false
456
1665
  }
1666
+ ]
1667
+ }
1668
+ },
1669
+ "required": [
1670
+ "action",
1671
+ "result"
1672
+ ],
1673
+ "additionalProperties": false
1674
+ },
1675
+ {
1676
+ "type": "object",
1677
+ "properties": {
1678
+ "action": {
1679
+ "type": "string",
1680
+ "const": "market_metrics"
1681
+ },
1682
+ "total_services": {
1683
+ "type": "integer",
1684
+ "minimum": 0,
1685
+ "maximum": 9007199254740991,
1686
+ "description": "All shared Service objects enumerated."
1687
+ },
1688
+ "active_services": {
1689
+ "type": "integer",
1690
+ "minimum": 0,
1691
+ "maximum": 9007199254740991,
1692
+ "description": "Published and not paused Service objects."
1693
+ },
1694
+ "total_demands": {
1695
+ "type": "integer",
1696
+ "minimum": 0,
1697
+ "maximum": 9007199254740991,
1698
+ "description": "All shared Demand objects enumerated."
1699
+ },
1700
+ "open_demands": {
1701
+ "type": "integer",
1702
+ "minimum": 0,
1703
+ "maximum": 9007199254740991,
1704
+ "description": "Demands with no presenter yet."
1705
+ },
1706
+ "total_arbs": {
1707
+ "type": "integer",
1708
+ "minimum": 0,
1709
+ "maximum": 9007199254740991,
1710
+ "description": "All Arb dispute cases enumerated."
1711
+ },
1712
+ "open_arbs": {
1713
+ "type": "integer",
1714
+ "minimum": 0,
1715
+ "maximum": 9007199254740991,
1716
+ "description": "Arb cases not yet Finished/Withdrawn."
1717
+ },
1718
+ "supply_demand_ratio": {
1719
+ "anyOf": [
1720
+ {
1721
+ "type": "number"
1722
+ },
1723
+ {
1724
+ "type": "null"
1725
+ }
1726
+ ],
1727
+ "description": "open_demands / active_services (null when no active supply)."
1728
+ },
1729
+ "computed_at": {
1730
+ "type": "number",
1731
+ "description": "Unix ms when computed."
1732
+ }
1733
+ },
1734
+ "required": [
1735
+ "action",
1736
+ "total_services",
1737
+ "active_services",
1738
+ "total_demands",
1739
+ "open_demands",
1740
+ "total_arbs",
1741
+ "open_arbs",
1742
+ "supply_demand_ratio",
1743
+ "computed_at"
1744
+ ],
1745
+ "additionalProperties": false
1746
+ },
1747
+ {
1748
+ "type": "object",
1749
+ "properties": {
1750
+ "action": {
1751
+ "type": "string",
1752
+ "const": "anti_cheat"
1753
+ },
1754
+ "signals": {
1755
+ "type": "array",
1756
+ "items": {
1757
+ "type": "object",
1758
+ "properties": {
1759
+ "kind": {
1760
+ "type": "string",
1761
+ "enum": [
1762
+ "fake_order",
1763
+ "fake_review",
1764
+ "shell_merchant",
1765
+ "reputation_trade"
1766
+ ]
1767
+ },
1768
+ "severity": {
1769
+ "type": "string",
1770
+ "enum": [
1771
+ "high",
1772
+ "medium",
1773
+ "low"
1774
+ ]
1775
+ },
1776
+ "description": {
1777
+ "type": "string"
1778
+ }
1779
+ },
1780
+ "required": [
1781
+ "kind",
1782
+ "severity",
1783
+ "description"
1784
+ ],
1785
+ "additionalProperties": false
457
1786
  },
458
- "required": [
459
- "action",
460
- "plan"
1787
+ "description": "Detected anti-cheat signals (pluggable negative factors)."
1788
+ }
1789
+ },
1790
+ "required": [
1791
+ "action",
1792
+ "signals"
1793
+ ],
1794
+ "additionalProperties": false
1795
+ },
1796
+ {
1797
+ "type": "object",
1798
+ "properties": {
1799
+ "action": {
1800
+ "type": "string",
1801
+ "const": "match_discover"
1802
+ },
1803
+ "sensitivity": {
1804
+ "type": "string",
1805
+ "enum": [
1806
+ "strict",
1807
+ "near",
1808
+ "logistics"
461
1809
  ],
462
- "additionalProperties": false
1810
+ "description": "Sensitivity in effect (explicit or inferred)."
463
1811
  },
464
- {
465
- "type": "object",
466
- "properties": {
467
- "action": {
468
- "type": "string",
469
- "const": "demand_match"
470
- },
471
- "matches": {
472
- "type": "array",
473
- "items": {
1812
+ "inference_signals": {
1813
+ "type": "array",
1814
+ "items": {
1815
+ "type": "string"
1816
+ },
1817
+ "description": "Keyword signals that drove sensitivity inference (empty when explicit)."
1818
+ },
1819
+ "matches": {
1820
+ "type": "array",
1821
+ "items": {
1822
+ "type": "object",
1823
+ "properties": {
1824
+ "service": {
474
1825
  "type": "object",
475
1826
  "properties": {
476
- "service": {
477
- "type": "object",
478
- "properties": {
479
- "object": {
480
- "type": "string",
481
- "description": "Service object address."
482
- },
483
- "description": {
484
- "type": "string"
485
- },
486
- "location": {
487
- "type": "string"
488
- },
489
- "sales": {
490
- "type": "array",
491
- "items": {
492
- "type": "object",
493
- "properties": {
494
- "name": {
495
- "type": "string"
496
- },
497
- "price": {
498
- "type": "string",
499
- "description": "Smallest-unit amount (string)."
500
- },
501
- "wip_hash": {
502
- "type": "string"
503
- }
504
- },
505
- "required": [
506
- "price"
507
- ],
508
- "additionalProperties": false
509
- }
510
- },
511
- "arbitrations": {
512
- "type": "array",
513
- "items": {
1827
+ "object": {
1828
+ "type": "string",
1829
+ "description": "Service object address."
1830
+ },
1831
+ "description": {
1832
+ "type": "string"
1833
+ },
1834
+ "location": {
1835
+ "type": "string"
1836
+ },
1837
+ "sales": {
1838
+ "type": "array",
1839
+ "items": {
1840
+ "type": "object",
1841
+ "properties": {
1842
+ "name": {
1843
+ "type": "string"
1844
+ },
1845
+ "price": {
1846
+ "type": "string",
1847
+ "description": "Smallest-unit amount (string)."
1848
+ },
1849
+ "wip_hash": {
514
1850
  "type": "string"
515
1851
  }
516
1852
  },
517
- "compensation_fund": {
518
- "type": "string",
519
- "description": "Smallest-unit amount (string)."
520
- },
521
- "buy_guard": {
522
- "type": [
523
- "string",
524
- "null"
525
- ]
526
- },
527
- "machine": {
528
- "type": [
529
- "string",
530
- "null"
531
- ]
532
- },
533
- "um": {
534
- "type": [
535
- "string",
536
- "null"
537
- ]
538
- },
539
- "bPublished": {
540
- "type": "boolean"
541
- },
542
- "bPaused": {
543
- "type": "boolean"
544
- },
545
- "owner": {
1853
+ "required": [
1854
+ "price"
1855
+ ],
1856
+ "additionalProperties": false
1857
+ }
1858
+ },
1859
+ "arbitrations": {
1860
+ "type": "array",
1861
+ "items": {
1862
+ "type": "string"
1863
+ }
1864
+ },
1865
+ "compensation_fund": {
1866
+ "description": "Smallest-unit amount (string).",
1867
+ "type": "string"
1868
+ },
1869
+ "buy_guard": {
1870
+ "anyOf": [
1871
+ {
546
1872
  "type": "string"
1873
+ },
1874
+ {
1875
+ "type": "null"
547
1876
  }
548
- },
549
- "required": [
550
- "object",
551
- "description",
552
- "location"
553
- ],
554
- "additionalProperties": false
1877
+ ]
555
1878
  },
556
- "result": {
557
- "type": "object",
558
- "properties": {
559
- "evaluation_id": {
1879
+ "machine": {
1880
+ "anyOf": [
1881
+ {
560
1882
  "type": "string"
561
1883
  },
562
- "total": {
563
- "type": "integer",
564
- "minimum": 0,
565
- "maximum": 100
566
- },
567
- "level": {
568
- "type": "string",
569
- "enum": [
570
- "low",
571
- "medium_low",
572
- "medium_high",
573
- "high"
574
- ]
575
- },
576
- "breakdown": {
577
- "type": "array",
578
- "items": {
579
- "type": "object",
580
- "properties": {
581
- "rule_id": {
582
- "type": "string"
583
- },
584
- "dimension": {
585
- "type": "string"
586
- },
587
- "score": {
588
- "type": "number"
589
- },
590
- "weight": {
591
- "type": "number"
592
- },
593
- "reason": {
594
- "type": "string"
595
- },
596
- "matched": {
597
- "type": "array",
598
- "items": {
599
- "type": "string"
600
- }
601
- },
602
- "mismatched": {
603
- "type": "array",
604
- "items": {
605
- "type": "string"
606
- }
607
- },
608
- "red_flag": {
609
- "type": "boolean"
610
- }
611
- },
612
- "required": [
613
- "rule_id",
614
- "dimension",
615
- "score",
616
- "weight"
617
- ],
618
- "additionalProperties": false
619
- }
1884
+ {
1885
+ "type": "null"
1886
+ }
1887
+ ]
1888
+ },
1889
+ "um": {
1890
+ "anyOf": [
1891
+ {
1892
+ "type": "string"
620
1893
  },
621
- "red_flags": {
622
- "type": "array",
623
- "items": {
1894
+ {
1895
+ "type": "null"
1896
+ }
1897
+ ]
1898
+ },
1899
+ "bPublished": {
1900
+ "type": "boolean"
1901
+ },
1902
+ "bPaused": {
1903
+ "type": "boolean"
1904
+ },
1905
+ "owner": {
1906
+ "type": "string"
1907
+ }
1908
+ },
1909
+ "required": [
1910
+ "object",
1911
+ "description",
1912
+ "location"
1913
+ ],
1914
+ "additionalProperties": false
1915
+ },
1916
+ "location": {
1917
+ "type": "object",
1918
+ "properties": {
1919
+ "relation": {
1920
+ "type": "string",
1921
+ "enum": [
1922
+ "exact",
1923
+ "contains",
1924
+ "overlap",
1925
+ "compatible",
1926
+ "mismatch"
1927
+ ]
1928
+ },
1929
+ "satisfied": {
1930
+ "type": "boolean",
1931
+ "description": "Passed the location gate under the sensitivity."
1932
+ },
1933
+ "score": {
1934
+ "type": "number",
1935
+ "minimum": 0,
1936
+ "maximum": 1
1937
+ },
1938
+ "reason": {
1939
+ "type": "string"
1940
+ }
1941
+ },
1942
+ "required": [
1943
+ "relation",
1944
+ "satisfied",
1945
+ "score",
1946
+ "reason"
1947
+ ],
1948
+ "additionalProperties": false
1949
+ },
1950
+ "result": {
1951
+ "type": "object",
1952
+ "properties": {
1953
+ "evaluation_id": {
1954
+ "type": "string"
1955
+ },
1956
+ "total": {
1957
+ "type": "integer",
1958
+ "minimum": 0,
1959
+ "maximum": 100
1960
+ },
1961
+ "level": {
1962
+ "type": "string",
1963
+ "enum": [
1964
+ "low",
1965
+ "medium_low",
1966
+ "medium_high",
1967
+ "high"
1968
+ ]
1969
+ },
1970
+ "breakdown": {
1971
+ "type": "array",
1972
+ "items": {
1973
+ "type": "object",
1974
+ "properties": {
1975
+ "rule_id": {
1976
+ "type": "string"
1977
+ },
1978
+ "dimension": {
624
1979
  "type": "string"
1980
+ },
1981
+ "score": {
1982
+ "type": "number"
1983
+ },
1984
+ "weight": {
1985
+ "type": "number"
1986
+ },
1987
+ "reason": {
1988
+ "type": "string"
1989
+ },
1990
+ "matched": {
1991
+ "type": "array",
1992
+ "items": {
1993
+ "type": "string"
1994
+ }
1995
+ },
1996
+ "mismatched": {
1997
+ "type": "array",
1998
+ "items": {
1999
+ "type": "string"
2000
+ }
2001
+ },
2002
+ "red_flag": {
2003
+ "type": "boolean"
625
2004
  }
626
2005
  },
627
- "blocked": {
628
- "type": "boolean"
629
- },
630
- "trace": {
631
- "type": "array",
632
- "items": {
633
- "type": "object",
634
- "properties": {
635
- "kind": {
636
- "type": "string",
637
- "enum": [
638
- "data_source",
639
- "rule",
640
- "override"
641
- ]
642
- },
643
- "id": {
644
- "type": "string"
645
- },
646
- "detail": {
647
- "type": "string"
648
- }
649
- },
650
- "required": [
651
- "kind",
652
- "id",
653
- "detail"
654
- ],
655
- "additionalProperties": false
2006
+ "required": [
2007
+ "rule_id",
2008
+ "dimension",
2009
+ "score",
2010
+ "weight"
2011
+ ],
2012
+ "additionalProperties": false
2013
+ }
2014
+ },
2015
+ "red_flags": {
2016
+ "type": "array",
2017
+ "items": {
2018
+ "type": "string"
2019
+ }
2020
+ },
2021
+ "blocked": {
2022
+ "type": "boolean"
2023
+ },
2024
+ "trace": {
2025
+ "type": "array",
2026
+ "items": {
2027
+ "type": "object",
2028
+ "properties": {
2029
+ "kind": {
2030
+ "type": "string",
2031
+ "enum": [
2032
+ "data_source",
2033
+ "rule",
2034
+ "override"
2035
+ ]
2036
+ },
2037
+ "id": {
2038
+ "type": "string"
2039
+ },
2040
+ "detail": {
2041
+ "type": "string"
656
2042
  }
657
2043
  },
658
- "summary": {
659
- "type": "string"
660
- }
661
- },
662
- "required": [
663
- "evaluation_id",
664
- "total",
665
- "level",
666
- "breakdown",
667
- "red_flags",
668
- "blocked",
669
- "trace",
670
- "summary"
671
- ],
672
- "additionalProperties": false
2044
+ "required": [
2045
+ "kind",
2046
+ "id",
2047
+ "detail"
2048
+ ],
2049
+ "additionalProperties": false
2050
+ }
2051
+ },
2052
+ "summary": {
2053
+ "type": "string"
673
2054
  }
674
2055
  },
675
2056
  "required": [
676
- "service",
677
- "result"
2057
+ "evaluation_id",
2058
+ "total",
2059
+ "level",
2060
+ "breakdown",
2061
+ "red_flags",
2062
+ "blocked",
2063
+ "trace",
2064
+ "summary"
678
2065
  ],
679
2066
  "additionalProperties": false
680
2067
  }
2068
+ },
2069
+ "required": [
2070
+ "service",
2071
+ "location",
2072
+ "result"
2073
+ ],
2074
+ "additionalProperties": false
2075
+ },
2076
+ "description": "Location-gated services with their 6-dimension match result (scored only when the location gate passed)."
2077
+ },
2078
+ "total_enumerated": {
2079
+ "type": "integer",
2080
+ "minimum": 0,
2081
+ "maximum": 9007199254740991,
2082
+ "description": "Shared Services enumerated on-chain before filtering."
2083
+ },
2084
+ "has_more": {
2085
+ "type": "boolean",
2086
+ "description": "True = enumeration truncated at max_objects (partial universe)."
2087
+ },
2088
+ "scope_advice": {
2089
+ "type": "object",
2090
+ "properties": {
2091
+ "search_terms": {
2092
+ "type": "array",
2093
+ "items": {
2094
+ "type": "string"
2095
+ }
2096
+ },
2097
+ "ai_enrichment_note": {
2098
+ "type": "string"
681
2099
  }
682
2100
  },
683
2101
  "required": [
684
- "action",
685
- "matches"
2102
+ "search_terms",
2103
+ "ai_enrichment_note"
686
2104
  ],
687
2105
  "additionalProperties": false
2106
+ }
2107
+ },
2108
+ "required": [
2109
+ "action",
2110
+ "sensitivity",
2111
+ "inference_signals",
2112
+ "matches",
2113
+ "total_enumerated",
2114
+ "has_more",
2115
+ "scope_advice"
2116
+ ],
2117
+ "additionalProperties": false
2118
+ },
2119
+ {
2120
+ "type": "object",
2121
+ "properties": {
2122
+ "action": {
2123
+ "type": "string",
2124
+ "const": "arbitration_score"
688
2125
  },
689
- {
2126
+ "trust": {
690
2127
  "type": "object",
691
2128
  "properties": {
692
- "action": {
2129
+ "evaluation_id": {
2130
+ "type": "string"
2131
+ },
2132
+ "total": {
2133
+ "type": "integer",
2134
+ "minimum": 0,
2135
+ "maximum": 100
2136
+ },
2137
+ "level": {
693
2138
  "type": "string",
694
- "const": "service_match"
2139
+ "enum": [
2140
+ "low",
2141
+ "medium_low",
2142
+ "medium_high",
2143
+ "high"
2144
+ ]
695
2145
  },
696
- "matches": {
2146
+ "breakdown": {
697
2147
  "type": "array",
698
2148
  "items": {
699
2149
  "type": "object",
700
2150
  "properties": {
701
- "demand": {
702
- "type": "object",
703
- "properties": {
704
- "object": {
705
- "type": "string",
706
- "description": "Demand object address."
707
- },
708
- "description": {
709
- "type": "string"
710
- },
711
- "location": {
712
- "type": "string"
713
- },
714
- "rewards": {
715
- "type": "array",
716
- "items": {
717
- "type": "string"
718
- }
719
- },
720
- "um": {
721
- "type": [
722
- "string",
723
- "null"
724
- ]
725
- },
726
- "owner": {
727
- "type": "string"
728
- }
729
- },
730
- "required": [
731
- "object",
732
- "description",
733
- "location"
734
- ],
735
- "additionalProperties": false
2151
+ "rule_id": {
2152
+ "type": "string"
2153
+ },
2154
+ "dimension": {
2155
+ "type": "string"
2156
+ },
2157
+ "score": {
2158
+ "type": "number"
2159
+ },
2160
+ "weight": {
2161
+ "type": "number"
2162
+ },
2163
+ "reason": {
2164
+ "type": "string"
2165
+ },
2166
+ "matched": {
2167
+ "type": "array",
2168
+ "items": {
2169
+ "type": "string"
2170
+ }
2171
+ },
2172
+ "mismatched": {
2173
+ "type": "array",
2174
+ "items": {
2175
+ "type": "string"
2176
+ }
2177
+ },
2178
+ "red_flag": {
2179
+ "type": "boolean"
2180
+ }
2181
+ },
2182
+ "required": [
2183
+ "rule_id",
2184
+ "dimension",
2185
+ "score",
2186
+ "weight"
2187
+ ],
2188
+ "additionalProperties": false
2189
+ }
2190
+ },
2191
+ "red_flags": {
2192
+ "type": "array",
2193
+ "items": {
2194
+ "type": "string"
2195
+ }
2196
+ },
2197
+ "blocked": {
2198
+ "type": "boolean"
2199
+ },
2200
+ "trace": {
2201
+ "type": "array",
2202
+ "items": {
2203
+ "type": "object",
2204
+ "properties": {
2205
+ "kind": {
2206
+ "type": "string",
2207
+ "enum": [
2208
+ "data_source",
2209
+ "rule",
2210
+ "override"
2211
+ ]
2212
+ },
2213
+ "id": {
2214
+ "type": "string"
736
2215
  },
737
- "result": {
738
- "$ref": "#/definitions/evaluation_operation/properties/result/anyOf/4/properties/matches/items/properties/result"
2216
+ "detail": {
2217
+ "type": "string"
739
2218
  }
740
2219
  },
741
2220
  "required": [
742
- "demand",
743
- "result"
2221
+ "kind",
2222
+ "id",
2223
+ "detail"
744
2224
  ],
745
2225
  "additionalProperties": false
746
2226
  }
2227
+ },
2228
+ "summary": {
2229
+ "type": "string"
747
2230
  }
748
2231
  },
749
2232
  "required": [
750
- "action",
751
- "matches"
2233
+ "evaluation_id",
2234
+ "total",
2235
+ "level",
2236
+ "breakdown",
2237
+ "red_flags",
2238
+ "blocked",
2239
+ "trace",
2240
+ "summary"
752
2241
  ],
753
2242
  "additionalProperties": false
754
2243
  },
755
- {
2244
+ "fairness": {
756
2245
  "type": "object",
757
2246
  "properties": {
758
- "action": {
2247
+ "evaluation_id": {
2248
+ "type": "string"
2249
+ },
2250
+ "total": {
2251
+ "type": "integer",
2252
+ "minimum": 0,
2253
+ "maximum": 100
2254
+ },
2255
+ "level": {
759
2256
  "type": "string",
760
- "const": "service_risk"
2257
+ "enum": [
2258
+ "low",
2259
+ "medium_low",
2260
+ "medium_high",
2261
+ "high"
2262
+ ]
2263
+ },
2264
+ "breakdown": {
2265
+ "type": "array",
2266
+ "items": {
2267
+ "type": "object",
2268
+ "properties": {
2269
+ "rule_id": {
2270
+ "type": "string"
2271
+ },
2272
+ "dimension": {
2273
+ "type": "string"
2274
+ },
2275
+ "score": {
2276
+ "type": "number"
2277
+ },
2278
+ "weight": {
2279
+ "type": "number"
2280
+ },
2281
+ "reason": {
2282
+ "type": "string"
2283
+ },
2284
+ "matched": {
2285
+ "type": "array",
2286
+ "items": {
2287
+ "type": "string"
2288
+ }
2289
+ },
2290
+ "mismatched": {
2291
+ "type": "array",
2292
+ "items": {
2293
+ "type": "string"
2294
+ }
2295
+ },
2296
+ "red_flag": {
2297
+ "type": "boolean"
2298
+ }
2299
+ },
2300
+ "required": [
2301
+ "rule_id",
2302
+ "dimension",
2303
+ "score",
2304
+ "weight"
2305
+ ],
2306
+ "additionalProperties": false
2307
+ }
2308
+ },
2309
+ "red_flags": {
2310
+ "type": "array",
2311
+ "items": {
2312
+ "type": "string"
2313
+ }
2314
+ },
2315
+ "blocked": {
2316
+ "type": "boolean"
2317
+ },
2318
+ "trace": {
2319
+ "type": "array",
2320
+ "items": {
2321
+ "type": "object",
2322
+ "properties": {
2323
+ "kind": {
2324
+ "type": "string",
2325
+ "enum": [
2326
+ "data_source",
2327
+ "rule",
2328
+ "override"
2329
+ ]
2330
+ },
2331
+ "id": {
2332
+ "type": "string"
2333
+ },
2334
+ "detail": {
2335
+ "type": "string"
2336
+ }
2337
+ },
2338
+ "required": [
2339
+ "kind",
2340
+ "id",
2341
+ "detail"
2342
+ ],
2343
+ "additionalProperties": false
2344
+ }
761
2345
  },
762
- "result": {
763
- "$ref": "#/definitions/evaluation_operation/properties/result/anyOf/4/properties/matches/items/properties/result"
2346
+ "summary": {
2347
+ "type": "string"
764
2348
  }
765
2349
  },
766
2350
  "required": [
767
- "action",
768
- "result"
2351
+ "evaluation_id",
2352
+ "total",
2353
+ "level",
2354
+ "breakdown",
2355
+ "red_flags",
2356
+ "blocked",
2357
+ "trace",
2358
+ "summary"
769
2359
  ],
770
2360
  "additionalProperties": false
2361
+ },
2362
+ "combined": {
2363
+ "type": "integer",
2364
+ "minimum": 0,
2365
+ "maximum": 100
2366
+ },
2367
+ "summary": {
2368
+ "type": "string"
2369
+ }
2370
+ },
2371
+ "required": [
2372
+ "action",
2373
+ "trust",
2374
+ "fairness",
2375
+ "combined",
2376
+ "summary"
2377
+ ],
2378
+ "additionalProperties": false
2379
+ },
2380
+ {
2381
+ "type": "object",
2382
+ "properties": {
2383
+ "action": {
2384
+ "type": "string",
2385
+ "const": "account_events"
2386
+ },
2387
+ "events": {
2388
+ "type": "array",
2389
+ "items": {
2390
+ "type": "object",
2391
+ "properties": {
2392
+ "id": {
2393
+ "type": "string"
2394
+ },
2395
+ "category": {
2396
+ "type": "string"
2397
+ },
2398
+ "priority": {
2399
+ "type": "string",
2400
+ "enum": [
2401
+ "required",
2402
+ "recommended",
2403
+ "info",
2404
+ "reminder"
2405
+ ]
2406
+ },
2407
+ "title": {
2408
+ "type": "string"
2409
+ },
2410
+ "message": {
2411
+ "type": "string"
2412
+ },
2413
+ "action": {
2414
+ "type": "string"
2415
+ },
2416
+ "object_ref": {
2417
+ "type": "string"
2418
+ },
2419
+ "timestamp": {
2420
+ "type": "number"
2421
+ }
2422
+ },
2423
+ "required": [
2424
+ "id",
2425
+ "category",
2426
+ "priority",
2427
+ "title",
2428
+ "message",
2429
+ "timestamp"
2430
+ ],
2431
+ "additionalProperties": false
2432
+ }
771
2433
  }
2434
+ },
2435
+ "required": [
2436
+ "action",
2437
+ "events"
772
2438
  ],
773
- "description": "Evaluation result — shape depends on action"
2439
+ "additionalProperties": false
774
2440
  }
775
- },
776
- "required": [
777
- "result"
778
2441
  ],
779
- "additionalProperties": false
2442
+ "description": "Evaluation result — shape depends on action"
780
2443
  }
781
- }
2444
+ },
2445
+ "required": [
2446
+ "result"
2447
+ ],
2448
+ "additionalProperties": false
782
2449
  }