@wowok/agent-mcp 3.1.3 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/dist/config/config-audit.spec.d.ts +1 -0
  2. package/dist/config/config-audit.spec.js +1 -0
  3. package/dist/config/exposure.d.ts +108 -0
  4. package/dist/config/exposure.js +1 -0
  5. package/dist/config/index.d.ts +2 -0
  6. package/dist/config/index.js +1 -1
  7. package/dist/config/judgment.d.ts +1228 -0
  8. package/dist/config/judgment.js +1 -0
  9. package/dist/config/judgment.spec.d.ts +1 -0
  10. package/dist/config/judgment.spec.js +1 -0
  11. package/dist/config/rule-engine.d.ts +299 -0
  12. package/dist/config/rule-engine.js +1 -0
  13. package/dist/config/rule-engine.spec.d.ts +1 -0
  14. package/dist/config/rule-engine.spec.js +1 -0
  15. package/dist/config/severity.d.ts +7 -0
  16. package/dist/config/severity.js +1 -0
  17. package/dist/customer/order-monitor.d.ts +3 -1
  18. package/dist/customer/order-monitor.js +1 -1
  19. package/dist/evaluation/acceptance.d.ts +1 -0
  20. package/dist/evaluation/acceptance.js +1 -1
  21. package/dist/evaluation/arbitration-game.js +1 -1
  22. package/dist/evaluation/builtins/demand-match.js +1 -1
  23. package/dist/evaluation/builtins/graph-service.js +1 -1
  24. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  25. package/dist/evaluation/engine.js +1 -1
  26. package/dist/evaluation/game-strategy.d.ts +2 -2
  27. package/dist/evaluation/game-strategy.js +1 -1
  28. package/dist/evaluation/match-operation.d.ts +2 -2
  29. package/dist/evaluation/match-operation.js +1 -1
  30. package/dist/evaluation/standards.d.ts +3 -25
  31. package/dist/evaluation/standards.js +1 -1
  32. package/dist/evaluation/types.d.ts +2 -1
  33. package/dist/experience/realtime-feedback.js +1 -1
  34. package/dist/extensions/business-modules.js +1 -1
  35. package/dist/extensions/custom-registry-file.js +1 -1
  36. package/dist/extensions/industry-audit.spec.d.ts +1 -0
  37. package/dist/extensions/industry-audit.spec.js +1 -0
  38. package/dist/extensions/industry-layers.d.ts +8 -0
  39. package/dist/extensions/industry-layers.js +1 -1
  40. package/dist/extensions/industry-pack.d.ts +2 -0
  41. package/dist/extensions/industry-pack.js +1 -1
  42. package/dist/extensions/mode-evaluator.js +1 -1
  43. package/dist/extensions/modes.js +1 -1
  44. package/dist/graph/onchain/analyze.d.ts +3 -1
  45. package/dist/graph/onchain/analyze.js +1 -1
  46. package/dist/graph/onchain/analyze.spec.js +1 -1
  47. package/dist/graph/onchain/edge-schema.d.ts +1 -0
  48. package/dist/graph/onchain/edge-schema.js +1 -1
  49. package/dist/graph/onchain/expand.js +1 -1
  50. package/dist/graph/onchain/exploration.d.ts +28 -0
  51. package/dist/graph/onchain/exploration.js +1 -0
  52. package/dist/graph/onchain/exploration.spec.d.ts +1 -0
  53. package/dist/graph/onchain/exploration.spec.js +1 -0
  54. package/dist/graph/onchain/exposure.d.ts +18 -0
  55. package/dist/graph/onchain/exposure.js +1 -0
  56. package/dist/graph/onchain/exposure.spec.d.ts +1 -0
  57. package/dist/graph/onchain/exposure.spec.js +1 -0
  58. package/dist/graph/onchain/graph-policy.spec.d.ts +1 -0
  59. package/dist/graph/onchain/graph-policy.spec.js +1 -0
  60. package/dist/graph/onchain/index.d.ts +6 -0
  61. package/dist/graph/onchain/index.js +1 -1
  62. package/dist/graph/onchain/interest.js +1 -1
  63. package/dist/graph/onchain/interest.spec.js +1 -1
  64. package/dist/graph/onchain/names.js +1 -1
  65. package/dist/graph/onchain/names.spec.js +1 -1
  66. package/dist/graph/onchain/policy.d.ts +8 -0
  67. package/dist/graph/onchain/policy.js +1 -0
  68. package/dist/graph/onchain/proposal-graph.js +1 -1
  69. package/dist/graph/onchain/proposal-graph.spec.js +1 -1
  70. package/dist/graph/onchain/synthesis.d.ts +20 -0
  71. package/dist/graph/onchain/synthesis.js +1 -0
  72. package/dist/graph/onchain/synthesis.spec.d.ts +1 -0
  73. package/dist/graph/onchain/synthesis.spec.js +1 -0
  74. package/dist/graph/onchain/types.d.ts +11 -1
  75. package/dist/keeper/keeper.spec.js +1 -1
  76. package/dist/knowledge/alloc-audit-policy.spec.d.ts +1 -0
  77. package/dist/knowledge/alloc-audit-policy.spec.js +1 -0
  78. package/dist/knowledge/allocation-ledger.js +1 -1
  79. package/dist/knowledge/allocation-puzzle.d.ts +1 -1
  80. package/dist/knowledge/allocation-puzzle.js +1 -1
  81. package/dist/knowledge/allocation-risk.d.ts +4 -1
  82. package/dist/knowledge/allocation-risk.js +1 -1
  83. package/dist/knowledge/allocation-templates.js +1 -1
  84. package/dist/knowledge/arb-risk.d.ts +6 -5
  85. package/dist/knowledge/arb-risk.js +1 -1
  86. package/dist/knowledge/arbitration-ledger.d.ts +4 -4
  87. package/dist/knowledge/arbitration-ledger.js +1 -1
  88. package/dist/knowledge/arbitration-puzzle.d.ts +1 -1
  89. package/dist/knowledge/arbitration-puzzle.js +1 -1
  90. package/dist/knowledge/arbitration-risk.d.ts +4 -1
  91. package/dist/knowledge/arbitration-risk.js +1 -1
  92. package/dist/knowledge/arbitration-templates.js +1 -1
  93. package/dist/knowledge/baselines/judgment-baselines.json +289 -0
  94. package/dist/knowledge/baselines/risk-baselines.spec.js +1 -1
  95. package/dist/knowledge/baselines/rules/alloc_audit.json +290 -0
  96. package/dist/knowledge/baselines/rules/allocation.json +492 -0
  97. package/dist/knowledge/baselines/rules/arb.json +155 -0
  98. package/dist/knowledge/baselines/rules/arbitration.json +366 -0
  99. package/dist/knowledge/baselines/rules/bridge.json +197 -0
  100. package/dist/knowledge/baselines/rules/contact.json +152 -0
  101. package/dist/knowledge/baselines/rules/demand.json +158 -0
  102. package/dist/knowledge/baselines/rules/graph.json +453 -0
  103. package/dist/knowledge/baselines/rules/guard.json +981 -0
  104. package/dist/knowledge/baselines/rules/machine.json +706 -0
  105. package/dist/knowledge/baselines/rules/order.json +549 -0
  106. package/dist/knowledge/baselines/rules/payment.json +205 -0
  107. package/dist/knowledge/baselines/rules/permission.json +330 -0
  108. package/dist/knowledge/baselines/rules/personal.json +139 -0
  109. package/dist/knowledge/baselines/rules/progress.json +346 -0
  110. package/dist/knowledge/baselines/rules/proof.json +158 -0
  111. package/dist/knowledge/baselines/rules/registrar.json +159 -0
  112. package/dist/knowledge/baselines/rules/repository.json +244 -0
  113. package/dist/knowledge/baselines/rules/resource.json +117 -0
  114. package/dist/knowledge/baselines/rules/reward.json +471 -0
  115. package/dist/knowledge/baselines/rules/service.json +595 -0
  116. package/dist/knowledge/baselines/rules/treasury.json +440 -0
  117. package/dist/knowledge/baselines/rules/util.json +101 -0
  118. package/dist/knowledge/bridge-risk.d.ts +6 -5
  119. package/dist/knowledge/bridge-risk.js +1 -1
  120. package/dist/knowledge/builtin-templates.d.ts +26 -0
  121. package/dist/knowledge/builtin-templates.js +1 -0
  122. package/dist/knowledge/contact-risk.d.ts +6 -5
  123. package/dist/knowledge/contact-risk.js +1 -1
  124. package/dist/knowledge/demand-risk.d.ts +6 -5
  125. package/dist/knowledge/demand-risk.js +1 -1
  126. package/dist/knowledge/event-semantics.js +1 -1
  127. package/dist/knowledge/facts-sync.spec.d.ts +1 -0
  128. package/dist/knowledge/facts-sync.spec.js +1 -0
  129. package/dist/knowledge/getting-started.js +1 -1
  130. package/dist/knowledge/guard-design-patterns.js +1 -1
  131. package/dist/knowledge/guard-field-cognition.d.ts +1 -1
  132. package/dist/knowledge/guard-field-cognition.js +1 -1
  133. package/dist/knowledge/guard-ledger.js +1 -1
  134. package/dist/knowledge/guard-risk.d.ts +4 -1
  135. package/dist/knowledge/guard-risk.js +1 -1
  136. package/dist/knowledge/guard-templates.js +1 -1
  137. package/dist/knowledge/guard-translation.js +1 -1
  138. package/dist/knowledge/index.d.ts +10 -2
  139. package/dist/knowledge/index.js +1 -1
  140. package/dist/knowledge/industry-registry.js +1 -1
  141. package/dist/knowledge/industry-strategy.js +1 -1
  142. package/dist/knowledge/jsonrpc-enum.js +1 -1
  143. package/dist/knowledge/machine-ledger.js +1 -1
  144. package/dist/knowledge/machine-risk.d.ts +4 -1
  145. package/dist/knowledge/machine-risk.js +1 -1
  146. package/dist/knowledge/machine-templates.js +1 -1
  147. package/dist/knowledge/machine-translation.js +1 -1
  148. package/dist/knowledge/migration-preflight.js +1 -1
  149. package/dist/knowledge/operation-dictionary.js +1 -1
  150. package/dist/knowledge/order-ledger.js +1 -1
  151. package/dist/knowledge/order-puzzle.d.ts +3 -3
  152. package/dist/knowledge/order-puzzle.js +1 -1
  153. package/dist/knowledge/order-risk.d.ts +6 -3
  154. package/dist/knowledge/order-risk.js +1 -1
  155. package/dist/knowledge/order-templates.js +1 -1
  156. package/dist/knowledge/passport-ledger.js +1 -1
  157. package/dist/knowledge/passport-templates.js +1 -1
  158. package/dist/knowledge/payment-risk.d.ts +8 -6
  159. package/dist/knowledge/payment-risk.js +1 -1
  160. package/dist/knowledge/payment-tracker.js +1 -1
  161. package/dist/knowledge/permission-ledger.js +1 -1
  162. package/dist/knowledge/permission-puzzle.d.ts +12 -12
  163. package/dist/knowledge/permission-puzzle.js +1 -1
  164. package/dist/knowledge/permission-risk.d.ts +4 -7
  165. package/dist/knowledge/permission-risk.js +1 -1
  166. package/dist/knowledge/permission-templates.js +1 -1
  167. package/dist/knowledge/personal-risk.d.ts +6 -5
  168. package/dist/knowledge/personal-risk.js +1 -1
  169. package/dist/knowledge/progress-ledger.js +1 -1
  170. package/dist/knowledge/progress-puzzle.d.ts +2 -2
  171. package/dist/knowledge/progress-puzzle.js +1 -1
  172. package/dist/knowledge/progress-risk.d.ts +4 -1
  173. package/dist/knowledge/progress-risk.js +1 -1
  174. package/dist/knowledge/progress-templates.js +1 -1
  175. package/dist/knowledge/proof-risk.d.ts +6 -5
  176. package/dist/knowledge/proof-risk.js +1 -1
  177. package/dist/knowledge/puzzle-projections.js +1 -1
  178. package/dist/knowledge/recipient-constraint.d.ts +20 -1
  179. package/dist/knowledge/recipient-constraint.js +1 -1
  180. package/dist/knowledge/registrar-risk.d.ts +6 -5
  181. package/dist/knowledge/registrar-risk.js +1 -1
  182. package/dist/knowledge/repository-risk.d.ts +7 -6
  183. package/dist/knowledge/repository-risk.js +1 -1
  184. package/dist/knowledge/resource-risk.d.ts +6 -5
  185. package/dist/knowledge/resource-risk.js +1 -1
  186. package/dist/knowledge/reward-ledger.d.ts +1 -1
  187. package/dist/knowledge/reward-ledger.js +1 -1
  188. package/dist/knowledge/reward-puzzle.d.ts +2 -2
  189. package/dist/knowledge/reward-puzzle.js +1 -1
  190. package/dist/knowledge/reward-risk.d.ts +4 -1
  191. package/dist/knowledge/reward-risk.js +1 -1
  192. package/dist/knowledge/rule-node-analyzers.spec.js +1 -1
  193. package/dist/knowledge/rule-outcome.js +1 -1
  194. package/dist/knowledge/scenario-modes.d.ts +2 -2
  195. package/dist/knowledge/scenario-modes.js +1 -1
  196. package/dist/knowledge/scenario-topology.js +1 -1
  197. package/dist/knowledge/service-allocator-audit-node.js +1 -1
  198. package/dist/knowledge/service-ledger.js +1 -1
  199. package/dist/knowledge/service-puzzle.d.ts +2 -2
  200. package/dist/knowledge/service-puzzle.js +1 -1
  201. package/dist/knowledge/service-risk-node.js +1 -1
  202. package/dist/knowledge/service-risk.d.ts +4 -1
  203. package/dist/knowledge/service-risk.js +1 -1
  204. package/dist/knowledge/service-templates.js +1 -1
  205. package/dist/knowledge/strategy-manuals.d.ts +1 -1
  206. package/dist/knowledge/strategy-manuals.js +1 -1
  207. package/dist/knowledge/template-loader.d.ts +84 -0
  208. package/dist/knowledge/template-loader.js +1 -0
  209. package/dist/knowledge/template-loader.spec.d.ts +1 -0
  210. package/dist/knowledge/template-loader.spec.js +1 -0
  211. package/dist/knowledge/template-registry.js +1 -1
  212. package/dist/knowledge/template-scanner.d.ts +17 -0
  213. package/dist/knowledge/template-scanner.js +1 -0
  214. package/dist/knowledge/template-scanner.spec.d.ts +1 -0
  215. package/dist/knowledge/template-scanner.spec.js +1 -0
  216. package/dist/knowledge/tools-reference.js +1 -1
  217. package/dist/knowledge/treasury-ledger.d.ts +1 -1
  218. package/dist/knowledge/treasury-ledger.js +1 -1
  219. package/dist/knowledge/treasury-puzzle.d.ts +3 -3
  220. package/dist/knowledge/treasury-puzzle.js +1 -1
  221. package/dist/knowledge/treasury-risk.d.ts +4 -1
  222. package/dist/knowledge/treasury-risk.js +1 -1
  223. package/dist/knowledge/treasury-templates.js +1 -1
  224. package/dist/knowledge/util-risk.d.ts +6 -5
  225. package/dist/knowledge/util-risk.js +1 -1
  226. package/dist/knowledge/workflow-guidance.d.ts +4 -0
  227. package/dist/knowledge/workflow-guidance.js +1 -1
  228. package/dist/knowledge/workspace-lists.js +1 -1
  229. package/dist/monitor/MonitorLoop.js +1 -1
  230. package/dist/participation/arbitrator-interest.js +1 -1
  231. package/dist/participation/radar-core.js +1 -1
  232. package/dist/persona/analyzer.js +1 -1
  233. package/dist/persona/index.js +1 -1
  234. package/dist/persona/model.js +1 -1
  235. package/dist/persona/persona-audit.spec.d.ts +1 -0
  236. package/dist/persona/persona-audit.spec.js +1 -0
  237. package/dist/persona/types.d.ts +2 -0
  238. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  239. package/dist/playbooks/service-build/facet-money.d.ts +11 -0
  240. package/dist/playbooks/service-build/facet-money.js +1 -1
  241. package/dist/playbooks/service-build/machine-panorama.d.ts +17 -0
  242. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  243. package/dist/playbooks/service-build/merchant-guide.d.ts +2 -2
  244. package/dist/playbooks/service-build/migration-planner.d.ts +43 -0
  245. package/dist/playbooks/service-build/migration-planner.js +1 -0
  246. package/dist/playbooks/service-build/object-panorama.d.ts +42 -1
  247. package/dist/playbooks/service-build/object-panorama.js +1 -1
  248. package/dist/playbooks/service-build/participation-radar.js +1 -1
  249. package/dist/playbooks/service-build/pipeline-actions.d.ts +1 -1
  250. package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
  251. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  252. package/dist/playbooks/service-build/risk-aggregator.d.ts +2 -1
  253. package/dist/playbooks/service-build/risk-aggregator.js +1 -1
  254. package/dist/playbooks/service-build/semantic-graph.js +1 -1
  255. package/dist/playbooks/service-build/service-panorama.d.ts +53 -1
  256. package/dist/playbooks/service-build/service-panorama.js +1 -1
  257. package/dist/playbooks/service-build/topology-evaluation.spec.js +1 -1
  258. package/dist/playbooks/service-build/topology-query.js +1 -1
  259. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +2 -2
  260. package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
  261. package/dist/relationship/registry.js +1 -1
  262. package/dist/review/machine.js +1 -1
  263. package/dist/review/order.js +1 -1
  264. package/dist/review/service.js +1 -1
  265. package/dist/review/types.d.ts +7 -0
  266. package/dist/safety/confirm-gate.js +1 -1
  267. package/dist/schema/benchmark-migration/index.d.ts +207 -0
  268. package/dist/schema/benchmark-migration/index.js +1 -0
  269. package/dist/schema/call/allocation.d.ts +1 -1
  270. package/dist/schema/call/allocation.js +1 -1
  271. package/dist/schema/call/arbitration.d.ts +1 -1
  272. package/dist/schema/call/arbitration.js +1 -1
  273. package/dist/schema/call/base.d.ts +5 -5
  274. package/dist/schema/call/base.js +1 -1
  275. package/dist/schema/call/contact.d.ts +1 -1
  276. package/dist/schema/call/demand.d.ts +1 -1
  277. package/dist/schema/call/guard.d.ts +3 -3
  278. package/dist/schema/call/machine.d.ts +5 -5
  279. package/dist/schema/call/order.d.ts +3 -3
  280. package/dist/schema/call/payment.js +1 -1
  281. package/dist/schema/call/permission-handler.d.ts +1 -1
  282. package/dist/schema/call/permission-handler.js +1 -1
  283. package/dist/schema/call/permission.d.ts +16 -16
  284. package/dist/schema/call/permission.js +1 -1
  285. package/dist/schema/call/personal.d.ts +8 -8
  286. package/dist/schema/call/personal.js +1 -1
  287. package/dist/schema/call/progress.d.ts +3 -3
  288. package/dist/schema/call/repository.d.ts +11 -11
  289. package/dist/schema/call/repository.js +1 -1
  290. package/dist/schema/call/reward.d.ts +1 -1
  291. package/dist/schema/call/semantic.js +1 -1
  292. package/dist/schema/call/service.d.ts +7 -7
  293. package/dist/schema/call/service.js +1 -1
  294. package/dist/schema/call/treasury.d.ts +1 -1
  295. package/dist/schema/common/index.d.ts +6 -6
  296. package/dist/schema/common/index.js +1 -1
  297. package/dist/schema/config/index.d.ts +50 -1
  298. package/dist/schema/config/index.js +1 -1
  299. package/dist/schema/evaluation/index.d.ts +27 -11
  300. package/dist/schema/evaluation/index.js +1 -1
  301. package/dist/schema/goal/index.d.ts +5 -5
  302. package/dist/schema/goal/planning.d.ts +15 -15
  303. package/dist/schema/goal/planning.js +1 -1
  304. package/dist/schema/index.d.ts +1 -0
  305. package/dist/schema/index.js +1 -1
  306. package/dist/schema/interaction/index.d.ts +1 -1
  307. package/dist/schema/local/index.js +1 -1
  308. package/dist/schema/messenger/index.d.ts +26 -26
  309. package/dist/schema/operations.d.ts +33 -33
  310. package/dist/schema/operations.js +1 -1
  311. package/dist/schema/persona/index.d.ts +4708 -0
  312. package/dist/schema/persona/index.js +1 -1
  313. package/dist/schema/query/bi.d.ts +232 -25
  314. package/dist/schema/query/bi.js +1 -1
  315. package/dist/schema/query/index.d.ts +35 -35
  316. package/dist/schema/query/index.js +1 -1
  317. package/dist/schema/schema-version.js +1 -1
  318. package/dist/schema/workflow/index.d.ts +1 -1
  319. package/dist/schema-query-impl/index.d.ts +9 -0
  320. package/dist/schema-query-impl/index.js +1 -1
  321. package/dist/schemas/benchmark_migration_operation.output.json +793 -0
  322. package/dist/schemas/benchmark_migration_operation.schema.json +83 -0
  323. package/dist/schemas/bridge_operation.schema.json +5 -5
  324. package/dist/schemas/config_operation.output.json +252 -0
  325. package/dist/schemas/config_operation.schema.json +21 -1
  326. package/dist/schemas/evaluation_operation.output.json +22 -10
  327. package/dist/schemas/goal_operation.schema.json +8 -8
  328. package/dist/schemas/guard2file.schema.json +1 -1
  329. package/dist/schemas/index.json +7 -1
  330. package/dist/schemas/machineNode2file.schema.json +1 -1
  331. package/dist/schemas/messenger_operation.schema.json +24 -12
  332. package/dist/schemas/onchain_events.output.json +1 -1
  333. package/dist/schemas/onchain_operations.output.json +4 -2
  334. package/dist/schemas/onchain_operations.schema.json +189 -139
  335. package/dist/schemas/onchain_operations_allocation.schema.json +13 -11
  336. package/dist/schemas/onchain_operations_arbitration.schema.json +10 -8
  337. package/dist/schemas/onchain_operations_contact.schema.json +7 -5
  338. package/dist/schemas/onchain_operations_demand.schema.json +7 -5
  339. package/dist/schemas/onchain_operations_gen_passport.schema.json +5 -3
  340. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  341. package/dist/schemas/onchain_operations_guard.schema.json +5 -3
  342. package/dist/schemas/onchain_operations_machine.schema.json +22 -18
  343. package/dist/schemas/onchain_operations_order.schema.json +11 -7
  344. package/dist/schemas/onchain_operations_payment.schema.json +3 -3
  345. package/dist/schemas/onchain_operations_permission.schema.json +19 -11
  346. package/dist/schemas/onchain_operations_personal.schema.json +16 -10
  347. package/dist/schemas/onchain_operations_progress.schema.json +11 -7
  348. package/dist/schemas/onchain_operations_proof.schema.json +5 -3
  349. package/dist/schemas/onchain_operations_repository.schema.json +12 -8
  350. package/dist/schemas/onchain_operations_reward.schema.json +11 -9
  351. package/dist/schemas/onchain_operations_service.schema.json +28 -22
  352. package/dist/schemas/onchain_operations_treasury.schema.json +11 -9
  353. package/dist/schemas/onchain_table_data.output.json +27 -17
  354. package/dist/schemas/persona_operation.output.json +15875 -1
  355. package/dist/schemas/persona_operation.schema.json +3056 -478
  356. package/dist/schemas/query_toolkit.output.json +343 -63
  357. package/dist/schemas/query_toolkit.schema.json +1 -1
  358. package/dist/schemas/workflow_operation.schema.json +4 -2
  359. package/dist/strategy/scorecard.js +1 -1
  360. package/dist/tools/handlers/benchmark-migration.d.ts +2 -0
  361. package/dist/tools/handlers/benchmark-migration.js +1 -0
  362. package/dist/tools/handlers/config.js +1 -1
  363. package/dist/tools/handlers/industry-pack.js +1 -1
  364. package/dist/tools/handlers/onchain.js +1 -1
  365. package/dist/tools/handlers/query.js +1 -1
  366. package/dist/tools/handlers/schema-query.js +1 -1
  367. package/dist/tools/index.js +1 -1
  368. package/dist/tools/move-fn-index.gen.d.ts +3 -0
  369. package/dist/tools/move-fn-index.gen.js +1 -0
  370. package/dist/tools/registry/business.js +1 -1
  371. package/dist/tools/registry/config.js +1 -1
  372. package/dist/tools/registry/evaluation.js +1 -1
  373. package/dist/tools/registry/onchain.js +1 -1
  374. package/dist/tools/sanitize-output.d.ts +3 -0
  375. package/dist/tools/sanitize-output.js +1 -0
  376. package/dist/tools/sanitize-output.spec.d.ts +1 -0
  377. package/dist/tools/sanitize-output.spec.js +1 -0
  378. package/package.json +9 -4
  379. package/dist/knowledge/baselines/evaluation-baselines.json +0 -79
@@ -0,0 +1,155 @@
1
+ {
2
+ "comment": "Arb rule pack (R-ARB) — declarative form of the retired in-code Arb risk rules. Facts are produced by the kernel extractor (arb-risk.ts, bound to the on-chain arb limits); rules only reference fact names. Levels/wording can be retuned per rule and rules can be disabled (enabled=false, trace left) via the judgment document — factory rules can never be deleted or invented here.",
3
+ "facts": {
4
+ "status_display": "Rendered current Arb status code ('?' when the context carries none) — evidence annotation for transition checks.",
5
+ "invalid_transition": "A state transition targets an invalid next state in the Arb 7-state machine.",
6
+ "withdraw_too_early": "The caller attempts withdraw before the post-arbitration lock duration has elapsed.",
7
+ "votor_count": "Number of voters recorded (or about to be recorded) on the Arb.",
8
+ "votor_count_at_limit": "votor_count has reached MAX_VOTOR_COUNT (chain-limit comparison sunk into the extractor).",
9
+ "voting_deadline_none": "voting_deadline is None (open-ended vote that never auto-expires).",
10
+ "expects_proposition_event": "The caller expects proposition edits to emit a discrete event.",
11
+ "indemnity_none": "indemnity is None (the ruling carries no compensation).",
12
+ "weight_concentrated": "The Arbitration rule gives disproportionate voting weight to one voter.",
13
+ "expects_status_enum": "The caller expects status fields to be a Move enum (they are u8 constants).",
14
+ "max_votor_count": "KERNEL CONSTANT — maximum voters per Arb (MAX_VOTOR_COUNT).",
15
+ "withdraw_duration_time_ms": "KERNEL CONSTANT — post-arbitration withdraw lock in milliseconds (WITHDRAW_DURATION_TIME)."
16
+ },
17
+ "rules": [
18
+ {
19
+ "rule_id": "R-ARB-01",
20
+ "dimension": "lifecycle",
21
+ "trigger": "a state transition targets an invalid next state",
22
+ "cases": [
23
+ {
24
+ "when": { "field": "invalid_transition", "op": "eq", "value": true },
25
+ "level": "high",
26
+ "title": "7-state machine — invalid transitions can deadlock the arbitration",
27
+ "description": "Arb has a 7-state machine: Principal_confirming(0) → Arbitrator_confirming(1) → Voting(2) → Arbitrated(3) → Objectionable(4) → Finished(5) → Withdrawn(6). reset() can revert from {1, 4} back to 0. Each op asserts the current status; calling an op out of order aborts with E_STATUS_NOT_MATCH (3). Repeated mis-calls leave the Arb stuck in a non-terminal state with no automatic recovery.",
28
+ "scenario": "Caller calls vote() when status is still Arbitrator_confirming; abort blocks progress",
29
+ "mitigation": "Strictly validate the current status before submitting any Arb op. The SDK should expose a status-aware state machine helper. Provide a recovery path (reset) for Arbitrator_confirming and Objectionable states.",
30
+ "evidence": "invalid_transition=true (status=${status_display})",
31
+ "stakeholders": ["principal", "arbitrator", "voter"]
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "rule_id": "R-ARB-02",
37
+ "dimension": "lifecycle",
38
+ "trigger": "withdraw attempted before the withdraw lock duration elapses",
39
+ "cases": [
40
+ {
41
+ "when": { "field": "withdraw_too_early", "op": "eq", "value": true },
42
+ "level": "medium",
43
+ "title": "WITHDRAW_DURATION_TIME=${withdraw_duration_time_ms}ms (30 days) — funds locked",
44
+ "description": "After arbitration, the fee Balance can only be withdrawn after WITHDRAW_DURATION_TIME=${withdraw_duration_time_ms}ms (30 days) when status is Arbitrated(3) or Objectionable(4). From Finished(5), withdraw is immediate. The 30-day lock is a dispute-window safeguard, but it locks funds for a long time and users may not understand why.",
45
+ "scenario": "Arbitrator finishes a case but must wait 30 days to claim the fee",
46
+ "mitigation": "Surface the unlock timestamp in the UI. To shorten the lock, drive the case to Finished(5) via finish() rather than leaving it in Arbitrated/Objectionable.",
47
+ "evidence": "withdraw_too_early=true (limit=${withdraw_duration_time_ms}ms)",
48
+ "stakeholders": ["principal", "arbitrator"]
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "rule_id": "R-ARB-03",
54
+ "dimension": "structural",
55
+ "trigger": "voter count reaches MAX_VOTOR_COUNT",
56
+ "cases": [
57
+ {
58
+ "when": { "field": "votor_count_at_limit", "op": "eq", "value": true },
59
+ "level": "medium",
60
+ "title": "MAX_VOTOR_COUNT=${max_votor_count} permissive — voting efficiency cost",
61
+ "description": "A single Arb may record up to MAX_VOTOR_COUNT=${max_votor_count} voters. The limit aborts with E_MAX_VOTOR_COUNT (6) only at the boundary. 520 voters in one Arb inflates the voted vector, slowing tally and gas, and complicates weighted-quorum reasoning.",
62
+ "scenario": "Arbitration allows 520 voters; tallying the vote vector is slow and gas-heavy",
63
+ "mitigation": "Business layer should self-limit voter count based on the Arbitration rule's quorum. For large juries, shard across multiple Arb instances or aggregate off-chain.",
64
+ "evidence": "votor_count=${votor_count}, limit=${max_votor_count}",
65
+ "stakeholders": ["voter", "arbitrator"]
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "rule_id": "R-ARB-04",
71
+ "dimension": "semantic",
72
+ "trigger": "caller expects proposition edits to emit a discrete event",
73
+ "cases": [
74
+ {
75
+ "when": { "field": "expects_proposition_event", "op": "eq", "value": true },
76
+ "level": "low",
77
+ "title": "Proposition edits may not emit a discrete event — indexers must infer",
78
+ "description": "Editing propositions updates the proposition vector in place. Unlike state transitions (which emit ArbEvent), proposition edits may not produce a discrete event — indexers must infer changes by diffing the proposition vector across polls.",
79
+ "scenario": "Indexer expects a PropositionChangedEvent; none is emitted, UI fails to refresh",
80
+ "mitigation": "External indexers should poll the proposition vector. UI should display 'propositions may have changed' on each poll rather than relying on event-driven refresh.",
81
+ "evidence": "expects_proposition_event=true (poll instead)",
82
+ "stakeholders": ["arbitrator", "voter"]
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "rule_id": "R-ARB-05",
88
+ "dimension": "semantic",
89
+ "trigger": "voting_deadline is None (open-ended vote)",
90
+ "cases": [
91
+ {
92
+ "when": { "field": "voting_deadline_none", "op": "eq", "value": true },
93
+ "level": "medium",
94
+ "title": "voting_deadline is Option<u64> — None means open-ended vote",
95
+ "description": "voting_deadline is Option<u64>. When None, voting has no deadline (open-ended) and E_VOTING_DEADLINE_PASSED (7) never triggers. When Some(t), vote() aborts if clock.timestamp_ms() > t. Callers who assume a default deadline may be surprised by an open-ended vote that never finalizes.",
96
+ "scenario": "Voter assumes a deadline; voting_deadline is None and the case stalls indefinitely",
97
+ "mitigation": "Document that None means open-ended. Arbitrators should set an explicit deadline when confirming the case unless they intend an open vote. SDK should surface voting_deadline prominently.",
98
+ "evidence": "voting_deadline_none=true (open-ended vote)",
99
+ "stakeholders": ["voter", "arbitrator"]
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "rule_id": "R-ARB-06",
105
+ "dimension": "semantic",
106
+ "trigger": "indemnity is None (no compensation)",
107
+ "cases": [
108
+ {
109
+ "when": { "field": "indemnity_none", "op": "eq", "value": true },
110
+ "level": "low",
111
+ "title": "indemnity is Option<Indemnity> — None means no compensation",
112
+ "description": "indemnity is Option<Indemnity>. When None, the arbitration produces no compensation (e.g. a pure declaratory ruling). Consumers who assume a non-null indemnity will mis-handle None cases. finish() returns the indemnity amount (0 when None).",
113
+ "scenario": "Principal expects compensation; indemnity is None and finish() returns 0",
114
+ "mitigation": "Document that None means no compensation. UI should show 'no compensation awarded' rather than 'compensation pending'.",
115
+ "evidence": "indemnity_none=true (no compensation)",
116
+ "stakeholders": ["principal"]
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "rule_id": "R-ARB-07",
122
+ "dimension": "permission",
123
+ "trigger": "the Arbitration rule concentrates weight in one voter",
124
+ "cases": [
125
+ {
126
+ "when": { "field": "weight_concentrated", "op": "eq", "value": true },
127
+ "level": "medium",
128
+ "title": "Voted.weight is set by the Arbitration rule — concentrated weight risk",
129
+ "description": "Voted.weight (u32) is assigned by the Arbitration object's voting_guard logic, not by the voter. If the Arbitration rule concentrates weight in one voter (e.g. an admin with weight 1000 vs. others with weight 1), a single voter can dictate the outcome. The Arb contract itself does not detect concentration — that is the Arbitration designer's responsibility.",
130
+ "scenario": "Arbitration rule gives one voter weight 1000; that voter single-handedly decides the case",
131
+ "mitigation": "When designing the Arbitration rule, cap individual voter weight and require a quorum. Audit the voting_guard to ensure no single voter can exceed the quorum alone.",
132
+ "evidence": "weight_concentrated=true (rule-level risk)",
133
+ "stakeholders": ["voter", "arbitrator"]
134
+ }
135
+ ]
136
+ },
137
+ {
138
+ "rule_id": "R-ARB-08",
139
+ "dimension": "semantic",
140
+ "trigger": "caller expects a Move enum for statuses",
141
+ "cases": [
142
+ {
143
+ "when": { "field": "expects_status_enum", "op": "eq", "value": true },
144
+ "level": "low",
145
+ "title": "Status uses u8 constants — Move enum is commented out",
146
+ "description": "The 7 statuses are defined as u8 constants (Status_Principal_confirming=0, etc.). The Move enum definition is commented out. Consumers cannot rely on a type-safe enum and must compare against magic numbers. A future Wow release enabling the enum would be a breaking change to downstream code.",
147
+ "scenario": "Developer expects a Status enum; only u8 constants are available, causing type errors",
148
+ "mitigation": "SDK should expose a TypeScript enum mirroring the u8 constants. Document that the Move enum is intentionally disabled and may be enabled in a future version.",
149
+ "evidence": "expects_status_enum=true (only u8 constants exist)",
150
+ "stakeholders": ["system"]
151
+ }
152
+ ]
153
+ }
154
+ ]
155
+ }
@@ -0,0 +1,366 @@
1
+ {
2
+ "comment": "Arbitration rule pack (R-AB) — declarative form of the retired in-code Arbitration risk rules (objectType 'arb', L1/L2 assess path). Facts are produced by the kernel extractor (arbitration-risk.ts, bound to the arbitration ledger and on-chain fee/vote semantics); rules only reference fact names. Levels/wording can be retuned per rule and rules can be disabled (enabled=false, trace left) via the judgment document — factory rules can never be deleted or invented here.",
3
+ "facts": {
4
+ "voting_guard_add_set": "The context carries a voting_guard add/set op (a projected voting_guard list mutation).",
5
+ "voting_guard_new_count": "Projected voting_guard entry count after the op: guards.length for 'set', current on-chain count + guards.length for 'add'.",
6
+ "max_voting_guard_count": "KERNEL CONSTANT — on-chain MAX_VOTING_GUARD_COUNT bound imported from @wowok/wowok.",
7
+ "voting_guard_count_exceeded": "True when the projected voting_guard entry count exceeds MAX_VOTING_GUARD_COUNT (first-hit scan of the guards list).",
8
+ "dispute_present": "The context carries a dispute payload (truthy ctx.dispute).",
9
+ "dispute_fee_insufficient": "True when the dispute fee (balance form) is below the current on-chain arbitration fee (BigInt comparison, mirroring E_FEE_NOT_ENOUGH).",
10
+ "dispute_fee_provided": "Dispute fee balance rendered in base units (BigInt string form).",
11
+ "arbitration_fee_required": "Current on-chain arbitration fee rendered in base units (BigInt string form).",
12
+ "current_bPaused": "Echo of the on-chain Arbitration.bPaused flag (strict boolean).",
13
+ "voting_deadline_selected": "The voting_deadline under review (confirm.voting_deadline, else voting_deadline_change.voting_deadline).",
14
+ "current_timestamp_ms": "Echo of the current clock reading used for the deadline comparison.",
15
+ "voting_deadline_in_past": "True when the selected voting_deadline is already elapsed at the current timestamp.",
16
+ "vote_voting_guard": "The Guard id the vote claims (vote.voting_guard).",
17
+ "voting_guard_list_empty": "True when the on-chain Arbitration.voting_guard list is missing or empty.",
18
+ "vote_guard_registered": "True when the claimed vote Guard is found in the on-chain voting_guard list.",
19
+ "registered_voting_guards": "Comma-joined on-chain voting_guard address list (display form).",
20
+ "weight_guard_identifier_over": "True when a submitted vote_weight.GuardIdentifier exceeds the u8 bound (first offender in list order wins).",
21
+ "weight_guard_identifier_value": "The offending GuardIdentifier value.",
22
+ "weight_fixed_over": "True when a submitted vote_weight.FixedValue exceeds the u32 bound (first offender in list order wins).",
23
+ "weight_fixed_value": "The offending FixedValue value.",
24
+ "weight_collusion_dominant": "True when at least 2 guards carry fixed weights and one fixed weight controls more than 50% of the fixed-weight total.",
25
+ "weight_max": "Largest single fixed vote weight in the submission.",
26
+ "weight_total": "Sum of all fixed vote weights in the submission.",
27
+ "weight_ratio_pct": "Dominance ratio (max/total) in percent with one decimal place (display string).",
28
+ "builder": "Echo of the target owner address for an ownership transfer (ctx.builder).",
29
+ "arbitration_op_present": "The context carries an arbitration (ruling) op payload.",
30
+ "current_arb_status": "Echo of the current on-chain Arb status.",
31
+ "expected_arb_status": "Echo of the Arb status the operation expects.",
32
+ "arb_transition_invalid": "True when current → expected is not a valid 7-state flow transition (arbitration-ledger kernel).",
33
+ "arb_status_terminal": "True when the current Arb status is terminal (Finished/Withdrawn).",
34
+ "arb_terminal_op_blocked": "True when a non-withdraw operation targets a terminal Arb.",
35
+ "reset_present": "The context carries a reset op payload (truthy ctx.reset).",
36
+ "reset_arb": "Target Arb object id of the reset op (display form).",
37
+ "fees_transfer_present": "The context carries a fees_transfer op payload.",
38
+ "fees_transfer_dest": "Rendered transfer destination: 'Allocation <id>' or 'Treasury <id>'.",
39
+ "fees_transfer_remark": "Rendered payment remark of the fees_transfer op.",
40
+ "dispute_order": "Order object id the dispute is filed against (display form)."
41
+ },
42
+ "rules": [
43
+ {
44
+ "rule_id": "R-AB-1-01",
45
+ "dimension": "structural",
46
+ "trigger": "voting_guard count exceeds MAX_VOTING_GUARD_COUNT (50)",
47
+ "cases": [
48
+ {
49
+ "when": { "field": "voting_guard_count_exceeded", "op": "eq", "value": true },
50
+ "level": "high",
51
+ "title": "voting_guard count exceeds limit",
52
+ "description": "voting_guard would have ${voting_guard_new_count} entries, exceeds MAX_VOTING_GUARD_COUNT ${max_voting_guard_count}",
53
+ "scenario": "Adding too many voting guards",
54
+ "mitigation": "Remove unused guards before adding new ones; max ${max_voting_guard_count}",
55
+ "evidence": "count=${voting_guard_new_count}",
56
+ "stakeholders": ["owner", "arbiter"]
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "rule_id": "R-AB-1-02",
62
+ "dimension": "structural",
63
+ "trigger": "Dispute fee below arbitration.fee threshold",
64
+ "cases": [
65
+ {
66
+ "when": { "field": "dispute_fee_insufficient", "op": "eq", "value": true },
67
+ "level": "critical",
68
+ "title": "Dispute fee insufficient (E_FEE_NOT_ENOUGH)",
69
+ "description": "Provided fee ${dispute_fee_provided} < required ${arbitration_fee_required}",
70
+ "scenario": "Filing dispute with insufficient fee",
71
+ "mitigation": "Increase dispute.fee.balance to >= ${arbitration_fee_required}",
72
+ "evidence": "provided=${dispute_fee_provided}, required=${arbitration_fee_required}",
73
+ "stakeholders": ["disputant"]
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ "rule_id": "R-AB-1-03",
79
+ "dimension": "structural",
80
+ "trigger": "Arbitration paused (bPaused=true) — dispute will fail with E_PAUSED",
81
+ "cases": [
82
+ {
83
+ "when": { "all": [
84
+ { "field": "dispute_present", "op": "eq", "value": true },
85
+ { "field": "current_bPaused", "op": "eq", "value": true }
86
+ ] },
87
+ "level": "high",
88
+ "title": "Arbitration paused — cannot file dispute",
89
+ "description": "Arbitration.bPaused=true; dispute() will abort with E_PAUSED",
90
+ "scenario": "Filing dispute against a paused Arbitration",
91
+ "mitigation": "Call pause(false) (requires ARBITRATION_PAUSE=356) to resume",
92
+ "evidence": "bPaused=true",
93
+ "stakeholders": ["disputant"]
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "rule_id": "R-AB-1-04",
99
+ "dimension": "structural",
100
+ "trigger": "voting_deadline in the past — vote will be rejected",
101
+ "cases": [
102
+ {
103
+ "when": { "field": "voting_deadline_in_past", "op": "eq", "value": true },
104
+ "level": "high",
105
+ "title": "voting_deadline in the past",
106
+ "description": "Deadline ${voting_deadline_selected} is before current time ${current_timestamp_ms}",
107
+ "scenario": "Setting voting deadline to an already-elapsed timestamp",
108
+ "mitigation": "Use a future timestamp (e.g. now + 7 days in ms)",
109
+ "evidence": "deadline=${voting_deadline_selected}, now=${current_timestamp_ms}",
110
+ "stakeholders": ["voter", "arbiter"]
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "rule_id": "R-AB-2-01",
116
+ "dimension": "semantic",
117
+ "trigger": "voting_guard misconfiguration — dispute cannot be resolved",
118
+ "cases": [
119
+ {
120
+ "when": { "all": [
121
+ { "field": "vote_voting_guard", "op": "truthy" },
122
+ { "field": "voting_guard_list_empty", "op": "eq", "value": true }
123
+ ] },
124
+ "level": "high",
125
+ "title": "voting_guard misconfiguration — dispute cannot be resolved",
126
+ "description": "vote.voting_guard provided but Arbitration.voting_guard is empty; E_VOTING_GUARD_NOT_FOUND will abort",
127
+ "scenario": "voting_guard misconfiguration prevents vote — dispute stuck",
128
+ "mitigation": "Either add the Guard to the voting_guard list (354) or use an open vote without a voting_guard list",
129
+ "evidence": "vote.voting_guard=${vote_voting_guard}",
130
+ "stakeholders": ["voter", "arbiter", "disputant"],
131
+ "exposure": {
132
+ "loss_parties": [
133
+ { "role": "buyer", "basis": "A dispute that cannot proceed to a vote cannot produce a ruling — the disputant's compensation path stalls until the voting_guard setup is repaired." }
134
+ ],
135
+ "gain_paths": []
136
+ }
137
+ },
138
+ {
139
+ "when": { "all": [
140
+ { "field": "vote_voting_guard", "op": "truthy" },
141
+ { "field": "voting_guard_list_empty", "op": "eq", "value": false },
142
+ { "field": "vote_guard_registered", "op": "eq", "value": false }
143
+ ] },
144
+ "level": "high",
145
+ "title": "voting_guard misconfiguration — dispute cannot be resolved",
146
+ "description": "vote.voting_guard ${vote_voting_guard} not in Arbitration.voting_guard list",
147
+ "scenario": "Voter's Guard not registered — vote will fail with E_VOTING_GUARD_NOT_FOUND",
148
+ "mitigation": "Add guard ${vote_voting_guard} via voting_guard_add (354), or use a registered guard",
149
+ "evidence": "provided=${vote_voting_guard}, registered=${registered_voting_guards}",
150
+ "stakeholders": ["voter", "arbiter", "disputant"],
151
+ "exposure": {
152
+ "loss_parties": [
153
+ { "role": "buyer", "basis": "A dispute that cannot proceed to a vote cannot produce a ruling — the disputant's compensation path stalls until the voting_guard setup is repaired." }
154
+ ],
155
+ "gain_paths": []
156
+ }
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "rule_id": "R-AB-2-03",
162
+ "dimension": "semantic",
163
+ "trigger": "VoteValue.GuardIdentifier with non-numeric Guard submission type",
164
+ "cases": [
165
+ {
166
+ "when": { "field": "weight_guard_identifier_over", "op": "eq", "value": true },
167
+ "level": "high",
168
+ "title": "GuardIdentifier index > u8::max (255)",
169
+ "description": "GuardIdentifier ${weight_guard_identifier_value} exceeds u8 max (255)",
170
+ "scenario": "Setting GuardIdentifier index beyond u8 range",
171
+ "mitigation": "Use GuardIdentifier index 0-255",
172
+ "evidence": "identifier=${weight_guard_identifier_value}",
173
+ "stakeholders": ["owner"]
174
+ },
175
+ {
176
+ "when": { "field": "weight_fixed_over", "op": "eq", "value": true },
177
+ "level": "high",
178
+ "title": "FixedValue > u32::max (4294967295)",
179
+ "description": "FixedValue ${weight_fixed_value} exceeds u32 max",
180
+ "scenario": "Setting FixedValue beyond u32 range",
181
+ "mitigation": "Use FixedValue 0-4294967295",
182
+ "evidence": "fixed=${weight_fixed_value}",
183
+ "stakeholders": ["owner"]
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "rule_id": "R-AB-3-01",
189
+ "dimension": "authority",
190
+ "trigger": "Arbiter collusion — single voter controls >50% of total weight",
191
+ "cases": [
192
+ {
193
+ "when": { "field": "weight_collusion_dominant", "op": "eq", "value": true },
194
+ "level": "medium",
195
+ "title": "Arbiter collusion risk — single guard controls >50% weight",
196
+ "description": "One voting_guard has ${weight_max} of ${weight_total} total weight (${weight_ratio_pct}%)",
197
+ "scenario": "Weighted voting with dominant arbiter — can single-handedly decide rulings",
198
+ "mitigation": "Distribute weight more evenly, or require multi-arbiter consensus",
199
+ "evidence": "max=${weight_max}, total=${weight_total}, ratio=${weight_ratio_pct}%",
200
+ "stakeholders": ["owner", "disputant"],
201
+ "exposure": {
202
+ "loss_parties": [
203
+ { "role": "buyer", "basis": "A single dominant voter can decide compensation rulings alone — the disputant's claim outcome rests on one party's discretion." }
204
+ ],
205
+ "gain_paths": [
206
+ {
207
+ "role": "neutral",
208
+ "path": "The dominant guard rules in favor of whoever can influence it, deciding the payout direction single-handedly.",
209
+ "viability": "conditional",
210
+ "gate": "Executes only if the dominant guard is actually captured or biased — the rule flags weight concentration, not an observed influence."
211
+ }
212
+ ]
213
+ }
214
+ }
215
+ ]
216
+ },
217
+ {
218
+ "rule_id": "R-AB-3-02",
219
+ "dimension": "authority",
220
+ "trigger": "Permission over-concentration — single admin (owner)",
221
+ "cases": [
222
+ {
223
+ "when": { "field": "builder", "op": "truthy" },
224
+ "level": "high",
225
+ "title": "Arbitration ownership transfer — IRREVERSIBLE",
226
+ "description": "Transferring Arbitration to ${builder}; original owner loses all control permanently",
227
+ "scenario": "Transferring Arbitration ownership",
228
+ "mitigation": "1) Verify new owner twice. 2) Confirm new owner has 350-368 permissions configured. 3) Coordinate before transfer.",
229
+ "evidence": "new_owner=${builder}",
230
+ "stakeholders": ["owner"],
231
+ "exposure": {
232
+ "loss_parties": [
233
+ { "role": "arbitrator", "basis": "The original owner loses all control permanently — including fee-withdrawal rights over the arbitration balance." }
234
+ ],
235
+ "gain_paths": [
236
+ {
237
+ "role": "neutral",
238
+ "path": "Whichever address is submitted becomes the arbitration owner with full 350-368 permission control and fee-withdrawal rights.",
239
+ "viability": "viable",
240
+ "gate": "No destination verification on-chain — the transfer executes as submitted and cannot be undone."
241
+ }
242
+ ]
243
+ }
244
+ }
245
+ ]
246
+ },
247
+ {
248
+ "rule_id": "R-AB-3-03",
249
+ "dimension": "authority",
250
+ "trigger": "ARBITRATION_ARBITRATION (359) granted to wide audience",
251
+ "cases": [
252
+ {
253
+ "when": { "all": [
254
+ { "field": "arbitration_op_present", "op": "eq", "value": true },
255
+ { "field": "voting_guard_list_empty", "op": "eq", "value": true }
256
+ ] },
257
+ "level": "medium",
258
+ "title": "Ruling without voting_guard — single-arbiter can rule unchallenged",
259
+ "description": "Ruling (359) without a voting_guard restriction means any permission holder can unilaterally decide",
260
+ "scenario": "Single-arbiter Arbitration without consensus check",
261
+ "mitigation": "Configure voting_guard (354) to require multi-arbiter consensus before ruling",
262
+ "evidence": "voting_guard=empty",
263
+ "stakeholders": ["disputant", "voter"],
264
+ "exposure": {
265
+ "loss_parties": [
266
+ { "role": "buyer", "basis": "Without a consensus check the dispute outcome rests on one holder's unilateral decision — no multi-arbiter balance protects the claim." }
267
+ ],
268
+ "gain_paths": [
269
+ {
270
+ "role": "neutral",
271
+ "path": "A 359-permission holder rules unilaterally in favor of whichever party benefits from the payout direction.",
272
+ "viability": "conditional",
273
+ "gate": "Executes only if a ruling holder actually abuses the unrestricted power — the rule flags the missing consensus check, not an observed abuse."
274
+ }
275
+ ]
276
+ }
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ "rule_id": "R-AB-4-01",
282
+ "dimension": "lifecycle",
283
+ "trigger": "Invalid Arb status transition (7-state flow violation)",
284
+ "cases": [
285
+ {
286
+ "when": { "field": "arb_transition_invalid", "op": "eq", "value": true },
287
+ "level": "critical",
288
+ "title": "Invalid Arb status transition",
289
+ "description": "${current_arb_status} → ${expected_arb_status} is not a valid 7-state flow transition",
290
+ "scenario": "Attempting operation out of order (e.g. vote before confirm)",
291
+ "mitigation": "Follow the 7-state flow: Principal_confirming → Arbitrator_confirming → Voting → Arbitrated → Objectionable → Finished/Withdrawn",
292
+ "evidence": "${current_arb_status} → ${expected_arb_status}",
293
+ "stakeholders": ["arbiter", "disputant"]
294
+ }
295
+ ]
296
+ },
297
+ {
298
+ "rule_id": "R-AB-4-02",
299
+ "dimension": "lifecycle",
300
+ "trigger": "Operation on terminal Arb status (Finished/Withdrawn)",
301
+ "cases": [
302
+ {
303
+ "when": { "field": "arb_terminal_op_blocked", "op": "eq", "value": true },
304
+ "level": "high",
305
+ "title": "Operation on terminal Arb status — irreversible",
306
+ "description": "Arb is in terminal status ${current_arb_status}; only the fee withdrawal is allowed",
307
+ "scenario": "Voting/ruling/reset on a Finished or Withdrawn Arb",
308
+ "mitigation": "Open a new Arb case via a new dispute filing if further arbitration is needed",
309
+ "evidence": "status=${current_arb_status}",
310
+ "stakeholders": ["arbiter", "disputant"]
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ "rule_id": "R-AB-4-03",
316
+ "dimension": "lifecycle",
317
+ "trigger": "reset operation — may indefinitely extend arbitration",
318
+ "cases": [
319
+ {
320
+ "when": { "field": "reset_present", "op": "eq", "value": true },
321
+ "level": "medium",
322
+ "title": "reset operation — arbitration lifecycle extended",
323
+ "description": "reset on Arb ${reset_arb} restarts lifecycle to Principal_confirming; feedback required",
324
+ "scenario": "Disputant objects to ruling and resubmits materials",
325
+ "mitigation": "Track reset count — consider capping resets to prevent abuse",
326
+ "evidence": "arb=${reset_arb}",
327
+ "stakeholders": ["arbiter", "disputant"]
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ "rule_id": "R-AB-5-01",
333
+ "dimension": "cross_object",
334
+ "trigger": "fee allocation / transfer unfair distribution — destination not verified",
335
+ "cases": [
336
+ {
337
+ "when": { "field": "fees_transfer_present", "op": "eq", "value": true },
338
+ "level": "medium",
339
+ "title": "Fee allocation / transfer — verify destination fairness",
340
+ "description": "All Arbitration.balance will be transferred to ${fees_transfer_dest}; ensure destination policy is fair to arbiters",
341
+ "scenario": "Distributing arbitration fees without verifying allocation rules",
342
+ "mitigation": "Verify ${fees_transfer_dest} has fair distribution policy; consider allocating to arbiters' Allocation",
343
+ "evidence": "dest=${fees_transfer_dest}, remark=${fees_transfer_remark}",
344
+ "stakeholders": ["arbiter", "owner"]
345
+ }
346
+ ]
347
+ },
348
+ {
349
+ "rule_id": "R-AB-5-02",
350
+ "dimension": "cross_object",
351
+ "trigger": "Dispute filed but Order op permission not verified — E_NOT_OP_PERMISSION",
352
+ "cases": [
353
+ {
354
+ "when": { "field": "dispute_present", "op": "eq", "value": true },
355
+ "level": "high",
356
+ "title": "Order op permission required for dispute",
357
+ "description": "dispute on Order ${dispute_order} requires the Order's operation-permission check; signer must have Order's dispute permission",
358
+ "scenario": "Filing dispute without Order op permission",
359
+ "mitigation": "Ensure signer has Order's dispute operation permission (custom index or builtin)",
360
+ "evidence": "order=${dispute_order}",
361
+ "stakeholders": ["disputant"]
362
+ }
363
+ ]
364
+ }
365
+ ]
366
+ }