@wowok/agent-mcp 2.6.1 → 2.6.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 (125) hide show
  1. package/dist/customer/info-puzzle.d.ts +1 -1
  2. package/dist/customer/info-puzzle.js +4 -2
  3. package/dist/customer/risk-assessment.js +26 -4
  4. package/dist/customer/types.d.ts +2 -0
  5. package/dist/examples/guard-template-balance-check.json +38 -0
  6. package/dist/examples/guard-template-time-lock.json +39 -0
  7. package/dist/examples/machine-template-7node-rental.json +114 -0
  8. package/dist/examples/rental-ziroom-machine-create.json +137 -0
  9. package/dist/examples/rental-ziroom-permission-create.json +35 -0
  10. package/dist/examples/rental-ziroom-service-create.json +80 -0
  11. package/dist/examples/retail-myshop-service-create.json +88 -0
  12. package/dist/extensions/capability-manifest.js +24 -24
  13. package/dist/extensions/constraint-registry.js +18 -18
  14. package/dist/extensions/metric-registry.js +14 -14
  15. package/dist/extensions/mode-evaluator.js +16 -16
  16. package/dist/extensions/modes.js +131 -45
  17. package/dist/extensions/registry.d.ts +2 -0
  18. package/dist/extensions/registry.js +63 -30
  19. package/dist/extensions/types.d.ts +1 -0
  20. package/dist/index.js +50 -0
  21. package/dist/knowledge/deployment-scanner.js +1 -1
  22. package/dist/knowledge/fund-layer.d.ts +72 -0
  23. package/dist/knowledge/fund-layer.js +420 -0
  24. package/dist/knowledge/guard-render.d.ts +57 -0
  25. package/dist/knowledge/guard-render.js +700 -0
  26. package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
  27. package/dist/knowledge/guard-submission-prompt.js +171 -0
  28. package/dist/knowledge/machine-ledger.js +1 -1
  29. package/dist/knowledge/machine-render.d.ts +41 -0
  30. package/dist/knowledge/machine-render.js +565 -0
  31. package/dist/knowledge/machine-templates.js +4 -4
  32. package/dist/knowledge/reward-confirm.js +2 -2
  33. package/dist/knowledge/reward-puzzle.js +1 -1
  34. package/dist/knowledge/reward-risk.js +9 -9
  35. package/dist/knowledge/reward-templates.js +2 -2
  36. package/dist/knowledge/service-confirm.d.ts +1 -1
  37. package/dist/knowledge/service-confirm.js +3 -3
  38. package/dist/knowledge/service-context.js +1 -1
  39. package/dist/knowledge/service-ledger.js +1 -1
  40. package/dist/knowledge/service-risk.d.ts +1 -1
  41. package/dist/knowledge/service-risk.js +3 -3
  42. package/dist/knowledge/service-templates.js +2 -2
  43. package/dist/knowledge/service-translation.d.ts +1 -1
  44. package/dist/knowledge/service-translation.js +7 -7
  45. package/dist/project/deployment-bridge.js +6 -5
  46. package/dist/project/deployment-doc.js +5 -5
  47. package/dist/project/edit-planner.d.ts +123 -0
  48. package/dist/project/edit-planner.js +1371 -0
  49. package/dist/project/evaluation.js +314 -14
  50. package/dist/project/graph-builder.js +6 -1
  51. package/dist/project/handlers.d.ts +99 -2
  52. package/dist/project/handlers.js +358 -16
  53. package/dist/project/stage-gate.js +4 -4
  54. package/dist/schema/call/allocation.js +2 -2
  55. package/dist/schema/call/arbitration.js +19 -6
  56. package/dist/schema/call/contact.js +2 -2
  57. package/dist/schema/call/demand.js +2 -2
  58. package/dist/schema/call/guard.js +1 -1
  59. package/dist/schema/call/machine.d.ts +1975 -777
  60. package/dist/schema/call/machine.js +50 -4
  61. package/dist/schema/call/order.js +3 -6
  62. package/dist/schema/call/permission.js +2 -2
  63. package/dist/schema/call/repository.js +2 -2
  64. package/dist/schema/call/reward.js +3 -3
  65. package/dist/schema/call/semantic.js +7 -1
  66. package/dist/schema/call/service.d.ts +180 -8
  67. package/dist/schema/call/service.js +82 -27
  68. package/dist/schema/call/treasury.js +3 -3
  69. package/dist/schema/common/index.d.ts +2 -0
  70. package/dist/schema/common/index.js +46 -10
  71. package/dist/schema/local/index.js +5 -1
  72. package/dist/schema/operations.d.ts +755 -176
  73. package/dist/schema/operations.js +43 -7
  74. package/dist/schema/project/index.d.ts +969 -6
  75. package/dist/schema/project/index.js +268 -4
  76. package/dist/schema/query/index.d.ts +217 -0
  77. package/dist/schema/query/index.js +63 -33
  78. package/dist/schema/schema-query/index.d.ts +53 -3
  79. package/dist/schema/schema-query/index.js +17 -2
  80. package/dist/schema/utils/node-parser.js +13 -0
  81. package/dist/schema/utils/object-type-utils.d.ts +12 -0
  82. package/dist/schema/utils/object-type-utils.js +35 -0
  83. package/dist/schema/utils/permission-machine-check.d.ts +49 -0
  84. package/dist/schema/utils/permission-machine-check.js +121 -0
  85. package/dist/schema/utils/skills-recommendation.d.ts +2 -0
  86. package/dist/schema/utils/skills-recommendation.js +76 -0
  87. package/dist/schema-query/index.d.ts +14 -1
  88. package/dist/schema-query/index.js +104 -2
  89. package/dist/schemas/account_operation.schema.json +1 -1
  90. package/dist/schemas/index.json +1 -1
  91. package/dist/schemas/onchain_events.output.json +1 -1
  92. package/dist/schemas/onchain_operations.output.json +2820 -0
  93. package/dist/schemas/onchain_operations.schema.json +115 -53
  94. package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
  95. package/dist/schemas/onchain_operations_arbitration.schema.json +9 -7
  96. package/dist/schemas/onchain_operations_contact.schema.json +3 -3
  97. package/dist/schemas/onchain_operations_demand.schema.json +3 -3
  98. package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -2
  99. package/dist/schemas/onchain_operations_guard.schema.json +1 -1
  100. package/dist/schemas/onchain_operations_machine.schema.json +4 -4
  101. package/dist/schemas/onchain_operations_order.schema.json +3 -3
  102. package/dist/schemas/onchain_operations_payment.schema.json +1 -1
  103. package/dist/schemas/onchain_operations_permission.schema.json +2 -2
  104. package/dist/schemas/onchain_operations_progress.schema.json +1 -1
  105. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  106. package/dist/schemas/onchain_operations_repository.schema.json +3 -3
  107. package/dist/schemas/onchain_operations_reward.schema.json +6 -6
  108. package/dist/schemas/onchain_operations_service.schema.json +77 -17
  109. package/dist/schemas/onchain_operations_treasury.schema.json +4 -4
  110. package/dist/schemas/onchain_table_data.output.json +1 -1
  111. package/dist/schemas/onchain_table_data.schema.json +10 -9
  112. package/dist/schemas/project_operation.output.json +1026 -7
  113. package/dist/schemas/project_operation.schema.json +46 -4
  114. package/dist/schemas/query_toolkit.output.json +15 -15
  115. package/dist/schemas/query_toolkit.schema.json +3 -3
  116. package/dist/schemas/schema_query.output.json +64 -1
  117. package/dist/schemas/schema_query.schema.json +3 -2
  118. package/dist/schemas/wowok_buildin_info.output.json +81 -8
  119. package/dist/schemas/wowok_buildin_info.schema.json +46 -2
  120. package/dist/tools/handlers/onchain.js +571 -6
  121. package/dist/tools/handlers/project.js +25 -2
  122. package/dist/tools/handlers/schema-query.js +24 -1
  123. package/dist/tools/index.d.ts +8 -0
  124. package/dist/tools/index.js +177 -6
  125. package/package.json +2 -2
@@ -147,7 +147,7 @@
147
147
  "number",
148
148
  "string"
149
149
  ],
150
- "description": "A coin/balance amount in the smallest on-chain unit (u64). Accepts a JS number OR a numeric string. PRECISION RULE: for values exceeding 2^53 (e.g. token amounts with 18 decimals), ALWAYS pass a numeric STRING (e.g. \"1000000000000000000\") to preserve precision — JS numbers lose precision above 2^53. UNIT: this is the smallest unit, NOT the display unit. For SUI: 1 SUI = 10^9 MIST, so 10 SUI = 10000000000. For custom tokens: use the token's native smallest unit (decimals from coin metadata). Examples: 10000000000 (10 SUI), \"1000000000000000000\" (1 token with 18 decimals), 500 (500 units of a token with 0 decimals). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
150
+ "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
151
  }
152
152
  },
153
153
  "required": [
@@ -170,7 +170,7 @@
170
170
  "additionalProperties": false
171
171
  }
172
172
  ],
173
- "description": "Actual payment amount"
173
+ "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
174
  },
175
175
  "discount": {
176
176
  "type": "string",
@@ -248,15 +248,15 @@
248
248
  }
249
249
  },
250
250
  "additionalProperties": false,
251
- "description": "Set the local name of the order object."
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."
252
252
  },
253
253
  "namedNewAllocation": {
254
254
  "$ref": "#/definitions/data/properties/order_new/properties/namedNewOrder",
255
- "description": "Set the local name of the order's Allocation object."
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'."
256
256
  },
257
257
  "namedNewProgress": {
258
258
  "$ref": "#/definitions/data/properties/order_new/properties/namedNewOrder",
259
- "description": "Set the local name of the order's Progress object."
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'."
260
260
  }
261
261
  },
262
262
  "required": [
@@ -467,7 +467,7 @@
467
467
  },
468
468
  "arbitrations": {
469
469
  "$ref": "#/definitions/data/properties/repositories",
470
- "description": "Service Arbitration object list."
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)."
471
471
  },
472
472
  "machine": {
473
473
  "anyOf": [
@@ -649,10 +649,10 @@
649
649
  "Signer"
650
650
  ],
651
651
  "additionalProperties": false,
652
- "description": "Current transaction signer ID"
652
+ "description": "Current transaction signer (tx_context::sender) at the time of the alloc() call. For refunds, the Order owner must call alloc_by_guard themselves to receive the funds."
653
653
  }
654
654
  ],
655
- "description": "Recipient of this allocation. Three forms:\n• { GuardIdentifier: u8 } — resolved from Passport at allocation time. 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.\n• { Entity: { name_or_address: '...' } } — static address resolved via LocalMark. Use for known recipients (e.g., 'turo_host', or a Treasury object address).\n• 'Signer' — the transaction sender (tx_context::sender). Use when the recipient is the current signer (e.g., self-refund scenarios)."
655
+ "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
656
  },
657
657
  "sharing": {
658
658
  "type": [
@@ -703,7 +703,7 @@
703
703
  "type": "null"
704
704
  }
705
705
  ],
706
- "description": "Maximum allocation cap (optional). Has THREE effects:\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)."
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."
707
707
  }
708
708
  },
709
709
  "required": [
@@ -727,7 +727,7 @@
727
727
  "type": "null"
728
728
  }
729
729
  ],
730
- "description": "Order fund allocator."
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."
731
731
  },
732
732
  "buy_guard": {
733
733
  "anyOf": [
@@ -749,11 +749,71 @@
749
749
  "$ref": "#/definitions/data/properties/order_new/properties/buy/properties/total_pay/anyOf/1"
750
750
  }
751
751
  ],
752
- "description": "Compensation fund. Used to claim compensation based on the arbitration result of the Arb object when resolving order disputes."
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'."
753
753
  },
754
- "setting_locked_time_add": {
754
+ "compensation_fund_withdraw": {
755
+ "type": "object",
756
+ "properties": {
757
+ "receipt": {
758
+ "type": "object",
759
+ "properties": {
760
+ "name_or_address": {
761
+ "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
762
+ },
763
+ "local_mark_first": {
764
+ "$ref": "#/definitions/data/properties/order_new/properties/agents/properties/entities/items/properties/local_mark_first"
765
+ }
766
+ },
767
+ "additionalProperties": false,
768
+ "description": "Receipt address that will receive the withdrawn funds (as a new Payment object)"
769
+ },
770
+ "payment_info": {
771
+ "type": "object",
772
+ "properties": {
773
+ "for_object": {
774
+ "type": [
775
+ "string",
776
+ "null"
777
+ ],
778
+ "description": "Payment for a specific object ID"
779
+ },
780
+ "for_guard": {
781
+ "type": [
782
+ "string",
783
+ "null"
784
+ ],
785
+ "description": "Payment to satisfy verification of a Guard object"
786
+ },
787
+ "remark": {
788
+ "type": "string",
789
+ "description": "Payment record remark"
790
+ },
791
+ "index": {
792
+ "type": [
793
+ "number",
794
+ "string"
795
+ ],
796
+ "description": "Payment record index"
797
+ }
798
+ },
799
+ "required": [
800
+ "remark",
801
+ "index"
802
+ ],
803
+ "additionalProperties": false,
804
+ "description": "Payment info for the new Payment object created to hold the withdrawn funds"
805
+ }
806
+ },
807
+ "required": [
808
+ "receipt",
809
+ "payment_info"
810
+ ],
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)."
813
+ },
814
+ "setting_lock_duration_add": {
755
815
  "type": "number",
756
- "description": "Additional lock duration (milliseconds) to extend the 'setting_lock_duration'. Initial value is 30 days, can only be increased, not decreased. Affects: rewards, arbitrations, and compensation_fund_receive."
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)."
757
817
  },
758
818
  "compensation_fund_receive": {
759
819
  "anyOf": [
@@ -808,7 +868,7 @@
808
868
  "const": "recently"
809
869
  }
810
870
  ],
811
- "description": "Receive order compensation funds."
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."
812
872
  },
813
873
  "owner_receive": {
814
874
  "anyOf": [
@@ -847,7 +907,7 @@
847
907
  "const": "recently"
848
908
  }
849
909
  ],
850
- "description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
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."
851
911
  },
852
912
  "um": {
853
913
  "anyOf": [
@@ -866,7 +926,7 @@
866
926
  },
867
927
  "publish": {
868
928
  "type": "boolean",
869
- "description": "Whether to publish the Service. After publishing, customers can place orders. BUG-04 fix (v2.2 — verified against Move source service.move + SDK service.ts):\n SDK-LOCKED after publish (checkNotPublished — cannot modify, must clone new Service):\n • machine (permanently locked — workflow template)\n • order_allocators (permanently locked — fund distribution rules)\n • arbitrations (permanently locked at SDK level — dispute resolution objects)\n TIME-LOCKED after publish (modifiable only after pause + setting_lock_duration elapsed):\n • rewards remove/clear (assert_not_published — time-based lock)\n REMAIN MUTABLE after publish (no SDK check, no Move check):\n • buy_guard (CAN be modified after publish — purchase eligibility guard)\n • setting_locked_time_add (CAN be extended — only increases, never decreases)\n • sales, discount, description, location, pause, repositories,\n • compensation_fund_add, customer_required, um (Contact), rewards add\nThese 3 SDK-LOCKED fields (machine/order_allocators/arbitrations) MUST be set BEFORE publish=true.\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 SDK-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), etc."
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."
870
930
  }
871
931
  },
872
932
  "required": [
@@ -991,7 +1051,7 @@
991
1051
  },
992
1052
  "b_submission": {
993
1053
  "type": "boolean",
994
- "description": "Whether user submission is required for this data"
1054
+ "description": "Whether this table item's value is submitted dynamically at Guard trigger time (alloc_by_guard call). \n\ntrue = value is submitted by the caller when triggering the Guard. Use for runtime-context-dependent values like order address, user address. The 'value' field is ignored when b_submission=true; the caller must provide it via submissions[]. \n\nfalse = value is static, set at Guard creation time. Use for values known when the Guard is created: expected node names, expected merchant address, expected service address. The 'value' field must be populated and will be stored on-chain permanently. \n\nRule of thumb: if the value is the SAME for all future Guard triggers, use false. If the value DIFFERS per trigger (e.g., which order to release funds for), use true."
995
1055
  },
996
1056
  "value_type": {
997
1057
  "anyOf": [
@@ -115,7 +115,7 @@
115
115
  "number",
116
116
  "string"
117
117
  ],
118
- "description": "A coin/balance amount in the smallest on-chain unit (u64). Accepts a JS number OR a numeric string. PRECISION RULE: for values exceeding 2^53 (e.g. token amounts with 18 decimals), ALWAYS pass a numeric STRING (e.g. \"1000000000000000000\") to preserve precision — JS numbers lose precision above 2^53. UNIT: this is the smallest unit, NOT the display unit. For SUI: 1 SUI = 10^9 MIST, so 10 SUI = 10000000000. For custom tokens: use the token's native smallest unit (decimals from coin metadata). Examples: 10000000000 (10 SUI), \"1000000000000000000\" (1 token with 18 decimals), 500 (500 units of a token with 0 decimals). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
118
+ "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."
119
119
  },
120
120
  "token_type": {
121
121
  "type": "string",
@@ -162,7 +162,7 @@
162
162
  "const": "recently"
163
163
  }
164
164
  ],
165
- "description": "Receive CoinWrapper objects received by the object and deposit them into its balance."
165
+ "description": "Receive CoinWrapper objects received by this Treasury object and deposit them into its balance.\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."
166
166
  },
167
167
  "deposit": {
168
168
  "type": "object",
@@ -588,7 +588,7 @@
588
588
  "const": "recently"
589
589
  }
590
590
  ],
591
- "description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
591
+ "description": "Unwrap CoinWrapper objects and other objects received by this Treasury 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."
592
592
  },
593
593
  "um": {
594
594
  "anyOf": [
@@ -724,7 +724,7 @@
724
724
  },
725
725
  "b_submission": {
726
726
  "type": "boolean",
727
- "description": "Whether user submission is required for this data"
727
+ "description": "Whether this table item's value is submitted dynamically at Guard trigger time (alloc_by_guard call). \n\ntrue = value is submitted by the caller when triggering the Guard. Use for runtime-context-dependent values like order address, user address. The 'value' field is ignored when b_submission=true; the caller must provide it via submissions[]. \n\nfalse = value is static, set at Guard creation time. Use for values known when the Guard is created: expected node names, expected merchant address, expected service address. The 'value' field must be populated and will be stored on-chain permanently. \n\nRule of thumb: if the value is the SAME for all future Guard triggers, use false. If the value DIFFERS per trigger (e.g., which order to release funds for), use true."
728
728
  },
729
729
  "value_type": {
730
730
  "anyOf": [
@@ -1691,7 +1691,7 @@
1691
1691
  "additionalProperties": false,
1692
1692
  "description": "Forward in Machine object"
1693
1693
  },
1694
- "description": "Forward list — operations to ENTER THIS NODE from prev_node. Example: pair {prev_node:'A', forwards:[{name:'Go'}]} means 'use Go to advance FROM A TO THIS NODE'. For initial node (prev_node=''), forwards are operations to enter this node from the start state. WARNING: forwards belong to the DESTINATION node's pair, NOT the source node. Placing a forward on the wrong pair will cause Progress to get stuck."
1694
+ "description": "Forward list — operations to ENTER THIS NODE from prev_node. SEMANTIC CLARIFICATION: forwards describe INCOMING transitions (how to ARRIVE at this node), NOT outgoing transitions. Think of each forward as an 'entry door' to this node. Example: pair {prev_node:'A', forwards:[{name:'Go'}]} means 'use Go to advance FROM A TO THIS NODE'. For initial node (prev_node=''), forwards are operations to enter this node from the start state. DIAGRAM: A --[Go]--> B means the pair belongs to node B (destination), with prev_node='A'. WARNING: forwards belong to the DESTINATION node's pair, NOT the source node. Placing a forward on the wrong pair will cause Progress to get stuck."
1695
1695
  }
1696
1696
  },
1697
1697
  "required": [
@@ -125,13 +125,14 @@
125
125
  "address": {
126
126
  "anyOf": [
127
127
  {
128
- "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/1/properties/entity/anyOf/0"
128
+ "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/1/properties/entity/anyOf/0/properties/name_or_address",
129
+ "description": "Account name, address (0x...), or mark name. When using string format, local marks are searched first. EXAMPLE: 'alice' - searches local marks first, then global; EXAMPLE: '0x2...' (64 hex chars) - uses address directly; EXAMPLE: '' - uses the default local account"
129
130
  },
130
131
  {
131
- "type": "string"
132
+ "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/1/properties/entity/anyOf/0"
132
133
  }
133
134
  ],
134
- "description": "User address or Guard ID whose permissions to check"
135
+ "description": "User address or Guard ID whose permissions to check. Supports string (name/address) or object form. LocalMark names are resolved automatically."
135
136
  },
136
137
  "no_cache": {
137
138
  "type": "boolean",
@@ -160,13 +161,13 @@
160
161
  "address": {
161
162
  "anyOf": [
162
163
  {
163
- "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/1/properties/entity/anyOf/0"
164
+ "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/2/properties/address/anyOf/0"
164
165
  },
165
166
  {
166
- "type": "string"
167
+ "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/1/properties/entity/anyOf/0"
167
168
  }
168
169
  ],
169
- "description": "User address to look up in the global EntityRegistrar"
170
+ "description": "User address to look up in the global EntityRegistrar. Supports string (name/address) or object form. LocalMark names are resolved automatically."
170
171
  },
171
172
  "no_cache": {
172
173
  "type": "boolean",
@@ -194,13 +195,13 @@
194
195
  "address": {
195
196
  "anyOf": [
196
197
  {
197
- "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/1/properties/entity/anyOf/0"
198
+ "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/2/properties/address/anyOf/0"
198
199
  },
199
200
  {
200
- "type": "string"
201
+ "$ref": "#/definitions/onchain_table_data/anyOf/0/anyOf/1/properties/entity/anyOf/0"
201
202
  }
202
203
  ],
203
- "description": "Entity address whose community votes/endorsements to query"
204
+ "description": "Entity address whose community votes/endorsements to query. Supports string (name/address) or object form. LocalMark names are resolved automatically."
204
205
  },
205
206
  "no_cache": {
206
207
  "type": "boolean",