@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.
- package/README.md +13 -9
- package/dist/customer/customer-advice.d.ts +31 -0
- package/dist/customer/customer-advice.js +129 -0
- package/dist/customer/index.d.ts +2 -0
- package/dist/customer/index.js +2 -0
- package/dist/customer/info-puzzle.d.ts +8 -1
- package/dist/customer/info-puzzle.js +30 -5
- package/dist/customer/order-monitor.d.ts +2 -0
- package/dist/customer/order-monitor.js +3 -2
- package/dist/customer/post-purchase.d.ts +2 -0
- package/dist/customer/post-purchase.js +6 -5
- package/dist/customer/preorder-compare.d.ts +24 -0
- package/dist/customer/preorder-compare.js +34 -0
- package/dist/customer/reminder-system.d.ts +2 -0
- package/dist/customer/reminder-system.js +2 -1
- package/dist/customer/risk-assessment.js +4 -3
- package/dist/customer/types.d.ts +5 -0
- package/dist/examples/arbitration-dispute-create.json +41 -0
- package/dist/examples/arbitration-vote-weighted.json +35 -0
- package/dist/examples/arbitration-voting-guard-add.json +38 -0
- package/dist/examples/demand-present-service.json +33 -0
- package/dist/examples/gen-passport-verify-guard.json +48 -0
- package/dist/examples/guard-template-balance-check.json +36 -15
- package/dist/examples/guard-template-time-lock.json +33 -12
- package/dist/examples/insurance-guard-claim-timelock.json +75 -0
- package/dist/examples/insurance-guard-withdraw-allocation.json +96 -0
- package/dist/examples/insurance-machine-create-publish.json +75 -0
- package/dist/examples/insurance-service-allocators-publish.json +56 -0
- package/dist/examples/machine-multisig-threshold.json +86 -0
- package/dist/examples/machine-template-7node-rental.json +99 -94
- package/dist/examples/payment-scenario-bound.json +45 -0
- package/dist/examples/rental-ziroom-machine-create.json +126 -114
- package/dist/examples/rental-ziroom-permission-create.json +10 -3
- package/dist/examples/rental-ziroom-service-create.json +27 -18
- package/dist/examples/retail-adv-guard-customer-win-create.json +80 -0
- package/dist/examples/retail-adv-guard-messenger-proof-create.json +65 -0
- package/dist/examples/retail-adv-guard-reward-timeout-create.json +92 -0
- package/dist/examples/retail-adv-reward-guard-add.json +51 -0
- package/dist/examples/retail-myshop-allocation-activate.json +55 -0
- package/dist/examples/retail-myshop-arbitration-create.json +40 -0
- package/dist/examples/retail-myshop-contact-create.json +43 -0
- package/dist/examples/retail-myshop-order-create.json +56 -0
- package/dist/examples/retail-myshop-progress-operate.json +38 -0
- package/dist/examples/retail-myshop-reward-create.json +35 -0
- package/dist/examples/service-discount-issue.json +46 -0
- package/dist/examples/threebody-guard-create.json +56 -0
- package/dist/examples/threebody-machine-create.json +72 -0
- package/dist/examples/threebody-permission-create.json +38 -0
- package/dist/examples/threebody-service-allocators.json +49 -0
- package/dist/examples/travel-guard-time-lock.json +69 -0
- package/dist/examples/travel-guard-weather-oracle.json +70 -0
- package/dist/examples/travel-machine-create.json +136 -0
- package/dist/examples/travel-repository-create.json +47 -0
- package/dist/examples/travel-service-create.json +102 -0
- package/dist/examples/travel-treasury-create.json +34 -0
- package/dist/examples/treasury-deposit.json +37 -0
- package/dist/examples/treasury-withdraw.json +38 -0
- package/dist/extensions/business-modules.d.ts +49 -0
- package/dist/extensions/business-modules.js +287 -0
- package/dist/extensions/capability-manifest.js +192 -5
- package/dist/extensions/constraint-registry.js +3 -1
- package/dist/extensions/modes.js +10 -4
- package/dist/extensions/registry.d.ts +14 -9
- package/dist/extensions/registry.js +69 -14
- package/dist/extensions/types.d.ts +1 -0
- package/dist/knowledge/fund-layer.d.ts +67 -1
- package/dist/knowledge/fund-layer.js +561 -12
- package/dist/knowledge/guard-templates.d.ts +10 -0
- package/dist/knowledge/guard-templates.js +50 -0
- package/dist/knowledge/index.d.ts +2 -2
- package/dist/knowledge/index.js +2 -2
- package/dist/knowledge/machine-risk.js +4 -1
- package/dist/knowledge/progress-context.js +1 -1
- package/dist/knowledge/progress-ledger.js +3 -3
- package/dist/knowledge/progress-templates.js +1 -1
- package/dist/knowledge/progress-translation.js +1 -1
- package/dist/knowledge/safety-rules.d.ts +83 -1
- package/dist/knowledge/safety-rules.js +166 -2
- package/dist/knowledge/scenario-modes.d.ts +1 -1
- package/dist/knowledge/scenario-modes.js +13 -11
- package/dist/knowledge/template-registry.d.ts +48 -0
- package/dist/knowledge/template-registry.js +341 -0
- package/dist/knowledge/tool-constraints.js +6 -6
- package/dist/knowledge/tools-reference.js +11 -8
- package/dist/participation/merchant-interest.d.ts +32 -0
- package/dist/participation/merchant-interest.js +100 -0
- package/dist/participation/radar-core.d.ts +104 -0
- package/dist/participation/radar-core.js +269 -0
- package/dist/project/context-assembly.js +8 -0
- package/dist/project/edit-planner.js +27 -56
- package/dist/project/evaluation.d.ts +36 -0
- package/dist/project/evaluation.js +422 -56
- package/dist/project/game-theory.d.ts +43 -0
- package/dist/project/game-theory.js +177 -0
- package/dist/project/graph-builder.js +1 -0
- package/dist/project/handlers.d.ts +38 -0
- package/dist/project/handlers.js +65 -35
- package/dist/project/intent-analyzer.d.ts +71 -0
- package/dist/project/intent-analyzer.js +149 -0
- package/dist/project/machine-nodes.d.ts +2 -0
- package/dist/project/machine-nodes.js +36 -0
- package/dist/project/merchant-guide.d.ts +165 -0
- package/dist/project/merchant-guide.js +264 -0
- package/dist/project/mode-actions.d.ts +199 -0
- package/dist/project/mode-actions.js +309 -0
- package/dist/project/participation-radar.d.ts +18 -0
- package/dist/project/participation-radar.js +428 -0
- package/dist/project/pipeline-actions.d.ts +101 -0
- package/dist/project/pipeline-actions.js +109 -0
- package/dist/project/semantic-graph.d.ts +95 -0
- package/dist/project/semantic-graph.js +245 -0
- package/dist/schema/call/allocation.d.ts +11 -11
- package/dist/schema/call/allocation.js +11 -1
- package/dist/schema/call/arbitration.d.ts +21 -21
- package/dist/schema/call/arbitration.js +17 -9
- package/dist/schema/call/base.d.ts +2 -2
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +127 -127
- package/dist/schema/call/bridge.js +12 -12
- package/dist/schema/call/contact.d.ts +3 -3
- package/dist/schema/call/demand.d.ts +3 -3
- package/dist/schema/call/guard.d.ts +11 -11
- package/dist/schema/call/guard.js +1 -1
- package/dist/schema/call/machine.d.ts +216 -21
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/order.d.ts +7 -7
- package/dist/schema/call/payment.d.ts +3 -3
- package/dist/schema/call/permission.d.ts +3 -3
- package/dist/schema/call/personal.d.ts +337 -3
- package/dist/schema/call/personal.js +10 -0
- package/dist/schema/call/progress.d.ts +177 -9
- package/dist/schema/call/progress.js +7 -3
- package/dist/schema/call/proof.d.ts +6 -6
- package/dist/schema/call/repository.d.ts +3 -3
- package/dist/schema/call/reward.d.ts +57 -57
- package/dist/schema/call/semantic.js +41 -1
- package/dist/schema/call/service.d.ts +114 -114
- package/dist/schema/call/service.js +11 -2
- package/dist/schema/call/treasury.d.ts +57 -57
- package/dist/schema/messenger/index.js +4 -1
- package/dist/schema/operations.d.ts +713 -291
- package/dist/schema/operations.js +33 -0
- package/dist/schema/project/index.d.ts +4635 -100
- package/dist/schema/project/index.js +868 -1
- package/dist/schema/query/index.d.ts +363 -19
- package/dist/schema/query/index.js +25 -3
- package/dist/schema/schema-query/index.d.ts +13 -7
- package/dist/schema/schema-query/index.js +29 -5
- package/dist/schema/trust/index.d.ts +1012 -6
- package/dist/schema/trust/index.js +212 -11
- package/dist/schema/utils/skills-recommendation.js +1 -0
- package/dist/schema-query/index.d.ts +4 -1
- package/dist/schema-query/index.js +255 -1
- package/dist/schemas/bridge_operation.schema.json +14 -7
- package/dist/schemas/guard2file.schema.json +2 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/machineNode2file.schema.json +2 -0
- package/dist/schemas/messenger_operation.schema.json +1 -1
- package/dist/schemas/onchain_operations.schema.json +143 -15
- package/dist/schemas/onchain_operations_allocation.schema.json +2 -1
- package/dist/schemas/onchain_operations_arbitration.schema.json +7 -5
- package/dist/schemas/onchain_operations_contact.schema.json +1 -0
- package/dist/schemas/onchain_operations_demand.schema.json +1 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -0
- package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -0
- package/dist/schemas/onchain_operations_guard.schema.json +578 -0
- package/dist/schemas/onchain_operations_machine.schema.json +1 -0
- package/dist/schemas/onchain_operations_order.schema.json +4 -3
- package/dist/schemas/onchain_operations_payment.schema.json +1 -0
- package/dist/schemas/onchain_operations_permission.schema.json +1 -0
- package/dist/schemas/onchain_operations_personal.schema.json +37 -0
- package/dist/schemas/onchain_operations_progress.schema.json +90 -3
- package/dist/schemas/onchain_operations_proof.schema.json +1 -0
- package/dist/schemas/onchain_operations_repository.schema.json +1 -0
- package/dist/schemas/onchain_operations_reward.schema.json +1 -0
- package/dist/schemas/onchain_operations_service.schema.json +4 -3
- package/dist/schemas/onchain_operations_treasury.schema.json +1 -0
- package/dist/schemas/project_operation.output.json +2243 -1
- package/dist/schemas/project_operation.schema.json +683 -1
- package/dist/schemas/query_toolkit.output.json +1 -1
- package/dist/schemas/query_toolkit.schema.json +37 -0
- package/dist/schemas/schema_query.output.json +1 -1
- package/dist/schemas/schema_query.schema.json +30 -5
- package/dist/schemas/trust_score.output.json +392 -1
- package/dist/schemas/trust_score.schema.json +275 -1
- package/dist/tools/handlers/onchain.js +73 -8
- package/dist/tools/handlers/project.js +46 -0
- package/dist/tools/handlers/query.js +117 -2
- package/dist/tools/handlers/schema-query.js +41 -0
- package/dist/tools/handlers/trust.js +192 -6
- package/dist/tools/index.js +52 -9
- package/dist/tools/wrap.js +194 -15
- 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
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"namedOperator": ""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
"
|
|
112
|
-
"
|
|
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
|
|
3
|
-
"description": "
|
|
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
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"weight": 1,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"weight": 1,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
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":
|
|
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
|
}
|