@wowok/agent-mcp 2.7.1 → 2.7.3

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 (597) hide show
  1. package/dist/config/index.js +1 -1
  2. package/dist/config/runtime.js +1 -238
  3. package/dist/customer/account-events.d.ts +32 -0
  4. package/dist/customer/account-events.js +1 -0
  5. package/dist/customer/customer-advice.d.ts +1 -0
  6. package/dist/customer/customer-advice.js +1 -130
  7. package/dist/customer/index.js +1 -11
  8. package/dist/customer/industry-risks.js +1 -438
  9. package/dist/customer/info-puzzle.js +1 -681
  10. package/dist/customer/order-monitor.js +1 -328
  11. package/dist/customer/order-strategy.d.ts +1 -1
  12. package/dist/customer/order-strategy.js +1 -373
  13. package/dist/customer/post-purchase.js +1 -351
  14. package/dist/customer/preorder-compare.js +1 -34
  15. package/dist/customer/reminder-system.d.ts +2 -0
  16. package/dist/customer/reminder-system.js +1 -316
  17. package/dist/customer/risk-assessment.d.ts +1 -0
  18. package/dist/customer/risk-assessment.js +1 -397
  19. package/dist/customer/types.d.ts +2 -0
  20. package/dist/customer/types.js +1 -13
  21. package/dist/customer/user-preferences.js +1 -460
  22. package/dist/evaluation/arbitration-game.d.ts +9 -2
  23. package/dist/evaluation/arbitration-game.js +1 -48
  24. package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
  25. package/dist/evaluation/builtins/arbitration-score.js +1 -0
  26. package/dist/evaluation/builtins/demand-match.js +1 -153
  27. package/dist/evaluation/builtins/index.d.ts +1 -0
  28. package/dist/evaluation/builtins/index.js +1 -10
  29. package/dist/evaluation/builtins/service-risk.js +1 -55
  30. package/dist/evaluation/capability.js +1 -13
  31. package/dist/evaluation/category-match-rules.d.ts +30 -0
  32. package/dist/evaluation/category-match-rules.js +1 -0
  33. package/dist/evaluation/composer.js +1 -40
  34. package/dist/evaluation/engine.js +1 -175
  35. package/dist/evaluation/extract.js +1 -115
  36. package/dist/evaluation/game-strategy.d.ts +27 -0
  37. package/dist/evaluation/game-strategy.js +1 -0
  38. package/dist/evaluation/gap.js +1 -100
  39. package/dist/evaluation/index.d.ts +2 -0
  40. package/dist/evaluation/index.js +1 -11
  41. package/dist/evaluation/location-match.d.ts +42 -0
  42. package/dist/evaluation/location-match.js +1 -0
  43. package/dist/evaluation/node-game.d.ts +31 -3
  44. package/dist/evaluation/node-game.js +1 -57
  45. package/dist/evaluation/path-reasoning.d.ts +35 -0
  46. package/dist/evaluation/path-reasoning.js +1 -0
  47. package/dist/evaluation/region.d.ts +6 -0
  48. package/dist/evaluation/region.js +1 -36
  49. package/dist/evaluation/types.d.ts +18 -0
  50. package/dist/evaluation/types.js +1 -1
  51. package/dist/evaluation/user-injection.js +1 -27
  52. package/dist/experience/experience-reuse.js +1 -103
  53. package/dist/experience/index.js +1 -5
  54. package/dist/experience/intent-distill.js +1 -83
  55. package/dist/experience/realtime-feedback.js +1 -94
  56. package/dist/experience/types.js +1 -1
  57. package/dist/experience/user-profile.d.ts +1 -1
  58. package/dist/experience/user-profile.js +1 -171
  59. package/dist/extensions/business-modules.js +1 -287
  60. package/dist/extensions/capability-manifest.js +1 -781
  61. package/dist/extensions/constraint-registry.js +1 -198
  62. package/dist/extensions/index.d.ts +6 -0
  63. package/dist/extensions/index.js +1 -6
  64. package/dist/extensions/industry-layers.d.ts +75 -0
  65. package/dist/extensions/industry-layers.js +1 -0
  66. package/dist/extensions/industry-pack.d.ts +105 -0
  67. package/dist/extensions/industry-pack.js +1 -0
  68. package/dist/extensions/metric-registry.js +1 -257
  69. package/dist/extensions/mode-evaluator.d.ts +1 -1
  70. package/dist/extensions/mode-evaluator.js +1 -170
  71. package/dist/extensions/modes.js +1 -499
  72. package/dist/extensions/registry.d.ts +1 -0
  73. package/dist/extensions/registry.js +1 -717
  74. package/dist/extensions/types.js +1 -1
  75. package/dist/graph/base.d.ts +8 -0
  76. package/dist/graph/base.js +1 -0
  77. package/dist/harness/auto-escalation.js +1 -68
  78. package/dist/harness/checkpoint.js +1 -129
  79. package/dist/harness/index.d.ts +1 -0
  80. package/dist/harness/index.js +1 -78
  81. package/dist/harness/plan.d.ts +2 -0
  82. package/dist/harness/plan.js +1 -315
  83. package/dist/harness/recover.d.ts +1 -1
  84. package/dist/harness/recover.js +1 -139
  85. package/dist/harness/types.d.ts +2 -3
  86. package/dist/harness/types.js +1 -1
  87. package/dist/harness/verify.js +1 -237
  88. package/dist/index.js +1 -273
  89. package/dist/intent/enrich.js +1 -67
  90. package/dist/intent/index.js +1 -60
  91. package/dist/intent/matcher.js +1 -81
  92. package/dist/intent/store.js +1 -55
  93. package/dist/intent/types.js +1 -10
  94. package/dist/knowledge/acquisition-flywheel.js +1 -192
  95. package/dist/knowledge/allocation-confirm.js +1 -534
  96. package/dist/knowledge/allocation-context.js +1 -249
  97. package/dist/knowledge/allocation-ledger.js +1 -463
  98. package/dist/knowledge/allocation-puzzle.js +1 -298
  99. package/dist/knowledge/allocation-risk.js +1 -568
  100. package/dist/knowledge/allocation-templates.js +1 -970
  101. package/dist/knowledge/allocation-translation.js +1 -585
  102. package/dist/knowledge/anti-cheat.d.ts +37 -0
  103. package/dist/knowledge/anti-cheat.js +1 -0
  104. package/dist/knowledge/arb-confirm.d.ts +28 -0
  105. package/dist/knowledge/arb-confirm.js +1 -0
  106. package/dist/knowledge/arb-risk.js +1 -210
  107. package/dist/knowledge/arb-translation.d.ts +48 -0
  108. package/dist/knowledge/arb-translation.js +1 -0
  109. package/dist/knowledge/arbitration-confirm.js +1 -559
  110. package/dist/knowledge/arbitration-context.js +1 -505
  111. package/dist/knowledge/arbitration-ledger.js +1 -521
  112. package/dist/knowledge/arbitration-puzzle.js +1 -304
  113. package/dist/knowledge/arbitration-risk.js +1 -423
  114. package/dist/knowledge/arbitration-templates.js +1 -276
  115. package/dist/knowledge/arbitration-translation.js +1 -487
  116. package/dist/knowledge/audit-rules.js +1 -141
  117. package/dist/knowledge/bridge-confirm.d.ts +26 -0
  118. package/dist/knowledge/bridge-confirm.js +1 -0
  119. package/dist/knowledge/bridge-risk.js +1 -263
  120. package/dist/knowledge/bridge-translation.d.ts +37 -0
  121. package/dist/knowledge/bridge-translation.js +1 -0
  122. package/dist/knowledge/contact-confirm.d.ts +27 -0
  123. package/dist/knowledge/contact-confirm.js +1 -0
  124. package/dist/knowledge/contact-risk.js +1 -200
  125. package/dist/knowledge/contact-templates.js +1 -60
  126. package/dist/knowledge/contact-translation.d.ts +39 -0
  127. package/dist/knowledge/contact-translation.js +1 -0
  128. package/dist/knowledge/demand-confirm.js +1 -206
  129. package/dist/knowledge/demand-context.d.ts +17 -0
  130. package/dist/knowledge/demand-context.js +1 -0
  131. package/dist/knowledge/demand-ledger.d.ts +26 -0
  132. package/dist/knowledge/demand-ledger.js +1 -0
  133. package/dist/knowledge/demand-matching.js +1 -132
  134. package/dist/knowledge/demand-puzzle.d.ts +29 -0
  135. package/dist/knowledge/demand-puzzle.js +1 -0
  136. package/dist/knowledge/demand-risk.js +1 -240
  137. package/dist/knowledge/demand-templates.d.ts +12 -0
  138. package/dist/knowledge/demand-templates.js +1 -0
  139. package/dist/knowledge/demand-translation.js +1 -354
  140. package/dist/knowledge/deployment-scanner.js +1 -823
  141. package/dist/knowledge/dynamic-pricing.js +1 -87
  142. package/dist/knowledge/evidence-review.d.ts +12 -0
  143. package/dist/knowledge/evidence-review.js +1 -0
  144. package/dist/knowledge/examples-scanner-cli.js +1 -26
  145. package/dist/knowledge/examples-scanner.js +1 -843
  146. package/dist/knowledge/flywheel-loop.d.ts +0 -1
  147. package/dist/knowledge/flywheel-loop.js +1 -404
  148. package/dist/knowledge/fund-layer.js +1 -973
  149. package/dist/knowledge/glossary.js +1 -211
  150. package/dist/knowledge/guard-confirm.js +1 -406
  151. package/dist/knowledge/guard-context.js +1 -287
  152. package/dist/knowledge/guard-design-patterns.js +1 -360
  153. package/dist/knowledge/guard-ledger.js +1 -260
  154. package/dist/knowledge/guard-lint.js +1 -670
  155. package/dist/knowledge/guard-migration.d.ts +1 -1
  156. package/dist/knowledge/guard-migration.js +1 -228
  157. package/dist/knowledge/guard-puzzle.js +1 -805
  158. package/dist/knowledge/guard-render.js +1 -700
  159. package/dist/knowledge/guard-risk.js +1 -1879
  160. package/dist/knowledge/guard-submission-prompt.js +1 -171
  161. package/dist/knowledge/guard-templates.js +1 -1105
  162. package/dist/knowledge/guard-translation.js +1 -1119
  163. package/dist/knowledge/index.d.ts +71 -3
  164. package/dist/knowledge/index.js +1 -436
  165. package/dist/knowledge/industry-evolution.js +1 -323
  166. package/dist/knowledge/industry-generalizer.js +1 -381
  167. package/dist/knowledge/industry-registry.js +1 -174
  168. package/dist/knowledge/intent-metrics.d.ts +4 -3
  169. package/dist/knowledge/intent-metrics.js +1 -566
  170. package/dist/knowledge/machine-confirm.js +1 -559
  171. package/dist/knowledge/machine-context.js +1 -833
  172. package/dist/knowledge/machine-ledger.js +1 -338
  173. package/dist/knowledge/machine-puzzle.js +1 -494
  174. package/dist/knowledge/machine-render.js +1 -565
  175. package/dist/knowledge/machine-risk.js +1 -669
  176. package/dist/knowledge/machine-templates.js +1 -1597
  177. package/dist/knowledge/machine-topology.js +1 -234
  178. package/dist/knowledge/machine-translation.js +1 -513
  179. package/dist/knowledge/market-metrics.d.ts +12 -0
  180. package/dist/knowledge/market-metrics.js +1 -0
  181. package/dist/knowledge/market-operations.d.ts +46 -0
  182. package/dist/knowledge/market-operations.js +1 -0
  183. package/dist/knowledge/mcp-schema-audit-cli.js +1 -45
  184. package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
  185. package/dist/knowledge/mcp-schema-audit.js +1 -777
  186. package/dist/knowledge/onchain-constants.js +1 -35
  187. package/dist/knowledge/order-confirm.js +1 -573
  188. package/dist/knowledge/order-context.js +1 -390
  189. package/dist/knowledge/order-ledger.js +1 -341
  190. package/dist/knowledge/order-puzzle.js +1 -255
  191. package/dist/knowledge/order-risk.js +1 -653
  192. package/dist/knowledge/order-templates.js +1 -368
  193. package/dist/knowledge/order-translation.js +1 -550
  194. package/dist/knowledge/overrides-loader.js +1 -65
  195. package/dist/knowledge/passport-confirm.js +1 -531
  196. package/dist/knowledge/passport-context.js +1 -306
  197. package/dist/knowledge/passport-ledger.js +1 -282
  198. package/dist/knowledge/passport-puzzle.js +1 -333
  199. package/dist/knowledge/passport-risk.js +1 -450
  200. package/dist/knowledge/passport-templates.js +1 -568
  201. package/dist/knowledge/passport-translation.js +1 -516
  202. package/dist/knowledge/payment-confirm.d.ts +26 -0
  203. package/dist/knowledge/payment-confirm.js +1 -0
  204. package/dist/knowledge/payment-risk.js +1 -249
  205. package/dist/knowledge/payment-translation.d.ts +37 -0
  206. package/dist/knowledge/payment-translation.js +1 -0
  207. package/dist/knowledge/permission-confirm.js +1 -426
  208. package/dist/knowledge/permission-context.js +1 -224
  209. package/dist/knowledge/permission-ledger.d.ts +11 -0
  210. package/dist/knowledge/permission-ledger.js +1 -403
  211. package/dist/knowledge/permission-puzzle.js +1 -173
  212. package/dist/knowledge/permission-risk.js +1 -411
  213. package/dist/knowledge/permission-templates.js +1 -234
  214. package/dist/knowledge/permission-translation.js +1 -350
  215. package/dist/knowledge/personal-confirm.d.ts +29 -0
  216. package/dist/knowledge/personal-confirm.js +1 -0
  217. package/dist/knowledge/personal-risk.js +1 -212
  218. package/dist/knowledge/personal-translation.d.ts +37 -0
  219. package/dist/knowledge/personal-translation.js +1 -0
  220. package/dist/knowledge/process-model.d.ts +1 -11
  221. package/dist/knowledge/process-model.js +1 -160
  222. package/dist/knowledge/progress-confirm.js +1 -456
  223. package/dist/knowledge/progress-context.js +1 -452
  224. package/dist/knowledge/progress-ledger.js +1 -330
  225. package/dist/knowledge/progress-puzzle.js +1 -219
  226. package/dist/knowledge/progress-risk.js +1 -461
  227. package/dist/knowledge/progress-templates.js +1 -228
  228. package/dist/knowledge/progress-translation.js +1 -405
  229. package/dist/knowledge/proof-confirm.js +1 -187
  230. package/dist/knowledge/proof-context.d.ts +17 -0
  231. package/dist/knowledge/proof-context.js +1 -0
  232. package/dist/knowledge/proof-ledger.d.ts +34 -0
  233. package/dist/knowledge/proof-ledger.js +1 -0
  234. package/dist/knowledge/proof-puzzle.d.ts +35 -0
  235. package/dist/knowledge/proof-puzzle.js +1 -0
  236. package/dist/knowledge/proof-risk.js +1 -207
  237. package/dist/knowledge/proof-templates.d.ts +22 -0
  238. package/dist/knowledge/proof-templates.js +1 -0
  239. package/dist/knowledge/proof-translation.js +1 -283
  240. package/dist/knowledge/registrar-confirm.d.ts +26 -0
  241. package/dist/knowledge/registrar-confirm.js +1 -0
  242. package/dist/knowledge/registrar-risk.js +1 -217
  243. package/dist/knowledge/registrar-translation.d.ts +37 -0
  244. package/dist/knowledge/registrar-translation.js +1 -0
  245. package/dist/knowledge/repository-confirm.js +1 -286
  246. package/dist/knowledge/repository-context.d.ts +12 -0
  247. package/dist/knowledge/repository-context.js +1 -0
  248. package/dist/knowledge/repository-ledger.d.ts +25 -0
  249. package/dist/knowledge/repository-ledger.js +1 -0
  250. package/dist/knowledge/repository-puzzle.d.ts +30 -0
  251. package/dist/knowledge/repository-puzzle.js +1 -0
  252. package/dist/knowledge/repository-risk.js +1 -373
  253. package/dist/knowledge/repository-templates.d.ts +14 -0
  254. package/dist/knowledge/repository-templates.js +1 -0
  255. package/dist/knowledge/repository-translation.js +1 -445
  256. package/dist/knowledge/reputation-rules.js +1 -99
  257. package/dist/knowledge/resource-confirm.d.ts +25 -0
  258. package/dist/knowledge/resource-confirm.js +1 -0
  259. package/dist/knowledge/resource-risk.js +1 -157
  260. package/dist/knowledge/resource-translation.d.ts +37 -0
  261. package/dist/knowledge/resource-translation.js +1 -0
  262. package/dist/knowledge/reward-confirm.js +1 -526
  263. package/dist/knowledge/reward-context.d.ts +2 -2
  264. package/dist/knowledge/reward-context.js +1 -504
  265. package/dist/knowledge/reward-ledger.js +1 -502
  266. package/dist/knowledge/reward-puzzle.js +1 -300
  267. package/dist/knowledge/reward-risk.js +1 -627
  268. package/dist/knowledge/reward-templates.js +1 -197
  269. package/dist/knowledge/reward-translation.js +1 -501
  270. package/dist/knowledge/safety-rules.d.ts +1 -0
  271. package/dist/knowledge/safety-rules.js +1 -404
  272. package/dist/knowledge/scenario-modes.js +1 -321
  273. package/dist/knowledge/service-confirm.js +1 -807
  274. package/dist/knowledge/service-context.js +1 -403
  275. package/dist/knowledge/service-ledger.js +1 -609
  276. package/dist/knowledge/service-puzzle.js +1 -236
  277. package/dist/knowledge/service-risk.d.ts +1 -1
  278. package/dist/knowledge/service-risk.js +1 -651
  279. package/dist/knowledge/service-templates.js +1 -456
  280. package/dist/knowledge/service-translation.js +1 -622
  281. package/dist/knowledge/template-registry.js +1 -353
  282. package/dist/knowledge/tool-constraints.js +1 -195
  283. package/dist/knowledge/tools-reference.js +1 -178
  284. package/dist/knowledge/treasury-confirm.js +1 -512
  285. package/dist/knowledge/treasury-context.js +1 -363
  286. package/dist/knowledge/treasury-ledger.js +1 -300
  287. package/dist/knowledge/treasury-puzzle.js +1 -216
  288. package/dist/knowledge/treasury-risk.js +1 -440
  289. package/dist/knowledge/treasury-templates.js +1 -358
  290. package/dist/knowledge/treasury-translation.js +1 -498
  291. package/dist/knowledge/trust-metrics.js +1 -198
  292. package/dist/knowledge/universal-template.d.ts +22 -0
  293. package/dist/knowledge/universal-template.js +1 -0
  294. package/dist/knowledge/util-confirm.d.ts +24 -0
  295. package/dist/knowledge/util-confirm.js +1 -0
  296. package/dist/knowledge/util-risk.js +1 -135
  297. package/dist/knowledge/util-translation.d.ts +38 -0
  298. package/dist/knowledge/util-translation.js +1 -0
  299. package/dist/knowledge/workflow-guidance.d.ts +116 -0
  300. package/dist/knowledge/workflow-guidance.js +1 -0
  301. package/dist/loop-engineering/aggregate.js +1 -132
  302. package/dist/loop-engineering/context-collect.js +1 -83
  303. package/dist/loop-engineering/diagnose.js +1 -273
  304. package/dist/loop-engineering/improve.js +1 -405
  305. package/dist/loop-engineering/index.js +1 -4
  306. package/dist/loop-engineering/pipeline.js +1 -56
  307. package/dist/mode-market/index.js +1 -3
  308. package/dist/mode-market/registry.js +1 -124
  309. package/dist/mode-market/review.js +1 -214
  310. package/dist/mode-market/submission.js +1 -85
  311. package/dist/participation/collaborator-interest.d.ts +23 -0
  312. package/dist/participation/collaborator-interest.js +1 -0
  313. package/dist/participation/customer-interest.d.ts +25 -0
  314. package/dist/participation/customer-interest.js +1 -0
  315. package/dist/participation/employee-kpi.d.ts +25 -0
  316. package/dist/participation/employee-kpi.js +1 -0
  317. package/dist/participation/employee-store.d.ts +16 -0
  318. package/dist/participation/employee-store.js +1 -0
  319. package/dist/participation/index.d.ts +2 -0
  320. package/dist/participation/index.js +1 -0
  321. package/dist/participation/merchant-interest.js +1 -100
  322. package/dist/participation/radar-core.d.ts +13 -3
  323. package/dist/participation/radar-core.js +1 -269
  324. package/dist/participation/supplier-interest.d.ts +25 -0
  325. package/dist/participation/supplier-interest.js +1 -0
  326. package/dist/persona/analyzer.js +1 -66
  327. package/dist/persona/bridge.js +1 -86
  328. package/dist/persona/defaults.js +1 -195
  329. package/dist/persona/experience-bridge.js +1 -23
  330. package/dist/persona/index.d.ts +9 -2
  331. package/dist/persona/index.js +1 -71
  332. package/dist/persona/local-region.d.ts +20 -0
  333. package/dist/persona/local-region.js +1 -0
  334. package/dist/persona/model.js +1 -111
  335. package/dist/persona/overrides.d.ts +10 -0
  336. package/dist/persona/overrides.js +1 -0
  337. package/dist/persona/pack-personae.d.ts +11 -0
  338. package/dist/persona/pack-personae.js +1 -0
  339. package/dist/persona/store.js +1 -62
  340. package/dist/persona/strategy-intent.d.ts +20 -0
  341. package/dist/persona/strategy-intent.js +1 -0
  342. package/dist/persona/types.d.ts +6 -2
  343. package/dist/persona/types.js +1 -5
  344. package/dist/project/business-puzzle.d.ts +1 -1
  345. package/dist/project/business-puzzle.js +1 -383
  346. package/dist/project/context-assembly.js +1 -254
  347. package/dist/project/deployment-bridge.js +1 -120
  348. package/dist/project/deployment-doc.js +1 -1126
  349. package/dist/project/edit-planner.js +1 -1342
  350. package/dist/project/evaluation.d.ts +37 -1
  351. package/dist/project/evaluation.js +1 -2011
  352. package/dist/project/game-theory.js +1 -177
  353. package/dist/project/graph-builder.js +1 -656
  354. package/dist/project/graph.d.ts +3 -6
  355. package/dist/project/graph.js +1 -340
  356. package/dist/project/handlers.d.ts +33 -2
  357. package/dist/project/handlers.js +1 -1784
  358. package/dist/project/index.d.ts +2 -0
  359. package/dist/project/index.js +1 -301
  360. package/dist/project/intent-analyzer.js +1 -149
  361. package/dist/project/machine-nodes.js +1 -36
  362. package/dist/project/merchant-guide.d.ts +19 -0
  363. package/dist/project/merchant-guide.js +1 -264
  364. package/dist/project/migration.js +1 -125
  365. package/dist/project/mode-actions.js +1 -309
  366. package/dist/project/namespace.js +1 -206
  367. package/dist/project/participation-radar.js +1 -428
  368. package/dist/project/pipeline-actions.js +1 -109
  369. package/dist/project/project-store.js +1 -422
  370. package/dist/project/query.js +1 -153
  371. package/dist/project/reverse-mapping.d.ts +34 -0
  372. package/dist/project/reverse-mapping.js +1 -0
  373. package/dist/project/risk-aggregator.js +1 -295
  374. package/dist/project/rollback-policy.js +1 -290
  375. package/dist/project/semantic-assembler.js +1 -345
  376. package/dist/project/semantic-graph.d.ts +3 -5
  377. package/dist/project/semantic-graph.js +1 -292
  378. package/dist/project/stage-gate.js +1 -369
  379. package/dist/project/substep-trace.js +1 -332
  380. package/dist/project/task-tracker.js +1 -78
  381. package/dist/project/workflow-design-assessment.d.ts +24 -0
  382. package/dist/project/workflow-design-assessment.js +1 -0
  383. package/dist/role/derivation.d.ts +18 -0
  384. package/dist/role/derivation.js +1 -0
  385. package/dist/role/index.d.ts +5 -0
  386. package/dist/role/index.js +1 -0
  387. package/dist/role/model.d.ts +8 -0
  388. package/dist/role/model.js +1 -0
  389. package/dist/role/resolution.d.ts +11 -0
  390. package/dist/role/resolution.js +1 -0
  391. package/dist/role/types.d.ts +11 -0
  392. package/dist/role/types.js +1 -0
  393. package/dist/rules.js +1 -52
  394. package/dist/safety/confirm-gate.d.ts +1 -1
  395. package/dist/safety/confirm-gate.js +1 -88
  396. package/dist/safety/index.js +1 -3
  397. package/dist/safety/preview.js +1 -52
  398. package/dist/schema/call/allocation.d.ts +186 -1385
  399. package/dist/schema/call/allocation.js +1 -34
  400. package/dist/schema/call/arbitration.d.ts +272 -1871
  401. package/dist/schema/call/arbitration.js +1 -113
  402. package/dist/schema/call/base.d.ts +1831 -9076
  403. package/dist/schema/call/base.js +1 -370
  404. package/dist/schema/call/bridge.d.ts +911 -3171
  405. package/dist/schema/call/bridge.js +1 -458
  406. package/dist/schema/call/contact.d.ts +135 -931
  407. package/dist/schema/call/contact.js +1 -37
  408. package/dist/schema/call/demand.d.ts +164 -1194
  409. package/dist/schema/call/demand.js +1 -47
  410. package/dist/schema/call/guard.d.ts +298 -1140
  411. package/dist/schema/call/guard.js +1 -161
  412. package/dist/schema/call/handler.js +1 -322
  413. package/dist/schema/call/index.js +1 -20
  414. package/dist/schema/call/machine.d.ts +459 -5403
  415. package/dist/schema/call/machine.js +1 -193
  416. package/dist/schema/call/order.d.ts +137 -844
  417. package/dist/schema/call/order.js +1 -35
  418. package/dist/schema/call/payment.d.ts +74 -561
  419. package/dist/schema/call/payment.js +1 -37
  420. package/dist/schema/call/permission-handler.js +1 -54
  421. package/dist/schema/call/permission.d.ts +335 -2791
  422. package/dist/schema/call/permission.js +1 -105
  423. package/dist/schema/call/personal.d.ts +227 -1814
  424. package/dist/schema/call/personal.js +1 -78
  425. package/dist/schema/call/progress.d.ts +140 -843
  426. package/dist/schema/call/progress.js +1 -47
  427. package/dist/schema/call/proof.d.ts +42 -258
  428. package/dist/schema/call/proof.js +1 -33
  429. package/dist/schema/call/repository.d.ts +324 -2222
  430. package/dist/schema/call/repository.js +1 -77
  431. package/dist/schema/call/reward.d.ts +153 -1183
  432. package/dist/schema/call/reward.js +1 -30
  433. package/dist/schema/call/semantic.js +1 -1679
  434. package/dist/schema/call/service.d.ts +376 -3431
  435. package/dist/schema/call/service.js +1 -184
  436. package/dist/schema/call/treasury.d.ts +252 -2158
  437. package/dist/schema/call/treasury.js +1 -71
  438. package/dist/schema/common/index.d.ts +222 -697
  439. package/dist/schema/common/index.js +1 -407
  440. package/dist/schema/config/index.d.ts +18 -161
  441. package/dist/schema/config/index.js +1 -68
  442. package/dist/schema/employee/index.d.ts +99 -0
  443. package/dist/schema/employee/index.js +1 -0
  444. package/dist/schema/evaluation/index.d.ts +1062 -3748
  445. package/dist/schema/evaluation/index.js +1 -356
  446. package/dist/schema/index.d.ts +3 -0
  447. package/dist/schema/index.js +1 -17
  448. package/dist/schema/industry-pack/index.d.ts +132 -0
  449. package/dist/schema/industry-pack/index.js +1 -0
  450. package/dist/schema/intent-radar/index.d.ts +92 -245
  451. package/dist/schema/intent-radar/index.js +1 -89
  452. package/dist/schema/local/index.d.ts +2045 -18080
  453. package/dist/schema/local/index.js +1 -927
  454. package/dist/schema/local/wip.d.ts +61 -651
  455. package/dist/schema/local/wip.js +1 -187
  456. package/dist/schema/messenger/index.d.ts +949 -5557
  457. package/dist/schema/messenger/index.js +1 -475
  458. package/dist/schema/operations.d.ts +2969 -26518
  459. package/dist/schema/operations.js +1 -520
  460. package/dist/schema/persona/index.d.ts +469 -1820
  461. package/dist/schema/persona/index.js +1 -148
  462. package/dist/schema/project/index.d.ts +1027 -8408
  463. package/dist/schema/project/index.js +1 -2057
  464. package/dist/schema/query/index.d.ts +12041 -75261
  465. package/dist/schema/query/index.js +1 -1646
  466. package/dist/schema/schema-query/index.d.ts +35 -98
  467. package/dist/schema/schema-query/index.js +1 -104
  468. package/dist/schema/schema-version.js +1 -76
  469. package/dist/schema/task-status.d.ts +26 -132
  470. package/dist/schema/task-status.js +1 -36
  471. package/dist/schema/trust/index.d.ts +194 -1290
  472. package/dist/schema/trust/index.js +1 -314
  473. package/dist/schema/utils/guard-parser.js +1 -419
  474. package/dist/schema/utils/guard-query-utils.js +1 -46
  475. package/dist/schema/utils/node-parser.js +1 -369
  476. package/dist/schema/utils/object-type-utils.js +1 -35
  477. package/dist/schema/utils/permission-index-utils.js +1 -7
  478. package/dist/schema/utils/permission-machine-check.js +1 -121
  479. package/dist/schema/utils/skills-recommendation.d.ts +1 -0
  480. package/dist/schema/utils/skills-recommendation.js +1 -77
  481. package/dist/schema/workspace/index.d.ts +69 -0
  482. package/dist/schema/workspace/index.js +1 -0
  483. package/dist/schema-query-impl/index.js +1 -0
  484. package/dist/schemas/account_operation.output.json +3147 -1652
  485. package/dist/schemas/account_operation.schema.json +225 -218
  486. package/dist/schemas/bridge_operation.output.json +1168 -650
  487. package/dist/schemas/bridge_operation.schema.json +736 -504
  488. package/dist/schemas/config_operation.output.json +185 -179
  489. package/dist/schemas/config_operation.schema.json +21 -26
  490. package/dist/schemas/employee_operation.output.json +207 -0
  491. package/dist/schemas/employee_operation.schema.json +176 -0
  492. package/dist/schemas/evaluation_operation.output.json +2329 -557
  493. package/dist/schemas/evaluation_operation.schema.json +2939 -720
  494. package/dist/schemas/guard2file.output.json +58 -64
  495. package/dist/schemas/guard2file.schema.json +79 -81
  496. package/dist/schemas/index.json +29 -11
  497. package/dist/schemas/industry_pack_operation.output.json +594 -0
  498. package/dist/schemas/industry_pack_operation.schema.json +55 -0
  499. package/dist/schemas/intent_radar.output.json +275 -200
  500. package/dist/schemas/intent_radar.schema.json +124 -123
  501. package/dist/schemas/local_info_operation.output.json +1174 -657
  502. package/dist/schemas/local_info_operation.schema.json +119 -125
  503. package/dist/schemas/local_mark_operation.output.json +1239 -689
  504. package/dist/schemas/local_mark_operation.schema.json +91 -96
  505. package/dist/schemas/machineNode2file.output.json +63 -69
  506. package/dist/schemas/machineNode2file.schema.json +79 -81
  507. package/dist/schemas/messenger_operation.output.json +2722 -1528
  508. package/dist/schemas/messenger_operation.schema.json +1482 -1264
  509. package/dist/schemas/onchain_events.output.json +2590 -975
  510. package/dist/schemas/onchain_events.schema.json +117 -99
  511. package/dist/schemas/onchain_operations.output.json +3957 -2309
  512. package/dist/schemas/onchain_operations.schema.json +20799 -9285
  513. package/dist/schemas/onchain_operations_allocation.schema.json +172 -108
  514. package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
  515. package/dist/schemas/onchain_operations_contact.schema.json +129 -90
  516. package/dist/schemas/onchain_operations_demand.schema.json +170 -112
  517. package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
  518. package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
  519. package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
  520. package/dist/schemas/onchain_operations_machine.schema.json +537 -164
  521. package/dist/schemas/onchain_operations_order.schema.json +126 -96
  522. package/dist/schemas/onchain_operations_payment.schema.json +82 -67
  523. package/dist/schemas/onchain_operations_permission.schema.json +331 -93
  524. package/dist/schemas/onchain_operations_personal.schema.json +636 -96
  525. package/dist/schemas/onchain_operations_progress.schema.json +125 -92
  526. package/dist/schemas/onchain_operations_proof.schema.json +76 -69
  527. package/dist/schemas/onchain_operations_repository.schema.json +636 -249
  528. package/dist/schemas/onchain_operations_reward.schema.json +218 -108
  529. package/dist/schemas/onchain_operations_service.schema.json +679 -221
  530. package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
  531. package/dist/schemas/onchain_table_data.output.json +6018 -2430
  532. package/dist/schemas/onchain_table_data.schema.json +544 -430
  533. package/dist/schemas/persona_operation.output.json +1568 -265
  534. package/dist/schemas/persona_operation.schema.json +346 -202
  535. package/dist/schemas/project_operation.output.json +6957 -5147
  536. package/dist/schemas/project_operation.schema.json +1050 -1020
  537. package/dist/schemas/query_task_status.output.json +195 -99
  538. package/dist/schemas/query_task_status.schema.json +12 -18
  539. package/dist/schemas/query_toolkit.output.json +18870 -14566
  540. package/dist/schemas/query_toolkit.schema.json +614 -522
  541. package/dist/schemas/schema_query.output.json +127 -129
  542. package/dist/schemas/schema_query.schema.json +64 -69
  543. package/dist/schemas/trust_score.output.json +678 -587
  544. package/dist/schemas/trust_score.schema.json +289 -277
  545. package/dist/schemas/wip_file.output.json +116 -124
  546. package/dist/schemas/wip_file.schema.json +142 -143
  547. package/dist/schemas/workspace_operation.output.json +277 -0
  548. package/dist/schemas/workspace_operation.schema.json +45 -0
  549. package/dist/schemas/wowok_buildin_info.output.json +1693 -723
  550. package/dist/schemas/wowok_buildin_info.schema.json +576 -512
  551. package/dist/telemetry/index.js +1 -112
  552. package/dist/telemetry/redact.js +1 -23
  553. package/dist/telemetry/storage.js +1 -80
  554. package/dist/tools/handlers/bridge.d.ts +8 -1
  555. package/dist/tools/handlers/bridge.js +1 -1
  556. package/dist/tools/handlers/config.js +1 -74
  557. package/dist/tools/handlers/employee.d.ts +2 -0
  558. package/dist/tools/handlers/employee.js +1 -0
  559. package/dist/tools/handlers/evaluation.js +1 -123
  560. package/dist/tools/handlers/file-export.js +1 -90
  561. package/dist/tools/handlers/industry-pack.d.ts +2 -0
  562. package/dist/tools/handlers/industry-pack.js +1 -0
  563. package/dist/tools/handlers/intent-radar.js +1 -76
  564. package/dist/tools/handlers/local.js +1 -53
  565. package/dist/tools/handlers/messenger.js +1 -188
  566. package/dist/tools/handlers/onchain.js +1 -1180
  567. package/dist/tools/handlers/persona.js +1 -89
  568. package/dist/tools/handlers/project.js +1 -211
  569. package/dist/tools/handlers/query.js +1 -434
  570. package/dist/tools/handlers/schema-query.js +1 -176
  571. package/dist/tools/handlers/task-status.js +1 -26
  572. package/dist/tools/handlers/trust.js +1 -380
  573. package/dist/tools/handlers/wip.js +1 -90
  574. package/dist/tools/handlers/workspace.d.ts +2 -0
  575. package/dist/tools/handlers/workspace.js +1 -0
  576. package/dist/tools/index.d.ts +2 -1
  577. package/dist/tools/index.js +1 -1382
  578. package/dist/tools/retry.js +1 -85
  579. package/dist/tools/rules-hook.d.ts +1 -1
  580. package/dist/tools/rules-hook.js +1 -23
  581. package/dist/tools/shared.d.ts +1 -1
  582. package/dist/tools/shared.js +1 -130
  583. package/dist/tools/types.d.ts +2 -1
  584. package/dist/tools/types.js +1 -1
  585. package/dist/tools/upgrade-check.d.ts +19 -0
  586. package/dist/tools/upgrade-check.js +1 -0
  587. package/dist/tools/wip-deploy-assist.js +1 -306
  588. package/dist/tools/wrap.js +1 -500
  589. package/package.json +7 -6
  590. package/dist/knowledge/arbitration-trust.d.ts +0 -24
  591. package/dist/knowledge/arbitration-trust.js +0 -117
  592. package/dist/schema/call/bridge-handler.d.ts +0 -8
  593. package/dist/schema/call/bridge-handler.js +0 -265
  594. package/dist/schema/sync-layer4.d.ts +0 -21
  595. package/dist/schema/sync-layer4.js +0 -286
  596. package/dist/schema-query/index.js +0 -810
  597. /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
@@ -1,176 +1,2226 @@
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": {
206
+ "type": "object",
207
+ "properties": {
208
+ "threshold": {
209
+ "type": "integer",
210
+ "minimum": 1,
211
+ "maximum": 9007199254740991,
212
+ "description": "Pair threshold (accumulated forward weights to advance)."
213
+ },
214
+ "my_weight": {
215
+ "type": "integer",
216
+ "minimum": 0,
217
+ "maximum": 9007199254740991,
218
+ "description": "Weight THIS role can contribute."
219
+ },
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)."
225
+ },
226
+ "collaborators": {
227
+ "type": "array",
228
+ "items": {
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."
242
+ },
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
269
+ },
270
+ "allocation_note": {
271
+ "description": "Human-readable利益分配说明.",
272
+ "type": "string"
273
+ }
274
+ },
275
+ "required": [
276
+ "threshold",
277
+ "my_weight",
278
+ "needed_from_others",
279
+ "collaborators"
280
+ ],
281
+ "additionalProperties": false
282
+ },
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": {
312
+ "type": "object",
313
+ "properties": {
314
+ "entity_id": {
315
+ "type": "string"
316
+ },
317
+ "satisfied": {
318
+ "type": "array",
319
+ "items": {
320
+ "type": "object",
321
+ "properties": {
322
+ "dimension": {
323
+ "type": "string",
324
+ "description": "Capability dimension (has_arbitration / region / price / ...)."
325
+ },
326
+ "requirement": {
327
+ "type": "string",
328
+ "description": "What the demand requires."
329
+ },
330
+ "provided": {
331
+ "type": "string",
332
+ "description": "What the service provides."
333
+ },
334
+ "status": {
335
+ "type": "string",
336
+ "enum": [
337
+ "satisfied",
338
+ "partial",
339
+ "missing"
340
+ ]
341
+ },
342
+ "impact": {
343
+ "type": "string",
344
+ "enum": [
345
+ "critical",
346
+ "major",
347
+ "minor"
348
+ ]
349
+ },
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 / ...)."
374
+ },
375
+ "requirement": {
376
+ "type": "string",
377
+ "description": "What the demand requires."
378
+ },
379
+ "provided": {
380
+ "type": "string",
381
+ "description": "What the service provides."
382
+ },
383
+ "status": {
384
+ "type": "string",
385
+ "enum": [
386
+ "satisfied",
387
+ "partial",
388
+ "missing"
389
+ ]
390
+ },
391
+ "impact": {
392
+ "type": "string",
393
+ "enum": [
394
+ "critical",
395
+ "major",
396
+ "minor"
397
+ ]
398
+ },
399
+ "suggestion": {
400
+ "type": "string",
401
+ "description": "Actionable suggestion."
402
+ }
403
+ },
404
+ "required": [
405
+ "dimension",
406
+ "requirement",
407
+ "provided",
408
+ "status",
409
+ "impact",
410
+ "suggestion"
411
+ ],
412
+ "additionalProperties": false
413
+ }
414
+ },
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": {
459
+ "type": "string"
460
+ },
461
+ "covered": {
462
+ "type": "array",
463
+ "items": {
464
+ "type": "string"
465
+ }
466
+ }
467
+ },
468
+ "required": [
469
+ "id",
470
+ "covered"
471
+ ],
472
+ "additionalProperties": false
473
+ }
474
+ },
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
+ }
485
+ },
486
+ "feasibility": {
487
+ "type": "string",
488
+ "enum": [
489
+ "ready",
490
+ "needs_supply_chain",
491
+ "infeasible"
492
+ ]
493
+ },
494
+ "summary": {
495
+ "type": "string"
496
+ }
497
+ },
498
+ "required": [
499
+ "demand",
500
+ "services",
501
+ "coverage_score",
502
+ "remaining_missing",
503
+ "feasibility",
504
+ "summary"
505
+ ],
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"
521
+ },
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
+ }
555
+ },
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"
576
+ },
577
+ {
578
+ "type": "null"
579
+ }
580
+ ]
581
+ },
582
+ "machine": {
583
+ "anyOf": [
584
+ {
585
+ "type": "string"
586
+ },
587
+ {
588
+ "type": "null"
589
+ }
590
+ ]
591
+ },
592
+ "um": {
593
+ "anyOf": [
594
+ {
595
+ "type": "string"
596
+ },
597
+ {
598
+ "type": "null"
599
+ }
600
+ ]
601
+ },
602
+ "bPublished": {
603
+ "type": "boolean"
604
+ },
605
+ "bPaused": {
606
+ "type": "boolean"
607
+ },
608
+ "owner": {
609
+ "type": "string"
610
+ }
611
+ },
612
+ "required": [
613
+ "object",
614
+ "description",
615
+ "location"
616
+ ],
617
+ "additionalProperties": false
618
+ },
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
+ },
1050
+ "required": [
1051
+ "evaluation_id",
1052
+ "total",
1053
+ "level",
1054
+ "breakdown",
1055
+ "red_flags",
1056
+ "blocked",
1057
+ "trace",
1058
+ "summary"
1059
+ ],
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"
1075
+ },
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": {
1169
+ "type": "object",
1170
+ "properties": {
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": {
14
1271
  "type": "object",
15
1272
  "properties": {
16
- "action": {
17
- "type": "string",
18
- "const": "arb_game"
19
- },
20
1273
  "status": {
21
1274
  "type": "string",
22
1275
  "enum": [
23
- "Principal_confirming",
24
- "Arbitrator_confirming",
25
- "Voting",
26
- "Arbitrated",
27
- "Objectionable",
28
- "Finished",
29
- "Withdrawn"
30
- ]
1276
+ "auto_pass",
1277
+ "auto_reject",
1278
+ "manual_review"
1279
+ ],
1280
+ "description": "Review gate verdict."
31
1281
  },
32
- "perspective": {
1282
+ "reason": {
33
1283
  "type": "string",
34
- "enum": [
35
- "disputant",
36
- "arbitrator",
37
- "voter",
38
- "both"
39
- ]
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
+ {
1489
+ "type": "object",
1490
+ "properties": {
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": {
1546
+ "type": "string"
1547
+ },
1548
+ "by_referrer": {
1549
+ "type": "array",
1550
+ "items": {
1551
+ "type": "object",
1552
+ "properties": {
1553
+ "referrer": {
1554
+ "type": "string"
1555
+ },
1556
+ "referrals": {
1557
+ "type": "integer",
1558
+ "minimum": 0,
1559
+ "maximum": 9007199254740991
1560
+ },
1561
+ "gmv": {
1562
+ "type": "string"
1563
+ }
1564
+ },
1565
+ "required": [
1566
+ "referrer",
1567
+ "referrals",
1568
+ "gmv"
1569
+ ],
1570
+ "additionalProperties": false
1571
+ }
1572
+ }
1573
+ },
1574
+ "required": [
1575
+ "referrals",
1576
+ "closed_referrals",
1577
+ "gmv",
1578
+ "by_referrer"
1579
+ ],
1580
+ "additionalProperties": false
40
1581
  },
41
- "actions": {
1582
+ {
42
1583
  "type": "array",
43
1584
  "items": {
44
1585
  "type": "object",
45
1586
  "properties": {
46
- "action": {
47
- "type": "string",
48
- "description": "Recommended move (e.g. 'confirm', 'vote', 'objection', 'arb_withdraw')."
1587
+ "customer": {
1588
+ "type": "string"
49
1589
  },
50
- "favorability": {
1590
+ "order_count": {
51
1591
  "type": "integer",
52
1592
  "minimum": 0,
53
- "maximum": 100,
54
- "description": "Favorability 0-100 for the perspective."
1593
+ "maximum": 9007199254740991
55
1594
  },
56
- "is_optimal": {
57
- "type": "boolean",
58
- "description": "True when this is the top recommended move."
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
1609
+ }
1610
+ },
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": {
1624
+ "type": "string",
1625
+ "enum": [
1626
+ "increase",
1627
+ "decrease",
1628
+ "maintain"
1629
+ ]
1630
+ },
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": {
1648
+ "type": "string"
1649
+ },
1650
+ "confidence": {
1651
+ "type": "number",
1652
+ "minimum": 0,
1653
+ "maximum": 1
1654
+ },
1655
+ "adjustmentPercent": {
1656
+ "type": "number"
1657
+ }
1658
+ },
1659
+ "required": [
1660
+ "action",
1661
+ "reason",
1662
+ "confidence"
1663
+ ],
1664
+ "additionalProperties": false
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
1786
+ },
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"
1809
+ ],
1810
+ "description": "Sensitivity in effect (explicit or inferred)."
1811
+ },
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": {
1825
+ "type": "object",
1826
+ "properties": {
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": {
1850
+ "type": "string"
1851
+ }
1852
+ },
1853
+ "required": [
1854
+ "price"
1855
+ ],
1856
+ "additionalProperties": false
1857
+ }
1858
+ },
1859
+ "arbitrations": {
1860
+ "type": "array",
1861
+ "items": {
1862
+ "type": "string"
1863
+ }
59
1864
  },
60
- "payoff_note": {
1865
+ "compensation_fund": {
1866
+ "description": "Smallest-unit amount (string).",
1867
+ "type": "string"
1868
+ },
1869
+ "buy_guard": {
1870
+ "anyOf": [
1871
+ {
1872
+ "type": "string"
1873
+ },
1874
+ {
1875
+ "type": "null"
1876
+ }
1877
+ ]
1878
+ },
1879
+ "machine": {
1880
+ "anyOf": [
1881
+ {
1882
+ "type": "string"
1883
+ },
1884
+ {
1885
+ "type": "null"
1886
+ }
1887
+ ]
1888
+ },
1889
+ "um": {
1890
+ "anyOf": [
1891
+ {
1892
+ "type": "string"
1893
+ },
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": {
61
1920
  "type": "string",
62
- "description": "What the move achieves."
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
63
1960
  },
64
- "risk": {
1961
+ "level": {
65
1962
  "type": "string",
66
1963
  "enum": [
67
1964
  "low",
68
- "medium",
1965
+ "medium_low",
1966
+ "medium_high",
69
1967
  "high"
70
- ],
71
- "description": "Risk of the move."
1968
+ ]
1969
+ },
1970
+ "breakdown": {
1971
+ "type": "array",
1972
+ "items": {
1973
+ "type": "object",
1974
+ "properties": {
1975
+ "rule_id": {
1976
+ "type": "string"
1977
+ },
1978
+ "dimension": {
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"
2004
+ }
2005
+ },
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"
2042
+ }
2043
+ },
2044
+ "required": [
2045
+ "kind",
2046
+ "id",
2047
+ "detail"
2048
+ ],
2049
+ "additionalProperties": false
2050
+ }
2051
+ },
2052
+ "summary": {
2053
+ "type": "string"
72
2054
  }
73
2055
  },
74
2056
  "required": [
75
- "action",
76
- "favorability",
77
- "is_optimal",
78
- "payoff_note",
79
- "risk"
2057
+ "evaluation_id",
2058
+ "total",
2059
+ "level",
2060
+ "breakdown",
2061
+ "red_flags",
2062
+ "blocked",
2063
+ "trace",
2064
+ "summary"
80
2065
  ],
81
2066
  "additionalProperties": false
82
2067
  }
83
2068
  },
84
- "summary": {
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": {
85
2098
  "type": "string"
86
2099
  }
87
2100
  },
88
2101
  "required": [
89
- "action",
90
- "status",
91
- "perspective",
92
- "actions",
93
- "summary"
2102
+ "search_terms",
2103
+ "ai_enrichment_note"
94
2104
  ],
95
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"
96
2125
  },
97
- {
2126
+ "trust": {
98
2127
  "type": "object",
99
2128
  "properties": {
100
- "action": {
101
- "type": "string",
102
- "const": "node_game"
103
- },
104
- "current_node": {
2129
+ "evaluation_id": {
105
2130
  "type": "string"
106
2131
  },
107
- "perspective": {
2132
+ "total": {
2133
+ "type": "integer",
2134
+ "minimum": 0,
2135
+ "maximum": 100
2136
+ },
2137
+ "level": {
108
2138
  "type": "string",
109
2139
  "enum": [
110
- "customer",
111
- "operator",
112
- "observer"
2140
+ "low",
2141
+ "medium_low",
2142
+ "medium_high",
2143
+ "high"
113
2144
  ]
114
2145
  },
115
- "actions": {
2146
+ "breakdown": {
116
2147
  "type": "array",
117
2148
  "items": {
118
2149
  "type": "object",
119
2150
  "properties": {
120
- "forward": {
121
- "type": "string",
122
- "description": "Forward (operation) name."
2151
+ "rule_id": {
2152
+ "type": "string"
123
2153
  },
124
- "to_node": {
125
- "type": "string",
126
- "description": "Target node after execution."
2154
+ "dimension": {
2155
+ "type": "string"
127
2156
  },
128
- "execution_path": {
129
- "type": "string",
130
- "enum": [
131
- "order_holder",
132
- "permission",
133
- "named_operator",
134
- "not_available"
135
- ],
136
- "description": "How the account may execute it."
2157
+ "score": {
2158
+ "type": "number"
137
2159
  },
138
- "guard": {
139
- "type": "string",
140
- "description": "Guard address gating this forward."
2160
+ "weight": {
2161
+ "type": "number"
141
2162
  },
142
- "favorability": {
143
- "type": "integer",
144
- "minimum": 0,
145
- "maximum": 100,
146
- "description": "Favorability 0-100 for the perspective."
2163
+ "reason": {
2164
+ "type": "string"
147
2165
  },
148
- "is_optimal": {
149
- "type": "boolean",
150
- "description": "True when this is the top recommended move."
2166
+ "matched": {
2167
+ "type": "array",
2168
+ "items": {
2169
+ "type": "string"
2170
+ }
151
2171
  },
152
- "payoff_note": {
153
- "type": "string",
154
- "description": "What the move achieves."
2172
+ "mismatched": {
2173
+ "type": "array",
2174
+ "items": {
2175
+ "type": "string"
2176
+ }
155
2177
  },
156
- "risk": {
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": {
157
2206
  "type": "string",
158
2207
  "enum": [
159
- "low",
160
- "medium",
161
- "high"
162
- ],
163
- "description": "Risk of the move."
2208
+ "data_source",
2209
+ "rule",
2210
+ "override"
2211
+ ]
2212
+ },
2213
+ "id": {
2214
+ "type": "string"
2215
+ },
2216
+ "detail": {
2217
+ "type": "string"
164
2218
  }
165
2219
  },
166
2220
  "required": [
167
- "forward",
168
- "to_node",
169
- "execution_path",
170
- "favorability",
171
- "is_optimal",
172
- "payoff_note",
173
- "risk"
2221
+ "kind",
2222
+ "id",
2223
+ "detail"
174
2224
  ],
175
2225
  "additionalProperties": false
176
2226
  }
@@ -180,498 +2230,220 @@
180
2230
  }
181
2231
  },
182
2232
  "required": [
183
- "action",
184
- "current_node",
185
- "perspective",
186
- "actions",
2233
+ "evaluation_id",
2234
+ "total",
2235
+ "level",
2236
+ "breakdown",
2237
+ "red_flags",
2238
+ "blocked",
2239
+ "trace",
187
2240
  "summary"
188
2241
  ],
189
2242
  "additionalProperties": false
190
2243
  },
191
- {
2244
+ "fairness": {
192
2245
  "type": "object",
193
2246
  "properties": {
194
- "action": {
195
- "type": "string",
196
- "const": "capability_gap"
2247
+ "evaluation_id": {
2248
+ "type": "string"
197
2249
  },
198
- "report": {
199
- "type": "object",
200
- "properties": {
201
- "entity_id": {
202
- "type": "string"
203
- },
204
- "satisfied": {
205
- "type": "array",
206
- "items": {
207
- "type": "object",
208
- "properties": {
209
- "dimension": {
210
- "type": "string",
211
- "description": "Capability dimension (has_arbitration / region / price / ...)."
212
- },
213
- "requirement": {
214
- "type": "string",
215
- "description": "What the demand requires."
216
- },
217
- "provided": {
218
- "type": "string",
219
- "description": "What the service provides."
220
- },
221
- "status": {
222
- "type": "string",
223
- "enum": [
224
- "satisfied",
225
- "partial",
226
- "missing"
227
- ]
228
- },
229
- "impact": {
230
- "type": "string",
231
- "enum": [
232
- "critical",
233
- "major",
234
- "minor"
235
- ]
236
- },
237
- "suggestion": {
238
- "type": "string",
239
- "description": "Actionable suggestion."
240
- }
241
- },
242
- "required": [
243
- "dimension",
244
- "requirement",
245
- "provided",
246
- "status",
247
- "impact",
248
- "suggestion"
249
- ],
250
- "additionalProperties": false
251
- }
252
- },
253
- "missing": {
254
- "type": "array",
255
- "items": {
256
- "$ref": "#/definitions/evaluation_operation/properties/result/anyOf/2/properties/report/properties/satisfied/items"
257
- }
258
- },
259
- "coverage_score": {
260
- "type": "integer",
261
- "minimum": 0,
262
- "maximum": 100
263
- },
264
- "summary": {
265
- "type": "string"
266
- }
267
- },
268
- "required": [
269
- "entity_id",
270
- "satisfied",
271
- "missing",
272
- "coverage_score",
273
- "summary"
274
- ],
275
- "additionalProperties": false
276
- }
277
- },
278
- "required": [
279
- "action",
280
- "report"
281
- ],
282
- "additionalProperties": false
283
- },
284
- {
285
- "type": "object",
286
- "properties": {
287
- "action": {
288
- "type": "string",
289
- "const": "compose_service"
2250
+ "total": {
2251
+ "type": "integer",
2252
+ "minimum": 0,
2253
+ "maximum": 100
290
2254
  },
291
- "plan": {
292
- "type": "object",
293
- "properties": {
294
- "demand": {
295
- "type": "string"
296
- },
297
- "services": {
298
- "type": "array",
299
- "items": {
300
- "type": "object",
301
- "properties": {
302
- "id": {
303
- "type": "string"
304
- },
305
- "covered": {
306
- "type": "array",
307
- "items": {
308
- "type": "string"
309
- }
310
- }
311
- },
312
- "required": [
313
- "id",
314
- "covered"
315
- ],
316
- "additionalProperties": false
317
- }
318
- },
319
- "coverage_score": {
320
- "type": "integer",
321
- "minimum": 0,
322
- "maximum": 100
323
- },
324
- "remaining_missing": {
325
- "type": "array",
326
- "items": {
327
- "type": "string"
328
- }
329
- },
330
- "feasibility": {
331
- "type": "string",
332
- "enum": [
333
- "ready",
334
- "needs_supply_chain",
335
- "infeasible"
336
- ]
337
- },
338
- "summary": {
339
- "type": "string"
340
- }
341
- },
342
- "required": [
343
- "demand",
344
- "services",
345
- "coverage_score",
346
- "remaining_missing",
347
- "feasibility",
348
- "summary"
349
- ],
350
- "additionalProperties": false
351
- }
352
- },
353
- "required": [
354
- "action",
355
- "plan"
356
- ],
357
- "additionalProperties": false
358
- },
359
- {
360
- "type": "object",
361
- "properties": {
362
- "action": {
2255
+ "level": {
363
2256
  "type": "string",
364
- "const": "demand_match"
2257
+ "enum": [
2258
+ "low",
2259
+ "medium_low",
2260
+ "medium_high",
2261
+ "high"
2262
+ ]
365
2263
  },
366
- "matches": {
2264
+ "breakdown": {
367
2265
  "type": "array",
368
2266
  "items": {
369
2267
  "type": "object",
370
2268
  "properties": {
371
- "service": {
372
- "type": "object",
373
- "properties": {
374
- "object": {
375
- "type": "string",
376
- "description": "Service object address."
377
- },
378
- "description": {
379
- "type": "string"
380
- },
381
- "location": {
382
- "type": "string"
383
- },
384
- "sales": {
385
- "type": "array",
386
- "items": {
387
- "type": "object",
388
- "properties": {
389
- "name": {
390
- "type": "string"
391
- },
392
- "price": {
393
- "type": "string",
394
- "description": "Smallest-unit amount (string)."
395
- },
396
- "wip_hash": {
397
- "type": "string"
398
- }
399
- },
400
- "required": [
401
- "price"
402
- ],
403
- "additionalProperties": false
404
- }
405
- },
406
- "arbitrations": {
407
- "type": "array",
408
- "items": {
409
- "type": "string"
410
- }
411
- },
412
- "compensation_fund": {
413
- "type": "string",
414
- "description": "Smallest-unit amount (string)."
415
- },
416
- "buy_guard": {
417
- "type": [
418
- "string",
419
- "null"
420
- ]
421
- },
422
- "machine": {
423
- "type": [
424
- "string",
425
- "null"
426
- ]
427
- },
428
- "um": {
429
- "type": [
430
- "string",
431
- "null"
432
- ]
433
- },
434
- "bPublished": {
435
- "type": "boolean"
436
- },
437
- "bPaused": {
438
- "type": "boolean"
439
- },
440
- "owner": {
441
- "type": "string"
442
- }
443
- },
444
- "required": [
445
- "object",
446
- "description",
447
- "location"
448
- ],
449
- "additionalProperties": false
2269
+ "rule_id": {
2270
+ "type": "string"
450
2271
  },
451
- "result": {
452
- "type": "object",
453
- "properties": {
454
- "evaluation_id": {
455
- "type": "string"
456
- },
457
- "total": {
458
- "type": "integer",
459
- "minimum": 0,
460
- "maximum": 100
461
- },
462
- "level": {
463
- "type": "string",
464
- "enum": [
465
- "low",
466
- "medium_low",
467
- "medium_high",
468
- "high"
469
- ]
470
- },
471
- "breakdown": {
472
- "type": "array",
473
- "items": {
474
- "type": "object",
475
- "properties": {
476
- "rule_id": {
477
- "type": "string"
478
- },
479
- "dimension": {
480
- "type": "string"
481
- },
482
- "score": {
483
- "type": "number"
484
- },
485
- "weight": {
486
- "type": "number"
487
- },
488
- "reason": {
489
- "type": "string"
490
- },
491
- "matched": {
492
- "type": "array",
493
- "items": {
494
- "type": "string"
495
- }
496
- },
497
- "mismatched": {
498
- "type": "array",
499
- "items": {
500
- "type": "string"
501
- }
502
- },
503
- "red_flag": {
504
- "type": "boolean"
505
- }
506
- },
507
- "required": [
508
- "rule_id",
509
- "dimension",
510
- "score",
511
- "weight"
512
- ],
513
- "additionalProperties": false
514
- }
515
- },
516
- "red_flags": {
517
- "type": "array",
518
- "items": {
519
- "type": "string"
520
- }
521
- },
522
- "blocked": {
523
- "type": "boolean"
524
- },
525
- "trace": {
526
- "type": "array",
527
- "items": {
528
- "type": "object",
529
- "properties": {
530
- "kind": {
531
- "type": "string",
532
- "enum": [
533
- "data_source",
534
- "rule",
535
- "override"
536
- ]
537
- },
538
- "id": {
539
- "type": "string"
540
- },
541
- "detail": {
542
- "type": "string"
543
- }
544
- },
545
- "required": [
546
- "kind",
547
- "id",
548
- "detail"
549
- ],
550
- "additionalProperties": false
551
- }
552
- },
553
- "summary": {
554
- "type": "string"
555
- }
556
- },
557
- "required": [
558
- "evaluation_id",
559
- "total",
560
- "level",
561
- "breakdown",
562
- "red_flags",
563
- "blocked",
564
- "trace",
565
- "summary"
566
- ],
567
- "additionalProperties": false
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"
568
2298
  }
569
2299
  },
570
2300
  "required": [
571
- "service",
572
- "result"
2301
+ "rule_id",
2302
+ "dimension",
2303
+ "score",
2304
+ "weight"
573
2305
  ],
574
2306
  "additionalProperties": false
575
2307
  }
576
- }
577
- },
578
- "required": [
579
- "action",
580
- "matches"
581
- ],
582
- "additionalProperties": false
583
- },
584
- {
585
- "type": "object",
586
- "properties": {
587
- "action": {
588
- "type": "string",
589
- "const": "service_match"
590
2308
  },
591
- "matches": {
2309
+ "red_flags": {
2310
+ "type": "array",
2311
+ "items": {
2312
+ "type": "string"
2313
+ }
2314
+ },
2315
+ "blocked": {
2316
+ "type": "boolean"
2317
+ },
2318
+ "trace": {
592
2319
  "type": "array",
593
2320
  "items": {
594
2321
  "type": "object",
595
2322
  "properties": {
596
- "demand": {
597
- "type": "object",
598
- "properties": {
599
- "object": {
600
- "type": "string",
601
- "description": "Demand object address."
602
- },
603
- "description": {
604
- "type": "string"
605
- },
606
- "location": {
607
- "type": "string"
608
- },
609
- "rewards": {
610
- "type": "array",
611
- "items": {
612
- "type": "string"
613
- }
614
- },
615
- "um": {
616
- "type": [
617
- "string",
618
- "null"
619
- ]
620
- },
621
- "owner": {
622
- "type": "string"
623
- }
624
- },
625
- "required": [
626
- "object",
627
- "description",
628
- "location"
629
- ],
630
- "additionalProperties": false
2323
+ "kind": {
2324
+ "type": "string",
2325
+ "enum": [
2326
+ "data_source",
2327
+ "rule",
2328
+ "override"
2329
+ ]
2330
+ },
2331
+ "id": {
2332
+ "type": "string"
631
2333
  },
632
- "result": {
633
- "$ref": "#/definitions/evaluation_operation/properties/result/anyOf/4/properties/matches/items/properties/result"
2334
+ "detail": {
2335
+ "type": "string"
634
2336
  }
635
2337
  },
636
2338
  "required": [
637
- "demand",
638
- "result"
2339
+ "kind",
2340
+ "id",
2341
+ "detail"
639
2342
  ],
640
2343
  "additionalProperties": false
641
2344
  }
2345
+ },
2346
+ "summary": {
2347
+ "type": "string"
642
2348
  }
643
2349
  },
644
2350
  "required": [
645
- "action",
646
- "matches"
2351
+ "evaluation_id",
2352
+ "total",
2353
+ "level",
2354
+ "breakdown",
2355
+ "red_flags",
2356
+ "blocked",
2357
+ "trace",
2358
+ "summary"
647
2359
  ],
648
2360
  "additionalProperties": false
649
2361
  },
650
- {
651
- "type": "object",
652
- "properties": {
653
- "action": {
654
- "type": "string",
655
- "const": "service_risk"
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
+ }
656
2422
  },
657
- "result": {
658
- "$ref": "#/definitions/evaluation_operation/properties/result/anyOf/4/properties/matches/items/properties/result"
659
- }
660
- },
661
- "required": [
662
- "action",
663
- "result"
664
- ],
665
- "additionalProperties": false
2423
+ "required": [
2424
+ "id",
2425
+ "category",
2426
+ "priority",
2427
+ "title",
2428
+ "message",
2429
+ "timestamp"
2430
+ ],
2431
+ "additionalProperties": false
2432
+ }
666
2433
  }
2434
+ },
2435
+ "required": [
2436
+ "action",
2437
+ "events"
667
2438
  ],
668
- "description": "Evaluation result — shape depends on action"
2439
+ "additionalProperties": false
669
2440
  }
670
- },
671
- "required": [
672
- "result"
673
2441
  ],
674
- "additionalProperties": false
2442
+ "description": "Evaluation result — shape depends on action"
675
2443
  }
676
- }
2444
+ },
2445
+ "required": [
2446
+ "result"
2447
+ ],
2448
+ "additionalProperties": false
677
2449
  }