@wowok/agent-mcp 2.7.1 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (597) hide show
  1. package/dist/config/index.js +1 -1
  2. package/dist/config/runtime.js +1 -238
  3. package/dist/customer/account-events.d.ts +32 -0
  4. package/dist/customer/account-events.js +1 -0
  5. package/dist/customer/customer-advice.d.ts +1 -0
  6. package/dist/customer/customer-advice.js +1 -130
  7. package/dist/customer/index.js +1 -11
  8. package/dist/customer/industry-risks.js +1 -438
  9. package/dist/customer/info-puzzle.js +1 -681
  10. package/dist/customer/order-monitor.js +1 -328
  11. package/dist/customer/order-strategy.d.ts +1 -1
  12. package/dist/customer/order-strategy.js +1 -373
  13. package/dist/customer/post-purchase.js +1 -351
  14. package/dist/customer/preorder-compare.js +1 -34
  15. package/dist/customer/reminder-system.d.ts +2 -0
  16. package/dist/customer/reminder-system.js +1 -316
  17. package/dist/customer/risk-assessment.d.ts +1 -0
  18. package/dist/customer/risk-assessment.js +1 -397
  19. package/dist/customer/types.d.ts +2 -0
  20. package/dist/customer/types.js +1 -13
  21. package/dist/customer/user-preferences.js +1 -460
  22. package/dist/evaluation/arbitration-game.d.ts +9 -2
  23. package/dist/evaluation/arbitration-game.js +1 -48
  24. package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
  25. package/dist/evaluation/builtins/arbitration-score.js +1 -0
  26. package/dist/evaluation/builtins/demand-match.js +1 -153
  27. package/dist/evaluation/builtins/index.d.ts +1 -0
  28. package/dist/evaluation/builtins/index.js +1 -10
  29. package/dist/evaluation/builtins/service-risk.js +1 -55
  30. package/dist/evaluation/capability.js +1 -13
  31. package/dist/evaluation/category-match-rules.d.ts +30 -0
  32. package/dist/evaluation/category-match-rules.js +1 -0
  33. package/dist/evaluation/composer.js +1 -40
  34. package/dist/evaluation/engine.js +1 -175
  35. package/dist/evaluation/extract.js +1 -115
  36. package/dist/evaluation/game-strategy.d.ts +27 -0
  37. package/dist/evaluation/game-strategy.js +1 -0
  38. package/dist/evaluation/gap.js +1 -100
  39. package/dist/evaluation/index.d.ts +2 -0
  40. package/dist/evaluation/index.js +1 -11
  41. package/dist/evaluation/location-match.d.ts +42 -0
  42. package/dist/evaluation/location-match.js +1 -0
  43. package/dist/evaluation/node-game.d.ts +31 -3
  44. package/dist/evaluation/node-game.js +1 -57
  45. package/dist/evaluation/path-reasoning.d.ts +35 -0
  46. package/dist/evaluation/path-reasoning.js +1 -0
  47. package/dist/evaluation/region.d.ts +6 -0
  48. package/dist/evaluation/region.js +1 -36
  49. package/dist/evaluation/types.d.ts +18 -0
  50. package/dist/evaluation/types.js +1 -1
  51. package/dist/evaluation/user-injection.js +1 -27
  52. package/dist/experience/experience-reuse.js +1 -103
  53. package/dist/experience/index.js +1 -5
  54. package/dist/experience/intent-distill.js +1 -83
  55. package/dist/experience/realtime-feedback.js +1 -94
  56. package/dist/experience/types.js +1 -1
  57. package/dist/experience/user-profile.d.ts +1 -1
  58. package/dist/experience/user-profile.js +1 -171
  59. package/dist/extensions/business-modules.js +1 -287
  60. package/dist/extensions/capability-manifest.js +1 -781
  61. package/dist/extensions/constraint-registry.js +1 -198
  62. package/dist/extensions/index.d.ts +6 -0
  63. package/dist/extensions/index.js +1 -6
  64. package/dist/extensions/industry-layers.d.ts +75 -0
  65. package/dist/extensions/industry-layers.js +1 -0
  66. package/dist/extensions/industry-pack.d.ts +105 -0
  67. package/dist/extensions/industry-pack.js +1 -0
  68. package/dist/extensions/metric-registry.js +1 -257
  69. package/dist/extensions/mode-evaluator.d.ts +1 -1
  70. package/dist/extensions/mode-evaluator.js +1 -170
  71. package/dist/extensions/modes.js +1 -499
  72. package/dist/extensions/registry.d.ts +1 -0
  73. package/dist/extensions/registry.js +1 -717
  74. package/dist/extensions/types.js +1 -1
  75. package/dist/graph/base.d.ts +8 -0
  76. package/dist/graph/base.js +1 -0
  77. package/dist/harness/auto-escalation.js +1 -68
  78. package/dist/harness/checkpoint.js +1 -129
  79. package/dist/harness/index.d.ts +1 -0
  80. package/dist/harness/index.js +1 -78
  81. package/dist/harness/plan.d.ts +2 -0
  82. package/dist/harness/plan.js +1 -315
  83. package/dist/harness/recover.d.ts +1 -1
  84. package/dist/harness/recover.js +1 -139
  85. package/dist/harness/types.d.ts +2 -3
  86. package/dist/harness/types.js +1 -1
  87. package/dist/harness/verify.js +1 -237
  88. package/dist/index.js +1 -273
  89. package/dist/intent/enrich.js +1 -67
  90. package/dist/intent/index.js +1 -60
  91. package/dist/intent/matcher.js +1 -81
  92. package/dist/intent/store.js +1 -55
  93. package/dist/intent/types.js +1 -10
  94. package/dist/knowledge/acquisition-flywheel.js +1 -192
  95. package/dist/knowledge/allocation-confirm.js +1 -534
  96. package/dist/knowledge/allocation-context.js +1 -249
  97. package/dist/knowledge/allocation-ledger.js +1 -463
  98. package/dist/knowledge/allocation-puzzle.js +1 -298
  99. package/dist/knowledge/allocation-risk.js +1 -568
  100. package/dist/knowledge/allocation-templates.js +1 -970
  101. package/dist/knowledge/allocation-translation.js +1 -585
  102. package/dist/knowledge/anti-cheat.d.ts +37 -0
  103. package/dist/knowledge/anti-cheat.js +1 -0
  104. package/dist/knowledge/arb-confirm.d.ts +28 -0
  105. package/dist/knowledge/arb-confirm.js +1 -0
  106. package/dist/knowledge/arb-risk.js +1 -210
  107. package/dist/knowledge/arb-translation.d.ts +48 -0
  108. package/dist/knowledge/arb-translation.js +1 -0
  109. package/dist/knowledge/arbitration-confirm.js +1 -559
  110. package/dist/knowledge/arbitration-context.js +1 -505
  111. package/dist/knowledge/arbitration-ledger.js +1 -521
  112. package/dist/knowledge/arbitration-puzzle.js +1 -304
  113. package/dist/knowledge/arbitration-risk.js +1 -423
  114. package/dist/knowledge/arbitration-templates.js +1 -276
  115. package/dist/knowledge/arbitration-translation.js +1 -487
  116. package/dist/knowledge/audit-rules.js +1 -141
  117. package/dist/knowledge/bridge-confirm.d.ts +26 -0
  118. package/dist/knowledge/bridge-confirm.js +1 -0
  119. package/dist/knowledge/bridge-risk.js +1 -263
  120. package/dist/knowledge/bridge-translation.d.ts +37 -0
  121. package/dist/knowledge/bridge-translation.js +1 -0
  122. package/dist/knowledge/contact-confirm.d.ts +27 -0
  123. package/dist/knowledge/contact-confirm.js +1 -0
  124. package/dist/knowledge/contact-risk.js +1 -200
  125. package/dist/knowledge/contact-templates.js +1 -60
  126. package/dist/knowledge/contact-translation.d.ts +39 -0
  127. package/dist/knowledge/contact-translation.js +1 -0
  128. package/dist/knowledge/demand-confirm.js +1 -206
  129. package/dist/knowledge/demand-context.d.ts +17 -0
  130. package/dist/knowledge/demand-context.js +1 -0
  131. package/dist/knowledge/demand-ledger.d.ts +26 -0
  132. package/dist/knowledge/demand-ledger.js +1 -0
  133. package/dist/knowledge/demand-matching.js +1 -132
  134. package/dist/knowledge/demand-puzzle.d.ts +29 -0
  135. package/dist/knowledge/demand-puzzle.js +1 -0
  136. package/dist/knowledge/demand-risk.js +1 -240
  137. package/dist/knowledge/demand-templates.d.ts +12 -0
  138. package/dist/knowledge/demand-templates.js +1 -0
  139. package/dist/knowledge/demand-translation.js +1 -354
  140. package/dist/knowledge/deployment-scanner.js +1 -823
  141. package/dist/knowledge/dynamic-pricing.js +1 -87
  142. package/dist/knowledge/evidence-review.d.ts +12 -0
  143. package/dist/knowledge/evidence-review.js +1 -0
  144. package/dist/knowledge/examples-scanner-cli.js +1 -26
  145. package/dist/knowledge/examples-scanner.js +1 -843
  146. package/dist/knowledge/flywheel-loop.d.ts +0 -1
  147. package/dist/knowledge/flywheel-loop.js +1 -404
  148. package/dist/knowledge/fund-layer.js +1 -973
  149. package/dist/knowledge/glossary.js +1 -211
  150. package/dist/knowledge/guard-confirm.js +1 -406
  151. package/dist/knowledge/guard-context.js +1 -287
  152. package/dist/knowledge/guard-design-patterns.js +1 -360
  153. package/dist/knowledge/guard-ledger.js +1 -260
  154. package/dist/knowledge/guard-lint.js +1 -670
  155. package/dist/knowledge/guard-migration.d.ts +1 -1
  156. package/dist/knowledge/guard-migration.js +1 -228
  157. package/dist/knowledge/guard-puzzle.js +1 -805
  158. package/dist/knowledge/guard-render.js +1 -700
  159. package/dist/knowledge/guard-risk.js +1 -1879
  160. package/dist/knowledge/guard-submission-prompt.js +1 -171
  161. package/dist/knowledge/guard-templates.js +1 -1105
  162. package/dist/knowledge/guard-translation.js +1 -1119
  163. package/dist/knowledge/index.d.ts +71 -3
  164. package/dist/knowledge/index.js +1 -436
  165. package/dist/knowledge/industry-evolution.js +1 -323
  166. package/dist/knowledge/industry-generalizer.js +1 -381
  167. package/dist/knowledge/industry-registry.js +1 -174
  168. package/dist/knowledge/intent-metrics.d.ts +4 -3
  169. package/dist/knowledge/intent-metrics.js +1 -566
  170. package/dist/knowledge/machine-confirm.js +1 -559
  171. package/dist/knowledge/machine-context.js +1 -833
  172. package/dist/knowledge/machine-ledger.js +1 -338
  173. package/dist/knowledge/machine-puzzle.js +1 -494
  174. package/dist/knowledge/machine-render.js +1 -565
  175. package/dist/knowledge/machine-risk.js +1 -669
  176. package/dist/knowledge/machine-templates.js +1 -1597
  177. package/dist/knowledge/machine-topology.js +1 -234
  178. package/dist/knowledge/machine-translation.js +1 -513
  179. package/dist/knowledge/market-metrics.d.ts +12 -0
  180. package/dist/knowledge/market-metrics.js +1 -0
  181. package/dist/knowledge/market-operations.d.ts +46 -0
  182. package/dist/knowledge/market-operations.js +1 -0
  183. package/dist/knowledge/mcp-schema-audit-cli.js +1 -45
  184. package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
  185. package/dist/knowledge/mcp-schema-audit.js +1 -777
  186. package/dist/knowledge/onchain-constants.js +1 -35
  187. package/dist/knowledge/order-confirm.js +1 -573
  188. package/dist/knowledge/order-context.js +1 -390
  189. package/dist/knowledge/order-ledger.js +1 -341
  190. package/dist/knowledge/order-puzzle.js +1 -255
  191. package/dist/knowledge/order-risk.js +1 -653
  192. package/dist/knowledge/order-templates.js +1 -368
  193. package/dist/knowledge/order-translation.js +1 -550
  194. package/dist/knowledge/overrides-loader.js +1 -65
  195. package/dist/knowledge/passport-confirm.js +1 -531
  196. package/dist/knowledge/passport-context.js +1 -306
  197. package/dist/knowledge/passport-ledger.js +1 -282
  198. package/dist/knowledge/passport-puzzle.js +1 -333
  199. package/dist/knowledge/passport-risk.js +1 -450
  200. package/dist/knowledge/passport-templates.js +1 -568
  201. package/dist/knowledge/passport-translation.js +1 -516
  202. package/dist/knowledge/payment-confirm.d.ts +26 -0
  203. package/dist/knowledge/payment-confirm.js +1 -0
  204. package/dist/knowledge/payment-risk.js +1 -249
  205. package/dist/knowledge/payment-translation.d.ts +37 -0
  206. package/dist/knowledge/payment-translation.js +1 -0
  207. package/dist/knowledge/permission-confirm.js +1 -426
  208. package/dist/knowledge/permission-context.js +1 -224
  209. package/dist/knowledge/permission-ledger.d.ts +11 -0
  210. package/dist/knowledge/permission-ledger.js +1 -403
  211. package/dist/knowledge/permission-puzzle.js +1 -173
  212. package/dist/knowledge/permission-risk.js +1 -411
  213. package/dist/knowledge/permission-templates.js +1 -234
  214. package/dist/knowledge/permission-translation.js +1 -350
  215. package/dist/knowledge/personal-confirm.d.ts +29 -0
  216. package/dist/knowledge/personal-confirm.js +1 -0
  217. package/dist/knowledge/personal-risk.js +1 -212
  218. package/dist/knowledge/personal-translation.d.ts +37 -0
  219. package/dist/knowledge/personal-translation.js +1 -0
  220. package/dist/knowledge/process-model.d.ts +1 -11
  221. package/dist/knowledge/process-model.js +1 -160
  222. package/dist/knowledge/progress-confirm.js +1 -456
  223. package/dist/knowledge/progress-context.js +1 -452
  224. package/dist/knowledge/progress-ledger.js +1 -330
  225. package/dist/knowledge/progress-puzzle.js +1 -219
  226. package/dist/knowledge/progress-risk.js +1 -461
  227. package/dist/knowledge/progress-templates.js +1 -228
  228. package/dist/knowledge/progress-translation.js +1 -405
  229. package/dist/knowledge/proof-confirm.js +1 -187
  230. package/dist/knowledge/proof-context.d.ts +17 -0
  231. package/dist/knowledge/proof-context.js +1 -0
  232. package/dist/knowledge/proof-ledger.d.ts +34 -0
  233. package/dist/knowledge/proof-ledger.js +1 -0
  234. package/dist/knowledge/proof-puzzle.d.ts +35 -0
  235. package/dist/knowledge/proof-puzzle.js +1 -0
  236. package/dist/knowledge/proof-risk.js +1 -207
  237. package/dist/knowledge/proof-templates.d.ts +22 -0
  238. package/dist/knowledge/proof-templates.js +1 -0
  239. package/dist/knowledge/proof-translation.js +1 -283
  240. package/dist/knowledge/registrar-confirm.d.ts +26 -0
  241. package/dist/knowledge/registrar-confirm.js +1 -0
  242. package/dist/knowledge/registrar-risk.js +1 -217
  243. package/dist/knowledge/registrar-translation.d.ts +37 -0
  244. package/dist/knowledge/registrar-translation.js +1 -0
  245. package/dist/knowledge/repository-confirm.js +1 -286
  246. package/dist/knowledge/repository-context.d.ts +12 -0
  247. package/dist/knowledge/repository-context.js +1 -0
  248. package/dist/knowledge/repository-ledger.d.ts +25 -0
  249. package/dist/knowledge/repository-ledger.js +1 -0
  250. package/dist/knowledge/repository-puzzle.d.ts +30 -0
  251. package/dist/knowledge/repository-puzzle.js +1 -0
  252. package/dist/knowledge/repository-risk.js +1 -373
  253. package/dist/knowledge/repository-templates.d.ts +14 -0
  254. package/dist/knowledge/repository-templates.js +1 -0
  255. package/dist/knowledge/repository-translation.js +1 -445
  256. package/dist/knowledge/reputation-rules.js +1 -99
  257. package/dist/knowledge/resource-confirm.d.ts +25 -0
  258. package/dist/knowledge/resource-confirm.js +1 -0
  259. package/dist/knowledge/resource-risk.js +1 -157
  260. package/dist/knowledge/resource-translation.d.ts +37 -0
  261. package/dist/knowledge/resource-translation.js +1 -0
  262. package/dist/knowledge/reward-confirm.js +1 -526
  263. package/dist/knowledge/reward-context.d.ts +2 -2
  264. package/dist/knowledge/reward-context.js +1 -504
  265. package/dist/knowledge/reward-ledger.js +1 -502
  266. package/dist/knowledge/reward-puzzle.js +1 -300
  267. package/dist/knowledge/reward-risk.js +1 -627
  268. package/dist/knowledge/reward-templates.js +1 -197
  269. package/dist/knowledge/reward-translation.js +1 -501
  270. package/dist/knowledge/safety-rules.d.ts +1 -0
  271. package/dist/knowledge/safety-rules.js +1 -404
  272. package/dist/knowledge/scenario-modes.js +1 -321
  273. package/dist/knowledge/service-confirm.js +1 -807
  274. package/dist/knowledge/service-context.js +1 -403
  275. package/dist/knowledge/service-ledger.js +1 -609
  276. package/dist/knowledge/service-puzzle.js +1 -236
  277. package/dist/knowledge/service-risk.d.ts +1 -1
  278. package/dist/knowledge/service-risk.js +1 -651
  279. package/dist/knowledge/service-templates.js +1 -456
  280. package/dist/knowledge/service-translation.js +1 -622
  281. package/dist/knowledge/template-registry.js +1 -353
  282. package/dist/knowledge/tool-constraints.js +1 -195
  283. package/dist/knowledge/tools-reference.js +1 -178
  284. package/dist/knowledge/treasury-confirm.js +1 -512
  285. package/dist/knowledge/treasury-context.js +1 -363
  286. package/dist/knowledge/treasury-ledger.js +1 -300
  287. package/dist/knowledge/treasury-puzzle.js +1 -216
  288. package/dist/knowledge/treasury-risk.js +1 -440
  289. package/dist/knowledge/treasury-templates.js +1 -358
  290. package/dist/knowledge/treasury-translation.js +1 -498
  291. package/dist/knowledge/trust-metrics.js +1 -198
  292. package/dist/knowledge/universal-template.d.ts +22 -0
  293. package/dist/knowledge/universal-template.js +1 -0
  294. package/dist/knowledge/util-confirm.d.ts +24 -0
  295. package/dist/knowledge/util-confirm.js +1 -0
  296. package/dist/knowledge/util-risk.js +1 -135
  297. package/dist/knowledge/util-translation.d.ts +38 -0
  298. package/dist/knowledge/util-translation.js +1 -0
  299. package/dist/knowledge/workflow-guidance.d.ts +116 -0
  300. package/dist/knowledge/workflow-guidance.js +1 -0
  301. package/dist/loop-engineering/aggregate.js +1 -132
  302. package/dist/loop-engineering/context-collect.js +1 -83
  303. package/dist/loop-engineering/diagnose.js +1 -273
  304. package/dist/loop-engineering/improve.js +1 -405
  305. package/dist/loop-engineering/index.js +1 -4
  306. package/dist/loop-engineering/pipeline.js +1 -56
  307. package/dist/mode-market/index.js +1 -3
  308. package/dist/mode-market/registry.js +1 -124
  309. package/dist/mode-market/review.js +1 -214
  310. package/dist/mode-market/submission.js +1 -85
  311. package/dist/participation/collaborator-interest.d.ts +23 -0
  312. package/dist/participation/collaborator-interest.js +1 -0
  313. package/dist/participation/customer-interest.d.ts +25 -0
  314. package/dist/participation/customer-interest.js +1 -0
  315. package/dist/participation/employee-kpi.d.ts +25 -0
  316. package/dist/participation/employee-kpi.js +1 -0
  317. package/dist/participation/employee-store.d.ts +16 -0
  318. package/dist/participation/employee-store.js +1 -0
  319. package/dist/participation/index.d.ts +2 -0
  320. package/dist/participation/index.js +1 -0
  321. package/dist/participation/merchant-interest.js +1 -100
  322. package/dist/participation/radar-core.d.ts +13 -3
  323. package/dist/participation/radar-core.js +1 -269
  324. package/dist/participation/supplier-interest.d.ts +25 -0
  325. package/dist/participation/supplier-interest.js +1 -0
  326. package/dist/persona/analyzer.js +1 -66
  327. package/dist/persona/bridge.js +1 -86
  328. package/dist/persona/defaults.js +1 -195
  329. package/dist/persona/experience-bridge.js +1 -23
  330. package/dist/persona/index.d.ts +9 -2
  331. package/dist/persona/index.js +1 -71
  332. package/dist/persona/local-region.d.ts +20 -0
  333. package/dist/persona/local-region.js +1 -0
  334. package/dist/persona/model.js +1 -111
  335. package/dist/persona/overrides.d.ts +10 -0
  336. package/dist/persona/overrides.js +1 -0
  337. package/dist/persona/pack-personae.d.ts +11 -0
  338. package/dist/persona/pack-personae.js +1 -0
  339. package/dist/persona/store.js +1 -62
  340. package/dist/persona/strategy-intent.d.ts +20 -0
  341. package/dist/persona/strategy-intent.js +1 -0
  342. package/dist/persona/types.d.ts +6 -2
  343. package/dist/persona/types.js +1 -5
  344. package/dist/project/business-puzzle.d.ts +1 -1
  345. package/dist/project/business-puzzle.js +1 -383
  346. package/dist/project/context-assembly.js +1 -254
  347. package/dist/project/deployment-bridge.js +1 -120
  348. package/dist/project/deployment-doc.js +1 -1126
  349. package/dist/project/edit-planner.js +1 -1342
  350. package/dist/project/evaluation.d.ts +37 -1
  351. package/dist/project/evaluation.js +1 -2011
  352. package/dist/project/game-theory.js +1 -177
  353. package/dist/project/graph-builder.js +1 -656
  354. package/dist/project/graph.d.ts +3 -6
  355. package/dist/project/graph.js +1 -340
  356. package/dist/project/handlers.d.ts +33 -2
  357. package/dist/project/handlers.js +1 -1784
  358. package/dist/project/index.d.ts +2 -0
  359. package/dist/project/index.js +1 -301
  360. package/dist/project/intent-analyzer.js +1 -149
  361. package/dist/project/machine-nodes.js +1 -36
  362. package/dist/project/merchant-guide.d.ts +19 -0
  363. package/dist/project/merchant-guide.js +1 -264
  364. package/dist/project/migration.js +1 -125
  365. package/dist/project/mode-actions.js +1 -309
  366. package/dist/project/namespace.js +1 -206
  367. package/dist/project/participation-radar.js +1 -428
  368. package/dist/project/pipeline-actions.js +1 -109
  369. package/dist/project/project-store.js +1 -422
  370. package/dist/project/query.js +1 -153
  371. package/dist/project/reverse-mapping.d.ts +34 -0
  372. package/dist/project/reverse-mapping.js +1 -0
  373. package/dist/project/risk-aggregator.js +1 -295
  374. package/dist/project/rollback-policy.js +1 -290
  375. package/dist/project/semantic-assembler.js +1 -345
  376. package/dist/project/semantic-graph.d.ts +3 -5
  377. package/dist/project/semantic-graph.js +1 -292
  378. package/dist/project/stage-gate.js +1 -369
  379. package/dist/project/substep-trace.js +1 -332
  380. package/dist/project/task-tracker.js +1 -78
  381. package/dist/project/workflow-design-assessment.d.ts +24 -0
  382. package/dist/project/workflow-design-assessment.js +1 -0
  383. package/dist/role/derivation.d.ts +18 -0
  384. package/dist/role/derivation.js +1 -0
  385. package/dist/role/index.d.ts +5 -0
  386. package/dist/role/index.js +1 -0
  387. package/dist/role/model.d.ts +8 -0
  388. package/dist/role/model.js +1 -0
  389. package/dist/role/resolution.d.ts +11 -0
  390. package/dist/role/resolution.js +1 -0
  391. package/dist/role/types.d.ts +11 -0
  392. package/dist/role/types.js +1 -0
  393. package/dist/rules.js +1 -52
  394. package/dist/safety/confirm-gate.d.ts +1 -1
  395. package/dist/safety/confirm-gate.js +1 -88
  396. package/dist/safety/index.js +1 -3
  397. package/dist/safety/preview.js +1 -52
  398. package/dist/schema/call/allocation.d.ts +186 -1385
  399. package/dist/schema/call/allocation.js +1 -34
  400. package/dist/schema/call/arbitration.d.ts +272 -1871
  401. package/dist/schema/call/arbitration.js +1 -113
  402. package/dist/schema/call/base.d.ts +1831 -9076
  403. package/dist/schema/call/base.js +1 -370
  404. package/dist/schema/call/bridge.d.ts +911 -3171
  405. package/dist/schema/call/bridge.js +1 -458
  406. package/dist/schema/call/contact.d.ts +135 -931
  407. package/dist/schema/call/contact.js +1 -37
  408. package/dist/schema/call/demand.d.ts +164 -1194
  409. package/dist/schema/call/demand.js +1 -47
  410. package/dist/schema/call/guard.d.ts +298 -1140
  411. package/dist/schema/call/guard.js +1 -161
  412. package/dist/schema/call/handler.js +1 -322
  413. package/dist/schema/call/index.js +1 -20
  414. package/dist/schema/call/machine.d.ts +459 -5403
  415. package/dist/schema/call/machine.js +1 -193
  416. package/dist/schema/call/order.d.ts +137 -844
  417. package/dist/schema/call/order.js +1 -35
  418. package/dist/schema/call/payment.d.ts +74 -561
  419. package/dist/schema/call/payment.js +1 -37
  420. package/dist/schema/call/permission-handler.js +1 -54
  421. package/dist/schema/call/permission.d.ts +335 -2791
  422. package/dist/schema/call/permission.js +1 -105
  423. package/dist/schema/call/personal.d.ts +227 -1814
  424. package/dist/schema/call/personal.js +1 -78
  425. package/dist/schema/call/progress.d.ts +140 -843
  426. package/dist/schema/call/progress.js +1 -47
  427. package/dist/schema/call/proof.d.ts +42 -258
  428. package/dist/schema/call/proof.js +1 -33
  429. package/dist/schema/call/repository.d.ts +324 -2222
  430. package/dist/schema/call/repository.js +1 -77
  431. package/dist/schema/call/reward.d.ts +153 -1183
  432. package/dist/schema/call/reward.js +1 -30
  433. package/dist/schema/call/semantic.js +1 -1679
  434. package/dist/schema/call/service.d.ts +376 -3431
  435. package/dist/schema/call/service.js +1 -184
  436. package/dist/schema/call/treasury.d.ts +252 -2158
  437. package/dist/schema/call/treasury.js +1 -71
  438. package/dist/schema/common/index.d.ts +222 -697
  439. package/dist/schema/common/index.js +1 -407
  440. package/dist/schema/config/index.d.ts +18 -161
  441. package/dist/schema/config/index.js +1 -68
  442. package/dist/schema/employee/index.d.ts +99 -0
  443. package/dist/schema/employee/index.js +1 -0
  444. package/dist/schema/evaluation/index.d.ts +1062 -3748
  445. package/dist/schema/evaluation/index.js +1 -356
  446. package/dist/schema/index.d.ts +3 -0
  447. package/dist/schema/index.js +1 -17
  448. package/dist/schema/industry-pack/index.d.ts +132 -0
  449. package/dist/schema/industry-pack/index.js +1 -0
  450. package/dist/schema/intent-radar/index.d.ts +92 -245
  451. package/dist/schema/intent-radar/index.js +1 -89
  452. package/dist/schema/local/index.d.ts +2045 -18080
  453. package/dist/schema/local/index.js +1 -927
  454. package/dist/schema/local/wip.d.ts +61 -651
  455. package/dist/schema/local/wip.js +1 -187
  456. package/dist/schema/messenger/index.d.ts +949 -5557
  457. package/dist/schema/messenger/index.js +1 -475
  458. package/dist/schema/operations.d.ts +2969 -26518
  459. package/dist/schema/operations.js +1 -520
  460. package/dist/schema/persona/index.d.ts +469 -1820
  461. package/dist/schema/persona/index.js +1 -148
  462. package/dist/schema/project/index.d.ts +1027 -8408
  463. package/dist/schema/project/index.js +1 -2057
  464. package/dist/schema/query/index.d.ts +12041 -75261
  465. package/dist/schema/query/index.js +1 -1646
  466. package/dist/schema/schema-query/index.d.ts +35 -98
  467. package/dist/schema/schema-query/index.js +1 -104
  468. package/dist/schema/schema-version.js +1 -76
  469. package/dist/schema/task-status.d.ts +26 -132
  470. package/dist/schema/task-status.js +1 -36
  471. package/dist/schema/trust/index.d.ts +194 -1290
  472. package/dist/schema/trust/index.js +1 -314
  473. package/dist/schema/utils/guard-parser.js +1 -419
  474. package/dist/schema/utils/guard-query-utils.js +1 -46
  475. package/dist/schema/utils/node-parser.js +1 -369
  476. package/dist/schema/utils/object-type-utils.js +1 -35
  477. package/dist/schema/utils/permission-index-utils.js +1 -7
  478. package/dist/schema/utils/permission-machine-check.js +1 -121
  479. package/dist/schema/utils/skills-recommendation.d.ts +1 -0
  480. package/dist/schema/utils/skills-recommendation.js +1 -77
  481. package/dist/schema/workspace/index.d.ts +69 -0
  482. package/dist/schema/workspace/index.js +1 -0
  483. package/dist/schema-query-impl/index.js +1 -0
  484. package/dist/schemas/account_operation.output.json +3147 -1652
  485. package/dist/schemas/account_operation.schema.json +225 -218
  486. package/dist/schemas/bridge_operation.output.json +1168 -650
  487. package/dist/schemas/bridge_operation.schema.json +736 -504
  488. package/dist/schemas/config_operation.output.json +185 -179
  489. package/dist/schemas/config_operation.schema.json +21 -26
  490. package/dist/schemas/employee_operation.output.json +207 -0
  491. package/dist/schemas/employee_operation.schema.json +176 -0
  492. package/dist/schemas/evaluation_operation.output.json +2329 -557
  493. package/dist/schemas/evaluation_operation.schema.json +2939 -720
  494. package/dist/schemas/guard2file.output.json +58 -64
  495. package/dist/schemas/guard2file.schema.json +79 -81
  496. package/dist/schemas/index.json +29 -11
  497. package/dist/schemas/industry_pack_operation.output.json +594 -0
  498. package/dist/schemas/industry_pack_operation.schema.json +55 -0
  499. package/dist/schemas/intent_radar.output.json +275 -200
  500. package/dist/schemas/intent_radar.schema.json +124 -123
  501. package/dist/schemas/local_info_operation.output.json +1174 -657
  502. package/dist/schemas/local_info_operation.schema.json +119 -125
  503. package/dist/schemas/local_mark_operation.output.json +1239 -689
  504. package/dist/schemas/local_mark_operation.schema.json +91 -96
  505. package/dist/schemas/machineNode2file.output.json +63 -69
  506. package/dist/schemas/machineNode2file.schema.json +79 -81
  507. package/dist/schemas/messenger_operation.output.json +2722 -1528
  508. package/dist/schemas/messenger_operation.schema.json +1482 -1264
  509. package/dist/schemas/onchain_events.output.json +2590 -975
  510. package/dist/schemas/onchain_events.schema.json +117 -99
  511. package/dist/schemas/onchain_operations.output.json +3957 -2309
  512. package/dist/schemas/onchain_operations.schema.json +20799 -9285
  513. package/dist/schemas/onchain_operations_allocation.schema.json +172 -108
  514. package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
  515. package/dist/schemas/onchain_operations_contact.schema.json +129 -90
  516. package/dist/schemas/onchain_operations_demand.schema.json +170 -112
  517. package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
  518. package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
  519. package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
  520. package/dist/schemas/onchain_operations_machine.schema.json +537 -164
  521. package/dist/schemas/onchain_operations_order.schema.json +126 -96
  522. package/dist/schemas/onchain_operations_payment.schema.json +82 -67
  523. package/dist/schemas/onchain_operations_permission.schema.json +331 -93
  524. package/dist/schemas/onchain_operations_personal.schema.json +636 -96
  525. package/dist/schemas/onchain_operations_progress.schema.json +125 -92
  526. package/dist/schemas/onchain_operations_proof.schema.json +76 -69
  527. package/dist/schemas/onchain_operations_repository.schema.json +636 -249
  528. package/dist/schemas/onchain_operations_reward.schema.json +218 -108
  529. package/dist/schemas/onchain_operations_service.schema.json +679 -221
  530. package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
  531. package/dist/schemas/onchain_table_data.output.json +6018 -2430
  532. package/dist/schemas/onchain_table_data.schema.json +544 -430
  533. package/dist/schemas/persona_operation.output.json +1568 -265
  534. package/dist/schemas/persona_operation.schema.json +346 -202
  535. package/dist/schemas/project_operation.output.json +6957 -5147
  536. package/dist/schemas/project_operation.schema.json +1050 -1020
  537. package/dist/schemas/query_task_status.output.json +195 -99
  538. package/dist/schemas/query_task_status.schema.json +12 -18
  539. package/dist/schemas/query_toolkit.output.json +18870 -14566
  540. package/dist/schemas/query_toolkit.schema.json +614 -522
  541. package/dist/schemas/schema_query.output.json +127 -129
  542. package/dist/schemas/schema_query.schema.json +64 -69
  543. package/dist/schemas/trust_score.output.json +678 -587
  544. package/dist/schemas/trust_score.schema.json +289 -277
  545. package/dist/schemas/wip_file.output.json +116 -124
  546. package/dist/schemas/wip_file.schema.json +142 -143
  547. package/dist/schemas/workspace_operation.output.json +277 -0
  548. package/dist/schemas/workspace_operation.schema.json +45 -0
  549. package/dist/schemas/wowok_buildin_info.output.json +1693 -723
  550. package/dist/schemas/wowok_buildin_info.schema.json +576 -512
  551. package/dist/telemetry/index.js +1 -112
  552. package/dist/telemetry/redact.js +1 -23
  553. package/dist/telemetry/storage.js +1 -80
  554. package/dist/tools/handlers/bridge.d.ts +8 -1
  555. package/dist/tools/handlers/bridge.js +1 -1
  556. package/dist/tools/handlers/config.js +1 -74
  557. package/dist/tools/handlers/employee.d.ts +2 -0
  558. package/dist/tools/handlers/employee.js +1 -0
  559. package/dist/tools/handlers/evaluation.js +1 -123
  560. package/dist/tools/handlers/file-export.js +1 -90
  561. package/dist/tools/handlers/industry-pack.d.ts +2 -0
  562. package/dist/tools/handlers/industry-pack.js +1 -0
  563. package/dist/tools/handlers/intent-radar.js +1 -76
  564. package/dist/tools/handlers/local.js +1 -53
  565. package/dist/tools/handlers/messenger.js +1 -188
  566. package/dist/tools/handlers/onchain.js +1 -1180
  567. package/dist/tools/handlers/persona.js +1 -89
  568. package/dist/tools/handlers/project.js +1 -211
  569. package/dist/tools/handlers/query.js +1 -434
  570. package/dist/tools/handlers/schema-query.js +1 -176
  571. package/dist/tools/handlers/task-status.js +1 -26
  572. package/dist/tools/handlers/trust.js +1 -380
  573. package/dist/tools/handlers/wip.js +1 -90
  574. package/dist/tools/handlers/workspace.d.ts +2 -0
  575. package/dist/tools/handlers/workspace.js +1 -0
  576. package/dist/tools/index.d.ts +2 -1
  577. package/dist/tools/index.js +1 -1382
  578. package/dist/tools/retry.js +1 -85
  579. package/dist/tools/rules-hook.d.ts +1 -1
  580. package/dist/tools/rules-hook.js +1 -23
  581. package/dist/tools/shared.d.ts +1 -1
  582. package/dist/tools/shared.js +1 -130
  583. package/dist/tools/types.d.ts +2 -1
  584. package/dist/tools/types.js +1 -1
  585. package/dist/tools/upgrade-check.d.ts +19 -0
  586. package/dist/tools/upgrade-check.js +1 -0
  587. package/dist/tools/wip-deploy-assist.js +1 -306
  588. package/dist/tools/wrap.js +1 -500
  589. package/package.json +7 -6
  590. package/dist/knowledge/arbitration-trust.d.ts +0 -24
  591. package/dist/knowledge/arbitration-trust.js +0 -117
  592. package/dist/schema/call/bridge-handler.d.ts +0 -8
  593. package/dist/schema/call/bridge-handler.js +0 -265
  594. package/dist/schema/sync-layer4.d.ts +0 -21
  595. package/dist/schema/sync-layer4.js +0 -286
  596. package/dist/schema-query/index.js +0 -810
  597. /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
@@ -1,184 +1 @@
1
- import { z } from "zod";
2
- import { TypedPermissionObjectSchema, CoinParamSchema, NamedObjectSchema, ObjectsSchema, CallEnvSchema, SubmissionCallSchema } from "./base.js";
3
- import { AllocatorsSchema, DiscountTypeSchema, ServiceSaleSchema, PaymentInfoSchema } from "../query/index.js";
4
- import { AccountOrMark_AddressSchema, DescriptionSchema, LongNameSchema, ManyAccountOrMark_AddressSchema, NameOrAddressSchema, NotEmptyNameSchema, ReceivedBalanceOrRecentlySchema, ReceivedObjectsOrRecentlySchema, RECEIVE_FORMAT_BLOCK_OBJECTS, RECEIVE_FORMAT_BLOCK_BALANCE } from "../common/index.js";
5
- import { BalanceTypeSchema } from "../common/index.js";
6
- export const ServiceBuyItemSchema = z.object({
7
- name: LongNameSchema.describe("Name of the product or service to purchase"),
8
- stock: BalanceTypeSchema.describe("Quantity of the product or service to purchase"),
9
- wip_hash: z.string().describe(`WIP file hash of the item. EMPTY string "" means only verify the WIP file integrity without comparing to a specific hash (the hash within the wip file will be used). For purchases, it is STRONGLY RECOMMENDED to fill in the hash you saw when viewing the product info (from the Service sale's wip_hash field) to prevent the merchant from replacing the WIP file before your order is placed (a legitimate update operation), which would cause inconsistency between what you saw and what you received.`),
10
- }).strict();
11
- export const BuySchema = z.object({
12
- items: z.array(ServiceBuyItemSchema).describe("List of products or services to purchase"),
13
- total_pay: CoinParamSchema.describe("Actual payment amount. FORMAT: {balance: <amount_in_smallest_unit>} or {coin: <coin_object_id>}. " +
14
- "The token type and precision are determined by the Service object's type_parameter (the generic type set when the Service was created). " +
15
- "For WOW (9 decimals): {balance: 1000000000} = 1 WOW. For SUI (9 decimals): {balance: 1000000000} = 1 SUI."),
16
- discount: z.string().optional().describe("Discount object ID or name"),
17
- payment_remark: z.string().optional().describe("Payment remark"),
18
- payment_index: z.number().optional().describe("Payment index"),
19
- }).strict();
20
- export const DiscountSchema = z.object({
21
- name: z.string().describe("Discount name"),
22
- discount_type: DiscountTypeSchema.describe("Discount type"),
23
- discount_value: BalanceTypeSchema.describe("Discount value"),
24
- benchmark: z.union([z.number(), z.string()]).optional().describe("Discount benchmark value. Discount is only applied if the amount exceeds this value"),
25
- time_ms_start: z.number().optional().describe("Discount start time (milliseconds)"),
26
- time_ms_end: z.number().describe("Discount end time (milliseconds)"),
27
- count: z.number().describe("Discount usage count"),
28
- recipient: ManyAccountOrMark_AddressSchema.describe("Discount recipient"),
29
- transferable: z.boolean().describe("Whether the discount object recipient can transfer the discount object"),
30
- }).strict();
31
- export const OrderNewSchema = z.object({
32
- buy: BuySchema,
33
- agents: ManyAccountOrMark_AddressSchema.optional().describe("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."),
34
- order_required_info: z.string().optional().describe("Contact object ID or WTS Proof object, recorded on the Order as proof that the order holder " +
35
- "delivered the required private information (service.customer_required) to the merchant. " +
36
- "FLOW: when a Service declares customer_required (e.g. phone/email/shipping_address), the order holder " +
37
- "MUST send that private information to the Service's Contact (um) via end-to-end encrypted Messenger, " +
38
- "then pass the Contact object ID or the generated WTS Proof here so the delivery is verifiable on-chain."),
39
- transfer: AccountOrMark_AddressSchema.optional().describe("Set the new owner of the order. Requires order owner permission to set."),
40
- namedNewOrder: NamedObjectSchema.optional().describe("RECOMMENDED: Set a local name for the newly created Order object. " +
41
- "Without this, the Order is only referenceable by its on-chain address. " +
42
- "Example: {name: 'my_order_v1'} allows subsequent operations to use 'my_order_v1' instead of the address."),
43
- namedNewAllocation: NamedObjectSchema.optional().describe("RECOMMENDED: Set a local name for the order's Allocation object. " +
44
- "Without this, the Allocation is only referenceable by its address. " +
45
- "Example: {name: 'my_allocation_v1'} allows alloc_by_guard to reference 'my_allocation_v1'."),
46
- namedNewProgress: NamedObjectSchema.optional().describe("RECOMMENDED: Set a local name for the order's Progress object. " +
47
- "Without this, the Progress is only referenceable by its address. " +
48
- "Example: {name: 'my_progress_v1'} allows progress operations to use 'my_progress_v1'."),
49
- }).strict();
50
- export const SalesSchema = z.discriminatedUnion("op", [
51
- z.object({
52
- op: z.literal("add"),
53
- sales: z.array(ServiceSaleSchema),
54
- }).strict().describe("Add new sales products or services."),
55
- z.object({
56
- op: z.literal("set"),
57
- sales: z.array(ServiceSaleSchema),
58
- }).strict().describe("Set sales products or services."),
59
- z.object({
60
- op: z.literal("remove"),
61
- sales_name: z.array(LongNameSchema.describe("Sales name")),
62
- }).strict().describe("Remove existing sales products or services."),
63
- z.object({
64
- op: z.literal("clear"),
65
- }).strict().describe("Clear all sales products or services."),
66
- ]);
67
- export const CallService_DataSchema = z.object({
68
- object: TypedPermissionObjectSchema,
69
- order_new: OrderNewSchema.optional().describe("Create new order."),
70
- description: DescriptionSchema.optional(),
71
- location: LongNameSchema.optional().describe("Location of the Service"),
72
- sales: SalesSchema.optional().describe("Service sales products or services list. " +
73
- "⚠️ WIP NETWORK-DEPLOYMENT RULE: a non-empty sale.wip MUST be a publicly reachable URL " +
74
- "(GitHub Pages / IPFS / your own website). The URL is stored ON-CHAIN and every customer " +
75
- "fetches it at order time — a local file path, localhost/loopback URL, or LAN private-IP URL " +
76
- "is unreachable by customers on other machines and aborts order_new 100%. Local-network URLs " +
77
- "are INTERNAL TEST USE ONLY (env.network = localnet). Leave sale.wip empty (\"\") to skip " +
78
- "WIP verification (TESTING ONLY)."),
79
- repositories: ObjectsSchema.optional().describe("Service Repository object list."),
80
- rewards: ObjectsSchema.optional().describe("Service Reward object list. " +
81
- "May share the Service's Permission (no conflict check — intentional: rewards are the provider's own " +
82
- "incentive tool; only Arbitration requires a different Permission for neutrality)."),
83
- arbitrations: ObjectsSchema.optional().describe("Service Arbitration object list. " +
84
- "FORMAT: same as repositories — use the `objects` field name inside the operation data. " +
85
- "Example: {arbitrations: [{name: 'my_arb_1'}, {name: 'my_arb_2'}]}. " +
86
- "Each item is a NameOrAddress (object ID or local mark name). " +
87
- "⚠️ PERMISSION RULE (contract-enforced, service.move arbitration_add_imp): every Arbitration bound here " +
88
- "MUST use a Permission object DIFFERENT from THIS Service's permission — binding an Arbitration that shares " +
89
- "the Service's Permission aborts with E_ARBITRATION_PERMISSION_CONFLICT (error 33). " +
90
- "Create a dedicated Permission for each Arbitration BEFORE binding. " +
91
- "DESIGN RATIONALE (confirmed intentional): dispute resolution requires NEUTRALITY — an Arbitration controlled " +
92
- "by the same Permission admins as the Service it judges would be a conflict of interest. ONLY Arbitration has " +
93
- "this check: Reward and Treasury objects MAY share the Service's Permission (they are the provider's own tools)."),
94
- machine: z.union([NameOrAddressSchema, z.null()]).optional().describe("Service Machine object ID or name. The Machine object must be in published state."),
95
- discount: DiscountSchema.optional().describe("Issue discount."),
96
- discount_destroy: z.array(NameOrAddressSchema).optional().describe("Destroy existing discount object ID list."),
97
- customer_required: z.array(NotEmptyNameSchema).optional().describe("Customer required information labels. Such as phone, email, shipping_address, etc. " +
98
- "⚠️ HARD LINKAGE (SDK-enforced): if customer_required is set (non-empty), the Service MUST also bind a " +
99
- "Contact via `um` — otherwise the customer's private information cannot be delivered through end-to-end " +
100
- "encrypted Messenger (which routes to the Contact bound as um). Set `um` together with customer_required."),
101
- order_allocators: z.union([AllocatorsSchema, z.null()]).optional().describe("Order fund allocator. Max 100 allocators (MAX_ALLOCATOR_COUNT). " +
102
- "Each allocator has a guard (first matching guard wins) and a sharing list. " +
103
- "Set to null to clear. " +
104
- "⚠️ PERMANENTLY IMMUTABLE after publish: order_allocators can ONLY be set BEFORE publish=true " +
105
- "(Move service.move:503: assert!(!self.bPublished, E_ALREADY_PUBLISHED)). " +
106
- "After publish, the ONLY way to change allocation rules is to create a NEW Service object. " +
107
- "There is NO pause+lock exception for order_allocators (unlike arbitrations/rewards which have time-lock removal). " +
108
- "PRE-PUBLISH CHECKLIST: verify all guard names resolve, all sharing amounts are correct, " +
109
- "threshold is set, and recipient types (Entity/Signer/GuardIdentifier) are intended before calling publish=true. " +
110
- "GuardIdentifier sharing mode: {who: {GuardIdentifier: <u8>}, sharing: <rate>, mode: 'Rate'} — " +
111
- "resolves recipient from Guard table submission at allocation time (e.g., refund to customer). " +
112
- "MULTI-CALL ALLOCATION: Allocation.alloc() can be called MULTIPLE times (no consumed flag in contract). " +
113
- "Use Amount mode (not Surplus) for recurring allocations — Surplus calls balance::withdraw_all which drains the balance. " +
114
- "For monthly payment scenarios, create multiple Allocators with time-based Guards + Amount mode sharing items."),
115
- buy_guard: z.union([NameOrAddressSchema, z.null()]).optional().describe("Buy guard object ID or name."),
116
- compensation_fund_add: CoinParamSchema.optional().describe("Deposit funds into the Service compensation_fund. Used to pay indemnity when arbitration resolves in customer's favor. " +
117
- "FORMAT: {balance: <amount_in_smallest_unit>} — the field name is 'balance' (NOT 'amount'). " +
118
- "The token type and precision are determined by the Service object's type_parameter (the generic type set when the Service was created). " +
119
- "For WOW (9 decimals): {balance: 1000000000} = 1 WOW. For SUI (9 decimals): {balance: 1000000000} = 1 SUI. " +
120
- "For tokens with different decimals, adjust accordingly (e.g. USDC has 6 decimals, so {balance: 1000000} = 1 USDC). " +
121
- "REQUIRES: Permission index 315 (SERVICE_COMPENSATION_FUND_DEPOSIT) must be granted to the calling account first. " +
122
- "COMMON MISTAKE: using {amount: ...} or {amount: ..., type: 'WOW'} — these will fail. The correct field is 'balance'."),
123
- compensation_fund_withdraw: z.object({
124
- receipt: AccountOrMark_AddressSchema.describe("Receipt address that will receive the withdrawn funds (as a new Payment object)"),
125
- payment_info: PaymentInfoSchema.describe("Payment info for the new Payment object created to hold the withdrawn funds"),
126
- }).strict().optional().describe("Withdraw ALL funds from the compensation_fund to a new Payment object owned by `receipt`. " +
127
- "Move layer: service::compensation_fund_withdraw (service.move L383-390). " +
128
- "REQUIRES: Service must be paused AND setting_lock_duration must have elapsed since pause (assert_not_published at L384-385). " +
129
- "Withdraws the ENTIRE compensation_fund balance via balance::withdraw_all. " +
130
- "DIFFERENT from compensation_claim (order-side, for arbitration-winning users, no pause+lock required)."),
131
- setting_lock_duration_add: z.number().optional().describe("Additional lock duration to ADD to 'setting_lock_duration' (Move field name). " +
132
- "UNIT: milliseconds (ms). Example: 2592000000 = 30 days, 7776000000 = 90 days, 86400000 = 1 day. " +
133
- "DEFAULT: 2592000000 (30 days, DEFAULT_LOCK_DURATION). This is the initial value when a Service is created. " +
134
- "Behavior: additive (safe_add) — only increases, never decreases. " +
135
- "Move entry: service::setting_lock_duration_add / setting_lock_duration_add_with_passport. " +
136
- "Can be called BEFORE or AFTER publish (no publish check). " +
137
- "Affects the waiting time required by: compensation_fund_withdraw, arbitrations remove/clear, rewards remove/clear " +
138
- "(all require pause + setting_lock_duration elapsed since pause)."),
139
- compensation_fund_receive: ReceivedBalanceOrRecentlySchema.optional().describe("Receive order compensation funds from this Service object." + RECEIVE_FORMAT_BLOCK_BALANCE),
140
- owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this Service object and send them to the owner of its Permission object." + RECEIVE_FORMAT_BLOCK_OBJECTS),
141
- um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object ID or name — the Service's customer-service channel. " +
142
- "This is the object that Messenger routes encrypted messages to for pre-order negotiation, " +
143
- "private-info delivery (see customer_required), and post-sale support. " +
144
- "⚠️ REQUIRED whenever customer_required is set: without um, the customer's private information " +
145
- "has no channel to reach the merchant."),
146
- pause: z.boolean().optional().describe("Whether to pause accepting new orders."),
147
- publish: z.boolean().optional().describe("Whether to publish the Service. After publishing, customers can place orders. " +
148
- "VERIFIED against Move source service.move + SDK service.ts (4-level immutability matrix):\n" +
149
- " L1 — PERMANENTLY LOCKED after publish (assert!(!bPublished), no pause+lock exception):\n" +
150
- " • machine (service.move L633/L653 — workflow template)\n" +
151
- " • order_allocators (service.move L503 — fund distribution rules)\n" +
152
- " L2 — TIME-LOCKED after publish (assert_not_published — requires pause + setting_lock_duration elapsed):\n" +
153
- " • arbitrations remove/clear (service.move L433/L445 — dispute resolution objects)\n" +
154
- " • rewards remove/clear (service.move L402/L414 — reward objects)\n" +
155
- " • compensation_fund_withdraw (service.move L384-385 — withdraw ALL funds)\n" +
156
- " L3 — REMAIN MUTABLE after publish (no SDK check, no Move check):\n" +
157
- " • arbitrations add, rewards add (no assert — can add after publish)\n" +
158
- " • buy_guard, sales, discount, description, location, pause, repositories,\n" +
159
- " • compensation_fund_add, setting_lock_duration_add, customer_required, um (Contact)\n" +
160
- "These 2 L1-LOCKED fields (machine/order_allocators) MUST be set BEFORE publish=true.\n" +
161
- "arbitrations/rewards can be ADDED after publish but remove/clear requires pause+lock.\n" +
162
- "\n" +
163
- "⚠️ COMPENSATION_FUND + ARBITRATION LINKAGE (service.move:494-499):\n" +
164
- " At publish time, if compensation_fund > 0, Arbitration MUST be bound:\n" +
165
- " if (balance::value(&self.compensation_fund) > 0) {\n" +
166
- " assert!(arbitration_count > 0, E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\n" +
167
- " }\n" +
168
- " The MCP handler enforces this as a HARD PRE-CHECK: if publish=true AND compensation_fund_add " +
169
- " is set in the same call AND arbitrations is empty, the call is REJECTED before submission. " +
170
- " If compensation_fund was deposited in a prior call, a SOFT WARNING is issued.\n" +
171
- "\n" +
172
- "SCHEMA-03 / P0-01 fix — DEPLOYMENT WORKFLOW (two-phase, avoids circular dependency):\n" +
173
- " Phase 1 — CREATE (no publish): object={name:'my-service', type_parameter, permission} + machine + order_allocators + arbitrations.\n" +
174
- " NOTE: buy_guard can use a LocalMark NAME (not address) to break the Guard→Service circular dependency.\n" +
175
- " The name is resolved to an address at transaction build time.\n" +
176
- " Phase 2 — PUBLISH: object='my-service' (string ref) + publish=true.\n" +
177
- " All L1-LOCKED fields must be set in Phase 1; Phase 2 only flips the publish flag.\n" +
178
- " Post-publish updates: buy_guard, sales, description, repositories (add), rewards (add), arbitrations (add), etc."),
179
- }).strict().describe("On-chain Service operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, type_parameter, permission, ...} to create a Service. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. 'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. STRING for existing, OBJECT for new creation.");
180
- export const CallService_InputSchema = z.object({
181
- data: CallService_DataSchema,
182
- env: CallEnvSchema.optional(),
183
- submission: SubmissionCallSchema.optional(),
184
- }).strict();
1
+ import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AllocatorsSchema,DiscountTypeSchema,ServiceSaleSchema,PaymentInfoSchema}from'../query/index.js';import{AccountOrMark_AddressSchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressSchema,NameOrAddressSchema,NotEmptyNameSchema,ReceivedBalanceOrRecentlySchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';import{BalanceTypeSchema}from'../common/index.js';export const ServiceBuyItemSchema=z['object']({'name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20or\x20service\x20to\x20purchase'),'stock':BalanceTypeSchema['describe']('Quantity\x20of\x20the\x20product\x20or\x20service\x20to\x20purchase'),'wip_hash':z['string']()['describe']('WIP\x20file\x20hash\x20of\x20the\x20item.\x20EMPTY\x20string\x20\x22\x22\x20means\x20only\x20verify\x20the\x20WIP\x20file\x20integrity\x20without\x20comparing\x20to\x20a\x20specific\x20hash\x20(the\x20hash\x20within\x20the\x20wip\x20file\x20will\x20be\x20used).\x20For\x20purchases,\x20it\x20is\x20STRONGLY\x20RECOMMENDED\x20to\x20fill\x20in\x20the\x20hash\x20you\x20saw\x20when\x20viewing\x20the\x20product\x20info\x20(from\x20the\x20Service\x20sale\x27s\x20wip_hash\x20field)\x20to\x20prevent\x20the\x20merchant\x20from\x20replacing\x20the\x20WIP\x20file\x20before\x20your\x20order\x20is\x20placed\x20(a\x20legitimate\x20update\x20operation),\x20which\x20would\x20cause\x20inconsistency\x20between\x20what\x20you\x20saw\x20and\x20what\x20you\x20received.')})['strict']();export const BuySchema=z['object']({'items':z['array'](ServiceBuyItemSchema)['describe']('List\x20of\x20products\x20or\x20services\x20to\x20purchase'),'total_pay':CoinParamSchema['describe']('Actual\x20payment\x20amount.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20or\x20{coin:\x20<coin_object_id>}.\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20For\x20SUI\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20SUI.'),'discount':z['string']()['optional']()['describe']('Discount\x20object\x20ID\x20or\x20name'),'payment_remark':z['string']()['optional']()['describe']('Payment\x20remark'),'payment_index':z['number']()['optional']()['describe']('Payment\x20index')})['strict']();export const DiscountSchema=z['object']({'name':z['string']()['describe']('Discount\x20name'),'discount_type':DiscountTypeSchema['describe']('Discount\x20type'),'discount_value':BalanceTypeSchema['describe']('Discount\x20value'),'benchmark':z['union']([z['number'](),z['string']()])['optional']()['describe']('Discount\x20benchmark\x20value.\x20Discount\x20is\x20only\x20applied\x20if\x20the\x20amount\x20exceeds\x20this\x20value'),'time_ms_start':z['number']()['optional']()['describe']('Discount\x20start\x20time\x20(milliseconds)'),'time_ms_end':z['number']()['describe']('Discount\x20end\x20time\x20(milliseconds)'),'count':z['number']()['describe']('Discount\x20usage\x20count'),'recipient':ManyAccountOrMark_AddressSchema['describe']('Discount\x20recipient'),'transferable':z['boolean']()['describe']('Whether\x20the\x20discount\x20object\x20recipient\x20can\x20transfer\x20the\x20discount\x20object')})['strict']();export const OrderNewSchema=z['object']({'buy':BuySchema,'agents':ManyAccountOrMark_AddressSchema['optional']()['describe']('Order\x20agents.\x20Agents\x20can\x20operate\x20the\x20order,\x20such\x20as\x20canceling\x20the\x20order,\x20modifying\x20the\x20order\x20status,\x20etc.;\x20but\x20cannot\x20receive\x20the\x20funds\x20received\x20by\x20the\x20order.'),'order_required_info':z['string']()['optional']()['describe']('Contact\x20object\x20ID\x20or\x20WTS\x20Proof\x20object,\x20recorded\x20on\x20the\x20Order\x20as\x20proof\x20that\x20the\x20order\x20holder\x20'+'delivered\x20the\x20required\x20private\x20information\x20(service.customer_required)\x20to\x20the\x20merchant.\x20'+'FLOW:\x20when\x20a\x20Service\x20declares\x20customer_required\x20(e.g.\x20phone/email/shipping_address),\x20the\x20order\x20holder\x20'+'MUST\x20send\x20that\x20private\x20information\x20to\x20the\x20Service\x27s\x20Contact\x20(um)\x20via\x20end-to-end\x20encrypted\x20Messenger,\x20'+'then\x20pass\x20the\x20Contact\x20object\x20ID\x20or\x20the\x20generated\x20WTS\x20Proof\x20here\x20so\x20the\x20delivery\x20is\x20verifiable\x20on-chain.'),'transfer':AccountOrMark_AddressSchema['optional']()['describe']('Set\x20the\x20new\x20owner\x20of\x20the\x20order.\x20Requires\x20order\x20owner\x20permission\x20to\x20set.'),'namedNewOrder':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Order\x20object.\x20'+'Without\x20this,\x20the\x20Order\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_order_v1\x27}\x20allows\x20subsequent\x20operations\x20to\x20use\x20\x27my_order_v1\x27\x20instead\x20of\x20the\x20address.'),'namedNewAllocation':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Allocation\x20object.\x20'+'Without\x20this,\x20the\x20Allocation\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_allocation_v1\x27}\x20allows\x20alloc_by_guard\x20to\x20reference\x20\x27my_allocation_v1\x27.'),'namedNewProgress':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Progress\x20object.\x20'+'Without\x20this,\x20the\x20Progress\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_progress_v1\x27}\x20allows\x20progress\x20operations\x20to\x20use\x20\x27my_progress_v1\x27.')})['strict']();export const SalesSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Add\x20new\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('set'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Set\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('remove'),'sales_name':z['array'](LongNameSchema['describe']('Sales\x20name'))})['strict']()['describe']('Remove\x20existing\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20all\x20sales\x20products\x20or\x20services.')]);export const CallService_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'order_new':OrderNewSchema['optional']()['describe']('Create\x20new\x20order.'),'description':DescriptionSchema['optional'](),'location':LongNameSchema['optional']()['describe']('Location\x20of\x20the\x20Service'),'sales':SalesSchema['optional']()['describe']('Service\x20sales\x20products\x20or\x20services\x20list.\x20'+'⚠️\x20WIP\x20NETWORK-DEPLOYMENT\x20RULE:\x20a\x20non-empty\x20sale.wip\x20MUST\x20be\x20a\x20publicly\x20reachable\x20URL\x20'+'(GitHub\x20Pages\x20/\x20IPFS\x20/\x20your\x20own\x20website).\x20The\x20URL\x20is\x20stored\x20ON-CHAIN\x20and\x20every\x20customer\x20'+'fetches\x20it\x20at\x20order\x20time\x20—\x20a\x20local\x20file\x20path,\x20localhost/loopback\x20URL,\x20or\x20LAN\x20private-IP\x20URL\x20'+'is\x20unreachable\x20by\x20customers\x20on\x20other\x20machines\x20and\x20aborts\x20order_new\x20100%.\x20Local-network\x20URLs\x20'+'are\x20INTERNAL\x20TEST\x20USE\x20ONLY\x20(env.network\x20=\x20localnet).\x20Leave\x20sale.wip\x20empty\x20(\x22\x22)\x20to\x20skip\x20'+'WIP\x20verification\x20(TESTING\x20ONLY).'),'repositories':ObjectsSchema['optional']()['describe']('Service\x20Repository\x20object\x20list.'),'rewards':ObjectsSchema['optional']()['describe']('Service\x20Reward\x20object\x20list.\x20'+'May\x20share\x20the\x20Service\x27s\x20Permission\x20(no\x20conflict\x20check\x20—\x20intentional:\x20rewards\x20are\x20the\x20provider\x27s\x20own\x20'+'incentive\x20tool;\x20only\x20Arbitration\x20requires\x20a\x20different\x20Permission\x20for\x20neutrality).'),'arbitrations':ObjectsSchema['optional']()['describe']('Service\x20Arbitration\x20object\x20list.\x20'+'FORMAT:\x20same\x20as\x20repositories\x20—\x20use\x20the\x20`objects`\x20field\x20name\x20inside\x20the\x20operation\x20data.\x20'+'Example:\x20{arbitrations:\x20[{name:\x20\x27my_arb_1\x27},\x20{name:\x20\x27my_arb_2\x27}]}.\x20'+'Each\x20item\x20is\x20a\x20NameOrAddress\x20(object\x20ID\x20or\x20local\x20mark\x20name).\x20'+'⚠️\x20PERMISSION\x20RULE\x20(contract-enforced,\x20service.move\x20arbitration_add_imp):\x20every\x20Arbitration\x20bound\x20here\x20'+'MUST\x20use\x20a\x20Permission\x20object\x20DIFFERENT\x20from\x20THIS\x20Service\x27s\x20permission\x20—\x20binding\x20an\x20Arbitration\x20that\x20shares\x20'+'the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20'+'Create\x20a\x20dedicated\x20Permission\x20for\x20each\x20Arbitration\x20BEFORE\x20binding.\x20'+'DESIGN\x20RATIONALE\x20(confirmed\x20intentional):\x20dispute\x20resolution\x20requires\x20NEUTRALITY\x20—\x20an\x20Arbitration\x20controlled\x20'+'by\x20the\x20same\x20Permission\x20admins\x20as\x20the\x20Service\x20it\x20judges\x20would\x20be\x20a\x20conflict\x20of\x20interest.\x20ONLY\x20Arbitration\x20has\x20'+'this\x20check:\x20Reward\x20and\x20Treasury\x20objects\x20MAY\x20share\x20the\x20Service\x27s\x20Permission\x20(they\x20are\x20the\x20provider\x27s\x20own\x20tools).'),'machine':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Service\x20Machine\x20object\x20ID\x20or\x20name.\x20The\x20Machine\x20object\x20must\x20be\x20in\x20published\x20state.'),'discount':DiscountSchema['optional']()['describe']('Issue\x20discount.'),'discount_destroy':z['array'](NameOrAddressSchema)['optional']()['describe']('Destroy\x20existing\x20discount\x20object\x20ID\x20list.'),'customer_required':z['array'](NotEmptyNameSchema)['optional']()['describe']('Customer\x20required\x20information\x20labels.\x20Such\x20as\x20phone,\x20email,\x20shipping_address,\x20etc.\x20'+'⚠️\x20HARD\x20LINKAGE\x20(SDK-enforced):\x20if\x20customer_required\x20is\x20set\x20(non-empty),\x20the\x20Service\x20MUST\x20also\x20bind\x20a\x20'+'Contact\x20via\x20`um`\x20—\x20otherwise\x20the\x20customer\x27s\x20private\x20information\x20cannot\x20be\x20delivered\x20through\x20end-to-end\x20'+'encrypted\x20Messenger\x20(which\x20routes\x20to\x20the\x20Contact\x20bound\x20as\x20um).\x20Set\x20`um`\x20together\x20with\x20customer_required.'),'order_allocators':z['union']([AllocatorsSchema,z['null']()])['optional']()['describe']('Order\x20fund\x20allocator.\x20Max\x20100\x20allocators\x20(MAX_ALLOCATOR_COUNT).\x20'+'Each\x20allocator\x20has\x20a\x20guard\x20(first\x20matching\x20guard\x20wins)\x20and\x20a\x20sharing\x20list.\x20'+'Set\x20to\x20null\x20to\x20clear.\x20'+'⚠️\x20PERMANENTLY\x20IMMUTABLE\x20after\x20publish:\x20order_allocators\x20can\x20ONLY\x20be\x20set\x20BEFORE\x20publish=true\x20'+'(Move\x20service.move:503:\x20assert!(!self.bPublished,\x20E_ALREADY_PUBLISHED)).\x20'+'After\x20publish,\x20the\x20ONLY\x20way\x20to\x20change\x20allocation\x20rules\x20is\x20to\x20create\x20a\x20NEW\x20Service\x20object.\x20'+'There\x20is\x20NO\x20pause+lock\x20exception\x20for\x20order_allocators\x20(unlike\x20arbitrations/rewards\x20which\x20have\x20time-lock\x20removal).\x20'+'PRE-PUBLISH\x20CHECKLIST:\x20verify\x20all\x20guard\x20names\x20resolve,\x20all\x20sharing\x20amounts\x20are\x20correct,\x20'+'threshold\x20is\x20set,\x20and\x20recipient\x20types\x20(Entity/Signer/GuardIdentifier)\x20are\x20intended\x20before\x20calling\x20publish=true.\x20'+'GuardIdentifier\x20sharing\x20mode:\x20{who:\x20{GuardIdentifier:\x20<u8>},\x20sharing:\x20<rate>,\x20mode:\x20\x27Rate\x27}\x20—\x20'+'resolves\x20recipient\x20from\x20Guard\x20table\x20submission\x20at\x20allocation\x20time\x20(e.g.,\x20refund\x20to\x20customer).\x20'+'MULTI-CALL\x20ALLOCATION:\x20Allocation.alloc()\x20can\x20be\x20called\x20MULTIPLE\x20times\x20(no\x20consumed\x20flag\x20in\x20contract).\x20'+'Use\x20Amount\x20mode\x20(not\x20Surplus)\x20for\x20recurring\x20allocations\x20—\x20Surplus\x20calls\x20balance::withdraw_all\x20which\x20drains\x20the\x20balance.\x20'+'For\x20monthly\x20payment\x20scenarios,\x20create\x20multiple\x20Allocators\x20with\x20time-based\x20Guards\x20+\x20Amount\x20mode\x20sharing\x20items.'),'buy_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Buy\x20guard\x20object\x20ID\x20or\x20name.'),'compensation_fund_add':CoinParamSchema['optional']()['describe']('Deposit\x20funds\x20into\x20the\x20Service\x20compensation_fund.\x20Used\x20to\x20pay\x20indemnity\x20when\x20arbitration\x20resolves\x20in\x20customer\x27s\x20favor.\x20'+'FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20the\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20For\x20SUI\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20SUI.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x201000000}\x20=\x201\x20USDC).\x20'+'REQUIRES:\x20Permission\x20index\x20315\x20(SERVICE_COMPENSATION_FUND_DEPOSIT)\x20must\x20be\x20granted\x20to\x20the\x20calling\x20account\x20first.\x20'+'COMMON\x20MISTAKE:\x20using\x20{amount:\x20...}\x20or\x20{amount:\x20...,\x20type:\x20\x27WOW\x27}\x20—\x20these\x20will\x20fail.\x20The\x20correct\x20field\x20is\x20\x27balance\x27.'),'compensation_fund_withdraw':z['object']({'receipt':AccountOrMark_AddressSchema['describe']('Receipt\x20address\x20that\x20will\x20receive\x20the\x20withdrawn\x20funds\x20(as\x20a\x20new\x20Payment\x20object)'),'payment_info':PaymentInfoSchema['describe']('Payment\x20info\x20for\x20the\x20new\x20Payment\x20object\x20created\x20to\x20hold\x20the\x20withdrawn\x20funds')})['strict']()['optional']()['describe']('Withdraw\x20ALL\x20funds\x20from\x20the\x20compensation_fund\x20to\x20a\x20new\x20Payment\x20object\x20owned\x20by\x20`receipt`.\x20'+'Move\x20layer:\x20service::compensation_fund_withdraw\x20(service.move\x20L383-390).\x20'+'REQUIRES:\x20Service\x20must\x20be\x20paused\x20AND\x20setting_lock_duration\x20must\x20have\x20elapsed\x20since\x20pause\x20(assert_not_published\x20at\x20L384-385).\x20'+'Withdraws\x20the\x20ENTIRE\x20compensation_fund\x20balance\x20via\x20balance::withdraw_all.\x20'+'DIFFERENT\x20from\x20compensation_claim\x20(order-side,\x20for\x20arbitration-winning\x20users,\x20no\x20pause+lock\x20required).'),'setting_lock_duration_add':z['number']()['optional']()['describe']('Additional\x20lock\x20duration\x20to\x20ADD\x20to\x20\x27setting_lock_duration\x27\x20(Move\x20field\x20name).\x20'+'UNIT:\x20milliseconds\x20(ms).\x20Example:\x202592000000\x20=\x2030\x20days,\x207776000000\x20=\x2090\x20days,\x2086400000\x20=\x201\x20day.\x20'+'DEFAULT:\x202592000000\x20(30\x20days,\x20DEFAULT_LOCK_DURATION).\x20This\x20is\x20the\x20initial\x20value\x20when\x20a\x20Service\x20is\x20created.\x20'+'Behavior:\x20additive\x20(safe_add)\x20—\x20only\x20increases,\x20never\x20decreases.\x20'+'Move\x20entry:\x20service::setting_lock_duration_add\x20/\x20setting_lock_duration_add_with_passport.\x20'+'Can\x20be\x20called\x20BEFORE\x20or\x20AFTER\x20publish\x20(no\x20publish\x20check).\x20'+'Affects\x20the\x20waiting\x20time\x20required\x20by:\x20compensation_fund_withdraw,\x20arbitrations\x20remove/clear,\x20rewards\x20remove/clear\x20'+'(all\x20require\x20pause\x20+\x20setting_lock_duration\x20elapsed\x20since\x20pause).'),'compensation_fund_receive':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Receive\x20order\x20compensation\x20funds\x20from\x20this\x20Service\x20object.'+RECEIVE_FORMAT_BLOCK_BALANCE),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Service\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name\x20—\x20the\x20Service\x27s\x20customer-service\x20channel.\x20'+'This\x20is\x20the\x20object\x20that\x20Messenger\x20routes\x20encrypted\x20messages\x20to\x20for\x20pre-order\x20negotiation,\x20'+'private-info\x20delivery\x20(see\x20customer_required),\x20and\x20post-sale\x20support.\x20'+'⚠️\x20REQUIRED\x20whenever\x20customer_required\x20is\x20set:\x20without\x20um,\x20the\x20customer\x27s\x20private\x20information\x20'+'has\x20no\x20channel\x20to\x20reach\x20the\x20merchant.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20accepting\x20new\x20orders.'),'publish':z['boolean']()['optional']()['describe']('Whether\x20to\x20publish\x20the\x20Service.\x20After\x20publishing,\x20customers\x20can\x20place\x20orders.\x20'+'VERIFIED\x20against\x20Move\x20source\x20service.move\x20+\x20SDK\x20service.ts\x20(4-level\x20immutability\x20matrix):\x0a'+'\x20\x20L1\x20—\x20PERMANENTLY\x20LOCKED\x20after\x20publish\x20(assert!(!bPublished),\x20no\x20pause+lock\x20exception):\x0a'+'\x20\x20\x20\x20•\x20machine\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(service.move\x20L633/L653\x20—\x20workflow\x20template)\x0a'+'\x20\x20\x20\x20•\x20order_allocators\x20(service.move\x20L503\x20—\x20fund\x20distribution\x20rules)\x0a'+'\x20\x20L2\x20—\x20TIME-LOCKED\x20after\x20publish\x20(assert_not_published\x20—\x20requires\x20pause\x20+\x20setting_lock_duration\x20elapsed):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20remove/clear\x20(service.move\x20L433/L445\x20—\x20dispute\x20resolution\x20objects)\x0a'+'\x20\x20\x20\x20•\x20rewards\x20remove/clear\x20\x20\x20\x20\x20\x20\x20(service.move\x20L402/L414\x20—\x20reward\x20objects)\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_withdraw\x20(service.move\x20L384-385\x20—\x20withdraw\x20ALL\x20funds)\x0a'+'\x20\x20L3\x20—\x20REMAIN\x20MUTABLE\x20after\x20publish\x20(no\x20SDK\x20check,\x20no\x20Move\x20check):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20add,\x20rewards\x20add\x20(no\x20assert\x20—\x20can\x20add\x20after\x20publish)\x0a'+'\x20\x20\x20\x20•\x20buy_guard,\x20sales,\x20discount,\x20description,\x20location,\x20pause,\x20repositories,\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_add,\x20setting_lock_duration_add,\x20customer_required,\x20um\x20(Contact)\x0a'+'These\x202\x20L1-LOCKED\x20fields\x20(machine/order_allocators)\x20MUST\x20be\x20set\x20BEFORE\x20publish=true.\x0a'+'arbitrations/rewards\x20can\x20be\x20ADDED\x20after\x20publish\x20but\x20remove/clear\x20requires\x20pause+lock.\x0a'+'\x0a'+'⚠️\x20COMPENSATION_FUND\x20+\x20ARBITRATION\x20LINKAGE\x20(service.move:494-499):\x0a'+'\x20\x20At\x20publish\x20time,\x20if\x20compensation_fund\x20>\x200,\x20Arbitration\x20MUST\x20be\x20bound:\x0a'+'\x20\x20\x20\x20if\x20(balance::value(&self.compensation_fund)\x20>\x200)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20assert!(arbitration_count\x20>\x200,\x20E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\x0a'+'\x20\x20\x20\x20}\x0a'+'\x20\x20The\x20MCP\x20handler\x20enforces\x20this\x20as\x20a\x20HARD\x20PRE-CHECK:\x20if\x20publish=true\x20AND\x20compensation_fund_add\x20'+'\x20\x20is\x20set\x20in\x20the\x20same\x20call\x20AND\x20arbitrations\x20is\x20empty,\x20the\x20call\x20is\x20REJECTED\x20before\x20submission.\x20'+'\x20\x20If\x20compensation_fund\x20was\x20deposited\x20in\x20a\x20prior\x20call,\x20a\x20SOFT\x20WARNING\x20is\x20issued.\x0a'+'\x0a'+'SCHEMA-03\x20/\x20P0-01\x20fix\x20—\x20DEPLOYMENT\x20WORKFLOW\x20(two-phase,\x20avoids\x20circular\x20dependency):\x0a'+'\x20\x20Phase\x201\x20—\x20CREATE\x20(no\x20publish):\x20object={name:\x27my-service\x27,\x20type_parameter,\x20permission}\x20+\x20machine\x20+\x20order_allocators\x20+\x20arbitrations.\x0a'+'\x20\x20\x20\x20NOTE:\x20buy_guard\x20can\x20use\x20a\x20LocalMark\x20NAME\x20(not\x20address)\x20to\x20break\x20the\x20Guard→Service\x20circular\x20dependency.\x0a'+'\x20\x20\x20\x20The\x20name\x20is\x20resolved\x20to\x20an\x20address\x20at\x20transaction\x20build\x20time.\x0a'+'\x20\x20Phase\x202\x20—\x20PUBLISH:\x20object=\x27my-service\x27\x20(string\x20ref)\x20+\x20publish=true.\x0a'+'\x20\x20\x20\x20All\x20L1-LOCKED\x20fields\x20must\x20be\x20set\x20in\x20Phase\x201;\x20Phase\x202\x20only\x20flips\x20the\x20publish\x20flag.\x0a'+'\x20\x20Post-publish\x20updates:\x20buy_guard,\x20sales,\x20description,\x20repositories\x20(add),\x20rewards\x20(add),\x20arbitrations\x20(add),\x20etc.')})['strict']()['describe']('On-chain\x20Service\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20a\x20Service.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallService_InputSchema=z['object']({'data':CallService_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();