@wowok/agent-mcp 2.4.3 → 2.5.0

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 (317) hide show
  1. package/dist/config/runtime.d.ts +4 -0
  2. package/dist/config/runtime.js +29 -5
  3. package/dist/harness/auto-escalation.d.ts +27 -0
  4. package/dist/harness/auto-escalation.js +68 -0
  5. package/dist/index.js +21 -0
  6. package/dist/knowledge/allocation-confirm.d.ts +115 -0
  7. package/dist/knowledge/allocation-confirm.js +534 -0
  8. package/dist/knowledge/allocation-context.d.ts +58 -0
  9. package/dist/knowledge/allocation-context.js +249 -0
  10. package/dist/knowledge/allocation-ledger.d.ts +67 -0
  11. package/dist/knowledge/allocation-ledger.js +463 -0
  12. package/dist/knowledge/allocation-puzzle.d.ts +135 -0
  13. package/dist/knowledge/allocation-puzzle.js +298 -0
  14. package/dist/knowledge/allocation-risk.d.ts +78 -0
  15. package/dist/knowledge/allocation-risk.js +568 -0
  16. package/dist/knowledge/allocation-templates.d.ts +38 -0
  17. package/dist/knowledge/allocation-templates.js +970 -0
  18. package/dist/knowledge/allocation-translation.d.ts +72 -0
  19. package/dist/knowledge/allocation-translation.js +585 -0
  20. package/dist/knowledge/arb-risk.d.ts +37 -0
  21. package/dist/knowledge/arb-risk.js +210 -0
  22. package/dist/knowledge/arbitration-confirm.d.ts +135 -0
  23. package/dist/knowledge/arbitration-confirm.js +559 -0
  24. package/dist/knowledge/arbitration-context.d.ts +81 -0
  25. package/dist/knowledge/arbitration-context.js +505 -0
  26. package/dist/knowledge/arbitration-ledger.d.ts +62 -0
  27. package/dist/knowledge/arbitration-ledger.js +521 -0
  28. package/dist/knowledge/arbitration-puzzle.d.ts +84 -0
  29. package/dist/knowledge/arbitration-puzzle.js +304 -0
  30. package/dist/knowledge/arbitration-risk.d.ts +112 -0
  31. package/dist/knowledge/arbitration-risk.js +433 -0
  32. package/dist/knowledge/arbitration-templates.d.ts +38 -0
  33. package/dist/knowledge/arbitration-templates.js +276 -0
  34. package/dist/knowledge/arbitration-translation.d.ts +91 -0
  35. package/dist/knowledge/arbitration-translation.js +487 -0
  36. package/dist/knowledge/bridge-risk.d.ts +36 -0
  37. package/dist/knowledge/bridge-risk.js +263 -0
  38. package/dist/knowledge/contact-risk.d.ts +32 -0
  39. package/dist/knowledge/contact-risk.js +200 -0
  40. package/dist/knowledge/demand-confirm.d.ts +32 -0
  41. package/dist/knowledge/demand-confirm.js +206 -0
  42. package/dist/knowledge/demand-risk.d.ts +30 -0
  43. package/dist/knowledge/demand-risk.js +240 -0
  44. package/dist/knowledge/demand-translation.d.ts +55 -0
  45. package/dist/knowledge/demand-translation.js +354 -0
  46. package/dist/knowledge/deployment-scanner.d.ts +63 -0
  47. package/dist/knowledge/deployment-scanner.js +762 -0
  48. package/dist/knowledge/examples-scanner-cli.d.ts +1 -0
  49. package/dist/knowledge/examples-scanner-cli.js +26 -0
  50. package/dist/knowledge/examples-scanner.d.ts +121 -0
  51. package/dist/knowledge/examples-scanner.js +825 -0
  52. package/dist/knowledge/flywheel-loop.d.ts +3 -0
  53. package/dist/knowledge/flywheel-loop.js +32 -3
  54. package/dist/knowledge/glossary.js +3 -1
  55. package/dist/knowledge/guard-confirm.d.ts +86 -0
  56. package/dist/knowledge/guard-confirm.js +406 -0
  57. package/dist/knowledge/guard-context.d.ts +56 -0
  58. package/dist/knowledge/guard-context.js +287 -0
  59. package/dist/knowledge/guard-design-patterns.d.ts +37 -0
  60. package/dist/knowledge/guard-design-patterns.js +257 -0
  61. package/dist/knowledge/guard-puzzle.js +3 -2
  62. package/dist/knowledge/guard-risk.d.ts +1 -1
  63. package/dist/knowledge/guard-risk.js +12 -14
  64. package/dist/knowledge/guard-templates.js +1 -1
  65. package/dist/knowledge/guard-translation.js +6 -5
  66. package/dist/knowledge/index.d.ts +342 -0
  67. package/dist/knowledge/index.js +344 -0
  68. package/dist/knowledge/machine-confirm.d.ts +102 -0
  69. package/dist/knowledge/machine-confirm.js +559 -0
  70. package/dist/knowledge/machine-context.d.ts +160 -0
  71. package/dist/knowledge/machine-context.js +812 -0
  72. package/dist/knowledge/machine-ledger.d.ts +41 -0
  73. package/dist/knowledge/machine-ledger.js +315 -0
  74. package/dist/knowledge/machine-puzzle.d.ts +206 -0
  75. package/dist/knowledge/machine-puzzle.js +494 -0
  76. package/dist/knowledge/machine-risk.d.ts +75 -0
  77. package/dist/knowledge/machine-risk.js +644 -0
  78. package/dist/knowledge/machine-templates.d.ts +92 -0
  79. package/dist/knowledge/machine-templates.js +1592 -0
  80. package/dist/knowledge/machine-topology.d.ts +57 -0
  81. package/dist/knowledge/machine-topology.js +234 -0
  82. package/dist/knowledge/machine-translation.d.ts +96 -0
  83. package/dist/knowledge/machine-translation.js +513 -0
  84. package/dist/knowledge/mcp-schema-audit-cli.d.ts +1 -0
  85. package/dist/knowledge/mcp-schema-audit-cli.js +45 -0
  86. package/dist/knowledge/mcp-schema-audit.d.ts +90 -0
  87. package/dist/knowledge/mcp-schema-audit.js +772 -0
  88. package/dist/knowledge/onchain-constants.d.ts +4 -0
  89. package/dist/knowledge/onchain-constants.js +35 -0
  90. package/dist/knowledge/order-confirm.d.ts +115 -0
  91. package/dist/knowledge/order-confirm.js +573 -0
  92. package/dist/knowledge/order-context.d.ts +66 -0
  93. package/dist/knowledge/order-context.js +390 -0
  94. package/dist/knowledge/order-ledger.d.ts +69 -0
  95. package/dist/knowledge/order-ledger.js +341 -0
  96. package/dist/knowledge/order-puzzle.d.ts +159 -0
  97. package/dist/knowledge/order-puzzle.js +255 -0
  98. package/dist/knowledge/order-risk.d.ts +66 -0
  99. package/dist/knowledge/order-risk.js +653 -0
  100. package/dist/knowledge/order-templates.d.ts +50 -0
  101. package/dist/knowledge/order-templates.js +368 -0
  102. package/dist/knowledge/order-translation.d.ts +78 -0
  103. package/dist/knowledge/order-translation.js +550 -0
  104. package/dist/knowledge/passport-confirm.d.ts +130 -0
  105. package/dist/knowledge/passport-confirm.js +531 -0
  106. package/dist/knowledge/passport-context.d.ts +59 -0
  107. package/dist/knowledge/passport-context.js +306 -0
  108. package/dist/knowledge/passport-ledger.d.ts +48 -0
  109. package/dist/knowledge/passport-ledger.js +282 -0
  110. package/dist/knowledge/passport-puzzle.d.ts +108 -0
  111. package/dist/knowledge/passport-puzzle.js +333 -0
  112. package/dist/knowledge/passport-risk.d.ts +70 -0
  113. package/dist/knowledge/passport-risk.js +450 -0
  114. package/dist/knowledge/passport-templates.d.ts +40 -0
  115. package/dist/knowledge/passport-templates.js +568 -0
  116. package/dist/knowledge/passport-translation.d.ts +68 -0
  117. package/dist/knowledge/passport-translation.js +516 -0
  118. package/dist/knowledge/payment-risk.d.ts +33 -0
  119. package/dist/knowledge/payment-risk.js +182 -0
  120. package/dist/knowledge/permission-confirm.d.ts +110 -0
  121. package/dist/knowledge/permission-confirm.js +426 -0
  122. package/dist/knowledge/permission-context.d.ts +58 -0
  123. package/dist/knowledge/permission-context.js +224 -0
  124. package/dist/knowledge/permission-ledger.d.ts +38 -0
  125. package/dist/knowledge/permission-ledger.js +403 -0
  126. package/dist/knowledge/permission-puzzle.d.ts +122 -0
  127. package/dist/knowledge/permission-puzzle.js +173 -0
  128. package/dist/knowledge/permission-risk.d.ts +76 -0
  129. package/dist/knowledge/permission-risk.js +411 -0
  130. package/dist/knowledge/permission-templates.d.ts +38 -0
  131. package/dist/knowledge/permission-templates.js +234 -0
  132. package/dist/knowledge/permission-translation.d.ts +57 -0
  133. package/dist/knowledge/permission-translation.js +350 -0
  134. package/dist/knowledge/personal-risk.d.ts +36 -0
  135. package/dist/knowledge/personal-risk.js +212 -0
  136. package/dist/knowledge/progress-confirm.d.ts +108 -0
  137. package/dist/knowledge/progress-confirm.js +456 -0
  138. package/dist/knowledge/progress-context.d.ts +123 -0
  139. package/dist/knowledge/progress-context.js +452 -0
  140. package/dist/knowledge/progress-ledger.d.ts +63 -0
  141. package/dist/knowledge/progress-ledger.js +327 -0
  142. package/dist/knowledge/progress-puzzle.d.ts +82 -0
  143. package/dist/knowledge/progress-puzzle.js +219 -0
  144. package/dist/knowledge/progress-risk.d.ts +74 -0
  145. package/dist/knowledge/progress-risk.js +461 -0
  146. package/dist/knowledge/progress-templates.d.ts +38 -0
  147. package/dist/knowledge/progress-templates.js +228 -0
  148. package/dist/knowledge/progress-translation.d.ts +52 -0
  149. package/dist/knowledge/progress-translation.js +401 -0
  150. package/dist/knowledge/proof-confirm.d.ts +31 -0
  151. package/dist/knowledge/proof-confirm.js +187 -0
  152. package/dist/knowledge/proof-risk.d.ts +33 -0
  153. package/dist/knowledge/proof-risk.js +207 -0
  154. package/dist/knowledge/proof-translation.d.ts +52 -0
  155. package/dist/knowledge/proof-translation.js +283 -0
  156. package/dist/knowledge/registrar-risk.d.ts +34 -0
  157. package/dist/knowledge/registrar-risk.js +217 -0
  158. package/dist/knowledge/repository-confirm.d.ts +36 -0
  159. package/dist/knowledge/repository-confirm.js +242 -0
  160. package/dist/knowledge/repository-risk.d.ts +40 -0
  161. package/dist/knowledge/repository-risk.js +312 -0
  162. package/dist/knowledge/repository-translation.d.ts +58 -0
  163. package/dist/knowledge/repository-translation.js +422 -0
  164. package/dist/knowledge/resource-risk.d.ts +32 -0
  165. package/dist/knowledge/resource-risk.js +157 -0
  166. package/dist/knowledge/reward-confirm.d.ts +113 -0
  167. package/dist/knowledge/reward-confirm.js +496 -0
  168. package/dist/knowledge/reward-context.d.ts +127 -0
  169. package/dist/knowledge/reward-context.js +504 -0
  170. package/dist/knowledge/reward-ledger.d.ts +96 -0
  171. package/dist/knowledge/reward-ledger.js +502 -0
  172. package/dist/knowledge/reward-puzzle.d.ts +97 -0
  173. package/dist/knowledge/reward-puzzle.js +288 -0
  174. package/dist/knowledge/reward-risk.d.ts +84 -0
  175. package/dist/knowledge/reward-risk.js +545 -0
  176. package/dist/knowledge/reward-translation.d.ts +58 -0
  177. package/dist/knowledge/reward-translation.js +501 -0
  178. package/dist/knowledge/safety-rules.js +11 -3
  179. package/dist/knowledge/scenario-modes.d.ts +53 -0
  180. package/dist/knowledge/scenario-modes.js +302 -0
  181. package/dist/knowledge/service-confirm.d.ts +152 -0
  182. package/dist/knowledge/service-confirm.js +699 -0
  183. package/dist/knowledge/service-context.d.ts +66 -0
  184. package/dist/knowledge/service-context.js +403 -0
  185. package/dist/knowledge/service-ledger.d.ts +71 -0
  186. package/dist/knowledge/service-ledger.js +609 -0
  187. package/dist/knowledge/service-puzzle.d.ts +158 -0
  188. package/dist/knowledge/service-puzzle.js +236 -0
  189. package/dist/knowledge/service-risk.d.ts +108 -0
  190. package/dist/knowledge/service-risk.js +615 -0
  191. package/dist/knowledge/service-templates.d.ts +39 -0
  192. package/dist/knowledge/service-templates.js +418 -0
  193. package/dist/knowledge/service-translation.d.ts +103 -0
  194. package/dist/knowledge/service-translation.js +622 -0
  195. package/dist/knowledge/tools-reference.d.ts +17 -0
  196. package/dist/knowledge/tools-reference.js +151 -0
  197. package/dist/knowledge/treasury-confirm.d.ts +133 -0
  198. package/dist/knowledge/treasury-confirm.js +512 -0
  199. package/dist/knowledge/treasury-context.d.ts +64 -0
  200. package/dist/knowledge/treasury-context.js +363 -0
  201. package/dist/knowledge/treasury-ledger.d.ts +42 -0
  202. package/dist/knowledge/treasury-ledger.js +300 -0
  203. package/dist/knowledge/treasury-puzzle.d.ts +163 -0
  204. package/dist/knowledge/treasury-puzzle.js +216 -0
  205. package/dist/knowledge/treasury-risk.d.ts +86 -0
  206. package/dist/knowledge/treasury-risk.js +440 -0
  207. package/dist/knowledge/treasury-templates.d.ts +38 -0
  208. package/dist/knowledge/treasury-templates.js +316 -0
  209. package/dist/knowledge/treasury-translation.d.ts +78 -0
  210. package/dist/knowledge/treasury-translation.js +498 -0
  211. package/dist/knowledge/util-risk.d.ts +30 -0
  212. package/dist/knowledge/util-risk.js +135 -0
  213. package/dist/project/business-puzzle.d.ts +47 -0
  214. package/dist/project/business-puzzle.js +372 -0
  215. package/dist/project/deployment-doc.d.ts +61 -0
  216. package/dist/project/deployment-doc.js +432 -0
  217. package/dist/project/risk-aggregator.d.ts +50 -0
  218. package/dist/project/risk-aggregator.js +280 -0
  219. package/dist/project/substep-trace.d.ts +130 -0
  220. package/dist/project/substep-trace.js +332 -0
  221. package/dist/schema/call/allocation.d.ts +34 -34
  222. package/dist/schema/call/arbitration.d.ts +141 -141
  223. package/dist/schema/call/base.d.ts +386 -386
  224. package/dist/schema/call/base.js +3 -3
  225. package/dist/schema/call/bridge-handler.d.ts +5 -2
  226. package/dist/schema/call/bridge.d.ts +159 -159
  227. package/dist/schema/call/contact.d.ts +110 -110
  228. package/dist/schema/call/demand.d.ts +76 -76
  229. package/dist/schema/call/handler.d.ts +2 -3
  230. package/dist/schema/call/handler.js +1 -1
  231. package/dist/schema/call/machine.d.ts +58 -58
  232. package/dist/schema/call/order.d.ts +98 -110
  233. package/dist/schema/call/permission-handler.d.ts +5 -0
  234. package/dist/schema/call/permission-handler.js +54 -0
  235. package/dist/schema/call/permission.d.ts +108 -108
  236. package/dist/schema/call/personal.d.ts +14 -14
  237. package/dist/schema/call/progress.d.ts +57 -72
  238. package/dist/schema/call/progress.js +7 -4
  239. package/dist/schema/call/proof.d.ts +18 -18
  240. package/dist/schema/call/proof.js +12 -7
  241. package/dist/schema/call/repository.d.ts +154 -154
  242. package/dist/schema/call/reward.d.ts +55 -55
  243. package/dist/schema/call/service.d.ts +231 -231
  244. package/dist/schema/call/treasury.d.ts +93 -93
  245. package/dist/schema/config/index.d.ts +178 -5
  246. package/dist/schema/config/index.js +52 -1
  247. package/dist/schema/local/index.d.ts +3554 -836
  248. package/dist/schema/local/index.js +2 -1
  249. package/dist/schema/messenger/index.d.ts +162 -162
  250. package/dist/schema/operations.d.ts +1058 -1074
  251. package/dist/schema/operations.js +7 -1
  252. package/dist/schema/project/index.d.ts +1392 -6
  253. package/dist/schema/project/index.js +426 -2
  254. package/dist/schema/query/index.d.ts +672 -672
  255. package/dist/schema/schema-query/index.d.ts +23 -3
  256. package/dist/schema/schema-query/index.js +13 -2
  257. package/dist/schema/sync-layer4.d.ts +21 -0
  258. package/dist/schema/sync-layer4.js +261 -0
  259. package/dist/schema/trust/index.d.ts +26 -26
  260. package/dist/schemas/account_operation.output.json +718 -0
  261. package/dist/schemas/config_operation.output.json +173 -0
  262. package/dist/schemas/index.json +9 -1
  263. package/dist/schemas/local_info_operation.output.json +718 -0
  264. package/dist/schemas/local_mark_operation.output.json +718 -0
  265. package/dist/schemas/onchain_operations.output.json +3 -2
  266. package/dist/schemas/onchain_operations.schema.json +1802 -313
  267. package/dist/schemas/onchain_operations_allocation.schema.json +2 -1
  268. package/dist/schemas/onchain_operations_arbitration.schema.json +2 -1
  269. package/dist/schemas/onchain_operations_contact.schema.json +2 -1
  270. package/dist/schemas/onchain_operations_demand.schema.json +2 -1
  271. package/dist/schemas/onchain_operations_gen_passport.schema.json +878 -872
  272. package/dist/schemas/onchain_operations_gen_proof.schema.json +273 -0
  273. package/dist/schemas/onchain_operations_guard.schema.json +584 -70
  274. package/dist/schemas/onchain_operations_machine.schema.json +2 -1
  275. package/dist/schemas/onchain_operations_order.schema.json +13 -9
  276. package/dist/schemas/onchain_operations_payment.schema.json +2 -1
  277. package/dist/schemas/onchain_operations_permission.schema.json +2 -1
  278. package/dist/schemas/onchain_operations_personal.schema.json +2 -1
  279. package/dist/schemas/onchain_operations_progress.schema.json +14 -10
  280. package/dist/schemas/onchain_operations_proof.schema.json +699 -0
  281. package/dist/schemas/onchain_operations_repository.schema.json +2 -1
  282. package/dist/schemas/onchain_operations_reward.schema.json +2 -1
  283. package/dist/schemas/onchain_operations_service.schema.json +2 -1
  284. package/dist/schemas/onchain_operations_treasury.schema.json +2 -1
  285. package/dist/schemas/onchain_table_data.schema.json +32 -1
  286. package/dist/schemas/project_operation.output.json +879 -0
  287. package/dist/schemas/project_operation.schema.json +473 -2
  288. package/dist/schemas/query_toolkit.output.json +14906 -6
  289. package/dist/schemas/schema_query.output.json +38 -1
  290. package/dist/telemetry/index.d.ts +1 -1
  291. package/dist/tools/handlers/config.d.ts +1 -1
  292. package/dist/tools/handlers/config.js +21 -18
  293. package/dist/tools/handlers/file-export.d.ts +2 -2
  294. package/dist/tools/handlers/local.d.ts +3 -30
  295. package/dist/tools/handlers/local.js +14 -3
  296. package/dist/tools/handlers/messenger.d.ts +1 -1
  297. package/dist/tools/handlers/messenger.js +2 -1
  298. package/dist/tools/handlers/onchain.d.ts +1 -1
  299. package/dist/tools/handlers/onchain.js +24 -22
  300. package/dist/tools/handlers/project.d.ts +1 -1
  301. package/dist/tools/handlers/project.js +258 -18
  302. package/dist/tools/handlers/query.d.ts +4 -4
  303. package/dist/tools/handlers/schema-query.d.ts +1 -1
  304. package/dist/tools/handlers/schema-query.js +21 -20
  305. package/dist/tools/handlers/trust.d.ts +1 -1
  306. package/dist/tools/handlers/trust.js +2 -2
  307. package/dist/tools/handlers/wip.d.ts +1 -1
  308. package/dist/tools/handlers/wip.js +1 -1
  309. package/dist/tools/index.d.ts +1 -1
  310. package/dist/tools/index.js +55 -8
  311. package/dist/tools/rules-hook.d.ts +1 -1
  312. package/dist/tools/rules-hook.js +3 -2
  313. package/dist/tools/shared.d.ts +13 -22
  314. package/dist/tools/types.d.ts +5 -5
  315. package/dist/tools/wrap.d.ts +10 -2
  316. package/dist/tools/wrap.js +212 -0
  317. package/package.json +3 -3
@@ -0,0 +1,521 @@
1
+ export const ARB_STATUS_CODE = {
2
+ Principal_confirming: 0,
3
+ Arbitrator_confirming: 1,
4
+ Voting: 2,
5
+ Arbitrated: 3,
6
+ Objectionable: 4,
7
+ Finished: 5,
8
+ Withdrawn: 6,
9
+ };
10
+ export const ARB_TERMINAL_STATUSES = ["Finished", "Withdrawn"];
11
+ export const ARB_STATUS_ALIASES = {
12
+ created: "Principal_confirming",
13
+ voting: "Voting",
14
+ feedback: "Arbitrator_confirming",
15
+ confirmed: "Arbitrated",
16
+ completed: "Finished",
17
+ reset: "Objectionable",
18
+ disputed: "Withdrawn",
19
+ };
20
+ export const ARBITRATION_PERMISSIONS = [
21
+ {
22
+ index: 350,
23
+ name: "ARBITRATION_NEW",
24
+ description: "Create new Arbitration object",
25
+ governed_operations: ["arbitration::new", "arbitration::new_with_passport"],
26
+ },
27
+ {
28
+ index: 351,
29
+ name: "ARBITRATION_DESCRIPTION",
30
+ description: "Modify Arbitration description",
31
+ governed_operations: ["arbitration::description_set", "arbitration::description_set_with_passport"],
32
+ },
33
+ {
34
+ index: 352,
35
+ name: "ARBITRATION_ENDPOINT",
36
+ description: "Reserved placeholder — not used on-chain (SDK commented out)",
37
+ governed_operations: [],
38
+ is_reserved: true,
39
+ },
40
+ {
41
+ index: 353,
42
+ name: "ARBITRATION_LOCATION",
43
+ description: "Set Arbitration location",
44
+ governed_operations: ["arbitration::location_set", "arbitration::location_set_with_passport"],
45
+ },
46
+ {
47
+ index: 354,
48
+ name: "ARBITRATION_VOTING_GUARD",
49
+ description: "Manage voting_guard list (add / remove / clear) — controls vote weight",
50
+ governed_operations: [
51
+ "arbitration::voting_guard_by_id_add",
52
+ "arbitration::voting_guard_fixed_add",
53
+ "arbitration::voting_guard_remove",
54
+ "arbitration::voting_guard_clear",
55
+ "(+ _with_passport variants)",
56
+ ],
57
+ },
58
+ {
59
+ index: 355,
60
+ name: "ARBITRATION_USAGE_GUARD",
61
+ description: "Set / clear usage_guard — controls who can file disputes",
62
+ governed_operations: [
63
+ "arbitration::usage_guard_set",
64
+ "arbitration::usage_guard_none",
65
+ "(+ _with_passport variants)",
66
+ ],
67
+ },
68
+ {
69
+ index: 356,
70
+ name: "ARBITRATION_PAUSE",
71
+ description: "Pause / resume Arbitration (bPaused default true)",
72
+ governed_operations: ["arbitration::pause", "arbitration::pause_with_passport"],
73
+ },
74
+ {
75
+ index: 357,
76
+ name: "ARBITRATION_FEE",
77
+ description: "Set dispute application fee (u64)",
78
+ governed_operations: ["arbitration::fee_set", "arbitration::fee_set_with_passport"],
79
+ },
80
+ {
81
+ index: 358,
82
+ name: "ARBITRATION_VOTE",
83
+ description: "Open vote (no voting_guard configured — 1 person 1 vote)",
84
+ governed_operations: ["arbitration::vote", "arbitration::vote_with_passport"],
85
+ },
86
+ {
87
+ index: 359,
88
+ name: "ARBITRATION_ARBITRATION",
89
+ description: "Make definitive arbitration ruling (with indemnity)",
90
+ governed_operations: ["arbitration::arbitration", "arbitration::arbitration_with_passport"],
91
+ },
92
+ {
93
+ index: 360,
94
+ name: "ARBITRATION_FEEDBACK",
95
+ description: "Provide feedback on Arb case",
96
+ governed_operations: ["arbitration::feedback", "arbitration::feedback_with_passport"],
97
+ },
98
+ {
99
+ index: 361,
100
+ name: "ARBITRATION_CONFIRM",
101
+ description: "Confirm materials submitted by principal (starts voting phase)",
102
+ governed_operations: ["arbitration::confirm", "arbitration::confirm_with_passport"],
103
+ },
104
+ {
105
+ index: 362,
106
+ name: "ARBITRATION_VOTING_DEADLINE_CHANGE",
107
+ description: "Change voting deadline for an Arb case",
108
+ governed_operations: ["arbitration::voting_deadline_change", "arbitration::voting_deadline_change_with_passport"],
109
+ },
110
+ {
111
+ index: 363,
112
+ name: "ARBITRATION_RESET",
113
+ description: "Reset arbitration — principal resubmits materials, restart lifecycle",
114
+ governed_operations: ["arbitration::reset", "arbitration::reset_with_passport"],
115
+ },
116
+ {
117
+ index: 364,
118
+ name: "ARBITRATION_ARB_WITHDRAW",
119
+ description: "Withdraw arbitration fees from Arb into Arbitration.balance",
120
+ governed_operations: ["arbitration::arb_withdraw", "arbitration::arb_withdraw_with_passport"],
121
+ },
122
+ {
123
+ index: 365,
124
+ name: "ARBITRATION_FEES_ALLOC",
125
+ description: "Allocate arbitration fees to Allocation object",
126
+ governed_operations: ["arbitration::fees_alloc", "arbitration::fees_alloc_with_passport"],
127
+ },
128
+ {
129
+ index: 366,
130
+ name: "ARBITRATION_FEES_TRANSFER",
131
+ description: "Transfer arbitration fees to Treasury object",
132
+ governed_operations: ["arbitration::fees_transfer", "arbitration::fees_transfer_with_passport"],
133
+ },
134
+ {
135
+ index: 367,
136
+ name: "ARBITRATION_OWNER_RECEIVE",
137
+ description: "Owner receive (unwrap received Coin/Object and send to Permission owner)",
138
+ governed_operations: ["arbitration::owner_receive", "arbitration::owner_receive_object"],
139
+ },
140
+ {
141
+ index: 368,
142
+ name: "ARBITRATION_UM",
143
+ description: "Set / clear User Manager (Contact object)",
144
+ governed_operations: ["arbitration::um_set", "arbitration::um_none", "(+ _with_passport variants)"],
145
+ },
146
+ ];
147
+ export const DUAL_GUARD_MATRIX = [
148
+ {
149
+ voting_guard_empty: true,
150
+ usage_guard_none: true,
151
+ dispute_method: "dispute",
152
+ vote_method: "vote",
153
+ scenario: "Open dispute + open voting (1 person 1 vote)",
154
+ },
155
+ {
156
+ voting_guard_empty: true,
157
+ usage_guard_none: false,
158
+ dispute_method: "dispute_with_passport",
159
+ vote_method: "vote",
160
+ scenario: "Restricted dispute + open voting",
161
+ },
162
+ {
163
+ voting_guard_empty: false,
164
+ usage_guard_none: true,
165
+ dispute_method: "dispute",
166
+ vote_method: "vote_with_voting_guard",
167
+ scenario: "Open dispute + weighted voting",
168
+ },
169
+ {
170
+ voting_guard_empty: false,
171
+ usage_guard_none: false,
172
+ dispute_method: "dispute_with_passport",
173
+ vote_method: "vote_with_voting_guard",
174
+ scenario: "Restricted dispute + weighted voting (most controlled)",
175
+ },
176
+ ];
177
+ export const ARBITRATION_SCENES = [
178
+ {
179
+ id: "arbitration_create",
180
+ name: "Create new Arbitration service",
181
+ operation_category: "lifecycle",
182
+ permission_index: 350,
183
+ permission_name: "ARBITRATION_NEW",
184
+ requires_voting_guard: "any",
185
+ requires_usage_guard: "any",
186
+ has_passport_variant: true,
187
+ governed_operations: ["arbitration::new", "arbitration::new_with_passport"],
188
+ common_patterns: [
189
+ "Pre-publish config: create Arbitration + Permission together",
190
+ "bPaused defaults to true — must call pause(false) to enable",
191
+ "Generic T: choose Coin type (e.g. 0x2::wow::WOW) at creation",
192
+ "Registrar affiliation: permission + arbitration linked via Registrar",
193
+ ],
194
+ recommended_templates: ["T-AB-01", "T-AB-02"],
195
+ },
196
+ {
197
+ id: "arbitration_dispute",
198
+ name: "File dispute against an Order (creates Arb case)",
199
+ operation_category: "dispute",
200
+ permission_index: 0,
201
+ permission_name: "(order op permission — no ARBITRATION_* index)",
202
+ required_arb_status: [],
203
+ resulting_arb_status: "Principal_confirming",
204
+ requires_voting_guard: "any",
205
+ requires_usage_guard: "any",
206
+ has_passport_variant: true,
207
+ governed_operations: ["arbitration::dispute", "arbitration::dispute_with_passport"],
208
+ common_patterns: [
209
+ "Fee gate: coin::value(&fee) >= self.fee, else E_FEE_NOT_ENOUGH",
210
+ "Order op permission: order::assert_op_permission(order, ctx) required",
211
+ "Creates independent Arb<T> object with its own lifecycle",
212
+ "If usage_guard is Some → must use dispute_with_passport",
213
+ "Order.dispute list: appends new Arb (max 10 per Order)",
214
+ ],
215
+ recommended_templates: ["T-AB-01", "T-AB-03", "T-AB-04"],
216
+ },
217
+ {
218
+ id: "arbitration_vote",
219
+ name: "Vote on Arb propositions",
220
+ operation_category: "voting",
221
+ permission_index: 358,
222
+ permission_name: "ARBITRATION_VOTE",
223
+ required_arb_status: ["Voting"],
224
+ requires_voting_guard: "any",
225
+ requires_usage_guard: "not_applicable",
226
+ has_passport_variant: true,
227
+ governed_operations: [
228
+ "arbitration::vote",
229
+ "arbitration::vote_with_passport",
230
+ "arbitration::vote_with_voting_guard",
231
+ ],
232
+ common_patterns: [
233
+ "Open vote: voting_guard empty → vote() / vote_with_passport()",
234
+ "Weighted vote: voting_guard non-empty → vote_with_voting_guard()",
235
+ "votes: u8 array — index into proposition list (0..N-1)",
236
+ "Mismatch: vote() with non-empty voting_guard → E_VOTING_GUARD_USED",
237
+ "Guard not in list: E_VOTING_GUARD_NOT_FOUND",
238
+ ],
239
+ recommended_templates: ["T-AB-02", "T-AB-03"],
240
+ },
241
+ {
242
+ id: "arbitration_confirm",
243
+ name: "Confirm principal materials and start voting phase",
244
+ operation_category: "ruling",
245
+ permission_index: 361,
246
+ permission_name: "ARBITRATION_CONFIRM",
247
+ required_arb_status: ["Principal_confirming", "Arbitrator_confirming"],
248
+ resulting_arb_status: "Voting",
249
+ requires_voting_guard: "any",
250
+ requires_usage_guard: "not_applicable",
251
+ has_passport_variant: true,
252
+ governed_operations: ["arbitration::confirm", "arbitration::confirm_with_passport"],
253
+ common_patterns: [
254
+ "Transitions Arb from Principal_confirming → Voting",
255
+ "voting_deadline: u64 timestamp_ms (null = no deadline)",
256
+ "Once in Voting, only vote / voting_deadline_change / reset allowed",
257
+ ],
258
+ recommended_templates: ["T-AB-01", "T-AB-02"],
259
+ },
260
+ {
261
+ id: "arbitration_feedback",
262
+ name: "Provide feedback on Arb case",
263
+ operation_category: "ruling",
264
+ permission_index: 360,
265
+ permission_name: "ARBITRATION_FEEDBACK",
266
+ required_arb_status: ["Principal_confirming", "Arbitrator_confirming", "Voting", "Arbitrated", "Objectionable"],
267
+ requires_voting_guard: "not_applicable",
268
+ requires_usage_guard: "not_applicable",
269
+ has_passport_variant: true,
270
+ governed_operations: ["arbitration::feedback", "arbitration::feedback_with_passport"],
271
+ common_patterns: [
272
+ "Feedback is informational — does not change Arb status",
273
+ "Used by principal / arbitrator / voters to attach notes",
274
+ "No state transition; supplements the case record",
275
+ ],
276
+ recommended_templates: ["T-AB-01", "T-AB-07"],
277
+ },
278
+ {
279
+ id: "arbitration_ruling",
280
+ name: "Make definitive arbitration ruling with indemnity",
281
+ operation_category: "ruling",
282
+ permission_index: 359,
283
+ permission_name: "ARBITRATION_ARBITRATION",
284
+ required_arb_status: ["Voting", "Arbitrated", "Objectionable"],
285
+ resulting_arb_status: "Arbitrated",
286
+ requires_voting_guard: "any",
287
+ requires_usage_guard: "not_applicable",
288
+ has_passport_variant: true,
289
+ governed_operations: ["arbitration::arbitration", "arbitration::arbitration_with_passport"],
290
+ common_patterns: [
291
+ "Ruling produces: feedback (string) + indemnity (u64)",
292
+ "indemnity is compensation amount — paid via order::compensate",
293
+ "compensate is public(package) — only order.move can trigger it",
294
+ "Once Arbitrated, case enters Objectionable window (reset possible)",
295
+ ],
296
+ recommended_templates: ["T-AB-01", "T-AB-05"],
297
+ },
298
+ {
299
+ id: "arbitration_reset",
300
+ name: "Reset arbitration — principal resubmits materials",
301
+ operation_category: "ruling",
302
+ permission_index: 363,
303
+ permission_name: "ARBITRATION_RESET",
304
+ required_arb_status: ["Objectionable", "Arbitrated"],
305
+ resulting_arb_status: "Principal_confirming",
306
+ requires_voting_guard: "any",
307
+ requires_usage_guard: "not_applicable",
308
+ has_passport_variant: true,
309
+ governed_operations: ["arbitration::reset", "arbitration::reset_with_passport"],
310
+ common_patterns: [
311
+ "Resets Arb from Objectionable/Arbitrated → Principal_confirming",
312
+ "Used when principal objects to ruling and resubmits materials",
313
+ "Feedback required (string explaining reset reason)",
314
+ "Restart full lifecycle: Principal_confirming → ... → Finished",
315
+ ],
316
+ recommended_templates: ["T-AB-07"],
317
+ },
318
+ {
319
+ id: "arbitration_arb_withdraw",
320
+ name: "Withdraw arbitration fees from Arb into Arbitration.balance",
321
+ operation_category: "fund",
322
+ permission_index: 364,
323
+ permission_name: "ARBITRATION_ARB_WITHDRAW",
324
+ required_arb_status: ["Finished", "Withdrawn"],
325
+ requires_voting_guard: "not_applicable",
326
+ requires_usage_guard: "not_applicable",
327
+ has_passport_variant: true,
328
+ governed_operations: ["arbitration::arb_withdraw", "arbitration::arb_withdraw_with_passport"],
329
+ common_patterns: [
330
+ "Calls arb::withdraw(arb, clock) — moves fees from Arb to Arbitration",
331
+ "Only allowed after Arb reaches terminal state (Finished/Withdrawn)",
332
+ "Increases Arbitration.balance — funds available for fees_alloc/fees_transfer",
333
+ ],
334
+ recommended_templates: ["T-AB-06"],
335
+ },
336
+ {
337
+ id: "arbitration_fees_alloc",
338
+ name: "Allocate arbitration fees to Allocation object",
339
+ operation_category: "fund",
340
+ permission_index: 365,
341
+ permission_name: "ARBITRATION_FEES_ALLOC",
342
+ requires_voting_guard: "not_applicable",
343
+ requires_usage_guard: "not_applicable",
344
+ has_passport_variant: true,
345
+ governed_operations: ["arbitration::fees_alloc", "arbitration::fees_alloc_with_passport"],
346
+ common_patterns: [
347
+ "Destination: Allocation object (parameterized fund distribution)",
348
+ "payment_remark + payment_index: bookkeeping for Payment object",
349
+ "May create new Payment object if newPayment name provided",
350
+ "Triggers balance::withdraw_all — extracts ALL balance",
351
+ ],
352
+ recommended_templates: ["T-AB-06"],
353
+ },
354
+ {
355
+ id: "arbitration_fees_transfer",
356
+ name: "Transfer arbitration fees to Treasury object",
357
+ operation_category: "fund",
358
+ permission_index: 366,
359
+ permission_name: "ARBITRATION_FEES_TRANSFER",
360
+ requires_voting_guard: "not_applicable",
361
+ requires_usage_guard: "not_applicable",
362
+ has_passport_variant: true,
363
+ governed_operations: ["arbitration::fees_transfer", "arbitration::fees_transfer_with_passport"],
364
+ common_patterns: [
365
+ "Destination: Treasury object (general fund pool)",
366
+ "Same bookkeeping as fees_alloc (remark + index + newPayment)",
367
+ "Triggers balance::withdraw_all — extracts ALL balance",
368
+ "Choose Allocation vs Treasury by distribution need",
369
+ ],
370
+ recommended_templates: ["T-AB-06"],
371
+ },
372
+ {
373
+ id: "arbitration_voting_guard_config",
374
+ name: "Configure voting_guard list (add / set / remove / clear)",
375
+ operation_category: "guard",
376
+ permission_index: 354,
377
+ permission_name: "ARBITRATION_VOTING_GUARD",
378
+ requires_voting_guard: "any",
379
+ requires_usage_guard: "not_applicable",
380
+ has_passport_variant: true,
381
+ governed_operations: [
382
+ "arbitration::voting_guard_by_id_add (+ _with_passport)",
383
+ "arbitration::voting_guard_fixed_add (+ _with_passport)",
384
+ "arbitration::voting_guard_remove (+ _with_passport)",
385
+ "arbitration::voting_guard_clear (+ _with_passport)",
386
+ ],
387
+ common_patterns: [
388
+ "Max 50 guards: MAX_VOTING_GUARD_COUNT=50 (off-by-one-safe: len<50 allows add)",
389
+ "GuardIdentifier(u8): dynamic weight from Passport submission value",
390
+ "FixedValue(u32): static weight (e.g. 100 votes per holder)",
391
+ "Add same guard twice → updates vote_weight (no duplicate)",
392
+ "op='set' = clear then add; op='add' = append; op='remove' = by address",
393
+ ],
394
+ recommended_templates: ["T-AB-02", "T-AB-03"],
395
+ },
396
+ {
397
+ id: "arbitration_usage_guard_config",
398
+ name: "Configure usage_guard (set / clear)",
399
+ operation_category: "guard",
400
+ permission_index: 355,
401
+ permission_name: "ARBITRATION_USAGE_GUARD",
402
+ requires_voting_guard: "not_applicable",
403
+ requires_usage_guard: "any",
404
+ has_passport_variant: true,
405
+ governed_operations: [
406
+ "arbitration::usage_guard_set (+ _with_passport)",
407
+ "arbitration::usage_guard_none (+ _with_passport)",
408
+ ],
409
+ common_patterns: [
410
+ "Single guard (Option<address>) — not a list",
411
+ "Some(guard): dispute must use _with_passport variant",
412
+ "None: dispute can use either variant (no passport needed)",
413
+ "Registrar affiliation_change: updates link when guard changes",
414
+ ],
415
+ recommended_templates: ["T-AB-04"],
416
+ },
417
+ {
418
+ id: "arbitration_pause",
419
+ name: "Pause / resume Arbitration service",
420
+ operation_category: "lifecycle",
421
+ permission_index: 356,
422
+ permission_name: "ARBITRATION_PAUSE",
423
+ requires_voting_guard: "not_applicable",
424
+ requires_usage_guard: "not_applicable",
425
+ has_passport_variant: true,
426
+ governed_operations: ["arbitration::pause", "arbitration::pause_with_passport"],
427
+ common_patterns: [
428
+ "bPaused default true — new Arbitration cannot accept disputes",
429
+ "pause(false) to enable, pause(true) to disable",
430
+ "Paused Arbitration rejects dispute (E_PAUSED)",
431
+ "Does not affect already-open Arb cases",
432
+ ],
433
+ recommended_templates: ["T-AB-01"],
434
+ },
435
+ ];
436
+ export const ARBITRATION_LEDGER_VERSION = "1.0.0";
437
+ export function getScenesByCategory(category) {
438
+ return ARBITRATION_SCENES.filter(s => s.operation_category === category);
439
+ }
440
+ export function findSceneById(id) {
441
+ return ARBITRATION_SCENES.find(s => s.id === id);
442
+ }
443
+ export function findSceneByPermissionIndex(index) {
444
+ return ARBITRATION_SCENES.find(s => s.permission_index === index);
445
+ }
446
+ export function getPermissionByIndex(index) {
447
+ return ARBITRATION_PERMISSIONS.find(p => p.index === index);
448
+ }
449
+ export function getPermissionByName(name) {
450
+ return ARBITRATION_PERMISSIONS.find(p => p.name === name);
451
+ }
452
+ export function isReservedIndex(index) {
453
+ const entry = getPermissionByIndex(index);
454
+ return !!entry?.is_reserved;
455
+ }
456
+ export function isUsedPermissionIndex(index) {
457
+ const entry = getPermissionByIndex(index);
458
+ return !!entry && !entry.is_reserved;
459
+ }
460
+ export function getActivePermissionCount() {
461
+ return ARBITRATION_PERMISSIONS.filter(p => !p.is_reserved).length;
462
+ }
463
+ export function inferSceneFromIntent(intent) {
464
+ const lower = intent.toLowerCase();
465
+ const keywordMap = [
466
+ { keywords: ["create", "new"], sceneId: "arbitration_create" },
467
+ { keywords: ["dispute", "file", "complaint"], sceneId: "arbitration_dispute" },
468
+ { keywords: ["vote", "voting", "decide"], sceneId: "arbitration_vote" },
469
+ { keywords: ["confirm", "materials"], sceneId: "arbitration_confirm" },
470
+ { keywords: ["feedback", "opinion"], sceneId: "arbitration_feedback" },
471
+ { keywords: ["ruling", "arbitration", "verdict"], sceneId: "arbitration_ruling" },
472
+ { keywords: ["reset", "resubmit"], sceneId: "arbitration_reset" },
473
+ { keywords: ["arb_withdraw", "withdraw", "withdraw fees"], sceneId: "arbitration_arb_withdraw" },
474
+ { keywords: ["fees_alloc", "allocate", "allocate fees"], sceneId: "arbitration_fees_alloc" },
475
+ { keywords: ["fees_transfer", "transfer", "transfer in"], sceneId: "arbitration_fees_transfer" },
476
+ { keywords: ["voting_guard", "voting guard"], sceneId: "arbitration_voting_guard_config" },
477
+ { keywords: ["usage_guard", "usage guard"], sceneId: "arbitration_usage_guard_config" },
478
+ { keywords: ["pause", "enable"], sceneId: "arbitration_pause" },
479
+ ];
480
+ for (const { keywords, sceneId } of keywordMap) {
481
+ if (keywords.some(kw => lower.includes(kw.toLowerCase()))) {
482
+ const scene = findSceneById(sceneId);
483
+ if (scene)
484
+ return scene;
485
+ }
486
+ }
487
+ return undefined;
488
+ }
489
+ export function getDualGuardMatrixEntry(votingGuardEmpty, usageGuardNone) {
490
+ return DUAL_GUARD_MATRIX.find(m => m.voting_guard_empty === votingGuardEmpty && m.usage_guard_none === usageGuardNone);
491
+ }
492
+ export function isValidArbStatusTransition(from, to) {
493
+ const transitions = {
494
+ Principal_confirming: ["Arbitrator_confirming", "Voting"],
495
+ Arbitrator_confirming: ["Voting", "Principal_confirming"],
496
+ Voting: ["Arbitrated"],
497
+ Arbitrated: ["Objectionable", "Finished"],
498
+ Objectionable: ["Principal_confirming", "Finished"],
499
+ Finished: ["Withdrawn"],
500
+ Withdrawn: [],
501
+ };
502
+ return transitions[from]?.includes(to) ?? false;
503
+ }
504
+ export function isTerminalArbStatus(status) {
505
+ return ARB_TERMINAL_STATUSES.includes(status);
506
+ }
507
+ export function getScenesProducingStatus(status) {
508
+ return ARBITRATION_SCENES.filter(s => s.resulting_arb_status === status);
509
+ }
510
+ export function getScenesRequiringStatus(status) {
511
+ return ARBITRATION_SCENES.filter(s => s.required_arb_status?.includes(status));
512
+ }
513
+ export function getArbitrationScenesCount() {
514
+ return ARBITRATION_SCENES.length;
515
+ }
516
+ export function getAllArbitrationPermissions() {
517
+ return [...ARBITRATION_PERMISSIONS];
518
+ }
519
+ export function getActiveArbitrationPermissions() {
520
+ return ARBITRATION_PERMISSIONS.filter(p => !p.is_reserved);
521
+ }
@@ -0,0 +1,84 @@
1
+ import { type ArbStatus, type VotingGuardEntry, type DualGuardMatrix } from "./arbitration-ledger.js";
2
+ export interface IntentPuzzle {
3
+ action: "create_arbitration" | "configure" | "configure_voting_guard" | "configure_usage_guard" | "file_dispute" | "confirm_materials" | "vote" | "provide_feedback" | "make_ruling" | "reset_arbitration" | "withdraw_fees" | "allocate_fees" | "pause_resume" | "transfer_ownership";
4
+ target_arb?: string;
5
+ target_order?: string;
6
+ rule_sentence: string;
7
+ failure_conditions: string[];
8
+ }
9
+ export interface ArbitrationConfigPuzzle {
10
+ description?: string;
11
+ location?: string;
12
+ fee?: string;
13
+ bPaused?: boolean;
14
+ coin_type?: string;
15
+ permission_address?: string;
16
+ um?: string | null;
17
+ }
18
+ export interface VotingGuardPuzzle {
19
+ guards: VotingGuardEntry[];
20
+ weight_mode: "GuardIdentifier" | "FixedValue" | "mixed" | "none";
21
+ cooperation_matrix?: DualGuardMatrix;
22
+ }
23
+ export interface UsageGuardPuzzle {
24
+ guard: string | null;
25
+ passport_required: boolean;
26
+ filter_rules: string[];
27
+ }
28
+ export interface ArbiterConfigPuzzle {
29
+ arbitrators: string[];
30
+ vote_distribution: "open" | "weighted" | "committee";
31
+ ruling_authority: "single_arbiter" | "multi_arbiter_vote" | "delegated_committee";
32
+ fees_split?: {
33
+ allocation?: string;
34
+ treasury?: string;
35
+ remark?: string;
36
+ payment_index?: number;
37
+ };
38
+ }
39
+ export interface ConstraintChecklist {
40
+ F_AB_01_coin_type_valid: boolean;
41
+ F_AB_02_permission_address_valid: boolean;
42
+ F_AB_03_bPaused_default_true: boolean;
43
+ F_AB_04_fee_u64_nonneg: boolean;
44
+ F_AB_05_voting_guard_count_le_50: boolean;
45
+ F_AB_06_voting_guard_no_duplicate: boolean;
46
+ F_AB_07_usage_guard_single: boolean;
47
+ F_AB_08_arb_status_transition_valid: boolean;
48
+ F_AB_09_arb_belongs_to_arbitration: boolean;
49
+ F_AB_10_order_op_permission: boolean;
50
+ F_AB_11_dispute_fee_sufficient: boolean;
51
+ F_AB_12_dual_guard_coherent: boolean;
52
+ }
53
+ export type PuzzleDimension = "A" | "B" | "C" | "D" | "E" | "F";
54
+ export interface ArbitrationPuzzle {
55
+ intent?: IntentPuzzle;
56
+ arbitration_config?: ArbitrationConfigPuzzle;
57
+ voting_guard?: VotingGuardPuzzle;
58
+ usage_guard?: UsageGuardPuzzle;
59
+ arbiter_config?: ArbiterConfigPuzzle;
60
+ constraints?: ConstraintChecklist;
61
+ current_arb_status?: ArbStatus;
62
+ expected_arb_status?: ArbStatus;
63
+ }
64
+ export interface PuzzleCompleteness {
65
+ dimensions: PuzzleDimension[];
66
+ missing: PuzzleDimension[];
67
+ missing_details: {
68
+ dimension: PuzzleDimension;
69
+ reason: string;
70
+ }[];
71
+ complete: boolean;
72
+ next_step: string;
73
+ }
74
+ export declare function initPuzzleFromIntent(intent: Partial<IntentPuzzle>): ArbitrationPuzzle;
75
+ export declare function checkPuzzleCompleteness(puzzle: ArbitrationPuzzle): PuzzleCompleteness;
76
+ export interface ConstraintViolation {
77
+ constraint_id: string;
78
+ severity: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW";
79
+ message: string;
80
+ current_value?: string | number;
81
+ limit?: string | number;
82
+ }
83
+ export declare function validateConstraints(puzzle: ArbitrationPuzzle): ConstraintViolation[];
84
+ export declare function generateConfirmationText(puzzle: ArbitrationPuzzle): string;