@wowok/agent-mcp 2.6.3 → 2.6.6

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 (193) hide show
  1. package/README.md +13 -9
  2. package/dist/customer/customer-advice.d.ts +31 -0
  3. package/dist/customer/customer-advice.js +129 -0
  4. package/dist/customer/index.d.ts +2 -0
  5. package/dist/customer/index.js +2 -0
  6. package/dist/customer/info-puzzle.d.ts +8 -1
  7. package/dist/customer/info-puzzle.js +30 -5
  8. package/dist/customer/order-monitor.d.ts +2 -0
  9. package/dist/customer/order-monitor.js +3 -2
  10. package/dist/customer/post-purchase.d.ts +2 -0
  11. package/dist/customer/post-purchase.js +6 -5
  12. package/dist/customer/preorder-compare.d.ts +24 -0
  13. package/dist/customer/preorder-compare.js +34 -0
  14. package/dist/customer/reminder-system.d.ts +2 -0
  15. package/dist/customer/reminder-system.js +2 -1
  16. package/dist/customer/risk-assessment.js +4 -3
  17. package/dist/customer/types.d.ts +5 -0
  18. package/dist/examples/arbitration-dispute-create.json +41 -0
  19. package/dist/examples/arbitration-vote-weighted.json +35 -0
  20. package/dist/examples/arbitration-voting-guard-add.json +38 -0
  21. package/dist/examples/demand-present-service.json +33 -0
  22. package/dist/examples/gen-passport-verify-guard.json +48 -0
  23. package/dist/examples/guard-template-balance-check.json +36 -15
  24. package/dist/examples/guard-template-time-lock.json +33 -12
  25. package/dist/examples/insurance-guard-claim-timelock.json +75 -0
  26. package/dist/examples/insurance-guard-withdraw-allocation.json +96 -0
  27. package/dist/examples/insurance-machine-create-publish.json +75 -0
  28. package/dist/examples/insurance-service-allocators-publish.json +56 -0
  29. package/dist/examples/machine-multisig-threshold.json +86 -0
  30. package/dist/examples/machine-template-7node-rental.json +99 -94
  31. package/dist/examples/payment-scenario-bound.json +45 -0
  32. package/dist/examples/rental-ziroom-machine-create.json +126 -114
  33. package/dist/examples/rental-ziroom-permission-create.json +10 -3
  34. package/dist/examples/rental-ziroom-service-create.json +27 -18
  35. package/dist/examples/retail-adv-guard-customer-win-create.json +80 -0
  36. package/dist/examples/retail-adv-guard-messenger-proof-create.json +65 -0
  37. package/dist/examples/retail-adv-guard-reward-timeout-create.json +92 -0
  38. package/dist/examples/retail-adv-reward-guard-add.json +51 -0
  39. package/dist/examples/retail-myshop-allocation-activate.json +55 -0
  40. package/dist/examples/retail-myshop-arbitration-create.json +40 -0
  41. package/dist/examples/retail-myshop-contact-create.json +43 -0
  42. package/dist/examples/retail-myshop-order-create.json +56 -0
  43. package/dist/examples/retail-myshop-progress-operate.json +38 -0
  44. package/dist/examples/retail-myshop-reward-create.json +35 -0
  45. package/dist/examples/service-discount-issue.json +46 -0
  46. package/dist/examples/threebody-guard-create.json +56 -0
  47. package/dist/examples/threebody-machine-create.json +72 -0
  48. package/dist/examples/threebody-permission-create.json +38 -0
  49. package/dist/examples/threebody-service-allocators.json +49 -0
  50. package/dist/examples/travel-guard-time-lock.json +69 -0
  51. package/dist/examples/travel-guard-weather-oracle.json +70 -0
  52. package/dist/examples/travel-machine-create.json +136 -0
  53. package/dist/examples/travel-repository-create.json +47 -0
  54. package/dist/examples/travel-service-create.json +102 -0
  55. package/dist/examples/travel-treasury-create.json +34 -0
  56. package/dist/examples/treasury-deposit.json +37 -0
  57. package/dist/examples/treasury-withdraw.json +38 -0
  58. package/dist/extensions/business-modules.d.ts +49 -0
  59. package/dist/extensions/business-modules.js +287 -0
  60. package/dist/extensions/capability-manifest.js +192 -5
  61. package/dist/extensions/constraint-registry.js +3 -1
  62. package/dist/extensions/modes.js +10 -4
  63. package/dist/extensions/registry.d.ts +14 -9
  64. package/dist/extensions/registry.js +69 -14
  65. package/dist/extensions/types.d.ts +1 -0
  66. package/dist/knowledge/fund-layer.d.ts +67 -1
  67. package/dist/knowledge/fund-layer.js +561 -12
  68. package/dist/knowledge/guard-templates.d.ts +10 -0
  69. package/dist/knowledge/guard-templates.js +50 -0
  70. package/dist/knowledge/index.d.ts +2 -2
  71. package/dist/knowledge/index.js +2 -2
  72. package/dist/knowledge/machine-risk.js +4 -1
  73. package/dist/knowledge/progress-context.js +1 -1
  74. package/dist/knowledge/progress-ledger.js +3 -3
  75. package/dist/knowledge/progress-templates.js +1 -1
  76. package/dist/knowledge/progress-translation.js +1 -1
  77. package/dist/knowledge/safety-rules.d.ts +83 -1
  78. package/dist/knowledge/safety-rules.js +166 -2
  79. package/dist/knowledge/scenario-modes.d.ts +1 -1
  80. package/dist/knowledge/scenario-modes.js +13 -11
  81. package/dist/knowledge/template-registry.d.ts +48 -0
  82. package/dist/knowledge/template-registry.js +341 -0
  83. package/dist/knowledge/tool-constraints.js +6 -6
  84. package/dist/knowledge/tools-reference.js +11 -8
  85. package/dist/participation/merchant-interest.d.ts +32 -0
  86. package/dist/participation/merchant-interest.js +100 -0
  87. package/dist/participation/radar-core.d.ts +104 -0
  88. package/dist/participation/radar-core.js +269 -0
  89. package/dist/project/context-assembly.js +8 -0
  90. package/dist/project/edit-planner.js +27 -56
  91. package/dist/project/evaluation.d.ts +36 -0
  92. package/dist/project/evaluation.js +422 -56
  93. package/dist/project/game-theory.d.ts +43 -0
  94. package/dist/project/game-theory.js +177 -0
  95. package/dist/project/graph-builder.js +1 -0
  96. package/dist/project/handlers.d.ts +38 -0
  97. package/dist/project/handlers.js +65 -35
  98. package/dist/project/intent-analyzer.d.ts +71 -0
  99. package/dist/project/intent-analyzer.js +149 -0
  100. package/dist/project/machine-nodes.d.ts +2 -0
  101. package/dist/project/machine-nodes.js +36 -0
  102. package/dist/project/merchant-guide.d.ts +165 -0
  103. package/dist/project/merchant-guide.js +264 -0
  104. package/dist/project/mode-actions.d.ts +199 -0
  105. package/dist/project/mode-actions.js +309 -0
  106. package/dist/project/participation-radar.d.ts +18 -0
  107. package/dist/project/participation-radar.js +428 -0
  108. package/dist/project/pipeline-actions.d.ts +101 -0
  109. package/dist/project/pipeline-actions.js +109 -0
  110. package/dist/project/semantic-graph.d.ts +95 -0
  111. package/dist/project/semantic-graph.js +245 -0
  112. package/dist/schema/call/allocation.d.ts +11 -11
  113. package/dist/schema/call/allocation.js +11 -1
  114. package/dist/schema/call/arbitration.d.ts +21 -21
  115. package/dist/schema/call/arbitration.js +17 -9
  116. package/dist/schema/call/base.d.ts +2 -2
  117. package/dist/schema/call/base.js +1 -1
  118. package/dist/schema/call/bridge.d.ts +127 -127
  119. package/dist/schema/call/bridge.js +12 -12
  120. package/dist/schema/call/contact.d.ts +3 -3
  121. package/dist/schema/call/demand.d.ts +3 -3
  122. package/dist/schema/call/guard.d.ts +11 -11
  123. package/dist/schema/call/guard.js +1 -1
  124. package/dist/schema/call/machine.d.ts +216 -21
  125. package/dist/schema/call/machine.js +1 -1
  126. package/dist/schema/call/order.d.ts +7 -7
  127. package/dist/schema/call/payment.d.ts +3 -3
  128. package/dist/schema/call/permission.d.ts +3 -3
  129. package/dist/schema/call/personal.d.ts +337 -3
  130. package/dist/schema/call/personal.js +10 -0
  131. package/dist/schema/call/progress.d.ts +177 -9
  132. package/dist/schema/call/progress.js +7 -3
  133. package/dist/schema/call/proof.d.ts +6 -6
  134. package/dist/schema/call/repository.d.ts +3 -3
  135. package/dist/schema/call/reward.d.ts +57 -57
  136. package/dist/schema/call/semantic.js +41 -1
  137. package/dist/schema/call/service.d.ts +114 -114
  138. package/dist/schema/call/service.js +11 -2
  139. package/dist/schema/call/treasury.d.ts +57 -57
  140. package/dist/schema/messenger/index.js +4 -1
  141. package/dist/schema/operations.d.ts +713 -291
  142. package/dist/schema/operations.js +33 -0
  143. package/dist/schema/project/index.d.ts +4635 -100
  144. package/dist/schema/project/index.js +868 -1
  145. package/dist/schema/query/index.d.ts +363 -19
  146. package/dist/schema/query/index.js +25 -3
  147. package/dist/schema/schema-query/index.d.ts +13 -7
  148. package/dist/schema/schema-query/index.js +29 -5
  149. package/dist/schema/trust/index.d.ts +1012 -6
  150. package/dist/schema/trust/index.js +212 -11
  151. package/dist/schema/utils/skills-recommendation.js +1 -0
  152. package/dist/schema-query/index.d.ts +4 -1
  153. package/dist/schema-query/index.js +255 -1
  154. package/dist/schemas/bridge_operation.schema.json +14 -7
  155. package/dist/schemas/guard2file.schema.json +2 -0
  156. package/dist/schemas/index.json +1 -1
  157. package/dist/schemas/machineNode2file.schema.json +2 -0
  158. package/dist/schemas/messenger_operation.schema.json +1 -1
  159. package/dist/schemas/onchain_operations.schema.json +143 -15
  160. package/dist/schemas/onchain_operations_allocation.schema.json +2 -1
  161. package/dist/schemas/onchain_operations_arbitration.schema.json +7 -5
  162. package/dist/schemas/onchain_operations_contact.schema.json +1 -0
  163. package/dist/schemas/onchain_operations_demand.schema.json +1 -0
  164. package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -0
  165. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -0
  166. package/dist/schemas/onchain_operations_guard.schema.json +578 -0
  167. package/dist/schemas/onchain_operations_machine.schema.json +1 -0
  168. package/dist/schemas/onchain_operations_order.schema.json +4 -3
  169. package/dist/schemas/onchain_operations_payment.schema.json +1 -0
  170. package/dist/schemas/onchain_operations_permission.schema.json +1 -0
  171. package/dist/schemas/onchain_operations_personal.schema.json +37 -0
  172. package/dist/schemas/onchain_operations_progress.schema.json +90 -3
  173. package/dist/schemas/onchain_operations_proof.schema.json +1 -0
  174. package/dist/schemas/onchain_operations_repository.schema.json +1 -0
  175. package/dist/schemas/onchain_operations_reward.schema.json +1 -0
  176. package/dist/schemas/onchain_operations_service.schema.json +4 -3
  177. package/dist/schemas/onchain_operations_treasury.schema.json +1 -0
  178. package/dist/schemas/project_operation.output.json +2243 -1
  179. package/dist/schemas/project_operation.schema.json +683 -1
  180. package/dist/schemas/query_toolkit.output.json +1 -1
  181. package/dist/schemas/query_toolkit.schema.json +37 -0
  182. package/dist/schemas/schema_query.output.json +1 -1
  183. package/dist/schemas/schema_query.schema.json +30 -5
  184. package/dist/schemas/trust_score.output.json +392 -1
  185. package/dist/schemas/trust_score.schema.json +275 -1
  186. package/dist/tools/handlers/onchain.js +73 -8
  187. package/dist/tools/handlers/project.js +46 -0
  188. package/dist/tools/handlers/query.js +117 -2
  189. package/dist/tools/handlers/schema-query.js +41 -0
  190. package/dist/tools/handlers/trust.js +192 -6
  191. package/dist/tools/index.js +52 -9
  192. package/dist/tools/wrap.js +194 -15
  193. package/package.json +2 -2
@@ -0,0 +1,86 @@
1
+ {
2
+ "title": "Machine Template: 2-of-3 Multi-Sig Approval Workflow (threshold > 1)",
3
+ "description": "Four-node workflow where the 'approved' node requires cumulative weight 2 from three distinct approver forwards (permissionIndex 1001/1002/1003, weight 1 each) — the on-chain multi-signature approval pattern.",
4
+ "tags": ["machine", "template", "multisig", "threshold", "approval", "governance"],
5
+ "industry": "general",
6
+ "operation_type": "machine",
7
+ "source": "constructed under T-09 authorization; grounded in MachineNodePairSchema threshold + MachineForwardSchema weight — schema-validated, not chain-verified",
8
+ "verified": false,
9
+ "network": "testnet",
10
+ "call": {
11
+ "tool": "onchain_operations",
12
+ "operation_type": "machine",
13
+ "data": {
14
+ "object": {
15
+ "name": "multisig_approval_machine"
16
+ },
17
+ "node": {
18
+ "op": "add",
19
+ "bReplace": true,
20
+ "nodes": [
21
+ {
22
+ "name": "submitted",
23
+ "pairs": [
24
+ {
25
+ "prev_node": "",
26
+ "threshold": 1,
27
+ "forwards": [
28
+ { "name": "Submit", "weight": 1, "namedOperator": "" }
29
+ ]
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "name": "under_review",
35
+ "pairs": [
36
+ {
37
+ "prev_node": "submitted",
38
+ "threshold": 1,
39
+ "forwards": [
40
+ { "name": "Start Review", "weight": 1, "permissionIndex": 1000 }
41
+ ]
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "name": "approved",
47
+ "pairs": [
48
+ {
49
+ "prev_node": "under_review",
50
+ "threshold": 2,
51
+ "forwards": [
52
+ { "name": "Approve Alice", "weight": 1, "permissionIndex": 1001 },
53
+ { "name": "Approve Bob", "weight": 1, "permissionIndex": 1002 },
54
+ { "name": "Approve Carol", "weight": 1, "permissionIndex": 1003 }
55
+ ]
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "name": "completed",
61
+ "pairs": [
62
+ {
63
+ "prev_node": "approved",
64
+ "threshold": 1,
65
+ "forwards": [
66
+ { "name": "Finalize", "weight": 1, "permissionIndex": 1000 }
67
+ ]
68
+ }
69
+ ]
70
+ }
71
+ ]
72
+ }
73
+ },
74
+ "env": {
75
+ "network": "testnet"
76
+ }
77
+ },
78
+ "notes": [
79
+ "MULTI-SIG MECHANICS: pair threshold=2 means Progress advances from 'under_review' to 'approved' only when the CUMULATIVE weight of completed DISTINCT forwards on that pair reaches 2. Each of the three approver forwards contributes weight 1, so any 2 of the 3 approvers must act — a 2-of-3 signature scheme.",
80
+ "Each approver calls progress operate with their OWN forward name (e.g. 'Approve Alice'). The same forward cannot be double-counted; distinct forwards by the same operator would still count separately, so map each forward to a distinct permissionIndex (1001/1002/1003 = three approver roles in the Permission table).",
81
+ "threshold semantics (MachineNodePairSchema): 'If total Forward weight is greater than or equal to threshold, node advancement is triggered.' Weighted variants are possible — e.g. give a senior approver weight 2 so they can approve alone (threshold 2 met by one forward).",
82
+ "Entry-node rule: 'submitted' has prev_node='' with at least one forward (schema-enforced FIX-002). namedOperator='' = order owner; permissionIndex references Permission table entries.",
83
+ "Compare with machine-template-7node-rental.json where every pair uses threshold 1 (single-signature sequential flow).",
84
+ "This Machine is a TEMPLATE object: bind it to a Service and each order gets a Progress instance whose multi-sig approvals are tracked per order."
85
+ ]
86
+ }
@@ -1,11 +1,12 @@
1
1
  {
2
- "title": "Machine Template: 7-Node Rental Workflow (Simplified)",
3
- "description": "Simplified rental workflow without damage/arbitration paths",
4
- "tags": ["machine", "template", "rental", "simplified"],
2
+ "title": "Machine Template: 7-Node Rental Workflow (Simplified, R-M1-11 Compliant)",
3
+ "description": "Simplified rental workflow without damage/arbitration paths. Refund flows through an Allocator triggered by the return_approved routing node — never through a Machine terminal node.",
4
+ "tags": ["machine", "template", "rental", "simplified", "r-m1-11"],
5
5
  "industry": "rental",
6
6
  "operation_type": "machine",
7
7
  "source": "template",
8
8
  "verified": true,
9
+ "network": "testnet",
9
10
  "call": {
10
11
  "tool": "onchain_operations",
11
12
  "operation_type": "machine",
@@ -13,102 +14,106 @@
13
14
  "object": {
14
15
  "name": "rental_machine_simple"
15
16
  },
16
- "nodes": [
17
- {
18
- "name": "reserved",
19
- "pairs": [
20
- {
21
- "prev_node": "",
22
- "threshold": 0,
23
- "forwards": [
24
- {
25
- "name": "Pay",
26
- "weight": 1,
27
- "namedOperator": "",
28
- "permissionIndex": null
29
- }
30
- ]
31
- }
32
- ]
33
- },
34
- {
35
- "name": "paid",
36
- "pairs": [
37
- {
38
- "prev_node": "reserved",
39
- "threshold": 1,
40
- "forwards": [
41
- {
42
- "name": "Deliver",
43
- "weight": 1,
44
- "namedOperator": null,
45
- "permissionIndex": 1000
46
- }
47
- ]
48
- }
49
- ]
50
- },
51
- {
52
- "name": "in_use",
53
- "pairs": [
54
- {
55
- "prev_node": "paid",
56
- "threshold": 1,
57
- "forwards": [
58
- {
59
- "name": "Return",
60
- "weight": 1,
61
- "namedOperator": "",
62
- "permissionIndex": null
63
- }
64
- ]
65
- }
66
- ]
67
- },
68
- {
69
- "name": "returned",
70
- "pairs": [
71
- {
72
- "prev_node": "in_use",
73
- "threshold": 1,
74
- "forwards": [
75
- {
76
- "name": "Inspect",
77
- "weight": 1,
78
- "namedOperator": null,
79
- "permissionIndex": 1001
80
- }
81
- ]
82
- }
83
- ]
84
- },
85
- {
86
- "name": "inspected",
87
- "pairs": [
88
- {
89
- "prev_node": "returned",
90
- "threshold": 1,
91
- "forwards": [
92
- {
93
- "name": "Refund",
94
- "weight": 1,
95
- "namedOperator": null,
96
- "permissionIndex": 1002
97
- }
98
- ]
99
- }
100
- ]
101
- },
102
- { "name": "refunded", "pairs": [] },
103
- { "name": "completed", "pairs": [] }
104
- ]
17
+ "node": {
18
+ "op": "add",
19
+ "bReplace": true,
20
+ "nodes": [
21
+ {
22
+ "name": "reserved",
23
+ "pairs": [
24
+ {
25
+ "prev_node": "",
26
+ "threshold": 1,
27
+ "forwards": [
28
+ { "name": "Pay", "weight": 1, "namedOperator": "" }
29
+ ]
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "name": "paid",
35
+ "pairs": [
36
+ {
37
+ "prev_node": "reserved",
38
+ "threshold": 1,
39
+ "forwards": [
40
+ { "name": "Confirm Payment", "weight": 1, "permissionIndex": 1000 }
41
+ ]
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "name": "in_use",
47
+ "pairs": [
48
+ {
49
+ "prev_node": "paid",
50
+ "threshold": 1,
51
+ "forwards": [
52
+ { "name": "Deliver Item", "weight": 1, "permissionIndex": 1000 }
53
+ ]
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "name": "returned",
59
+ "pairs": [
60
+ {
61
+ "prev_node": "in_use",
62
+ "threshold": 1,
63
+ "forwards": [
64
+ { "name": "Return Item", "weight": 1, "namedOperator": "" }
65
+ ]
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "name": "inspected",
71
+ "pairs": [
72
+ {
73
+ "prev_node": "returned",
74
+ "threshold": 1,
75
+ "forwards": [
76
+ { "name": "Inspect", "weight": 1, "permissionIndex": 1001 }
77
+ ]
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "name": "return_approved",
83
+ "pairs": [
84
+ {
85
+ "prev_node": "inspected",
86
+ "threshold": 1,
87
+ "forwards": [
88
+ { "name": "Approve Return", "weight": 1, "permissionIndex": 1002 }
89
+ ]
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "name": "completed",
95
+ "pairs": [
96
+ {
97
+ "prev_node": "return_approved",
98
+ "threshold": 1,
99
+ "forwards": [
100
+ { "name": "Complete", "weight": 1, "permissionIndex": 1000 }
101
+ ]
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
105
107
  },
106
108
  "env": {
107
109
  "network": "testnet"
108
110
  }
109
111
  },
110
112
  "notes": [
111
- "Simplified version — no damage or arbitration paths",
112
- "Use for short-term rentals without damage risk"
113
+ "R-M1-11: 'return_approved' is a ROUTING node — the actual refund MUST be executed by an Allocator (bound via Service.order_allocators) whose Guard checks progress.current == 'return_approved'. A node named 'refunded' implies the Machine itself moves funds, which Machines cannot do; funds would lock in the Order escrow.",
114
+ "Forwards describe INCOMING transitions: the forward in a node's pair (prev_node='X') is the action that advances Progress FROM X INTO this node.",
115
+ "The entry node (prev_node='') MUST have at least one forward — schema-enforced (FIX-002).",
116
+ "namedOperator='' means OrderHolder (customer). permissionIndex references Permission table entries (1000=operator, 1001=inspector, 1002=finance).",
117
+ "Simplified version — no damage or arbitration paths. Use for short-term rentals without damage risk."
113
118
  ]
114
119
  }
@@ -0,0 +1,45 @@
1
+ {
2
+ "title": "Create Scenario-Bound Payment (for_object + for_guard)",
3
+ "description": "Create a Payment of 0.05 WOW to alice whose payment_info binds it to a Demand object and a KYC Guard, making the fund flow auditable against a business scenario.",
4
+ "tags": ["payment", "scenario", "for_object", "for_guard", "audit"],
5
+ "industry": "general",
6
+ "operation_type": "payment",
7
+ "source": "constructed under T-09 authorization; grounded in CallPayment_CreateSchema + PaymentInfoSchema — schema-validated, not chain-verified",
8
+ "verified": false,
9
+ "network": "testnet",
10
+ "call": {
11
+ "tool": "onchain_operations",
12
+ "operation_type": "payment",
13
+ "data": {
14
+ "object": {
15
+ "name": "kyc_bounty_payment_v1",
16
+ "type_parameter": "0x2::wow::WOW"
17
+ },
18
+ "revenue": [
19
+ {
20
+ "recipient": { "name_or_address": "alice" },
21
+ "amount": { "balance": 50000000 }
22
+ }
23
+ ],
24
+ "info": {
25
+ "for_object": "toy_repair_demand_v1",
26
+ "for_guard": "kyc_level_guard",
27
+ "remark": "Bounty payout for completed KYC verification demand",
28
+ "index": 0
29
+ }
30
+ },
31
+ "env": {
32
+ "network": "testnet",
33
+ "no_cache": true,
34
+ "confirmed": true
35
+ }
36
+ },
37
+ "notes": [
38
+ "SCENARIO BINDING: info.for_object ties the Payment to a business object (here the Demand it settles); info.for_guard ties it to the Guard whose verification justified the payout (here the KYC Guard). Both are optional but together make the payment self-describing on-chain — auditors can trace WHY the money moved.",
39
+ "Payment is IMMUTABLE once created: it can only be created, never modified. revenue[] is the full recipient/amount split in one shot (single recipient here; multiple entries split the total).",
40
+ "amount uses CoinParam {balance: <smallest unit>} — 50000000 = 0.05 WOW (9 decimals). recipient is AccountOrMark_Address OBJECT form {name_or_address}.",
41
+ "info.remark and info.index are REQUIRED (PaymentInfoSchema); index numbers the payment record for later reference by fees_transfer-style operations.",
42
+ "The OTHER payment mode (not shown): {object: '<coinwrapper_id>', receive: true, type_parameter: '0x2::wow::WOW'} unwraps a CoinWrapper received from an Allocation split into spendable coins — see CallPayment_ReceiveSchema and the allocation-activate example for the full flow.",
43
+ "type_parameter goes INSIDE 'object' (TypeNamedObjectSchema) and must match the coin being paid."
44
+ ]
45
+ }
@@ -1,10 +1,10 @@
1
1
  {
2
- "title": "Create 10-node Machine for Rental Lifecycle (Ziroom)",
3
- "description": "10-node workflow: reserved → paid_deposit → in_use → returned → inspected → deposit_refunded/damage_confirmed/arbiter_rule",
4
- "tags": ["machine", "rental", "workflow", "nodes", "permission_index"],
2
+ "title": "Create 9-Node Machine for Rental Lifecycle (Ziroom, R-M1-11 Compliant)",
3
+ "description": "9-node workflow: reserved → paid_deposit → in_use → returned → inspected, then three competing routing branches: return_approved (refund Allocator fires) / damage_confirmed (deduction Allocator fires) / arbiter_rule (off-Machine arbitration). completed follows return_approved.",
4
+ "tags": ["machine", "rental", "workflow", "nodes", "permission_index", "r-m1-11"],
5
5
  "industry": "rental",
6
6
  "operation_type": "machine",
7
- "source": "ziroom testnet deployment 2026-07-29",
7
+ "source": "ziroom testnet deployment 2026-07-29 (repaired to current schema + R-M1-11)",
8
8
  "verified": true,
9
9
  "network": "testnet",
10
10
  "call": {
@@ -14,114 +14,123 @@
14
14
  "object": {
15
15
  "name": "ziroom_machine_v1",
16
16
  "tags": ["rental", "machine"],
17
- "replaceExistName": true
17
+ "replaceExistName": true,
18
+ "permission": "ziroom_permission_v1"
18
19
  },
19
- "permission": "ziroom_permission_v1",
20
- "nodes": [
21
- {
22
- "name": "reserved",
23
- "pairs": [
24
- {
25
- "prev_node": "",
26
- "threshold": 0,
27
- "forwards": [
28
- {
29
- "name": "Pay Deposit",
30
- "weight": 1,
31
- "namedOperator": "",
32
- "permissionIndex": null
33
- }
34
- ]
35
- }
36
- ]
37
- },
38
- {
39
- "name": "paid_deposit",
40
- "pairs": [
41
- {
42
- "prev_node": "reserved",
43
- "threshold": 1,
44
- "forwards": [
45
- {
46
- "name": "Handover",
47
- "weight": 1,
48
- "namedOperator": null,
49
- "permissionIndex": 1000
50
- }
51
- ]
52
- }
53
- ]
54
- },
55
- {
56
- "name": "in_use",
57
- "pairs": [
58
- {
59
- "prev_node": "paid_deposit",
60
- "threshold": 1,
61
- "forwards": [
62
- {
63
- "name": "Return Keys",
64
- "weight": 1,
65
- "namedOperator": "",
66
- "permissionIndex": null
67
- }
68
- ]
69
- }
70
- ]
71
- },
72
- {
73
- "name": "returned",
74
- "pairs": [
75
- {
76
- "prev_node": "in_use",
77
- "threshold": 1,
78
- "forwards": [
79
- {
80
- "name": "Inspect",
81
- "weight": 1,
82
- "namedOperator": null,
83
- "permissionIndex": 1001
84
- }
85
- ]
86
- }
87
- ]
88
- },
89
- {
90
- "name": "inspected",
91
- "pairs": [
92
- {
93
- "prev_node": "returned",
94
- "threshold": 1,
95
- "forwards": [
96
- { "name": "Refund Deposit", "weight": 1, "namedOperator": null, "permissionIndex": 1002 },
97
- { "name": "Confirm Damage", "weight": 1, "namedOperator": null, "permissionIndex": 1001 },
98
- { "name": "Escalate Arbitration", "weight": 1, "namedOperator": null, "permissionIndex": 1500 }
99
- ]
100
- }
101
- ]
102
- },
103
- { "name": "deposit_refunded", "pairs": [] },
104
- { "name": "completed", "pairs": [] },
105
- {
106
- "name": "damage_confirmed",
107
- "pairs": [
108
- {
109
- "prev_node": "inspected",
110
- "threshold": 1,
111
- "forwards": [
112
- {
113
- "name": "Deduct Deposit",
114
- "weight": 1,
115
- "namedOperator": null,
116
- "permissionIndex": 1002
117
- }
118
- ]
119
- }
120
- ]
121
- },
122
- { "name": "deposit_deducted", "pairs": [] },
123
- { "name": "arbiter_rule", "pairs": [] }
124
- ]
20
+ "node": {
21
+ "op": "add",
22
+ "bReplace": true,
23
+ "nodes": [
24
+ {
25
+ "name": "reserved",
26
+ "pairs": [
27
+ {
28
+ "prev_node": "",
29
+ "threshold": 1,
30
+ "forwards": [
31
+ { "name": "Reserve", "weight": 1, "namedOperator": "" }
32
+ ]
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "name": "paid_deposit",
38
+ "pairs": [
39
+ {
40
+ "prev_node": "reserved",
41
+ "threshold": 1,
42
+ "forwards": [
43
+ { "name": "Pay Deposit", "weight": 1, "namedOperator": "" }
44
+ ]
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "name": "in_use",
50
+ "pairs": [
51
+ {
52
+ "prev_node": "paid_deposit",
53
+ "threshold": 1,
54
+ "forwards": [
55
+ { "name": "Handover", "weight": 1, "permissionIndex": 1000 }
56
+ ]
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "name": "returned",
62
+ "pairs": [
63
+ {
64
+ "prev_node": "in_use",
65
+ "threshold": 1,
66
+ "forwards": [
67
+ { "name": "Return Keys", "weight": 1, "namedOperator": "" }
68
+ ]
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "name": "inspected",
74
+ "pairs": [
75
+ {
76
+ "prev_node": "returned",
77
+ "threshold": 1,
78
+ "forwards": [
79
+ { "name": "Inspect", "weight": 1, "permissionIndex": 1001 }
80
+ ]
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "name": "return_approved",
86
+ "pairs": [
87
+ {
88
+ "prev_node": "inspected",
89
+ "threshold": 1,
90
+ "forwards": [
91
+ { "name": "Approve Refund", "weight": 1, "permissionIndex": 1002 }
92
+ ]
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "name": "damage_confirmed",
98
+ "pairs": [
99
+ {
100
+ "prev_node": "inspected",
101
+ "threshold": 1,
102
+ "forwards": [
103
+ { "name": "Confirm Damage", "weight": 1, "permissionIndex": 1001 }
104
+ ]
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "name": "arbiter_rule",
110
+ "pairs": [
111
+ {
112
+ "prev_node": "inspected",
113
+ "threshold": 1,
114
+ "forwards": [
115
+ { "name": "Escalate Arbitration", "weight": 1, "permissionIndex": 1500 }
116
+ ]
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "name": "completed",
122
+ "pairs": [
123
+ {
124
+ "prev_node": "return_approved",
125
+ "threshold": 1,
126
+ "forwards": [
127
+ { "name": "Complete", "weight": 1, "permissionIndex": 1000 }
128
+ ]
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
125
134
  },
126
135
  "env": {
127
136
  "network": "testnet",
@@ -130,8 +139,11 @@
130
139
  }
131
140
  },
132
141
  "notes": [
133
- "namedOperator='' means OrderHolder (customer), NOT 'anyone'",
134
- "permissionIndex maps to Permission table entries (1000=operator, 1001=inspector, 1002=finance, 1500=arbiter)",
135
- "Machine nodes are immutable after publish — create new Machine to change workflow"
142
+ "R-M1-11: return_approved / damage_confirmed / arbiter_rule are ROUTING nodes. Fund movement (deposit refund / deduction) MUST be executed by Allocators (Service.order_allocators) whose Guards check progress.current == <routing node>. Never name nodes 'deposit_refunded'/'deposit_deducted'/'refunded' — Machines have no fund movement primitive; misnamed nodes leave funds locked in the Order escrow.",
143
+ "The three branches from 'inspected' are competing pairs (each threshold=1): the first forward executed wins and the other branches are abandoned for this session.",
144
+ "Forwards describe INCOMING transitions: a forward in a node's pair (prev_node='X') advances Progress FROM X INTO this node.",
145
+ "permission lives INSIDE 'object' (NamedObjectWithPermissionSchema) — it references existing Permission 'ziroom_permission_v1' by LocalMark name.",
146
+ "namedOperator='' means OrderHolder (customer), NOT 'anyone'. permissionIndex maps to Permission table entries (1000=operator, 1001=inspector, 1002=finance, 1500=arbiter).",
147
+ "Machine nodes are immutable after publish — create a new Machine to change the workflow."
136
148
  ]
137
149
  }
@@ -4,8 +4,9 @@
4
4
  "tags": ["permission", "rental", "role", "index"],
5
5
  "industry": "rental",
6
6
  "operation_type": "permission",
7
- "source": "ziroom testnet deployment 2026-07-29",
7
+ "source": "ziroom testnet deployment 2026-07-29 (repaired to current schema)",
8
8
  "verified": true,
9
+ "network": "testnet",
9
10
  "call": {
10
11
  "tool": "onchain_operations",
11
12
  "operation_type": "permission",
@@ -18,7 +19,12 @@
18
19
  "table": {
19
20
  "op": "add perm by index",
20
21
  "index": 1000,
21
- "entity": ["0x51bd..."]
22
+ "entity": {
23
+ "entities": [
24
+ { "name_or_address": "ziroom_operator" }
25
+ ],
26
+ "check_all_founded": false
27
+ }
22
28
  }
23
29
  },
24
30
  "env": {
@@ -30,6 +36,7 @@
30
36
  "notes": [
31
37
  "Custom indexes range 1000-65535 (0-999 are protocol-reserved)",
32
38
  "Single Permission recommended for centralized control across all objects",
33
- "Use 'add perm by index' to grant one permission to many entities"
39
+ "Use 'add perm by index' to grant one permission to many entities",
40
+ "entity is ManyAccountOrMark_AddressSchema OBJECT form {entities: [{name_or_address}], check_all_founded?} — NOT a bare array (schema drift repair 2026-07-30: the 2026-07-29 deployment used the legacy array form; current schema requires the object wrapper). Recipient shown as the operator's local mark name; the original deployment used raw 0x addresses (desensitized)."
34
41
  ]
35
42
  }