@wowok/agent-mcp 2.7.2 → 2.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/dist/config/runtime.js +1 -1
  2. package/dist/customer/account-events.d.ts +32 -0
  3. package/dist/customer/account-events.js +1 -0
  4. package/dist/customer/customer-advice.d.ts +1 -0
  5. package/dist/customer/customer-advice.js +1 -1
  6. package/dist/customer/info-puzzle.js +1 -1
  7. package/dist/customer/order-strategy.d.ts +1 -1
  8. package/dist/customer/reminder-system.d.ts +2 -0
  9. package/dist/customer/reminder-system.js +1 -1
  10. package/dist/customer/risk-assessment.d.ts +1 -0
  11. package/dist/customer/risk-assessment.js +1 -1
  12. package/dist/customer/types.d.ts +2 -0
  13. package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
  14. package/dist/evaluation/builtins/arbitration-score.js +1 -0
  15. package/dist/evaluation/builtins/index.d.ts +1 -0
  16. package/dist/evaluation/builtins/index.js +1 -1
  17. package/dist/evaluation/category-match-rules.d.ts +30 -0
  18. package/dist/evaluation/category-match-rules.js +1 -0
  19. package/dist/evaluation/engine.js +1 -1
  20. package/dist/evaluation/extract.js +1 -1
  21. package/dist/evaluation/index.d.ts +1 -0
  22. package/dist/evaluation/index.js +1 -1
  23. package/dist/evaluation/location-match.d.ts +42 -0
  24. package/dist/evaluation/location-match.js +1 -0
  25. package/dist/evaluation/path-reasoning.d.ts +35 -0
  26. package/dist/evaluation/path-reasoning.js +1 -0
  27. package/dist/evaluation/region.d.ts +6 -0
  28. package/dist/evaluation/region.js +1 -1
  29. package/dist/evaluation/types.d.ts +17 -0
  30. package/dist/experience/realtime-feedback.js +1 -1
  31. package/dist/experience/user-profile.d.ts +1 -1
  32. package/dist/extensions/index.d.ts +6 -0
  33. package/dist/extensions/index.js +1 -1
  34. package/dist/extensions/industry-layers.d.ts +75 -0
  35. package/dist/extensions/industry-layers.js +1 -0
  36. package/dist/extensions/industry-pack.d.ts +105 -0
  37. package/dist/extensions/industry-pack.js +1 -0
  38. package/dist/extensions/metric-registry.js +1 -1
  39. package/dist/extensions/mode-evaluator.d.ts +1 -1
  40. package/dist/extensions/registry.d.ts +1 -0
  41. package/dist/extensions/registry.js +1 -1
  42. package/dist/graph/base.d.ts +8 -0
  43. package/dist/graph/base.js +1 -0
  44. package/dist/harness/index.d.ts +1 -0
  45. package/dist/harness/index.js +1 -1
  46. package/dist/harness/plan.d.ts +2 -0
  47. package/dist/harness/plan.js +1 -1
  48. package/dist/harness/recover.d.ts +1 -1
  49. package/dist/harness/types.d.ts +2 -3
  50. package/dist/index.js +1 -1
  51. package/dist/knowledge/allocation-confirm.js +1 -1
  52. package/dist/knowledge/anti-cheat.d.ts +37 -0
  53. package/dist/knowledge/anti-cheat.js +1 -0
  54. package/dist/knowledge/arb-confirm.d.ts +28 -0
  55. package/dist/knowledge/arb-confirm.js +1 -0
  56. package/dist/knowledge/arb-translation.d.ts +48 -0
  57. package/dist/knowledge/arb-translation.js +1 -0
  58. package/dist/knowledge/arbitration-context.js +1 -1
  59. package/dist/knowledge/arbitration-ledger.js +1 -1
  60. package/dist/knowledge/bridge-confirm.d.ts +26 -0
  61. package/dist/knowledge/bridge-confirm.js +1 -0
  62. package/dist/knowledge/bridge-translation.d.ts +37 -0
  63. package/dist/knowledge/bridge-translation.js +1 -0
  64. package/dist/knowledge/contact-confirm.d.ts +27 -0
  65. package/dist/knowledge/contact-confirm.js +1 -0
  66. package/dist/knowledge/contact-translation.d.ts +39 -0
  67. package/dist/knowledge/contact-translation.js +1 -0
  68. package/dist/knowledge/demand-confirm.js +1 -1
  69. package/dist/knowledge/demand-context.d.ts +17 -0
  70. package/dist/knowledge/demand-context.js +1 -0
  71. package/dist/knowledge/demand-ledger.d.ts +26 -0
  72. package/dist/knowledge/demand-ledger.js +1 -0
  73. package/dist/knowledge/demand-puzzle.d.ts +29 -0
  74. package/dist/knowledge/demand-puzzle.js +1 -0
  75. package/dist/knowledge/demand-risk.js +1 -1
  76. package/dist/knowledge/demand-templates.d.ts +12 -0
  77. package/dist/knowledge/demand-templates.js +1 -0
  78. package/dist/knowledge/demand-translation.js +1 -1
  79. package/dist/knowledge/deployment-scanner.js +1 -1
  80. package/dist/knowledge/evidence-review.d.ts +12 -0
  81. package/dist/knowledge/evidence-review.js +1 -0
  82. package/dist/knowledge/examples-scanner-cli.js +1 -1
  83. package/dist/knowledge/examples-scanner.js +1 -1
  84. package/dist/knowledge/flywheel-loop.d.ts +0 -1
  85. package/dist/knowledge/flywheel-loop.js +1 -1
  86. package/dist/knowledge/guard-design-patterns.js +1 -1
  87. package/dist/knowledge/guard-migration.d.ts +1 -1
  88. package/dist/knowledge/index.d.ts +71 -3
  89. package/dist/knowledge/index.js +1 -1
  90. package/dist/knowledge/industry-registry.js +1 -1
  91. package/dist/knowledge/machine-render.js +1 -1
  92. package/dist/knowledge/market-metrics.d.ts +12 -0
  93. package/dist/knowledge/market-metrics.js +1 -0
  94. package/dist/knowledge/market-operations.d.ts +46 -0
  95. package/dist/knowledge/market-operations.js +1 -0
  96. package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
  97. package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
  98. package/dist/knowledge/mcp-schema-audit.js +1 -1
  99. package/dist/knowledge/onchain-constants.d.ts +2 -2
  100. package/dist/knowledge/onchain-constants.js +1 -1
  101. package/dist/knowledge/payment-confirm.d.ts +26 -0
  102. package/dist/knowledge/payment-confirm.js +1 -0
  103. package/dist/knowledge/payment-risk.js +1 -1
  104. package/dist/knowledge/payment-translation.d.ts +37 -0
  105. package/dist/knowledge/payment-translation.js +1 -0
  106. package/dist/knowledge/permission-context.d.ts +11 -0
  107. package/dist/knowledge/permission-context.js +1 -1
  108. package/dist/knowledge/permission-ledger.d.ts +11 -0
  109. package/dist/knowledge/permission-ledger.js +1 -1
  110. package/dist/knowledge/personal-confirm.d.ts +29 -0
  111. package/dist/knowledge/personal-confirm.js +1 -0
  112. package/dist/knowledge/personal-risk.js +1 -1
  113. package/dist/knowledge/personal-translation.d.ts +37 -0
  114. package/dist/knowledge/personal-translation.js +1 -0
  115. package/dist/knowledge/process-model.d.ts +1 -11
  116. package/dist/knowledge/process-model.js +1 -1
  117. package/dist/knowledge/progress-ledger.js +1 -1
  118. package/dist/knowledge/progress-risk.js +1 -1
  119. package/dist/knowledge/progress-templates.js +1 -1
  120. package/dist/knowledge/progress-translation.js +1 -1
  121. package/dist/knowledge/proof-context.d.ts +17 -0
  122. package/dist/knowledge/proof-context.js +1 -0
  123. package/dist/knowledge/proof-ledger.d.ts +34 -0
  124. package/dist/knowledge/proof-ledger.js +1 -0
  125. package/dist/knowledge/proof-puzzle.d.ts +35 -0
  126. package/dist/knowledge/proof-puzzle.js +1 -0
  127. package/dist/knowledge/proof-templates.d.ts +22 -0
  128. package/dist/knowledge/proof-templates.js +1 -0
  129. package/dist/knowledge/registrar-confirm.d.ts +26 -0
  130. package/dist/knowledge/registrar-confirm.js +1 -0
  131. package/dist/knowledge/registrar-risk.js +1 -1
  132. package/dist/knowledge/registrar-translation.d.ts +37 -0
  133. package/dist/knowledge/registrar-translation.js +1 -0
  134. package/dist/knowledge/repository-context.d.ts +12 -0
  135. package/dist/knowledge/repository-context.js +1 -0
  136. package/dist/knowledge/repository-ledger.d.ts +25 -0
  137. package/dist/knowledge/repository-ledger.js +1 -0
  138. package/dist/knowledge/repository-puzzle.d.ts +30 -0
  139. package/dist/knowledge/repository-puzzle.js +1 -0
  140. package/dist/knowledge/repository-templates.d.ts +14 -0
  141. package/dist/knowledge/repository-templates.js +1 -0
  142. package/dist/knowledge/resource-confirm.d.ts +25 -0
  143. package/dist/knowledge/resource-confirm.js +1 -0
  144. package/dist/knowledge/resource-translation.d.ts +37 -0
  145. package/dist/knowledge/resource-translation.js +1 -0
  146. package/dist/knowledge/reward-context.d.ts +2 -2
  147. package/dist/knowledge/reward-ledger.js +1 -1
  148. package/dist/knowledge/reward-translation.js +1 -1
  149. package/dist/knowledge/safety-rules.d.ts +1 -0
  150. package/dist/knowledge/safety-rules.js +1 -1
  151. package/dist/knowledge/service-risk.d.ts +1 -1
  152. package/dist/knowledge/service-risk.js +1 -1
  153. package/dist/knowledge/template-registry.js +1 -1
  154. package/dist/knowledge/tools-reference.js +1 -1
  155. package/dist/knowledge/treasury-context.d.ts +1 -1
  156. package/dist/knowledge/treasury-context.js +1 -1
  157. package/dist/knowledge/treasury-ledger.js +1 -1
  158. package/dist/knowledge/treasury-risk.js +1 -1
  159. package/dist/knowledge/universal-template.d.ts +22 -0
  160. package/dist/knowledge/universal-template.js +1 -0
  161. package/dist/knowledge/util-confirm.d.ts +24 -0
  162. package/dist/knowledge/util-confirm.js +1 -0
  163. package/dist/knowledge/util-risk.js +1 -1
  164. package/dist/knowledge/util-translation.d.ts +39 -0
  165. package/dist/knowledge/util-translation.js +1 -0
  166. package/dist/knowledge/workflow-guidance.d.ts +180 -0
  167. package/dist/knowledge/workflow-guidance.js +1 -0
  168. package/dist/participation/employee-kpi.d.ts +25 -0
  169. package/dist/participation/employee-kpi.js +1 -0
  170. package/dist/participation/employee-store.d.ts +16 -0
  171. package/dist/participation/employee-store.js +1 -0
  172. package/dist/participation/index.d.ts +2 -0
  173. package/dist/participation/index.js +1 -0
  174. package/dist/persona/defaults.js +1 -1
  175. package/dist/persona/index.d.ts +9 -2
  176. package/dist/persona/index.js +1 -1
  177. package/dist/persona/local-region.d.ts +20 -0
  178. package/dist/persona/local-region.js +1 -0
  179. package/dist/persona/model.js +1 -1
  180. package/dist/persona/overrides.d.ts +10 -0
  181. package/dist/persona/overrides.js +1 -0
  182. package/dist/persona/pack-personae.d.ts +11 -0
  183. package/dist/persona/pack-personae.js +1 -0
  184. package/dist/persona/strategy-intent.d.ts +20 -0
  185. package/dist/persona/strategy-intent.js +1 -0
  186. package/dist/persona/types.d.ts +3 -1
  187. package/dist/project/business-puzzle.d.ts +1 -1
  188. package/dist/project/business-puzzle.js +1 -1
  189. package/dist/project/deployment-doc.js +1 -1
  190. package/dist/project/edit-planner.js +1 -1
  191. package/dist/project/evaluation.d.ts +37 -1
  192. package/dist/project/evaluation.js +1 -1
  193. package/dist/project/graph-builder.d.ts +2 -2
  194. package/dist/project/graph-builder.js +1 -1
  195. package/dist/project/graph.d.ts +3 -6
  196. package/dist/project/handlers.d.ts +33 -2
  197. package/dist/project/handlers.js +1 -1
  198. package/dist/project/index.d.ts +1 -0
  199. package/dist/project/index.js +1 -1
  200. package/dist/project/merchant-guide.d.ts +19 -0
  201. package/dist/project/merchant-guide.js +1 -1
  202. package/dist/project/mode-actions.js +1 -1
  203. package/dist/project/rollback-policy.js +1 -1
  204. package/dist/project/semantic-assembler.d.ts +2 -2
  205. package/dist/project/semantic-assembler.js +1 -1
  206. package/dist/project/semantic-graph.d.ts +3 -5
  207. package/dist/project/workflow-design-assessment.d.ts +24 -0
  208. package/dist/project/workflow-design-assessment.js +1 -0
  209. package/dist/safety/confirm-gate.d.ts +1 -1
  210. package/dist/safety/confirm-gate.js +1 -1
  211. package/dist/schema/call/allocation.d.ts +186 -1385
  212. package/dist/schema/call/arbitration.d.ts +272 -1871
  213. package/dist/schema/call/base.d.ts +1831 -9076
  214. package/dist/schema/call/base.js +1 -1
  215. package/dist/schema/call/bridge.d.ts +911 -3171
  216. package/dist/schema/call/contact.d.ts +135 -931
  217. package/dist/schema/call/demand.d.ts +164 -1194
  218. package/dist/schema/call/guard.d.ts +298 -1140
  219. package/dist/schema/call/guard.js +1 -1
  220. package/dist/schema/call/machine.d.ts +459 -5403
  221. package/dist/schema/call/machine.js +1 -1
  222. package/dist/schema/call/order.d.ts +137 -844
  223. package/dist/schema/call/payment.d.ts +74 -561
  224. package/dist/schema/call/permission.d.ts +335 -2791
  225. package/dist/schema/call/personal.d.ts +227 -1814
  226. package/dist/schema/call/progress.d.ts +140 -843
  227. package/dist/schema/call/proof.d.ts +42 -258
  228. package/dist/schema/call/repository.d.ts +324 -2222
  229. package/dist/schema/call/reward.d.ts +153 -1183
  230. package/dist/schema/call/semantic.js +1 -1
  231. package/dist/schema/call/service.d.ts +376 -3431
  232. package/dist/schema/call/treasury.d.ts +252 -2158
  233. package/dist/schema/common/index.d.ts +222 -697
  234. package/dist/schema/common/index.js +1 -1
  235. package/dist/schema/config/index.d.ts +18 -161
  236. package/dist/schema/employee/index.d.ts +99 -0
  237. package/dist/schema/employee/index.js +1 -0
  238. package/dist/schema/evaluation/index.d.ts +1035 -3918
  239. package/dist/schema/evaluation/index.js +1 -1
  240. package/dist/schema/index.d.ts +5 -0
  241. package/dist/schema/index.js +1 -1
  242. package/dist/schema/industry-pack/index.d.ts +132 -0
  243. package/dist/schema/industry-pack/index.js +1 -0
  244. package/dist/schema/intent-radar/index.d.ts +92 -245
  245. package/dist/schema/intent-radar/index.js +1 -1
  246. package/dist/schema/local/index.d.ts +2045 -18080
  247. package/dist/schema/local/index.js +1 -1
  248. package/dist/schema/local/wip.d.ts +61 -651
  249. package/dist/schema/local/wip.js +1 -1
  250. package/dist/schema/messenger/index.d.ts +949 -5557
  251. package/dist/schema/messenger/index.js +1 -1
  252. package/dist/schema/operations.d.ts +3168 -26468
  253. package/dist/schema/operations.js +1 -1
  254. package/dist/schema/permission/index.d.ts +121 -0
  255. package/dist/schema/permission/index.js +1 -0
  256. package/dist/schema/persona/index.d.ts +469 -1820
  257. package/dist/schema/persona/index.js +1 -1
  258. package/dist/schema/project/index.d.ts +1023 -8450
  259. package/dist/schema/project/index.js +1 -1
  260. package/dist/schema/query/index.d.ts +12121 -75556
  261. package/dist/schema/query/index.js +1 -1
  262. package/dist/schema/schema-query/index.d.ts +35 -98
  263. package/dist/schema/schema-query/index.js +1 -1
  264. package/dist/schema/schema-version.js +1 -1
  265. package/dist/schema/task-status.d.ts +26 -132
  266. package/dist/schema/trust/index.d.ts +194 -1290
  267. package/dist/schema/utils/guard-parser.js +1 -1
  268. package/dist/schema/utils/node-parser.js +1 -1
  269. package/dist/schema/utils/skills-recommendation.d.ts +1 -0
  270. package/dist/schema/utils/skills-recommendation.js +1 -1
  271. package/dist/schema/workflow/index.d.ts +161 -0
  272. package/dist/schema/workflow/index.js +1 -0
  273. package/dist/schema/workspace/index.d.ts +69 -0
  274. package/dist/schema/workspace/index.js +1 -0
  275. package/dist/{schema-query → schema-query-impl}/index.js +1 -1
  276. package/dist/schemas/account_operation.output.json +3147 -1655
  277. package/dist/schemas/account_operation.schema.json +225 -218
  278. package/dist/schemas/bridge_operation.output.json +1168 -653
  279. package/dist/schemas/bridge_operation.schema.json +736 -504
  280. package/dist/schemas/config_operation.output.json +185 -179
  281. package/dist/schemas/config_operation.schema.json +21 -26
  282. package/dist/schemas/employee_operation.output.json +207 -0
  283. package/dist/schemas/employee_operation.schema.json +176 -0
  284. package/dist/schemas/evaluation_operation.output.json +2268 -601
  285. package/dist/schemas/evaluation_operation.schema.json +2919 -787
  286. package/dist/schemas/guard2file.output.json +58 -64
  287. package/dist/schemas/guard2file.schema.json +79 -81
  288. package/dist/schemas/index.json +41 -11
  289. package/dist/schemas/industry_pack_operation.output.json +594 -0
  290. package/dist/schemas/industry_pack_operation.schema.json +55 -0
  291. package/dist/schemas/intent_radar.output.json +275 -203
  292. package/dist/schemas/intent_radar.schema.json +124 -126
  293. package/dist/schemas/local_info_operation.output.json +1174 -660
  294. package/dist/schemas/local_info_operation.schema.json +119 -125
  295. package/dist/schemas/local_mark_operation.output.json +1239 -692
  296. package/dist/schemas/local_mark_operation.schema.json +91 -96
  297. package/dist/schemas/machineNode2file.output.json +63 -69
  298. package/dist/schemas/machineNode2file.schema.json +79 -81
  299. package/dist/schemas/messenger_operation.output.json +2722 -1531
  300. package/dist/schemas/messenger_operation.schema.json +1482 -1264
  301. package/dist/schemas/onchain_events.output.json +2590 -978
  302. package/dist/schemas/onchain_events.schema.json +117 -99
  303. package/dist/schemas/onchain_operations.output.json +3957 -2312
  304. package/dist/schemas/onchain_operations.schema.json +20799 -9285
  305. package/dist/schemas/onchain_operations_allocation.schema.json +171 -107
  306. package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
  307. package/dist/schemas/onchain_operations_contact.schema.json +129 -90
  308. package/dist/schemas/onchain_operations_demand.schema.json +170 -112
  309. package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
  310. package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
  311. package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
  312. package/dist/schemas/onchain_operations_machine.schema.json +536 -163
  313. package/dist/schemas/onchain_operations_order.schema.json +126 -96
  314. package/dist/schemas/onchain_operations_payment.schema.json +82 -67
  315. package/dist/schemas/onchain_operations_permission.schema.json +331 -93
  316. package/dist/schemas/onchain_operations_personal.schema.json +636 -96
  317. package/dist/schemas/onchain_operations_progress.schema.json +125 -92
  318. package/dist/schemas/onchain_operations_proof.schema.json +76 -69
  319. package/dist/schemas/onchain_operations_repository.schema.json +636 -249
  320. package/dist/schemas/onchain_operations_reward.schema.json +218 -108
  321. package/dist/schemas/onchain_operations_service.schema.json +678 -220
  322. package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
  323. package/dist/schemas/onchain_table_data.output.json +6833 -2432
  324. package/dist/schemas/onchain_table_data.schema.json +684 -417
  325. package/dist/schemas/permission_operation.output.json +173 -0
  326. package/dist/schemas/permission_operation.schema.json +39 -0
  327. package/dist/schemas/persona_operation.output.json +1568 -268
  328. package/dist/schemas/persona_operation.schema.json +346 -205
  329. package/dist/schemas/project_operation.output.json +6922 -5132
  330. package/dist/schemas/project_operation.schema.json +1050 -1020
  331. package/dist/schemas/query_task_status.output.json +195 -99
  332. package/dist/schemas/query_task_status.schema.json +12 -18
  333. package/dist/schemas/query_toolkit.output.json +18862 -14561
  334. package/dist/schemas/query_toolkit.schema.json +614 -522
  335. package/dist/schemas/schema_query.output.json +127 -129
  336. package/dist/schemas/schema_query.schema.json +64 -69
  337. package/dist/schemas/trust_score.output.json +678 -587
  338. package/dist/schemas/trust_score.schema.json +289 -277
  339. package/dist/schemas/wip_file.output.json +116 -124
  340. package/dist/schemas/wip_file.schema.json +142 -143
  341. package/dist/schemas/workflow_operation.output.json +164 -0
  342. package/dist/schemas/workflow_operation.schema.json +116 -0
  343. package/dist/schemas/workspace_operation.output.json +277 -0
  344. package/dist/schemas/workspace_operation.schema.json +45 -0
  345. package/dist/schemas/wowok_buildin_info.output.json +1682 -844
  346. package/dist/schemas/wowok_buildin_info.schema.json +576 -526
  347. package/dist/tools/handlers/bridge.d.ts +8 -1
  348. package/dist/tools/handlers/bridge.js +1 -1
  349. package/dist/tools/handlers/config.js +1 -1
  350. package/dist/tools/handlers/employee.d.ts +2 -0
  351. package/dist/tools/handlers/employee.js +1 -0
  352. package/dist/tools/handlers/evaluation.js +1 -1
  353. package/dist/tools/handlers/file-export.js +1 -1
  354. package/dist/tools/handlers/industry-pack.d.ts +2 -0
  355. package/dist/tools/handlers/industry-pack.js +1 -0
  356. package/dist/tools/handlers/onchain.js +1 -1
  357. package/dist/tools/handlers/permission.d.ts +2 -0
  358. package/dist/tools/handlers/permission.js +1 -0
  359. package/dist/tools/handlers/persona.js +1 -1
  360. package/dist/tools/handlers/project.js +1 -1
  361. package/dist/tools/handlers/query.js +1 -1
  362. package/dist/tools/handlers/schema-query.js +1 -1
  363. package/dist/tools/handlers/trust.js +1 -1
  364. package/dist/tools/handlers/wip.js +1 -1
  365. package/dist/tools/handlers/workflow.d.ts +2 -0
  366. package/dist/tools/handlers/workflow.js +1 -0
  367. package/dist/tools/handlers/workspace.d.ts +4 -0
  368. package/dist/tools/handlers/workspace.js +1 -0
  369. package/dist/tools/index.d.ts +2 -1
  370. package/dist/tools/index.js +1 -1
  371. package/dist/tools/rules-hook.d.ts +1 -1
  372. package/dist/tools/rules-hook.js +1 -1
  373. package/dist/tools/shared.d.ts +1 -1
  374. package/dist/tools/shared.js +1 -1
  375. package/dist/tools/types.d.ts +2 -1
  376. package/package.json +4 -5
  377. package/dist/knowledge/arbitration-trust.d.ts +0 -24
  378. package/dist/knowledge/arbitration-trust.js +0 -1
  379. package/dist/schema/call/bridge-handler.d.ts +0 -8
  380. package/dist/schema/call/bridge-handler.js +0 -1
  381. package/dist/schema/sync-layer4.d.ts +0 -21
  382. package/dist/schema/sync-layer4.js +0 -1
  383. /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
@@ -2,30 +2,13 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://wowok.net/schemas/onchain_operations_service.json",
4
4
  "title": "Service Operation",
5
- "description": "On-chain service operation schema",
5
+ "description": "🏪 Service Object: Create and manage product/service listings with transparent promises, bind workflow templates to order processing, set pricing, issue discount coupons to customers, and establish quality standards, etc..",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "operation_type": {
9
+ "type": "string",
9
10
  "const": "service"
10
11
  },
11
- "data": {
12
- "$ref": "#/definitions/data",
13
- "$schema": "http://json-schema.org/draft-07/schema#"
14
- },
15
- "env": {
16
- "$ref": "#/definitions/env",
17
- "$schema": "http://json-schema.org/draft-07/schema#"
18
- },
19
- "submission": {
20
- "$ref": "#/definitions/submission",
21
- "$schema": "http://json-schema.org/draft-07/schema#"
22
- }
23
- },
24
- "required": [
25
- "operation_type",
26
- "data"
27
- ],
28
- "definitions": {
29
12
  "data": {
30
13
  "type": "object",
31
14
  "properties": {
@@ -39,48 +22,55 @@
39
22
  "type": "object",
40
23
  "properties": {
41
24
  "name": {
42
- "type": "string",
43
- "description": "The name of the object"
25
+ "description": "The name of the object",
26
+ "type": "string"
44
27
  },
45
28
  "tags": {
29
+ "description": "The tags of the object",
46
30
  "type": "array",
47
31
  "items": {
48
32
  "type": "string"
49
- },
50
- "description": "The tags of the object"
33
+ }
51
34
  },
52
35
  "onChain": {
53
- "type": "boolean",
54
- "description": "CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for displaying the relationships you are willing to make public on the chain."
36
+ "description": "CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for displaying the relationships you are willing to make public on the chain.",
37
+ "type": "boolean"
55
38
  },
56
39
  "replaceExistName": {
57
- "type": "boolean",
58
- "description": "FORCE CLAIM: Set to true ONLY when the user explicitly expresses a STRONG INTENTION to forcefully take over an existing name (e.g., 'I must use this name', 'force rename', 'replace the existing one'). WARNING: This will UNBIND the name from its original object and rebind it to the new one, potentially breaking existing references. If not specified or false: the operation will FAIL with an error when the name is already in use (safe default behavior)."
40
+ "description": "FORCE CLAIM: Set to true ONLY when the user explicitly expresses a STRONG INTENTION to forcefully take over an existing name (e.g., 'I must use this name', 'force rename', 'replace the existing one'). WARNING: This will UNBIND the name from its original object and rebind it to the new one, potentially breaking existing references. If not specified or false: the operation will FAIL with an error when the name is already in use (safe default behavior).",
41
+ "type": "boolean"
59
42
  },
60
43
  "permission": {
61
44
  "anyOf": [
62
45
  {
63
- "$ref": "#/definitions/data/properties/object/anyOf/0",
46
+ "type": "string",
64
47
  "description": "String format: Reference an EXISTING object by its name (local mark) or on-chain object ID. Example: 'my-object' or '0x1234...'"
65
48
  },
66
49
  {
67
50
  "type": "object",
68
51
  "properties": {
69
52
  "name": {
70
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/name"
53
+ "description": "The name of the object",
54
+ "type": "string"
71
55
  },
72
56
  "tags": {
73
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/tags"
57
+ "description": "The tags of the object",
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
74
62
  },
75
63
  "onChain": {
76
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/onChain"
64
+ "description": "CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for displaying the relationships you are willing to make public on the chain.",
65
+ "type": "boolean"
77
66
  },
78
67
  "replaceExistName": {
79
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/replaceExistName"
68
+ "description": "FORCE CLAIM: Set to true ONLY when the user explicitly expresses a STRONG INTENTION to forcefully take over an existing name (e.g., 'I must use this name', 'force rename', 'replace the existing one'). WARNING: This will UNBIND the name from its original object and rebind it to the new one, potentially breaking existing references. If not specified or false: the operation will FAIL with an error when the name is already in use (safe default behavior).",
69
+ "type": "boolean"
80
70
  },
81
71
  "description": {
82
- "type": "string",
83
- "description": "The description of the object"
72
+ "description": "The description of the object",
73
+ "type": "string"
84
74
  }
85
75
  },
86
76
  "additionalProperties": false,
@@ -90,11 +80,14 @@
90
80
  "description": "Two ways to specify an object: (1) STRING - Reference an EXISTING object by name or ID; (2) OBJECT - CREATE a NEW object with full configuration including optional name, tags, description, and visibility settings (local private by default, or public on-chain with onChain:true)."
91
81
  },
92
82
  "type_parameter": {
93
- "type": "string",
83
+ "default": "0x2::wow::WOW",
94
84
  "description": "Payment token type for this object (format: {address}::{module}::{struct}). e.g. '0x2::wow::WOW' (WOW, the default), '0x...::usdt::USDT' (USDT), '0x...::eth::ETH' (ETH). Defines which token this object accepts for payments. To discover all available tokens and their type tags, call wowok_buildin_info with info 'mainnet bridge tokens' and use the returned `wowTypeTag` value here.",
95
- "default": "0x2::wow::WOW"
85
+ "type": "string"
96
86
  }
97
87
  },
88
+ "required": [
89
+ "type_parameter"
90
+ ],
98
91
  "additionalProperties": false,
99
92
  "description": "Object format: CREATE a NEW object with COMPLETE configuration including: optional name, tags, description, token type for payments (e.g., '0x2::wow::WOW'), AND Permission-based access control. Use this for creating sophisticated objects with both payment token specification and permission management."
100
93
  }
@@ -102,6 +95,7 @@
102
95
  "description": "Two ways to specify an object: (1) STRING - Reference an EXISTING object by name or ID; (2) OBJECT - CREATE a NEW object with full configuration including name, tags, description, token type for payments, and Permission-based access control. The object format is used when you need both token specification AND permission management."
103
96
  },
104
97
  "order_new": {
98
+ "description": "Create new order.",
105
99
  "type": "object",
106
100
  "properties": {
107
101
  "buy": {
@@ -117,9 +111,13 @@
117
111
  "description": "Name of the product or service to purchase"
118
112
  },
119
113
  "stock": {
120
- "type": [
121
- "number",
122
- "string"
114
+ "anyOf": [
115
+ {
116
+ "type": "number"
117
+ },
118
+ {
119
+ "type": "string"
120
+ }
123
121
  ],
124
122
  "description": "Quantity of the product or service to purchase"
125
123
  },
@@ -143,9 +141,13 @@
143
141
  "type": "object",
144
142
  "properties": {
145
143
  "balance": {
146
- "type": [
147
- "number",
148
- "string"
144
+ "anyOf": [
145
+ {
146
+ "type": "number"
147
+ },
148
+ {
149
+ "type": "string"
150
+ }
149
151
  ],
150
152
  "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
151
153
  }
@@ -173,16 +175,16 @@
173
175
  "description": "Actual payment amount. FORMAT: {balance: <amount_in_smallest_unit>} or {coin: <coin_object_id>}. The token type and precision are determined by the Service object's type_parameter (the generic type set when the Service was created). For WOW (9 decimals): {balance: 1000000000} = 1 WOW. For SUI (9 decimals): {balance: 1000000000} = 1 SUI."
174
176
  },
175
177
  "discount": {
176
- "type": "string",
177
- "description": "Discount object ID or name"
178
+ "description": "Discount object ID or name",
179
+ "type": "string"
178
180
  },
179
181
  "payment_remark": {
180
- "type": "string",
181
- "description": "Payment remark"
182
+ "description": "Payment remark",
183
+ "type": "string"
182
184
  },
183
185
  "payment_index": {
184
- "type": "number",
185
- "description": "Payment index"
186
+ "description": "Payment index",
187
+ "type": "number"
186
188
  }
187
189
  },
188
190
  "required": [
@@ -192,6 +194,7 @@
192
194
  "additionalProperties": false
193
195
  },
194
196
  "agents": {
197
+ "description": "Order agents. Agents can operate the order, such as canceling the order, modifying the order status, etc.; but cannot receive the funds received by the order.",
195
198
  "type": "object",
196
199
  "properties": {
197
200
  "entities": {
@@ -200,12 +203,12 @@
200
203
  "type": "object",
201
204
  "properties": {
202
205
  "name_or_address": {
203
- "$ref": "#/definitions/data/properties/object/anyOf/0",
206
+ "type": "string",
204
207
  "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
205
208
  },
206
209
  "local_mark_first": {
207
- "type": "boolean",
208
- "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks"
210
+ "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks",
211
+ "type": "boolean"
209
212
  }
210
213
  },
211
214
  "additionalProperties": false,
@@ -213,68 +216,129 @@
213
216
  }
214
217
  },
215
218
  "check_all_founded": {
216
- "type": "boolean",
217
- "description": "Whether to check all entities are found, if true, all entities must be found (abort and throw exception if any ID not found); if false, only return found IDs"
219
+ "description": "Whether to check all entities are found, if true, all entities must be found (abort and throw exception if any ID not found); if false, only return found IDs",
220
+ "type": "boolean"
218
221
  }
219
222
  },
220
223
  "required": [
221
224
  "entities"
222
225
  ],
223
- "additionalProperties": false,
224
- "description": "Order agents. Agents can operate the order, such as canceling the order, modifying the order status, etc.; but cannot receive the funds received by the order."
226
+ "additionalProperties": false
225
227
  },
226
228
  "order_required_info": {
227
- "type": "string",
228
- "description": "Contact object ID or WTS Proof object, recorded on the Order as proof that the order holder delivered the required private information (service.customer_required) to the merchant. FLOW: when a Service declares customer_required (e.g. phone/email/shipping_address), the order holder MUST send that private information to the Service's Contact (um) via end-to-end encrypted Messenger, then pass the Contact object ID or the generated WTS Proof here so the delivery is verifiable on-chain."
229
+ "description": "Contact object ID or WTS Proof object, recorded on the Order as proof that the order holder delivered the required private information (service.customer_required) to the merchant. FLOW: when a Service declares customer_required (e.g. phone/email/shipping_address), the order holder MUST send that private information to the Service's Contact (um) via end-to-end encrypted Messenger, then pass the Contact object ID or the generated WTS Proof here so the delivery is verifiable on-chain.",
230
+ "type": "string"
229
231
  },
230
232
  "transfer": {
231
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items",
232
- "description": "Set the new owner of the order. Requires order owner permission to set."
233
+ "description": "Set the new owner of the order. Requires order owner permission to set.",
234
+ "type": "object",
235
+ "properties": {
236
+ "name_or_address": {
237
+ "type": "string",
238
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
239
+ },
240
+ "local_mark_first": {
241
+ "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks",
242
+ "type": "boolean"
243
+ }
244
+ },
245
+ "additionalProperties": false
233
246
  },
234
247
  "namedNewOrder": {
248
+ "description": "RECOMMENDED: Set a local name for the newly created Order object. Without this, the Order is only referenceable by its on-chain address. Example: {name: 'my_order_v1'} allows subsequent operations to use 'my_order_v1' instead of the address.",
235
249
  "type": "object",
236
250
  "properties": {
237
251
  "name": {
238
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/name"
252
+ "description": "The name of the object",
253
+ "type": "string"
239
254
  },
240
255
  "tags": {
241
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/tags"
256
+ "description": "The tags of the object",
257
+ "type": "array",
258
+ "items": {
259
+ "type": "string"
260
+ }
242
261
  },
243
262
  "onChain": {
244
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/onChain"
263
+ "description": "CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for displaying the relationships you are willing to make public on the chain.",
264
+ "type": "boolean"
245
265
  },
246
266
  "replaceExistName": {
247
- "$ref": "#/definitions/data/properties/object/anyOf/1/properties/replaceExistName"
267
+ "description": "FORCE CLAIM: Set to true ONLY when the user explicitly expresses a STRONG INTENTION to forcefully take over an existing name (e.g., 'I must use this name', 'force rename', 'replace the existing one'). WARNING: This will UNBIND the name from its original object and rebind it to the new one, potentially breaking existing references. If not specified or false: the operation will FAIL with an error when the name is already in use (safe default behavior).",
268
+ "type": "boolean"
248
269
  }
249
270
  },
250
- "additionalProperties": false,
251
- "description": "RECOMMENDED: Set a local name for the newly created Order object. Without this, the Order is only referenceable by its on-chain address. Example: {name: 'my_order_v1'} allows subsequent operations to use 'my_order_v1' instead of the address."
271
+ "additionalProperties": false
252
272
  },
253
273
  "namedNewAllocation": {
254
- "$ref": "#/definitions/data/properties/order_new/properties/namedNewOrder",
255
- "description": "RECOMMENDED: Set a local name for the order's Allocation object. Without this, the Allocation is only referenceable by its address. Example: {name: 'my_allocation_v1'} allows alloc_by_guard to reference 'my_allocation_v1'."
274
+ "description": "RECOMMENDED: Set a local name for the order's Allocation object. Without this, the Allocation is only referenceable by its address. Example: {name: 'my_allocation_v1'} allows alloc_by_guard to reference 'my_allocation_v1'.",
275
+ "type": "object",
276
+ "properties": {
277
+ "name": {
278
+ "description": "The name of the object",
279
+ "type": "string"
280
+ },
281
+ "tags": {
282
+ "description": "The tags of the object",
283
+ "type": "array",
284
+ "items": {
285
+ "type": "string"
286
+ }
287
+ },
288
+ "onChain": {
289
+ "description": "CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for displaying the relationships you are willing to make public on the chain.",
290
+ "type": "boolean"
291
+ },
292
+ "replaceExistName": {
293
+ "description": "FORCE CLAIM: Set to true ONLY when the user explicitly expresses a STRONG INTENTION to forcefully take over an existing name (e.g., 'I must use this name', 'force rename', 'replace the existing one'). WARNING: This will UNBIND the name from its original object and rebind it to the new one, potentially breaking existing references. If not specified or false: the operation will FAIL with an error when the name is already in use (safe default behavior).",
294
+ "type": "boolean"
295
+ }
296
+ },
297
+ "additionalProperties": false
256
298
  },
257
299
  "namedNewProgress": {
258
- "$ref": "#/definitions/data/properties/order_new/properties/namedNewOrder",
259
- "description": "RECOMMENDED: Set a local name for the order's Progress object. Without this, the Progress is only referenceable by its address. Example: {name: 'my_progress_v1'} allows progress operations to use 'my_progress_v1'."
300
+ "description": "RECOMMENDED: Set a local name for the order's Progress object. Without this, the Progress is only referenceable by its address. Example: {name: 'my_progress_v1'} allows progress operations to use 'my_progress_v1'.",
301
+ "type": "object",
302
+ "properties": {
303
+ "name": {
304
+ "description": "The name of the object",
305
+ "type": "string"
306
+ },
307
+ "tags": {
308
+ "description": "The tags of the object",
309
+ "type": "array",
310
+ "items": {
311
+ "type": "string"
312
+ }
313
+ },
314
+ "onChain": {
315
+ "description": "CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for displaying the relationships you are willing to make public on the chain.",
316
+ "type": "boolean"
317
+ },
318
+ "replaceExistName": {
319
+ "description": "FORCE CLAIM: Set to true ONLY when the user explicitly expresses a STRONG INTENTION to forcefully take over an existing name (e.g., 'I must use this name', 'force rename', 'replace the existing one'). WARNING: This will UNBIND the name from its original object and rebind it to the new one, potentially breaking existing references. If not specified or false: the operation will FAIL with an error when the name is already in use (safe default behavior).",
320
+ "type": "boolean"
321
+ }
322
+ },
323
+ "additionalProperties": false
260
324
  }
261
325
  },
262
326
  "required": [
263
327
  "buy"
264
328
  ],
265
- "additionalProperties": false,
266
- "description": "Create new order."
329
+ "additionalProperties": false
267
330
  },
268
331
  "description": {
269
332
  "type": "string",
270
333
  "description": "Description string (max 4000 bcs characters)"
271
334
  },
272
335
  "location": {
273
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/items/items/properties/name",
274
- "description": "Location of the Service"
336
+ "description": "Location of the Service",
337
+ "type": "string"
275
338
  },
276
339
  "sales": {
277
- "anyOf": [
340
+ "description": "Service sales products or services list. ⚠️ WIP NETWORK-DEPLOYMENT RULE: a non-empty sale.wip MUST be a publicly reachable URL (GitHub Pages / IPFS / your own website). The URL is stored ON-CHAIN and every customer fetches it at order time — a local file path, localhost/loopback URL, or LAN private-IP URL is unreachable by customers on other machines and aborts order_new 100%. Local-network URLs are INTERNAL TEST USE ONLY (env.network = localnet). Leave sale.wip empty (\"\") to skip WIP verification (TESTING ONLY).",
341
+ "oneOf": [
278
342
  {
279
343
  "type": "object",
280
344
  "properties": {
@@ -288,20 +352,28 @@
288
352
  "type": "object",
289
353
  "properties": {
290
354
  "name": {
291
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/items/items/properties/name",
355
+ "type": "string",
292
356
  "description": "Name of the product or service for sale"
293
357
  },
294
358
  "price": {
295
- "type": [
296
- "number",
297
- "string"
359
+ "anyOf": [
360
+ {
361
+ "type": "number"
362
+ },
363
+ {
364
+ "type": "string"
365
+ }
298
366
  ],
299
367
  "description": "Price of the product or service"
300
368
  },
301
369
  "stock": {
302
- "type": [
303
- "number",
304
- "string"
370
+ "anyOf": [
371
+ {
372
+ "type": "number"
373
+ },
374
+ {
375
+ "type": "string"
376
+ }
305
377
  ],
306
378
  "description": "Stock of the product or service"
307
379
  },
@@ -348,7 +420,57 @@
348
420
  "sales": {
349
421
  "type": "array",
350
422
  "items": {
351
- "$ref": "#/definitions/data/properties/sales/anyOf/0/properties/sales/items"
423
+ "type": "object",
424
+ "properties": {
425
+ "name": {
426
+ "type": "string",
427
+ "description": "Name of the product or service for sale"
428
+ },
429
+ "price": {
430
+ "anyOf": [
431
+ {
432
+ "type": "number"
433
+ },
434
+ {
435
+ "type": "string"
436
+ }
437
+ ],
438
+ "description": "Price of the product or service"
439
+ },
440
+ "stock": {
441
+ "anyOf": [
442
+ {
443
+ "type": "number"
444
+ },
445
+ {
446
+ "type": "string"
447
+ }
448
+ ],
449
+ "description": "Stock of the product or service"
450
+ },
451
+ "suspension": {
452
+ "type": "boolean",
453
+ "description": "Whether sale is suspended"
454
+ },
455
+ "wip": {
456
+ "type": "string",
457
+ "description": "WIP file URL. EMPTY string \"\" skips verification (TESTING ONLY). Production MUST use a real HTTP URL pointing to a .wip file generated by the wip_file tool. ⚠️ NETWORK DEPLOYMENT REQUIRED: the URL is stored ON-CHAIN and every customer fetches it when placing an order. A local file path (C:\\..., /path/file.wip), a localhost/loopback URL or a LAN private-IP URL is unreachable by customers on other machines — it passes the merchant-side set-time verification but makes order_new abort 100% for customers. Either deploy the .wip file to a public endpoint (GitHub Pages / IPFS / your own website) and set this to the public URL, or leave it empty (\"\") to skip WIP verification (TESTING ONLY). Example: \"https://cdn.example.com/products/phone_v1.wip\""
458
+ },
459
+ "wip_hash": {
460
+ "type": "string",
461
+ "description": "SHA-256 hash (hex string) of the sale's WIP file, committed on-chain by the merchant. BUY RULE: if this is NON-EMPTY, the buyer MUST pass this exact value as wip_hash when creating an order (ServiceBuyItem.wip_hash) — NEVER use \"\". Pinning the on-chain hash prevents the merchant from replacing the WIP file (a legitimate update) between the buyer's view and order placement, ensuring 'what you see is what you get'. EMPTY means no hash was committed (TESTING ONLY, no delivery-integrity guarantee)."
462
+ }
463
+ },
464
+ "required": [
465
+ "name",
466
+ "price",
467
+ "stock",
468
+ "suspension",
469
+ "wip",
470
+ "wip_hash"
471
+ ],
472
+ "additionalProperties": false,
473
+ "description": "Service sale"
352
474
  }
353
475
  }
354
476
  },
@@ -369,7 +491,7 @@
369
491
  "sales_name": {
370
492
  "type": "array",
371
493
  "items": {
372
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/items/items/properties/name",
494
+ "type": "string",
373
495
  "description": "Sales name"
374
496
  }
375
497
  }
@@ -395,25 +517,31 @@
395
517
  "additionalProperties": false,
396
518
  "description": "Clear all sales products or services."
397
519
  }
398
- ],
399
- "description": "Service sales products or services list. ⚠️ WIP NETWORK-DEPLOYMENT RULE: a non-empty sale.wip MUST be a publicly reachable URL (GitHub Pages / IPFS / your own website). The URL is stored ON-CHAIN and every customer fetches it at order time — a local file path, localhost/loopback URL, or LAN private-IP URL is unreachable by customers on other machines and aborts order_new 100%. Local-network URLs are INTERNAL TEST USE ONLY (env.network = localnet). Leave sale.wip empty (\"\") to skip WIP verification (TESTING ONLY)."
520
+ ]
400
521
  },
401
522
  "repositories": {
523
+ "description": "Service Repository object list.",
402
524
  "anyOf": [
403
525
  {
404
526
  "type": "object",
405
527
  "properties": {
406
528
  "op": {
407
- "type": "string",
408
- "enum": [
409
- "add",
410
- "set"
529
+ "anyOf": [
530
+ {
531
+ "type": "string",
532
+ "const": "add"
533
+ },
534
+ {
535
+ "type": "string",
536
+ "const": "set"
537
+ }
411
538
  ]
412
539
  },
413
540
  "objects": {
414
541
  "type": "array",
415
542
  "items": {
416
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
543
+ "type": "string",
544
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
417
545
  },
418
546
  "description": "List of object IDs or names to add or set"
419
547
  }
@@ -434,7 +562,8 @@
434
562
  "objects": {
435
563
  "type": "array",
436
564
  "items": {
437
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
565
+ "type": "string",
566
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
438
567
  },
439
568
  "description": "List of object IDs or names to remove"
440
569
  }
@@ -458,29 +587,162 @@
458
587
  ],
459
588
  "additionalProperties": false
460
589
  }
461
- ],
462
- "description": "Service Repository object list."
590
+ ]
463
591
  },
464
592
  "rewards": {
465
- "$ref": "#/definitions/data/properties/repositories",
466
- "description": "Service Reward object list. May share the Service's Permission (no conflict check — intentional: rewards are the provider's own incentive tool; only Arbitration requires a different Permission for neutrality)."
593
+ "description": "Service Reward object list. May share the Service's Permission (no conflict check — intentional: rewards are the provider's own incentive tool; only Arbitration requires a different Permission for neutrality).",
594
+ "anyOf": [
595
+ {
596
+ "type": "object",
597
+ "properties": {
598
+ "op": {
599
+ "anyOf": [
600
+ {
601
+ "type": "string",
602
+ "const": "add"
603
+ },
604
+ {
605
+ "type": "string",
606
+ "const": "set"
607
+ }
608
+ ]
609
+ },
610
+ "objects": {
611
+ "type": "array",
612
+ "items": {
613
+ "type": "string",
614
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
615
+ },
616
+ "description": "List of object IDs or names to add or set"
617
+ }
618
+ },
619
+ "required": [
620
+ "op",
621
+ "objects"
622
+ ],
623
+ "additionalProperties": false
624
+ },
625
+ {
626
+ "type": "object",
627
+ "properties": {
628
+ "op": {
629
+ "type": "string",
630
+ "const": "remove"
631
+ },
632
+ "objects": {
633
+ "type": "array",
634
+ "items": {
635
+ "type": "string",
636
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
637
+ },
638
+ "description": "List of object IDs or names to remove"
639
+ }
640
+ },
641
+ "required": [
642
+ "op",
643
+ "objects"
644
+ ],
645
+ "additionalProperties": false
646
+ },
647
+ {
648
+ "type": "object",
649
+ "properties": {
650
+ "op": {
651
+ "type": "string",
652
+ "const": "clear"
653
+ }
654
+ },
655
+ "required": [
656
+ "op"
657
+ ],
658
+ "additionalProperties": false
659
+ }
660
+ ]
467
661
  },
468
662
  "arbitrations": {
469
- "$ref": "#/definitions/data/properties/repositories",
470
- "description": "Service Arbitration object list. FORMAT: same as repositories — use the `objects` field name inside the operation data. Example: {arbitrations: [{name: 'my_arb_1'}, {name: 'my_arb_2'}]}. Each item is a NameOrAddress (object ID or local mark name). ⚠️ PERMISSION RULE (contract-enforced, service.move arbitration_add_imp): every Arbitration bound here MUST use a Permission object DIFFERENT from THIS Service's permission — binding an Arbitration that shares the Service's Permission aborts with E_ARBITRATION_PERMISSION_CONFLICT (error 33). Create a dedicated Permission for each Arbitration BEFORE binding. DESIGN RATIONALE (confirmed intentional): dispute resolution requires NEUTRALITY — an Arbitration controlled by the same Permission admins as the Service it judges would be a conflict of interest. ONLY Arbitration has this check: Reward and Treasury objects MAY share the Service's Permission (they are the provider's own tools)."
663
+ "description": "Service Arbitration object list. FORMAT: same as repositories — use the `objects` field name inside the operation data. Example: {arbitrations: [{name: 'my_arb_1'}, {name: 'my_arb_2'}]}. Each item is a NameOrAddress (object ID or local mark name). ⚠️ PERMISSION RULE (contract-enforced, service.move arbitration_add_imp): every Arbitration bound here MUST use a Permission object DIFFERENT from THIS Service's permission — binding an Arbitration that shares the Service's Permission aborts with E_ARBITRATION_PERMISSION_CONFLICT (error 33). Create a dedicated Permission for each Arbitration BEFORE binding. DESIGN RATIONALE (confirmed intentional): dispute resolution requires NEUTRALITY — an Arbitration controlled by the same Permission admins as the Service it judges would be a conflict of interest. ONLY Arbitration has this check: Reward and Treasury objects MAY share the Service's Permission (they are the provider's own tools).",
664
+ "anyOf": [
665
+ {
666
+ "type": "object",
667
+ "properties": {
668
+ "op": {
669
+ "anyOf": [
670
+ {
671
+ "type": "string",
672
+ "const": "add"
673
+ },
674
+ {
675
+ "type": "string",
676
+ "const": "set"
677
+ }
678
+ ]
679
+ },
680
+ "objects": {
681
+ "type": "array",
682
+ "items": {
683
+ "type": "string",
684
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
685
+ },
686
+ "description": "List of object IDs or names to add or set"
687
+ }
688
+ },
689
+ "required": [
690
+ "op",
691
+ "objects"
692
+ ],
693
+ "additionalProperties": false
694
+ },
695
+ {
696
+ "type": "object",
697
+ "properties": {
698
+ "op": {
699
+ "type": "string",
700
+ "const": "remove"
701
+ },
702
+ "objects": {
703
+ "type": "array",
704
+ "items": {
705
+ "type": "string",
706
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
707
+ },
708
+ "description": "List of object IDs or names to remove"
709
+ }
710
+ },
711
+ "required": [
712
+ "op",
713
+ "objects"
714
+ ],
715
+ "additionalProperties": false
716
+ },
717
+ {
718
+ "type": "object",
719
+ "properties": {
720
+ "op": {
721
+ "type": "string",
722
+ "const": "clear"
723
+ }
724
+ },
725
+ "required": [
726
+ "op"
727
+ ],
728
+ "additionalProperties": false
729
+ }
730
+ ]
471
731
  },
472
732
  "machine": {
733
+ "description": "Service Machine object ID or name. The Machine object must be in published state.",
473
734
  "anyOf": [
474
735
  {
475
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
736
+ "type": "string",
737
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
476
738
  },
477
739
  {
478
740
  "type": "null"
479
741
  }
480
- ],
481
- "description": "Service Machine object ID or name. The Machine object must be in published state."
742
+ ]
482
743
  },
483
744
  "discount": {
745
+ "description": "Issue discount.",
484
746
  "type": "object",
485
747
  "properties": {
486
748
  "name": {
@@ -496,31 +758,35 @@
496
758
  "FIXED"
497
759
  ]
498
760
  },
499
- {
500
- "type": "integer",
501
- "minimum": 0,
502
- "maximum": 1
503
- }
761
+ {}
504
762
  ],
505
763
  "description": "Discount type"
506
764
  },
507
765
  "discount_value": {
508
- "type": [
509
- "number",
510
- "string"
766
+ "anyOf": [
767
+ {
768
+ "type": "number"
769
+ },
770
+ {
771
+ "type": "string"
772
+ }
511
773
  ],
512
774
  "description": "Discount value"
513
775
  },
514
776
  "benchmark": {
515
- "type": [
516
- "number",
517
- "string"
518
- ],
519
- "description": "Discount benchmark value. Discount is only applied if the amount exceeds this value"
777
+ "description": "Discount benchmark value. Discount is only applied if the amount exceeds this value",
778
+ "anyOf": [
779
+ {
780
+ "type": "number"
781
+ },
782
+ {
783
+ "type": "string"
784
+ }
785
+ ]
520
786
  },
521
787
  "time_ms_start": {
522
- "type": "number",
523
- "description": "Discount start time (milliseconds)"
788
+ "description": "Discount start time (milliseconds)",
789
+ "type": "number"
524
790
  },
525
791
  "time_ms_end": {
526
792
  "type": "number",
@@ -534,10 +800,26 @@
534
800
  "type": "object",
535
801
  "properties": {
536
802
  "entities": {
537
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities"
803
+ "type": "array",
804
+ "items": {
805
+ "type": "object",
806
+ "properties": {
807
+ "name_or_address": {
808
+ "type": "string",
809
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
810
+ },
811
+ "local_mark_first": {
812
+ "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks",
813
+ "type": "boolean"
814
+ }
815
+ },
816
+ "additionalProperties": false,
817
+ "description": "Account or address lookup object. Use this to specify which account to use for an operation. EXAMPLE: { name_or_address: 'testor2' } - looks up account by name; EXAMPLE: { name_or_address: '0x1234...' } - uses address directly; If name_or_address is empty string '', uses the default local account."
818
+ }
538
819
  },
539
820
  "check_all_founded": {
540
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/check_all_founded"
821
+ "description": "Whether to check all entities are found, if true, all entities must be found (abort and throw exception if any ID not found); if false, only return found IDs",
822
+ "type": "boolean"
541
823
  }
542
824
  },
543
825
  "required": [
@@ -560,37 +842,45 @@
560
842
  "recipient",
561
843
  "transferable"
562
844
  ],
563
- "additionalProperties": false,
564
- "description": "Issue discount."
845
+ "additionalProperties": false
565
846
  },
566
847
  "discount_destroy": {
848
+ "description": "Destroy existing discount object ID list.",
567
849
  "type": "array",
568
850
  "items": {
569
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
570
- },
571
- "description": "Destroy existing discount object ID list."
851
+ "type": "string",
852
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
853
+ }
572
854
  },
573
855
  "customer_required": {
856
+ "description": "Customer required information labels. Such as phone, email, shipping_address, etc. ⚠️ HARD LINKAGE (SDK-enforced): if customer_required is set (non-empty), the Service MUST also bind a Contact via `um` — otherwise the customer's private information cannot be delivered through end-to-end encrypted Messenger (which routes to the Contact bound as um). Set `um` together with customer_required.",
574
857
  "type": "array",
575
858
  "items": {
576
859
  "type": "string",
577
860
  "minLength": 1
578
- },
579
- "description": "Customer required information labels. Such as phone, email, shipping_address, etc. ⚠️ HARD LINKAGE (SDK-enforced): if customer_required is set (non-empty), the Service MUST also bind a Contact via `um` — otherwise the customer's private information cannot be delivered through end-to-end encrypted Messenger (which routes to the Contact bound as um). Set `um` together with customer_required."
861
+ }
580
862
  },
581
863
  "order_allocators": {
864
+ "description": "Order fund allocator. Max 100 allocators (MAX_ALLOCATOR_COUNT). Each allocator has a guard (first matching guard wins) and a sharing list. Set to null to clear. ⚠️ PERMANENTLY IMMUTABLE after publish: order_allocators can ONLY be set BEFORE publish=true (Move service.move:503: assert!(!self.bPublished, E_ALREADY_PUBLISHED)). After publish, the ONLY way to change allocation rules is to create a NEW Service object. There is NO pause+lock exception for order_allocators (unlike arbitrations/rewards which have time-lock removal). PRE-PUBLISH CHECKLIST: verify all guard names resolve, all sharing amounts are correct, threshold is set, and recipient types (Entity/Signer/GuardIdentifier) are intended before calling publish=true. GuardIdentifier sharing mode: {who: {GuardIdentifier: <u8>}, sharing: <rate>, mode: 'Rate'} — resolves recipient from Guard table submission at allocation time (e.g., refund to customer). MULTI-CALL ALLOCATION: Allocation.alloc() can be called MULTIPLE times (no consumed flag in contract). Use Amount mode (not Surplus) for recurring allocations — Surplus calls balance::withdraw_all which drains the balance. For monthly payment scenarios, create multiple Allocators with time-based Guards + Amount mode sharing items.",
582
865
  "anyOf": [
583
866
  {
584
867
  "type": "object",
585
868
  "properties": {
586
869
  "description": {
587
- "$ref": "#/definitions/data/properties/description",
870
+ "type": "string",
588
871
  "description": "Description of fund allocator list"
589
872
  },
590
873
  "threshold": {
591
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/0/properties/balance",
592
874
  "default": 0,
593
- "description": "Minimum balance required for allocation to fire. When the Allocation object's balance < threshold, allocation aborts with EINSUFFICIENT_BALANCE=7. Also: when an Allocator has only Amount items (no Rate, no Surplus), the sum of Amount items must be >= threshold (EAMOUNT_BELOW_THRESHOLD=12). Set to 0 (default) to allow any balance."
875
+ "description": "Minimum balance required for allocation to fire. When the Allocation object's balance < threshold, allocation aborts with EINSUFFICIENT_BALANCE=7. Also: when an Allocator has only Amount items (no Rate, no Surplus), the sum of Amount items must be >= threshold (EAMOUNT_BELOW_THRESHOLD=12). Set to 0 (default) to allow any balance.",
876
+ "anyOf": [
877
+ {
878
+ "type": "number"
879
+ },
880
+ {
881
+ "type": "string"
882
+ }
883
+ ]
594
884
  },
595
885
  "allocators": {
596
886
  "type": "array",
@@ -598,7 +888,7 @@
598
888
  "type": "object",
599
889
  "properties": {
600
890
  "guard": {
601
- "$ref": "#/definitions/data/properties/object/anyOf/0",
891
+ "type": "string",
602
892
  "description": "Guard object ID or name. If Guard verification passes (via Passport), fund allocation for THIS Allocator fires. Each Allocator in an Allocators list can have a different Guard — the first Allocator whose Guard returns true wins. This enables mutually exclusive allocation paths (e.g., refund Guard on 'return_approved' node vs damage Guard on 'damage_confirmed' node)."
603
893
  },
604
894
  "sharing": {
@@ -628,7 +918,19 @@
628
918
  "type": "object",
629
919
  "properties": {
630
920
  "Entity": {
631
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items"
921
+ "type": "object",
922
+ "properties": {
923
+ "name_or_address": {
924
+ "type": "string",
925
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
926
+ },
927
+ "local_mark_first": {
928
+ "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks",
929
+ "type": "boolean"
930
+ }
931
+ },
932
+ "additionalProperties": false,
933
+ "description": "Account or address lookup object. Use this to specify which account to use for an operation. EXAMPLE: { name_or_address: 'testor2' } - looks up account by name; EXAMPLE: { name_or_address: '0x1234...' } - uses address directly; If name_or_address is empty string '', uses the default local account."
632
934
  }
633
935
  },
634
936
  "required": [
@@ -655,9 +957,13 @@
655
957
  "description": "Recipient of this allocation. Three forms — each resolves the address at a DIFFERENT time:\n• { GuardIdentifier: u8 } — DYNAMIC address resolved from Passport at alloc() time (contract calls passport::submission_get). Use 0 for Order owner in Service-integrated mode (Customer who created the Order). The identifier must match a Guard table entry with b_submission=true. If Passport has no matching submission, contract aborts with E_VERIFY_FAILED. Use when the recipient address is not known at config time and must be supplied via Guard submission data.\n• { Entity: { name_or_address: '...' } } — FIXED address resolved via LocalMark at SDK build time (passed to contract as a literal address). Use for known recipients (e.g., 'turo_host', or a Treasury object address). Use when the recipient is a stable, known address (e.g., operator receives rent, platform fee to treasury).\n• 'Signer' — the transaction sender at the time of the alloc() call (tx_context::sender). RESOLVED AT EXECUTION TIME, not at config time. For refunds: the customer (Order owner) must call alloc_by_guard THEMSELVES so that tx_context::sender resolves to THEIR address — if the operator calls alloc_by_guard, the operator becomes the recipient (Signer = operator), NOT the customer. Use when the recipient is whoever submits the allocation transaction (e.g., customer receives refund)."
656
958
  },
657
959
  "sharing": {
658
- "type": [
659
- "number",
660
- "string"
960
+ "anyOf": [
961
+ {
962
+ "type": "number"
963
+ },
964
+ {
965
+ "type": "string"
966
+ }
661
967
  ],
662
968
  "description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations.\n⚠️ T1 LOSSY POINT (B-2): the value is PRE-CONFIGURED and STATIC. A continuous/conditional amount (e.g. 'pay exactly the assessed loss amount') CANNOT be expressed — there is no runtime formula field. Model variable payouts as (a) a fixed-tier Allocator list guarded by distinct Guards, or (b) an Amount with a `max` cap — both are finite configurations, not free-form formulas."
663
969
  },
@@ -671,11 +977,7 @@
671
977
  "Surplus"
672
978
  ]
673
979
  },
674
- {
675
- "type": "integer",
676
- "minimum": 0,
677
- "maximum": 2
678
- }
980
+ {}
679
981
  ],
680
982
  "description": "Allocation mode — determines how the `sharing` field is interpreted. Three modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set). Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate items (proportional to balance-fix) → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits (requires sum == 10000 unless Surplus present). Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus', recommended) or number (0/1/2)."
681
983
  }
@@ -691,19 +993,34 @@
691
993
  "description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
692
994
  },
693
995
  "fix": {
694
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/0/properties/balance",
695
- "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation."
996
+ "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation.",
997
+ "anyOf": [
998
+ {
999
+ "type": "number"
1000
+ },
1001
+ {
1002
+ "type": "string"
1003
+ }
1004
+ ]
696
1005
  },
697
1006
  "max": {
1007
+ "description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> via allocator_add(): when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort.",
698
1008
  "anyOf": [
699
1009
  {
700
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/0/properties/balance"
1010
+ "anyOf": [
1011
+ {
1012
+ "type": "number"
1013
+ },
1014
+ {
1015
+ "type": "string"
1016
+ }
1017
+ ],
1018
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
701
1019
  },
702
1020
  {
703
1021
  "type": "null"
704
1022
  }
705
- ],
706
- "description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> via allocator_add(): when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort."
1023
+ ]
707
1024
  }
708
1025
  },
709
1026
  "required": [
@@ -718,6 +1035,7 @@
718
1035
  },
719
1036
  "required": [
720
1037
  "description",
1038
+ "threshold",
721
1039
  "allocators"
722
1040
  ],
723
1041
  "additionalProperties": false,
@@ -726,42 +1044,73 @@
726
1044
  {
727
1045
  "type": "null"
728
1046
  }
729
- ],
730
- "description": "Order fund allocator. Max 100 allocators (MAX_ALLOCATOR_COUNT). Each allocator has a guard (first matching guard wins) and a sharing list. Set to null to clear. ⚠️ PERMANENTLY IMMUTABLE after publish: order_allocators can ONLY be set BEFORE publish=true (Move service.move:503: assert!(!self.bPublished, E_ALREADY_PUBLISHED)). After publish, the ONLY way to change allocation rules is to create a NEW Service object. There is NO pause+lock exception for order_allocators (unlike arbitrations/rewards which have time-lock removal). PRE-PUBLISH CHECKLIST: verify all guard names resolve, all sharing amounts are correct, threshold is set, and recipient types (Entity/Signer/GuardIdentifier) are intended before calling publish=true. GuardIdentifier sharing mode: {who: {GuardIdentifier: <u8>}, sharing: <rate>, mode: 'Rate'} — resolves recipient from Guard table submission at allocation time (e.g., refund to customer). MULTI-CALL ALLOCATION: Allocation.alloc() can be called MULTIPLE times (no consumed flag in contract). Use Amount mode (not Surplus) for recurring allocations — Surplus calls balance::withdraw_all which drains the balance. For monthly payment scenarios, create multiple Allocators with time-based Guards + Amount mode sharing items."
1047
+ ]
731
1048
  },
732
1049
  "buy_guard": {
1050
+ "description": "Buy guard object ID or name.",
733
1051
  "anyOf": [
734
1052
  {
735
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
1053
+ "type": "string",
1054
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
736
1055
  },
737
1056
  {
738
1057
  "type": "null"
739
1058
  }
740
- ],
741
- "description": "Buy guard object ID or name."
1059
+ ]
742
1060
  },
743
1061
  "compensation_fund_add": {
1062
+ "description": "Deposit funds into the Service compensation_fund. Used to pay indemnity when arbitration resolves in customer's favor. FORMAT: {balance: <amount_in_smallest_unit>} — the field name is 'balance' (NOT 'amount'). The token type and precision are determined by the Service object's type_parameter (the generic type set when the Service was created). For WOW (9 decimals): {balance: 1000000000} = 1 WOW. For SUI (9 decimals): {balance: 1000000000} = 1 SUI. For tokens with different decimals, adjust accordingly (e.g. USDC has 6 decimals, so {balance: 1000000} = 1 USDC). REQUIRES: Permission index 315 (SERVICE_COMPENSATION_FUND_DEPOSIT) must be granted to the calling account first. COMMON MISTAKE: using {amount: ...} or {amount: ..., type: 'WOW'} — these will fail. The correct field is 'balance'.",
744
1063
  "anyOf": [
745
1064
  {
746
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/0"
1065
+ "type": "object",
1066
+ "properties": {
1067
+ "balance": {
1068
+ "anyOf": [
1069
+ {
1070
+ "type": "number"
1071
+ },
1072
+ {
1073
+ "type": "string"
1074
+ }
1075
+ ],
1076
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
1077
+ }
1078
+ },
1079
+ "required": [
1080
+ "balance"
1081
+ ],
1082
+ "additionalProperties": false,
1083
+ "description": "Specify an amount value."
747
1084
  },
748
1085
  {
749
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/1"
1086
+ "type": "object",
1087
+ "properties": {
1088
+ "coin": {
1089
+ "type": "string",
1090
+ "description": "Coin object ID or name(local mark). Use a specified Coin object."
1091
+ }
1092
+ },
1093
+ "required": [
1094
+ "coin"
1095
+ ],
1096
+ "additionalProperties": false
750
1097
  }
751
- ],
752
- "description": "Deposit funds into the Service compensation_fund. Used to pay indemnity when arbitration resolves in customer's favor. FORMAT: {balance: <amount_in_smallest_unit>} — the field name is 'balance' (NOT 'amount'). The token type and precision are determined by the Service object's type_parameter (the generic type set when the Service was created). For WOW (9 decimals): {balance: 1000000000} = 1 WOW. For SUI (9 decimals): {balance: 1000000000} = 1 SUI. For tokens with different decimals, adjust accordingly (e.g. USDC has 6 decimals, so {balance: 1000000} = 1 USDC). REQUIRES: Permission index 315 (SERVICE_COMPENSATION_FUND_DEPOSIT) must be granted to the calling account first. COMMON MISTAKE: using {amount: ...} or {amount: ..., type: 'WOW'} — these will fail. The correct field is 'balance'."
1098
+ ]
753
1099
  },
754
1100
  "compensation_fund_withdraw": {
1101
+ "description": "Withdraw ALL funds from the compensation_fund to a new Payment object owned by `receipt`. Move layer: service::compensation_fund_withdraw (service.move L383-390). REQUIRES: Service must be paused AND setting_lock_duration must have elapsed since pause (assert_not_published at L384-385). Withdraws the ENTIRE compensation_fund balance via balance::withdraw_all. DIFFERENT from compensation_claim (order-side, for arbitration-winning users, no pause+lock required).",
755
1102
  "type": "object",
756
1103
  "properties": {
757
1104
  "receipt": {
758
1105
  "type": "object",
759
1106
  "properties": {
760
1107
  "name_or_address": {
761
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
1108
+ "type": "string",
1109
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
762
1110
  },
763
1111
  "local_mark_first": {
764
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/local_mark_first"
1112
+ "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks",
1113
+ "type": "boolean"
765
1114
  }
766
1115
  },
767
1116
  "additionalProperties": false,
@@ -771,27 +1120,39 @@
771
1120
  "type": "object",
772
1121
  "properties": {
773
1122
  "for_object": {
774
- "type": [
775
- "string",
776
- "null"
777
- ],
778
- "description": "Payment for a specific object ID"
1123
+ "description": "Payment for a specific object ID",
1124
+ "anyOf": [
1125
+ {
1126
+ "type": "string"
1127
+ },
1128
+ {
1129
+ "type": "null"
1130
+ }
1131
+ ]
779
1132
  },
780
1133
  "for_guard": {
781
- "type": [
782
- "string",
783
- "null"
784
- ],
785
- "description": "Payment to satisfy verification of a Guard object"
1134
+ "description": "Payment to satisfy verification of a Guard object",
1135
+ "anyOf": [
1136
+ {
1137
+ "type": "string"
1138
+ },
1139
+ {
1140
+ "type": "null"
1141
+ }
1142
+ ]
786
1143
  },
787
1144
  "remark": {
788
1145
  "type": "string",
789
1146
  "description": "Payment record remark"
790
1147
  },
791
1148
  "index": {
792
- "type": [
793
- "number",
794
- "string"
1149
+ "anyOf": [
1150
+ {
1151
+ "type": "number"
1152
+ },
1153
+ {
1154
+ "type": "string"
1155
+ }
795
1156
  ],
796
1157
  "description": "Payment record index"
797
1158
  }
@@ -808,20 +1169,28 @@
808
1169
  "receipt",
809
1170
  "payment_info"
810
1171
  ],
811
- "additionalProperties": false,
812
- "description": "Withdraw ALL funds from the compensation_fund to a new Payment object owned by `receipt`. Move layer: service::compensation_fund_withdraw (service.move L383-390). REQUIRES: Service must be paused AND setting_lock_duration must have elapsed since pause (assert_not_published at L384-385). Withdraws the ENTIRE compensation_fund balance via balance::withdraw_all. DIFFERENT from compensation_claim (order-side, for arbitration-winning users, no pause+lock required)."
1172
+ "additionalProperties": false
813
1173
  },
814
1174
  "setting_lock_duration_add": {
815
- "type": "number",
816
- "description": "Additional lock duration to ADD to 'setting_lock_duration' (Move field name). UNIT: milliseconds (ms). Example: 2592000000 = 30 days, 7776000000 = 90 days, 86400000 = 1 day. DEFAULT: 2592000000 (30 days, DEFAULT_LOCK_DURATION). This is the initial value when a Service is created. Behavior: additive (safe_add) — only increases, never decreases. Move entry: service::setting_lock_duration_add / setting_lock_duration_add_with_passport. Can be called BEFORE or AFTER publish (no publish check). Affects the waiting time required by: compensation_fund_withdraw, arbitrations remove/clear, rewards remove/clear (all require pause + setting_lock_duration elapsed since pause)."
1175
+ "description": "Additional lock duration to ADD to 'setting_lock_duration' (Move field name). UNIT: milliseconds (ms). Example: 2592000000 = 30 days, 7776000000 = 90 days, 86400000 = 1 day. DEFAULT: 2592000000 (30 days, DEFAULT_LOCK_DURATION). This is the initial value when a Service is created. Behavior: additive (safe_add) — only increases, never decreases. Move entry: service::setting_lock_duration_add / setting_lock_duration_add_with_passport. Can be called BEFORE or AFTER publish (no publish check). Affects the waiting time required by: compensation_fund_withdraw, arbitrations remove/clear, rewards remove/clear (all require pause + setting_lock_duration elapsed since pause).",
1176
+ "type": "number"
817
1177
  },
818
1178
  "compensation_fund_receive": {
1179
+ "description": "Receive order compensation funds from this Service object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received balance.\n Use this for the common case: \"deposit all recently received coins into pending balance.\"\n Example: receive: 'recently'\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a specific balance record from a Payment/payer.\n Use this when targeting a specific received balance (advanced).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly.",
819
1180
  "anyOf": [
820
1181
  {
821
1182
  "type": "object",
822
1183
  "properties": {
823
1184
  "balance": {
824
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/0/properties/balance"
1185
+ "anyOf": [
1186
+ {
1187
+ "type": "number"
1188
+ },
1189
+ {
1190
+ "type": "string"
1191
+ }
1192
+ ],
1193
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
825
1194
  },
826
1195
  "token_type": {
827
1196
  "type": "string",
@@ -837,7 +1206,15 @@
837
1206
  "description": "Received CoinWrapper object ID"
838
1207
  },
839
1208
  "balance": {
840
- "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/0/properties/balance"
1209
+ "anyOf": [
1210
+ {
1211
+ "type": "number"
1212
+ },
1213
+ {
1214
+ "type": "string"
1215
+ }
1216
+ ],
1217
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
841
1218
  },
842
1219
  "payment": {
843
1220
  "type": "string",
@@ -867,10 +1244,10 @@
867
1244
  "type": "string",
868
1245
  "const": "recently"
869
1246
  }
870
- ],
871
- "description": "Receive order compensation funds from this Service object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received balance.\n Use this for the common case: \"deposit all recently received coins into pending balance.\"\n Example: receive: 'recently'\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a specific balance record from a Payment/payer.\n Use this when targeting a specific received balance (advanced).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
1247
+ ]
872
1248
  },
873
1249
  "owner_receive": {
1250
+ "description": "Unwrap CoinWrapper objects and other objects received by this Service object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly.",
874
1251
  "anyOf": [
875
1252
  {
876
1253
  "type": "array",
@@ -900,33 +1277,92 @@
900
1277
  }
901
1278
  },
902
1279
  {
903
- "$ref": "#/definitions/data/properties/compensation_fund_receive/anyOf/0"
1280
+ "type": "object",
1281
+ "properties": {
1282
+ "balance": {
1283
+ "anyOf": [
1284
+ {
1285
+ "type": "number"
1286
+ },
1287
+ {
1288
+ "type": "string"
1289
+ }
1290
+ ],
1291
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
1292
+ },
1293
+ "token_type": {
1294
+ "type": "string",
1295
+ "description": "Asset type of Coin objects. Supports CoinWrapper<...> format for order receive operations."
1296
+ },
1297
+ "received": {
1298
+ "type": "array",
1299
+ "items": {
1300
+ "type": "object",
1301
+ "properties": {
1302
+ "id": {
1303
+ "type": "string",
1304
+ "description": "Received CoinWrapper object ID"
1305
+ },
1306
+ "balance": {
1307
+ "anyOf": [
1308
+ {
1309
+ "type": "number"
1310
+ },
1311
+ {
1312
+ "type": "string"
1313
+ }
1314
+ ],
1315
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
1316
+ },
1317
+ "payment": {
1318
+ "type": "string",
1319
+ "description": "Payment object ID"
1320
+ }
1321
+ },
1322
+ "required": [
1323
+ "id",
1324
+ "balance",
1325
+ "payment"
1326
+ ],
1327
+ "additionalProperties": false,
1328
+ "description": "Received CoinWrapper object record"
1329
+ },
1330
+ "description": "Received records of Coin objects"
1331
+ }
1332
+ },
1333
+ "required": [
1334
+ "balance",
1335
+ "token_type",
1336
+ "received"
1337
+ ],
1338
+ "additionalProperties": false,
1339
+ "description": "Received record of Coin objects"
904
1340
  },
905
1341
  {
906
1342
  "type": "string",
907
1343
  "const": "recently"
908
1344
  }
909
- ],
910
- "description": "Unwrap CoinWrapper objects and other objects received by this Service object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
1345
+ ]
911
1346
  },
912
1347
  "um": {
1348
+ "description": "Contact object ID or name — the Service's customer-service channel. This is the object that Messenger routes encrypted messages to for pre-order negotiation, private-info delivery (see customer_required), and post-sale support. ⚠️ REQUIRED whenever customer_required is set: without um, the customer's private information has no channel to reach the merchant.",
913
1349
  "anyOf": [
914
1350
  {
915
- "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
1351
+ "type": "string",
1352
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
916
1353
  },
917
1354
  {
918
1355
  "type": "null"
919
1356
  }
920
- ],
921
- "description": "Contact object ID or name — the Service's customer-service channel. This is the object that Messenger routes encrypted messages to for pre-order negotiation, private-info delivery (see customer_required), and post-sale support. ⚠️ REQUIRED whenever customer_required is set: without um, the customer's private information has no channel to reach the merchant."
1357
+ ]
922
1358
  },
923
1359
  "pause": {
924
- "type": "boolean",
925
- "description": "Whether to pause accepting new orders."
1360
+ "description": "Whether to pause accepting new orders.",
1361
+ "type": "boolean"
926
1362
  },
927
1363
  "publish": {
928
- "type": "boolean",
929
- "description": "Whether to publish the Service. After publishing, customers can place orders. VERIFIED against Move source service.move + SDK service.ts (4-level immutability matrix):\n L1 — PERMANENTLY LOCKED after publish (assert!(!bPublished), no pause+lock exception):\n • machine (service.move L633/L653 — workflow template)\n • order_allocators (service.move L503 — fund distribution rules)\n L2 — TIME-LOCKED after publish (assert_not_published — requires pause + setting_lock_duration elapsed):\n • arbitrations remove/clear (service.move L433/L445 — dispute resolution objects)\n • rewards remove/clear (service.move L402/L414 — reward objects)\n • compensation_fund_withdraw (service.move L384-385 — withdraw ALL funds)\n L3 — REMAIN MUTABLE after publish (no SDK check, no Move check):\n • arbitrations add, rewards add (no assert — can add after publish)\n • buy_guard, sales, discount, description, location, pause, repositories,\n • compensation_fund_add, setting_lock_duration_add, customer_required, um (Contact)\nThese 2 L1-LOCKED fields (machine/order_allocators) MUST be set BEFORE publish=true.\narbitrations/rewards can be ADDED after publish but remove/clear requires pause+lock.\n\n⚠️ COMPENSATION_FUND + ARBITRATION LINKAGE (service.move:494-499):\n At publish time, if compensation_fund > 0, Arbitration MUST be bound:\n if (balance::value(&self.compensation_fund) > 0) {\n assert!(arbitration_count > 0, E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\n }\n The MCP handler enforces this as a HARD PRE-CHECK: if publish=true AND compensation_fund_add is set in the same call AND arbitrations is empty, the call is REJECTED before submission. If compensation_fund was deposited in a prior call, a SOFT WARNING is issued.\n\nSCHEMA-03 / P0-01 fix — DEPLOYMENT WORKFLOW (two-phase, avoids circular dependency):\n Phase 1 — CREATE (no publish): object={name:'my-service', type_parameter, permission} + machine + order_allocators + arbitrations.\n NOTE: buy_guard can use a LocalMark NAME (not address) to break the Guard→Service circular dependency.\n The name is resolved to an address at transaction build time.\n Phase 2 — PUBLISH: object='my-service' (string ref) + publish=true.\n All L1-LOCKED fields must be set in Phase 1; Phase 2 only flips the publish flag.\n Post-publish updates: buy_guard, sales, description, repositories (add), rewards (add), arbitrations (add), etc."
1364
+ "description": "Whether to publish the Service. After publishing, customers can place orders. VERIFIED against Move source service.move + SDK service.ts (4-level immutability matrix):\n L1 — PERMANENTLY LOCKED after publish (assert!(!bPublished), no pause+lock exception):\n • machine (service.move L633/L653 — workflow template)\n • order_allocators (service.move L503 — fund distribution rules)\n L2 — TIME-LOCKED after publish (assert_not_published — requires pause + setting_lock_duration elapsed):\n • arbitrations remove/clear (service.move L433/L445 — dispute resolution objects)\n • rewards remove/clear (service.move L402/L414 — reward objects)\n • compensation_fund_withdraw (service.move L384-385 — withdraw ALL funds)\n L3 — REMAIN MUTABLE after publish (no SDK check, no Move check):\n • arbitrations add, rewards add (no assert — can add after publish)\n • buy_guard, sales, discount, description, location, pause, repositories,\n • compensation_fund_add, setting_lock_duration_add, customer_required, um (Contact)\nThese 2 L1-LOCKED fields (machine/order_allocators) MUST be set BEFORE publish=true.\narbitrations/rewards can be ADDED after publish but remove/clear requires pause+lock.\n\n⚠️ COMPENSATION_FUND + ARBITRATION LINKAGE (service.move:494-499):\n At publish time, if compensation_fund > 0, Arbitration MUST be bound:\n if (balance::value(&self.compensation_fund) > 0) {\n assert!(arbitration_count > 0, E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\n }\n The MCP handler enforces this as a HARD PRE-CHECK: if publish=true AND compensation_fund_add is set in the same call AND arbitrations is empty, the call is REJECTED before submission. If compensation_fund was deposited in a prior call, a SOFT WARNING is issued.\n\nSCHEMA-03 / P0-01 fix — DEPLOYMENT WORKFLOW (two-phase, avoids circular dependency):\n Phase 1 — CREATE (no publish): object={name:'my-service', type_parameter, permission} + machine + order_allocators + arbitrations.\n NOTE: buy_guard can use a LocalMark NAME (not address) to break the Guard→Service circular dependency.\n The name is resolved to an address at transaction build time.\n Phase 2 — PUBLISH: object='my-service' (string ref) + publish=true.\n All L1-LOCKED fields must be set in Phase 1; Phase 2 only flips the publish flag.\n Post-publish updates: buy_guard, sales, description, repositories (add), rewards (add), arbitrations (add), etc.",
1365
+ "type": "boolean"
930
1366
  }
931
1367
  },
932
1368
  "required": [
@@ -939,20 +1375,20 @@
939
1375
  "type": "object",
940
1376
  "properties": {
941
1377
  "account": {
1378
+ "default": "",
942
1379
  "type": "string",
943
- "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters).",
944
- "default": ""
1380
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
945
1381
  },
946
1382
  "permission_guard": {
1383
+ "description": "List of permission guard IDs. Used to extend additional operation permissions (requires verification and configuration in the Permission object).",
947
1384
  "type": "array",
948
1385
  "items": {
949
1386
  "type": "string"
950
- },
951
- "description": "List of permission guard IDs. Used to extend additional operation permissions (requires verification and configuration in the Permission object)."
1387
+ }
952
1388
  },
953
1389
  "no_cache": {
954
- "type": "boolean",
955
- "description": "Whether to disable caching."
1390
+ "description": "Whether to disable caching.",
1391
+ "type": "boolean"
956
1392
  },
957
1393
  "network": {
958
1394
  "type": "string",
@@ -964,38 +1400,42 @@
964
1400
  "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
965
1401
  },
966
1402
  "referrer": {
967
- "$ref": "#/definitions/env/properties/account",
968
- "description": "Referrer ID. If the user is using the network for the first time, the referrer ID will be recorded."
1403
+ "description": "Referrer ID. If the user is using the network for the first time, the referrer ID will be recorded.",
1404
+ "type": "string"
969
1405
  },
970
1406
  "confirmed": {
971
- "type": "boolean",
972
- "description": "Phase 2 ConfirmGate: set to true to proceed after a 'pending_confirmation' result. The operation is NOT executed until you re-call with confirmed=true after user consent."
1407
+ "description": "Phase 2 ConfirmGate: set to true to proceed after a 'pending_confirmation' result. The operation is NOT executed until you re-call with confirmed=true after user consent.",
1408
+ "type": "boolean"
973
1409
  },
974
1410
  "user_intent_phrases": {
1411
+ "description": "Phase 2 ConfirmGate: explicit user intent phrases collected from conversation context (e.g. 'use default account', 'force publish'). Used to bypass confirmation rules whose bypass_on_explicit_intent matches.",
975
1412
  "type": "array",
976
1413
  "items": {
977
1414
  "type": "string"
978
- },
979
- "description": "Phase 2 ConfirmGate: explicit user intent phrases collected from conversation context (e.g. 'use default account', 'force publish'). Used to bypass confirmation rules whose bypass_on_explicit_intent matches."
1415
+ }
980
1416
  },
981
1417
  "project": {
982
- "type": "string",
983
- "description": "Project prefix to assign this object to (e.g. 'myshop'). When set: 1) the object is tagged with 'project:<prefix>' on-chain automatically via ProjectService, 2) the newly created object is auto-associated to the SQLite project for local management, evaluation, and graph tracking. The project MUST exist (create via project_operation action='create_project' first). Use project_operation to manage projects."
1418
+ "description": "Project prefix to assign this object to (e.g. 'myshop'). When set: 1) the object is tagged with 'project:<prefix>' on-chain automatically via ProjectService, 2) the newly created object is auto-associated to the SQLite project for local management, evaluation, and graph tracking. The project MUST exist (create via project_operation action='create_project' first). Use project_operation to manage projects.",
1419
+ "type": "string"
984
1420
  },
985
1421
  "client_schema_version": {
986
- "type": "string",
987
- "description": "Client-side schema version (semver, e.g. '1.0.0'). When provided, the server checks compatibility and attaches warnings if mismatched."
1422
+ "description": "Client-side schema version (semver, e.g. '1.0.0'). When provided, the server checks compatibility and attaches warnings if mismatched.",
1423
+ "type": "string"
988
1424
  },
989
1425
  "schema_strict_mode": {
990
- "type": "boolean",
991
1426
  "default": false,
992
- "description": "When true, schema incompatibility returns an error instead of a warning. Default: false (warn mode)."
1427
+ "description": "When true, schema incompatibility returns an error instead of a warning. Default: false (warn mode).",
1428
+ "type": "boolean"
993
1429
  },
994
1430
  "dry_run": {
995
- "type": "boolean",
996
- "description": "Phase 1 dry_run: when true, SIMULATE the transaction without signing or submitting. Returns effects + events showing what WOULD happen — no on-chain state is modified, no gas is charged. Use this to verify an operation will succeed before committing. Essential for the 5-step loop's Plan step. The returned digest will be 'dry_run:<timestamp>' and objectChanges will be empty (simulation only)."
1431
+ "description": "Phase 1 dry_run: when true, SIMULATE the transaction without signing or submitting. Returns effects + events showing what WOULD happen — no on-chain state is modified, no gas is charged. Use this to verify an operation will succeed before committing. Essential for the 5-step loop's Plan step. The returned digest will be 'dry_run:<timestamp>' and objectChanges will be empty (simulation only).",
1432
+ "type": "boolean"
997
1433
  }
998
1434
  },
1435
+ "required": [
1436
+ "account",
1437
+ "schema_strict_mode"
1438
+ ],
999
1439
  "additionalProperties": false,
1000
1440
  "description": "IMPORTANT: Execution environment includes: account for signing operations, network selection ([object Object]), additional Guard permissions, and more. Used to specify context information during the call. If account is not specified, the default account (\"\") will be used."
1001
1441
  },
@@ -1008,6 +1448,7 @@
1008
1448
  "description": "Discriminator for this result variant. Constraint: always 'submission'. Example: 'submission'"
1009
1449
  },
1010
1450
  "guard": {
1451
+ "maxItems": 20,
1011
1452
  "type": "array",
1012
1453
  "items": {
1013
1454
  "type": "object",
@@ -1027,7 +1468,6 @@
1027
1468
  ],
1028
1469
  "additionalProperties": false
1029
1470
  },
1030
- "maxItems": 20,
1031
1471
  "description": "Array of Guard objects to verify. Constraint: at most 20 entries (MAX_GUARD_COUNT_PASSPORT). Relation: each entry corresponds to a Guard bound to the operation."
1032
1472
  },
1033
1473
  "submission": {
@@ -1036,7 +1476,7 @@
1036
1476
  "type": "object",
1037
1477
  "properties": {
1038
1478
  "guard": {
1039
- "$ref": "#/definitions/submission/properties/guard/items/properties/object",
1479
+ "type": "string",
1040
1480
  "description": "Guard object name or ID that requires submission data. Example: 'my-delivery-guard'"
1041
1481
  },
1042
1482
  "submission": {
@@ -1345,6 +1785,7 @@
1345
1785
  "description": "Type of the value stored in `value`. One of: Bool(0), Address(1), String(2), U8(3), U16(4), U32(5), U64(6), U128(7), U256(8), VecBool(9), VecAddress(10), VecString(11), VecU8(12), VecU16(13), VecU32(14), VecU64(15), VecU128(16), VecU256(17), VecVecU8(18). When value_type=Address (1), the `value` field accepts a hex address string, a LocalMark name, or an AccountOrMark_Address object — see `value` field description for details."
1346
1786
  },
1347
1787
  "value": {
1788
+ "description": "The actual value data. Format depends on `value_type`:\n• Bool: true/false (boolean)\n• Address (CRITICAL — string 'Address' is NOT a placeholder): a hex address (e.g. '0x1234...'), a LocalMark name (e.g. 'my-service' — resolved to address at evaluation time), an AccountOrMark_Address object (e.g. {name_or_address:'my-service'}), or system shorthand ('0xaaa' = EntityLinker, '0xaab' = EntityRegistrar). The literal string 'Address' itself is INVALID — it would be treated as a non-existent LocalMark name and fail. Example: value='0x2::wow::WOW<address>' or value='my-permission'.\n• String: any string\n• U8/U16/U32/U64/U128/U256: number or numeric string (e.g. 42 or '42')\n• Vec* types: arrays of the corresponding element type\nREQUIRED when b_submission=false. OPTIONAL when b_submission=true (value is supplied at evaluation time by user submission).",
1348
1789
  "anyOf": [
1349
1790
  {
1350
1791
  "type": "boolean"
@@ -1355,12 +1796,12 @@
1355
1796
  "type": "object",
1356
1797
  "properties": {
1357
1798
  "name_or_address": {
1358
- "$ref": "#/definitions/submission/properties/guard/items/properties/object",
1799
+ "type": "string",
1359
1800
  "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
1360
1801
  },
1361
1802
  "local_mark_first": {
1362
- "type": "boolean",
1363
- "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks"
1803
+ "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks",
1804
+ "type": "boolean"
1364
1805
  }
1365
1806
  },
1366
1807
  "additionalProperties": false,
@@ -1391,12 +1832,24 @@
1391
1832
  "entities": {
1392
1833
  "type": "array",
1393
1834
  "items": {
1394
- "$ref": "#/definitions/submission/properties/submission/items/properties/submission/items/properties/value/anyOf/1/anyOf/0"
1835
+ "type": "object",
1836
+ "properties": {
1837
+ "name_or_address": {
1838
+ "type": "string",
1839
+ "description": "Account/Object name or ID. If specifying an account, use empty string '' for the default account. If it starts with '0x', it will be treated as an ID. Otherwise, it will be treated as a name (max 64 bcs characters)."
1840
+ },
1841
+ "local_mark_first": {
1842
+ "description": "Whether to prioritize local marks, if true, prioritize local marks, otherwise prioritize global marks",
1843
+ "type": "boolean"
1844
+ }
1845
+ },
1846
+ "additionalProperties": false,
1847
+ "description": "Account or address lookup object. Use this to specify which account to use for an operation. EXAMPLE: { name_or_address: 'testor2' } - looks up account by name; EXAMPLE: { name_or_address: '0x1234...' } - uses address directly; If name_or_address is empty string '', uses the default local account."
1395
1848
  }
1396
1849
  },
1397
1850
  "check_all_founded": {
1398
- "type": "boolean",
1399
- "description": "Whether to check all entities are found, if true, all entities must be found (abort and throw exception if any ID not found); if false, only return found IDs"
1851
+ "description": "Whether to check all entities are found, if true, all entities must be found (abort and throw exception if any ID not found); if false, only return found IDs",
1852
+ "type": "boolean"
1400
1853
  }
1401
1854
  },
1402
1855
  "required": [
@@ -1434,15 +1887,15 @@
1434
1887
  }
1435
1888
  }
1436
1889
  }
1437
- ],
1438
- "description": "The actual value data. Format depends on `value_type`:\n• Bool: true/false (boolean)\n• Address (CRITICAL — string 'Address' is NOT a placeholder): a hex address (e.g. '0x1234...'), a LocalMark name (e.g. 'my-service' — resolved to address at evaluation time), an AccountOrMark_Address object (e.g. {name_or_address:'my-service'}), or system shorthand ('0xaaa' = EntityLinker, '0xaab' = EntityRegistrar). The literal string 'Address' itself is INVALID — it would be treated as a non-existent LocalMark name and fail. Example: value='0x2::wow::WOW<address>' or value='my-permission'.\n• String: any string\n• U8/U16/U32/U64/U128/U256: number or numeric string (e.g. 42 or '42')\n• Vec* types: arrays of the corresponding element type\nREQUIRED when b_submission=false. OPTIONAL when b_submission=true (value is supplied at evaluation time by user submission)."
1890
+ ]
1439
1891
  },
1440
1892
  "name": {
1441
- "type": "string",
1442
1893
  "default": "",
1443
- "description": "Data name identifier. MAX 64 BCS characters (Chinese chars count as 3-4 BCS bytes each). Use short identifiers like 'order_id', 'delivery_node'. Put longer descriptions in the Guard's 'description' field, NOT here."
1894
+ "description": "Data name identifier. MAX 64 BCS characters (Chinese chars count as 3-4 BCS bytes each). Use short identifiers like 'order_id', 'delivery_node'. Put longer descriptions in the Guard's 'description' field, NOT here.",
1895
+ "type": "string"
1444
1896
  },
1445
1897
  "object_type": {
1898
+ "description": "OUTPUT-ONLY (query side): Object type when value_type is Address and represents a specific object. Auto-derived by the system — DO NOT set this field at Guard creation.",
1446
1899
  "type": "string",
1447
1900
  "enum": [
1448
1901
  "Permission",
@@ -1477,14 +1930,14 @@
1477
1930
  "TableItem_EntityLinker",
1478
1931
  "TableItem_AddressMark",
1479
1932
  "TableItem_EntityRegistrar"
1480
- ],
1481
- "description": "OUTPUT-ONLY (query side): Object type when value_type is Address and represents a specific object. Auto-derived by the system — DO NOT set this field at Guard creation."
1933
+ ]
1482
1934
  }
1483
1935
  },
1484
1936
  "required": [
1485
1937
  "identifier",
1486
1938
  "b_submission",
1487
- "value_type"
1939
+ "value_type",
1940
+ "name"
1488
1941
  ],
1489
1942
  "additionalProperties": false,
1490
1943
  "description": "Guard table item (QUERY/OUTPUT form — includes auto-derived object_type field)"
@@ -1510,5 +1963,10 @@
1510
1963
  "additionalProperties": false,
1511
1964
  "description": "Guard verification required. The operation was blocked because one or more Guards require user-submitted data. Fill the submission array and resubmit. Semantic status is 'pending_input'."
1512
1965
  }
1513
- }
1966
+ },
1967
+ "required": [
1968
+ "operation_type",
1969
+ "data"
1970
+ ],
1971
+ "additionalProperties": false
1514
1972
  }