@wowok/agent-mcp 2.5.1 → 2.5.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.
- package/dist/index.js +46 -6
- package/dist/knowledge/guard-design-patterns.js +104 -1
- package/dist/knowledge/guard-ledger.js +3 -3
- package/dist/knowledge/guard-lint.js +3 -3
- package/dist/knowledge/guard-risk.js +23 -15
- package/dist/knowledge/guard-templates.js +174 -2
- package/dist/knowledge/guard-translation.js +3 -3
- package/dist/knowledge/index.d.ts +3 -0
- package/dist/knowledge/index.js +9 -0
- package/dist/knowledge/machine-context.d.ts +1 -1
- package/dist/knowledge/machine-context.js +21 -0
- package/dist/knowledge/machine-ledger.d.ts +1 -0
- package/dist/knowledge/machine-ledger.js +31 -11
- package/dist/knowledge/machine-templates.js +32 -78
- package/dist/knowledge/mcp-schema-audit.js +3 -2
- package/dist/knowledge/overrides-loader.d.ts +13 -0
- package/dist/knowledge/overrides-loader.js +67 -0
- package/dist/knowledge/payment-risk.d.ts +4 -0
- package/dist/knowledge/payment-risk.js +67 -0
- package/dist/knowledge/repository-confirm.d.ts +4 -0
- package/dist/knowledge/repository-confirm.js +44 -0
- package/dist/knowledge/repository-risk.d.ts +8 -2
- package/dist/knowledge/repository-risk.js +61 -0
- package/dist/knowledge/repository-translation.js +23 -0
- package/dist/knowledge/scenario-modes.js +22 -5
- package/dist/knowledge/service-templates.js +38 -0
- package/dist/knowledge/treasury-templates.js +42 -0
- package/dist/loop-engineering/context-collect.d.ts +7 -0
- package/dist/loop-engineering/context-collect.js +83 -0
- package/dist/loop-engineering/improve.d.ts +29 -0
- package/dist/loop-engineering/improve.js +178 -0
- package/dist/project/business-puzzle.d.ts +1 -0
- package/dist/project/business-puzzle.js +11 -0
- package/dist/project/context-assembly.d.ts +16 -0
- package/dist/project/context-assembly.js +130 -0
- package/dist/project/deployment-doc.d.ts +126 -0
- package/dist/project/deployment-doc.js +632 -0
- package/dist/project/index.d.ts +25 -0
- package/dist/project/index.js +78 -0
- package/dist/project/migration.d.ts +22 -0
- package/dist/project/migration.js +125 -0
- package/dist/project/project-store.d.ts +110 -0
- package/dist/project/project-store.js +425 -0
- package/dist/project/risk-aggregator.d.ts +7 -0
- package/dist/project/risk-aggregator.js +15 -0
- package/dist/project/rollback-policy.d.ts +45 -0
- package/dist/project/rollback-policy.js +290 -0
- package/dist/project/stage-gate.d.ts +49 -0
- package/dist/project/stage-gate.js +310 -0
- package/dist/schema/call/allocation.d.ts +5 -0
- package/dist/schema/call/arbitration.d.ts +5 -0
- package/dist/schema/call/base.d.ts +3 -0
- package/dist/schema/call/base.js +3 -2
- package/dist/schema/call/bridge.d.ts +24 -0
- package/dist/schema/call/contact.d.ts +5 -0
- package/dist/schema/call/demand.d.ts +5 -0
- package/dist/schema/call/guard.d.ts +15 -0
- package/dist/schema/call/machine.d.ts +10 -0
- package/dist/schema/call/order.d.ts +5 -0
- package/dist/schema/call/payment.d.ts +5 -0
- package/dist/schema/call/permission.d.ts +5 -0
- package/dist/schema/call/personal.d.ts +5 -0
- package/dist/schema/call/progress.d.ts +5 -0
- package/dist/schema/call/proof.d.ts +10 -0
- package/dist/schema/call/repository.d.ts +5 -0
- package/dist/schema/call/reward.d.ts +5 -0
- package/dist/schema/call/service.d.ts +5 -0
- package/dist/schema/call/treasury.d.ts +5 -0
- package/dist/schema/operations.d.ts +210 -0
- package/dist/schema/operations.js +24 -0
- package/dist/schema/project/index.d.ts +2798 -85
- package/dist/schema/project/index.js +667 -2
- package/dist/schema/query/index.d.ts +601 -0
- package/dist/schema/query/index.js +61 -0
- package/dist/schemas/bridge_operation.schema.json +4 -0
- package/dist/schemas/guard2file.schema.json +4 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/machineNode2file.schema.json +4 -0
- package/dist/schemas/onchain_operations.schema.json +20 -0
- package/dist/schemas/onchain_operations_allocation.schema.json +4 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +4 -0
- package/dist/schemas/onchain_operations_contact.schema.json +4 -0
- package/dist/schemas/onchain_operations_demand.schema.json +4 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_proof.schema.json +8 -0
- package/dist/schemas/onchain_operations_guard.schema.json +4 -577
- package/dist/schemas/onchain_operations_machine.schema.json +4 -0
- package/dist/schemas/onchain_operations_order.schema.json +4 -0
- package/dist/schemas/onchain_operations_payment.schema.json +4 -0
- package/dist/schemas/onchain_operations_permission.schema.json +4 -0
- package/dist/schemas/onchain_operations_personal.schema.json +4 -0
- package/dist/schemas/onchain_operations_progress.schema.json +4 -0
- package/dist/schemas/onchain_operations_proof.schema.json +4 -0
- package/dist/schemas/onchain_operations_repository.schema.json +4 -0
- package/dist/schemas/onchain_operations_reward.schema.json +4 -0
- package/dist/schemas/onchain_operations_service.schema.json +4 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +4 -0
- package/dist/schemas/project_operation.output.json +1955 -0
- package/dist/schemas/project_operation.schema.json +133 -2
- package/dist/schemas/query_toolkit.output.json +407 -1
- package/dist/schemas/query_toolkit.schema.json +132 -0
- package/dist/tools/handlers/project.js +788 -2
- package/dist/tools/handlers/query.js +38 -2
- package/dist/tools/index.js +346 -37
- package/dist/tools/wrap.js +61 -7
- package/package.json +2 -2
- package/dist/schemas/onchain_operations.output.json +0 -2819
|
@@ -3,22 +3,25 @@ export const MACHINE_SCENES = [
|
|
|
3
3
|
id: "ecommerce_standard",
|
|
4
4
|
name: "Standard E-commerce Flow",
|
|
5
5
|
industry: ["ecommerce"],
|
|
6
|
-
scenario: "
|
|
6
|
+
scenario: "Paid (entry) → Ship → Receive → Complete",
|
|
7
7
|
participants: [
|
|
8
|
-
{ role: "customer", permission_type: "OrderHolder", involved_in: ["
|
|
8
|
+
{ role: "customer", permission_type: "OrderHolder", involved_in: ["Receive"] },
|
|
9
9
|
{ role: "merchant", permission_type: "Permission", involved_in: ["Ship"] },
|
|
10
10
|
],
|
|
11
11
|
recommended_patterns: ["P-M-SEQ"],
|
|
12
12
|
recommended_topology: ["P-M-LINEAR"],
|
|
13
13
|
guard_requirements: [
|
|
14
|
-
{ forward: "Ship", scene: "machine_forward_guard", purpose: "Verify
|
|
14
|
+
{ forward: "Ship", scene: "machine_forward_guard", purpose: "Verify order is paid (post-buy state)" },
|
|
15
15
|
{ forward: "Receive", scene: "machine_forward_guard", purpose: "Verify identity" },
|
|
16
16
|
],
|
|
17
17
|
allocation_integration: "Complete node -> Allocator distributes funds to merchant",
|
|
18
18
|
special_constraints: [
|
|
19
|
-
"
|
|
19
|
+
"First node 'Paid' represents post-payment state — buy() completes payment atomically before Progress is created",
|
|
20
|
+
"No separate 'Order' or 'Pay' nodes needed — payment is handled by Service.buy(), not Machine",
|
|
21
|
+
"All nodes after entry represent order processing (ship, receive, complete), NOT payment actions",
|
|
20
22
|
"Receipt auto-triggers fund allocation",
|
|
21
23
|
],
|
|
24
|
+
first_node_semantics: "Paid — order has been created and paid via Service.buy(); Machine starts at post-payment state",
|
|
22
25
|
mutable_after_publish: false,
|
|
23
26
|
m_rounds_focus: ["M1", "M2", "M3", "M5", "M8"],
|
|
24
27
|
},
|
|
@@ -26,9 +29,9 @@ export const MACHINE_SCENES = [
|
|
|
26
29
|
id: "ecommerce_with_exceptions",
|
|
27
30
|
name: "E-commerce Flow with Exception Branches",
|
|
28
31
|
industry: ["ecommerce"],
|
|
29
|
-
scenario: "
|
|
32
|
+
scenario: "Paid (entry) → Ship → {Receive → Complete | Lost → Arbitration | Return → Refund}",
|
|
30
33
|
participants: [
|
|
31
|
-
{ role: "customer", permission_type: "OrderHolder", involved_in: ["
|
|
34
|
+
{ role: "customer", permission_type: "OrderHolder", involved_in: ["Receive", "Return"] },
|
|
32
35
|
{ role: "merchant", permission_type: "Permission", involved_in: ["Ship", "Refund"] },
|
|
33
36
|
{ role: "arbitrator", permission_type: "NamedOperator", involved_in: ["Arbitration"] },
|
|
34
37
|
],
|
|
@@ -40,10 +43,13 @@ export const MACHINE_SCENES = [
|
|
|
40
43
|
],
|
|
41
44
|
allocation_integration: "Complete->merchant | Refund->customer | Arb->arbitrator",
|
|
42
45
|
special_constraints: [
|
|
46
|
+
"First node 'Paid' represents post-payment state — buy() completes payment atomically before Progress is created",
|
|
47
|
+
"No separate 'Order' or 'Pay' nodes needed — payment is handled by Service.buy(), not Machine",
|
|
43
48
|
"Lost node threshold=2 (customer + merchant dual-sig)",
|
|
44
49
|
"Competing Pair: Receive vs Lost (first-wins)",
|
|
45
50
|
"Arbitration flow independent of main flow",
|
|
46
51
|
],
|
|
52
|
+
first_node_semantics: "Paid — order has been created and paid via Service.buy(); Machine starts at post-payment state",
|
|
47
53
|
mutable_after_publish: false,
|
|
48
54
|
m_rounds_focus: ["M1", "M2", "M3", "M5", "M6", "M8"],
|
|
49
55
|
},
|
|
@@ -51,22 +57,25 @@ export const MACHINE_SCENES = [
|
|
|
51
57
|
id: "rental_standard",
|
|
52
58
|
name: "Equipment Rental Flow",
|
|
53
59
|
industry: ["rental"],
|
|
54
|
-
scenario: "
|
|
60
|
+
scenario: "DepositPaid (entry) → Pickup → In Use → Return → Refund Deposit",
|
|
55
61
|
participants: [
|
|
56
|
-
{ role: "customer", permission_type: "OrderHolder", involved_in: ["
|
|
62
|
+
{ role: "customer", permission_type: "OrderHolder", involved_in: ["Pickup", "Return"] },
|
|
57
63
|
{ role: "merchant", permission_type: "Permission", involved_in: ["Deliver", "Refund Deposit"] },
|
|
58
64
|
],
|
|
59
65
|
recommended_patterns: ["P-M-SEQ"],
|
|
60
66
|
recommended_topology: ["P-M-LINEAR"],
|
|
61
67
|
guard_requirements: [
|
|
62
|
-
{ forward: "Pickup", scene: "machine_forward_guard", purpose: "Verify deposit paid" },
|
|
68
|
+
{ forward: "Pickup", scene: "machine_forward_guard", purpose: "Verify deposit paid (post-buy state)" },
|
|
63
69
|
{ forward: "Return", scene: "machine_forward_guard", purpose: "Verify equipment condition" },
|
|
64
70
|
],
|
|
65
71
|
allocation_integration: "Return complete -> deposit refund + rental fee allocation",
|
|
66
72
|
special_constraints: [
|
|
73
|
+
"First node 'DepositPaid' represents post-payment state — buy() completes deposit payment atomically before Progress is created",
|
|
74
|
+
"No separate 'Reserve' or 'PayDeposit' nodes needed — reservation and payment are handled by Service.buy(), not Machine",
|
|
67
75
|
"Deposit and rental fee separated (two Allocators)",
|
|
68
76
|
"Equipment damage verified by Guard (retained_submission stores inspection report)",
|
|
69
77
|
],
|
|
78
|
+
first_node_semantics: "DepositPaid — deposit has been paid via Service.buy(); Machine starts at post-deposit state",
|
|
70
79
|
mutable_after_publish: false,
|
|
71
80
|
m_rounds_focus: ["M1", "M2", "M3", "M5", "M8"],
|
|
72
81
|
},
|
|
@@ -90,6 +99,7 @@ export const MACHINE_SCENES = [
|
|
|
90
99
|
"Customer Forward: namedOperator='' (OrderHolder)",
|
|
91
100
|
"Merchant Forward: permissionIndex=2",
|
|
92
101
|
],
|
|
102
|
+
first_node_semantics: "Initiated — order has been created and paid via Service.buy(); Machine starts at post-payment state, awaiting dual-sig confirmation",
|
|
93
103
|
mutable_after_publish: false,
|
|
94
104
|
m_rounds_focus: ["M3", "M4", "M5"],
|
|
95
105
|
},
|
|
@@ -113,6 +123,7 @@ export const MACHINE_SCENES = [
|
|
|
113
123
|
"GuardIdentifier must be numeric type (extracts weight)",
|
|
114
124
|
"Prevent double-voting (Guard queries arb.voted has)",
|
|
115
125
|
],
|
|
126
|
+
first_node_semantics: "VoteOpened — dispute has been submitted (order already paid via Service.buy()); Machine starts at post-payment dispute state",
|
|
116
127
|
mutable_after_publish: false,
|
|
117
128
|
m_rounds_focus: ["M3", "M4", "M5"],
|
|
118
129
|
},
|
|
@@ -138,7 +149,9 @@ export const MACHINE_SCENES = [
|
|
|
138
149
|
"Cross-Machine dependency is one-way (no cycles)",
|
|
139
150
|
"Each Machine must be published independently",
|
|
140
151
|
"Dependency verification: indirect via progress::new -> assert_published (see 06 §14.6)",
|
|
152
|
+
"Each Machine in the chain starts at a post-payment state (each link's Service.buy() handles payment independently)",
|
|
141
153
|
],
|
|
154
|
+
first_node_semantics: "UpstreamVerified — order has been paid via upstream Service.buy(); Machine starts at post-payment state, verifying upstream completion",
|
|
142
155
|
mutable_after_publish: false,
|
|
143
156
|
m_rounds_focus: ["M1", "M3", "M8"],
|
|
144
157
|
},
|
|
@@ -163,7 +176,9 @@ export const MACHINE_SCENES = [
|
|
|
163
176
|
"Proof MUST be generated by messenger.submitChainProof",
|
|
164
177
|
"submitChainProof about_address = peerAddress (NOT sessionId)",
|
|
165
178
|
"Guard table item name <64 BCS bytes (MAX_NAME_LENGTH=64)",
|
|
179
|
+
"First node represents post-payment state — payment is handled by Service.buy(), not Machine",
|
|
166
180
|
],
|
|
181
|
+
first_node_semantics: "Paid — order has been created and paid via Service.buy(); Machine starts at post-payment state, awaiting proof submission",
|
|
167
182
|
mutable_after_publish: false,
|
|
168
183
|
m_rounds_focus: ["M1", "M3", "M7"],
|
|
169
184
|
},
|
|
@@ -187,6 +202,7 @@ export const MACHINE_SCENES = [
|
|
|
187
202
|
"Uses query_reward_record_count == 0 for anti-reentry",
|
|
188
203
|
"Reward object must be already created",
|
|
189
204
|
],
|
|
205
|
+
first_node_semantics: "Eligible — order has been created and paid via Service.buy(); Machine starts at post-payment state, customer is eligible to claim reward",
|
|
190
206
|
mutable_after_publish: false,
|
|
191
207
|
m_rounds_focus: ["M1", "M3", "M8"],
|
|
192
208
|
},
|
|
@@ -213,6 +229,7 @@ export const MACHINE_SCENES = [
|
|
|
213
229
|
"Prevent double-vote (R-X1-14 CRITICAL)",
|
|
214
230
|
"MAX_DISPUTE_COUNT=10 per order",
|
|
215
231
|
],
|
|
232
|
+
first_node_semantics: "DisputeOpened — order has been created and paid via Service.buy(); Machine starts at post-payment dispute state",
|
|
216
233
|
mutable_after_publish: false,
|
|
217
234
|
m_rounds_focus: ["M1", "M3", "M4", "M5", "M8"],
|
|
218
235
|
},
|
|
@@ -220,9 +237,9 @@ export const MACHINE_SCENES = [
|
|
|
220
237
|
id: "subscription",
|
|
221
238
|
name: "Subscription / Membership Flow",
|
|
222
239
|
industry: ["subscription", "service"],
|
|
223
|
-
scenario: "
|
|
240
|
+
scenario: "Paid (entry) → Activate → [Renew | Expire] → Cancel/End",
|
|
224
241
|
participants: [
|
|
225
|
-
{ role: "subscriber", permission_type: "OrderHolder", involved_in: ["
|
|
242
|
+
{ role: "subscriber", permission_type: "OrderHolder", involved_in: ["Renew", "Cancel"] },
|
|
226
243
|
{ role: "provider", permission_type: "Permission", involved_in: ["Activate", "Pause"] },
|
|
227
244
|
],
|
|
228
245
|
recommended_patterns: ["P-M-SEQ", "P-M-COMPETING"],
|
|
@@ -233,11 +250,14 @@ export const MACHINE_SCENES = [
|
|
|
233
250
|
],
|
|
234
251
|
allocation_integration: "Renew -> fund allocation | Expire -> stop service",
|
|
235
252
|
special_constraints: [
|
|
253
|
+
"First node 'Paid' represents post-payment state — buy() completes subscription payment atomically before Progress is created",
|
|
254
|
+
"No separate 'Subscribe' or 'Pay' nodes needed — subscription and payment are handled by Service.buy(), not Machine",
|
|
236
255
|
"Time-lock: context(Clock) >= progress.entry_time + duration",
|
|
237
256
|
"Competing Pair: Renew vs Expire (first-wins)",
|
|
238
257
|
"Repository records subscription status",
|
|
239
258
|
"Note: Machine.consensus_repositories is declarative-only and NOT auto-passed to Progress (see 06 §14.4)",
|
|
240
259
|
],
|
|
260
|
+
first_node_semantics: "Paid — subscription has been created and paid via Service.buy(); Machine starts at post-payment state, awaiting activation",
|
|
241
261
|
mutable_after_publish: false,
|
|
242
262
|
m_rounds_focus: ["M1", "M3", "M6", "M8"],
|
|
243
263
|
},
|
|
@@ -4,7 +4,8 @@ export const MACHINE_TEMPLATES = [
|
|
|
4
4
|
id: "tpl_machine_ecommerce_standard",
|
|
5
5
|
scene_id: "ecommerce_standard",
|
|
6
6
|
name: "Standard E-commerce Flow",
|
|
7
|
-
description: "Linear e-commerce workflow:
|
|
7
|
+
description: "Linear e-commerce workflow: Paid (entry) -> Ship -> Receive -> Complete. " +
|
|
8
|
+
"Payment is handled by Service.buy() atomically; Machine starts at post-payment state. " +
|
|
8
9
|
"Funds auto-allocated to merchant at Complete node. Recommended baseline for new merchants.",
|
|
9
10
|
recommended_patterns: ["P-M-SEQ"],
|
|
10
11
|
recommended_topology: ["P-M-LINEAR"],
|
|
@@ -31,13 +32,6 @@ export const MACHINE_TEMPLATES = [
|
|
|
31
32
|
default: "Receive",
|
|
32
33
|
description: "Forward name for customer receipt confirmation",
|
|
33
34
|
},
|
|
34
|
-
{
|
|
35
|
-
name: "pay_guard_name",
|
|
36
|
-
type: "guard_ref",
|
|
37
|
-
required: true,
|
|
38
|
-
description: "Guard name verifying payment completion on Ship forward",
|
|
39
|
-
constraint: "Must be CREATE-only Guard; use tpl_buy_guard_whitelist pattern",
|
|
40
|
-
},
|
|
41
35
|
{
|
|
42
36
|
name: "complete_node_name",
|
|
43
37
|
type: "string",
|
|
@@ -47,8 +41,7 @@ export const MACHINE_TEMPLATES = [
|
|
|
47
41
|
},
|
|
48
42
|
],
|
|
49
43
|
example_nodes: [
|
|
50
|
-
{ name: "
|
|
51
|
-
{ name: "Paid", description: "Payment confirmed, awaiting shipment" },
|
|
44
|
+
{ name: "Paid", description: "Entry: order created and paid via Service.buy(); Machine starts here" },
|
|
52
45
|
{ name: "Shipped", description: "Goods dispatched" },
|
|
53
46
|
{ name: "Received", description: "Customer confirmed receipt" },
|
|
54
47
|
{ name: "${complete_node_name}", description: "Terminal: triggers allocation" },
|
|
@@ -56,24 +49,10 @@ export const MACHINE_TEMPLATES = [
|
|
|
56
49
|
example_pairs: [
|
|
57
50
|
{
|
|
58
51
|
prev_node: "",
|
|
59
|
-
next_node: "OrderCreated",
|
|
60
|
-
threshold: 1,
|
|
61
|
-
forwards: [
|
|
62
|
-
{ name: "Enter", weight: 1, named_operator: "", permission_index: 0 },
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
prev_node: "OrderCreated",
|
|
67
52
|
next_node: "Paid",
|
|
68
53
|
threshold: 1,
|
|
69
54
|
forwards: [
|
|
70
|
-
{
|
|
71
|
-
name: "Pay",
|
|
72
|
-
weight: 1,
|
|
73
|
-
named_operator: "",
|
|
74
|
-
permission_index: 0,
|
|
75
|
-
guard: "${pay_guard_name}",
|
|
76
|
-
},
|
|
55
|
+
{ name: "Enter", weight: 1, named_operator: "", permission_index: 0 },
|
|
77
56
|
],
|
|
78
57
|
},
|
|
79
58
|
{
|
|
@@ -106,13 +85,7 @@ export const MACHINE_TEMPLATES = [
|
|
|
106
85
|
],
|
|
107
86
|
},
|
|
108
87
|
],
|
|
109
|
-
required_guards: [
|
|
110
|
-
{
|
|
111
|
-
guard_template_id: "tpl_buy_guard_whitelist",
|
|
112
|
-
bound_to_forward: "Pay",
|
|
113
|
-
purpose: "Verify payment completion",
|
|
114
|
-
},
|
|
115
|
-
],
|
|
88
|
+
required_guards: [],
|
|
116
89
|
required_permissions: [
|
|
117
90
|
{ index: 2, name: "merchant", description: "Merchant role for Ship + Finish" },
|
|
118
91
|
{ index: 3, name: "admin", description: "Admin override (optional)" },
|
|
@@ -129,16 +102,16 @@ export const MACHINE_TEMPLATES = [
|
|
|
129
102
|
relevant_risks: ["R-M1-01", "R-M1-02", "R-M1-08", "R-M2-01", "R-M3-02", "R-M4-01"],
|
|
130
103
|
creation_notes: [
|
|
131
104
|
"Build order: Permission -> Machine (unpublished) -> Guards -> Bind guards -> Publish -> Bind to Service",
|
|
132
|
-
"
|
|
133
|
-
"
|
|
105
|
+
"First node 'Paid' represents post-payment state — Service.buy() completes payment atomically before Progress is created",
|
|
106
|
+
"No separate 'Order' or 'Pay' nodes needed — payment is handled by Service.buy(), not Machine",
|
|
107
|
+
"Entry point: prev_node='' (empty string) targets 'Paid' — at least one Pair must exist with empty prev_node",
|
|
134
108
|
"If using P16 circular reference for Service, use name not address (Service not yet published)",
|
|
135
109
|
],
|
|
136
110
|
example_use_case: "Small e-commerce shop selling camera accessories. Linear flow with no exceptions. " +
|
|
137
111
|
"Funds allocated to merchant personal address on Complete.",
|
|
138
112
|
publish_checklist: [
|
|
139
|
-
"All
|
|
140
|
-
"Entry Pair exists (prev_node='')",
|
|
141
|
-
"Pay forward Guard created and tested via gen_passport",
|
|
113
|
+
"All 4 nodes have at least one outgoing Forward (except terminal)",
|
|
114
|
+
"Entry Pair exists (prev_node='' targets 'Paid')",
|
|
142
115
|
"permissionIndex values match Permission object indices",
|
|
143
116
|
"Test Progress run on testnet",
|
|
144
117
|
"machineNode2file export as backup",
|
|
@@ -148,7 +121,8 @@ export const MACHINE_TEMPLATES = [
|
|
|
148
121
|
id: "tpl_machine_ecommerce_exceptions",
|
|
149
122
|
scene_id: "ecommerce_with_exceptions",
|
|
150
123
|
name: "E-commerce Flow with Exception Branches",
|
|
151
|
-
description: "Multi-path workflow:
|
|
124
|
+
description: "Multi-path workflow: Paid (entry) -> Ship -> Receive/Lost/Return. Lost uses dual-sig (threshold=2). " +
|
|
125
|
+
"Payment is handled by Service.buy() atomically; Machine starts at post-payment state. " +
|
|
152
126
|
"Return path opens Refund -> Complete. Competing pairs first-wins.",
|
|
153
127
|
recommended_patterns: ["P-M-SEQ", "P-M-COMPETING"],
|
|
154
128
|
recommended_topology: ["P-M-LINEAR", "P-M-COMPETING"],
|
|
@@ -190,8 +164,7 @@ export const MACHINE_TEMPLATES = [
|
|
|
190
164
|
},
|
|
191
165
|
],
|
|
192
166
|
example_nodes: [
|
|
193
|
-
{ name: "
|
|
194
|
-
{ name: "Paid" },
|
|
167
|
+
{ name: "Paid", description: "Entry: order created and paid via Service.buy(); Machine starts here" },
|
|
195
168
|
{ name: "Shipped" },
|
|
196
169
|
{ name: "Received" },
|
|
197
170
|
{ name: "Lost" },
|
|
@@ -202,15 +175,9 @@ export const MACHINE_TEMPLATES = [
|
|
|
202
175
|
example_pairs: [
|
|
203
176
|
{
|
|
204
177
|
prev_node: "",
|
|
205
|
-
next_node: "OrderCreated",
|
|
206
|
-
threshold: 1,
|
|
207
|
-
forwards: [{ name: "Enter", weight: 1, named_operator: "" }],
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
prev_node: "OrderCreated",
|
|
211
178
|
next_node: "Paid",
|
|
212
179
|
threshold: 1,
|
|
213
|
-
forwards: [{ name: "
|
|
180
|
+
forwards: [{ name: "Enter", weight: 1, named_operator: "" }],
|
|
214
181
|
},
|
|
215
182
|
{
|
|
216
183
|
prev_node: "Paid",
|
|
@@ -267,11 +234,6 @@ export const MACHINE_TEMPLATES = [
|
|
|
267
234
|
},
|
|
268
235
|
],
|
|
269
236
|
required_guards: [
|
|
270
|
-
{
|
|
271
|
-
guard_template_id: "tpl_forward_node_check",
|
|
272
|
-
bound_to_forward: "Pay",
|
|
273
|
-
purpose: "Verify payment completion",
|
|
274
|
-
},
|
|
275
237
|
{
|
|
276
238
|
guard_template_id: "tpl_forward_node_check",
|
|
277
239
|
bound_to_forward: "MerchantConfirm",
|
|
@@ -311,6 +273,8 @@ export const MACHINE_TEMPLATES = [
|
|
|
311
273
|
"R-M3-02", "R-M3-04", "R-M3-05", "R-M4-01", "R-M5-03",
|
|
312
274
|
],
|
|
313
275
|
creation_notes: [
|
|
276
|
+
"First node 'Paid' represents post-payment state — Service.buy() completes payment atomically before Progress is created",
|
|
277
|
+
"No separate 'Order' or 'Pay' nodes needed — payment is handled by Service.buy(), not Machine",
|
|
314
278
|
"Competing Pairs (Shipped -> Received/Lost/Return) are mutually exclusive — first threshold met wins",
|
|
315
279
|
"Lost node threshold=2 means BOTH customer and merchant Forwards must execute",
|
|
316
280
|
"TimeGuard must use context(Clock) >= progress.entry_time + duration",
|
|
@@ -331,7 +295,8 @@ export const MACHINE_TEMPLATES = [
|
|
|
331
295
|
id: "tpl_machine_rental",
|
|
332
296
|
scene_id: "rental_standard",
|
|
333
297
|
name: "Equipment Rental Flow",
|
|
334
|
-
description: "Rental flow:
|
|
298
|
+
description: "Rental flow: DepositPaid (entry) -> Pickup -> In Use -> Return -> Refund Deposit. " +
|
|
299
|
+
"Payment is handled by Service.buy() atomically; Machine starts at post-deposit state. " +
|
|
335
300
|
"Separates deposit from rental fee (two Allocators). Damage report via retained_submission.",
|
|
336
301
|
recommended_patterns: ["P-M-SEQ"],
|
|
337
302
|
recommended_topology: ["P-M-LINEAR"],
|
|
@@ -360,8 +325,7 @@ export const MACHINE_TEMPLATES = [
|
|
|
360
325
|
},
|
|
361
326
|
],
|
|
362
327
|
example_nodes: [
|
|
363
|
-
{ name: "
|
|
364
|
-
{ name: "DepositPaid" },
|
|
328
|
+
{ name: "DepositPaid", description: "Entry: deposit paid via Service.buy(); Machine starts here" },
|
|
365
329
|
{ name: "PickedUp" },
|
|
366
330
|
{ name: "InUse" },
|
|
367
331
|
{ name: "Return" },
|
|
@@ -372,17 +336,9 @@ export const MACHINE_TEMPLATES = [
|
|
|
372
336
|
example_pairs: [
|
|
373
337
|
{
|
|
374
338
|
prev_node: "",
|
|
375
|
-
next_node: "Reserved",
|
|
376
|
-
threshold: 1,
|
|
377
|
-
forwards: [{ name: "Reserve", weight: 1, named_operator: "" }],
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
prev_node: "Reserved",
|
|
381
339
|
next_node: "DepositPaid",
|
|
382
340
|
threshold: 1,
|
|
383
|
-
forwards: [
|
|
384
|
-
{ name: "PayDeposit", weight: 1, named_operator: "", guard: "deposit_guard" },
|
|
385
|
-
],
|
|
341
|
+
forwards: [{ name: "Enter", weight: 1, named_operator: "" }],
|
|
386
342
|
},
|
|
387
343
|
{
|
|
388
344
|
prev_node: "DepositPaid",
|
|
@@ -435,11 +391,6 @@ export const MACHINE_TEMPLATES = [
|
|
|
435
391
|
},
|
|
436
392
|
],
|
|
437
393
|
required_guards: [
|
|
438
|
-
{
|
|
439
|
-
guard_template_id: "tpl_allocator_threshold",
|
|
440
|
-
bound_to_forward: "PayDeposit",
|
|
441
|
-
purpose: "Verify deposit amount >= required amount",
|
|
442
|
-
},
|
|
443
394
|
{
|
|
444
395
|
guard_template_id: "tpl_forward_privacy_delivery_proof",
|
|
445
396
|
bound_to_forward: "Inspect",
|
|
@@ -473,9 +424,10 @@ export const MACHINE_TEMPLATES = [
|
|
|
473
424
|
"R-M4-01", "R-M5-02",
|
|
474
425
|
],
|
|
475
426
|
creation_notes: [
|
|
427
|
+
"First node 'DepositPaid' represents post-payment state — Service.buy() completes deposit payment atomically before Progress is created",
|
|
428
|
+
"No separate 'Reserve' or 'PayDeposit' nodes needed — reservation and payment are handled by Service.buy(), not Machine",
|
|
476
429
|
"Damage report uses retained_submission — values stored uniquely by (current_node, next_node, forward_name)",
|
|
477
430
|
"Two competing Pairs at Return node: DamageCheck vs Complete (clean return)",
|
|
478
|
-
"Deposit Guard must verify amount via order.amount query, not hardcoded value",
|
|
479
431
|
"DamageDeduction Allocation uses sharing.who=Entity (merchant), not OrderHolder",
|
|
480
432
|
],
|
|
481
433
|
example_use_case: "Camera equipment rental: customer pays 1000 WOW deposit, returns equipment, " +
|
|
@@ -860,7 +812,7 @@ export const MACHINE_TEMPLATES = [
|
|
|
860
812
|
},
|
|
861
813
|
],
|
|
862
814
|
example_nodes: [
|
|
863
|
-
{ name: "
|
|
815
|
+
{ name: "Paid", description: "Entry: order created and paid via Service.buy(); Machine starts here" },
|
|
864
816
|
{ name: "${proof_node_name}", description: "Customer submits Proof via Messenger" },
|
|
865
817
|
{ name: "${delivery_node_name}" },
|
|
866
818
|
{ name: "Complete" },
|
|
@@ -868,12 +820,12 @@ export const MACHINE_TEMPLATES = [
|
|
|
868
820
|
example_pairs: [
|
|
869
821
|
{
|
|
870
822
|
prev_node: "",
|
|
871
|
-
next_node: "
|
|
823
|
+
next_node: "Paid",
|
|
872
824
|
threshold: 1,
|
|
873
825
|
forwards: [{ name: "Enter", weight: 1, named_operator: "" }],
|
|
874
826
|
},
|
|
875
827
|
{
|
|
876
|
-
prev_node: "
|
|
828
|
+
prev_node: "Paid",
|
|
877
829
|
next_node: "${proof_node_name}",
|
|
878
830
|
threshold: 1,
|
|
879
831
|
forwards: [
|
|
@@ -1204,7 +1156,7 @@ export const MACHINE_TEMPLATES = [
|
|
|
1204
1156
|
},
|
|
1205
1157
|
],
|
|
1206
1158
|
example_nodes: [
|
|
1207
|
-
{ name: "
|
|
1159
|
+
{ name: "Paid", description: "Entry: subscription created and paid via Service.buy(); Machine starts here" },
|
|
1208
1160
|
{ name: "Active" },
|
|
1209
1161
|
{ name: "RenewEligible" },
|
|
1210
1162
|
{ name: "Renewed" },
|
|
@@ -1215,12 +1167,12 @@ export const MACHINE_TEMPLATES = [
|
|
|
1215
1167
|
example_pairs: [
|
|
1216
1168
|
{
|
|
1217
1169
|
prev_node: "",
|
|
1218
|
-
next_node: "
|
|
1170
|
+
next_node: "Paid",
|
|
1219
1171
|
threshold: 1,
|
|
1220
|
-
forwards: [{ name: "
|
|
1172
|
+
forwards: [{ name: "Enter", weight: 1, named_operator: "" }],
|
|
1221
1173
|
},
|
|
1222
1174
|
{
|
|
1223
|
-
prev_node: "
|
|
1175
|
+
prev_node: "Paid",
|
|
1224
1176
|
next_node: "Active",
|
|
1225
1177
|
threshold: 1,
|
|
1226
1178
|
forwards: [
|
|
@@ -1324,6 +1276,8 @@ export const MACHINE_TEMPLATES = [
|
|
|
1324
1276
|
"R-M3-02", "R-M3-04", "R-M4-01", "R-M5-04",
|
|
1325
1277
|
],
|
|
1326
1278
|
creation_notes: [
|
|
1279
|
+
"First node 'Paid' represents post-payment state — Service.buy() completes subscription payment atomically before Progress is created",
|
|
1280
|
+
"No separate 'Subscribe' or 'Pay' nodes needed — subscription and payment are handled by Service.buy(), not Machine",
|
|
1327
1281
|
"Time-lock uses context(Clock) — verify Clock address in Guard table",
|
|
1328
1282
|
"Competing Pair: Renew vs Expire vs Cancel — first-wins",
|
|
1329
1283
|
"Renewed node loops back to Active (recurring subscription)",
|
|
@@ -1337,7 +1291,7 @@ export const MACHINE_TEMPLATES = [
|
|
|
1337
1291
|
"Time-lock Guards tested on testnet (both TimeUnlock + AutoExpire)",
|
|
1338
1292
|
"Competing Pair semantics verified (Renew vs Expire vs Cancel)",
|
|
1339
1293
|
"Repository write tested (subscription status queryable)",
|
|
1340
|
-
"Renewal loop tested:
|
|
1294
|
+
"Renewal loop tested: Paid -> Active -> RenewEligible -> Renewed -> Active",
|
|
1341
1295
|
],
|
|
1342
1296
|
},
|
|
1343
1297
|
];
|
|
@@ -484,7 +484,7 @@ export function analyzeHandlerTypeSafety(instances) {
|
|
|
484
484
|
export function analyzeOutputSchemaCoverage(census) {
|
|
485
485
|
const findings = [];
|
|
486
486
|
for (const c of census) {
|
|
487
|
-
if (!c.layer3_generated.output_exists) {
|
|
487
|
+
if (!c.layer3_generated.output_exists && c.name !== "onchain_operations") {
|
|
488
488
|
findings.push({
|
|
489
489
|
rule_id: 'MCP-OUTPUT-001',
|
|
490
490
|
severity: 'high',
|
|
@@ -559,7 +559,7 @@ export function analyzeSchemaQueryReflection(census) {
|
|
|
559
559
|
fix: `Run pnpm generate:schemas.`,
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
if (!c.layer3_generated.output_exists) {
|
|
562
|
+
if (!c.layer3_generated.output_exists && c.name !== "onchain_operations") {
|
|
563
563
|
findings.push({
|
|
564
564
|
rule_id: 'MCP-REFLECT-002',
|
|
565
565
|
severity: 'medium',
|
|
@@ -574,6 +574,7 @@ export function analyzeSchemaQueryReflection(census) {
|
|
|
574
574
|
'permission', 'service', 'machine', 'progress', 'guard',
|
|
575
575
|
'arbitration', 'repository', 'contact', 'treasury', 'reward',
|
|
576
576
|
'allocation', 'personal', 'payment', 'demand', 'order', 'gen_passport',
|
|
577
|
+
'proof', 'gen_proof',
|
|
577
578
|
];
|
|
578
579
|
for (const op of onchainOps) {
|
|
579
580
|
const opFile = path.join(GENERATED_SCHEMAS_DIR, `onchain_operations_${op}.schema.json`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OverrideCategory } from "../loop-engineering/improve.js";
|
|
2
|
+
export interface OverrideConfig {
|
|
3
|
+
"risk-thresholds"?: Record<string, unknown>;
|
|
4
|
+
"descriptions"?: Record<string, unknown>;
|
|
5
|
+
"industry-profiles"?: Record<string, unknown>;
|
|
6
|
+
"scenario-defaults"?: Record<string, unknown>;
|
|
7
|
+
"recovery-priorities"?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare function loadOverrides(forceReload?: boolean): OverrideConfig;
|
|
10
|
+
export declare function getOverride(category: OverrideCategory): Record<string, unknown> | undefined;
|
|
11
|
+
export declare function clearOverrideCache(): void;
|
|
12
|
+
export declare function listOverrideFiles(): string[];
|
|
13
|
+
export declare function getOverridesDirPath(): string;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { readFileSync, existsSync, readdirSync } from "fs";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
import { homedir } from "os";
|
|
4
|
+
function wowokRootDir() {
|
|
5
|
+
return process.env.WOWOK_CONFIG_DIR
|
|
6
|
+
? process.env.WOWOK_CONFIG_DIR
|
|
7
|
+
: join(homedir(), ".wowok");
|
|
8
|
+
}
|
|
9
|
+
function overridesDir() {
|
|
10
|
+
return join(wowokRootDir(), "overrides");
|
|
11
|
+
}
|
|
12
|
+
let overrideCache;
|
|
13
|
+
export function loadOverrides(forceReload = false) {
|
|
14
|
+
if (overrideCache && !forceReload)
|
|
15
|
+
return overrideCache;
|
|
16
|
+
const config = {};
|
|
17
|
+
const dir = overridesDir();
|
|
18
|
+
if (!existsSync(dir)) {
|
|
19
|
+
overrideCache = config;
|
|
20
|
+
return config;
|
|
21
|
+
}
|
|
22
|
+
const categories = [
|
|
23
|
+
"risk-thresholds",
|
|
24
|
+
"descriptions",
|
|
25
|
+
"industry-profiles",
|
|
26
|
+
"scenario-defaults",
|
|
27
|
+
"recovery-priorities",
|
|
28
|
+
];
|
|
29
|
+
for (const cat of categories) {
|
|
30
|
+
const filePath = join(dir, `${cat}.json`);
|
|
31
|
+
if (!existsSync(filePath))
|
|
32
|
+
continue;
|
|
33
|
+
try {
|
|
34
|
+
const raw = readFileSync(filePath, "utf-8");
|
|
35
|
+
const parsed = JSON.parse(raw);
|
|
36
|
+
const { _last_applied_proposal, _last_applied_at, ...userFields } = parsed;
|
|
37
|
+
void _last_applied_proposal;
|
|
38
|
+
void _last_applied_at;
|
|
39
|
+
config[cat] = userFields;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
overrideCache = config;
|
|
45
|
+
return config;
|
|
46
|
+
}
|
|
47
|
+
export function getOverride(category) {
|
|
48
|
+
const config = loadOverrides();
|
|
49
|
+
return config[category];
|
|
50
|
+
}
|
|
51
|
+
export function clearOverrideCache() {
|
|
52
|
+
overrideCache = undefined;
|
|
53
|
+
}
|
|
54
|
+
export function listOverrideFiles() {
|
|
55
|
+
const dir = overridesDir();
|
|
56
|
+
if (!existsSync(dir))
|
|
57
|
+
return [];
|
|
58
|
+
try {
|
|
59
|
+
return readdirSync(dir).filter((f) => f.endsWith(".json"));
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export function getOverridesDirPath() {
|
|
66
|
+
return overridesDir();
|
|
67
|
+
}
|
|
@@ -23,6 +23,10 @@ export interface PaymentRiskCheckContext {
|
|
|
23
23
|
uses_signer_for_provenance?: boolean;
|
|
24
24
|
coin_field_lint_reviewed?: boolean;
|
|
25
25
|
constants_synced?: boolean;
|
|
26
|
+
uses_scene_binding?: boolean;
|
|
27
|
+
has_for_object?: boolean;
|
|
28
|
+
has_for_guard?: boolean;
|
|
29
|
+
has_index?: boolean;
|
|
26
30
|
}
|
|
27
31
|
export declare const PAYMENT_RISK_RULES: {
|
|
28
32
|
rule: PaymentRisk;
|
|
@@ -155,6 +155,71 @@ const R_P_07 = {
|
|
|
155
155
|
return { ...R_P_07.rule, evidence: "uses_signer_for_provenance=true (informational only)" };
|
|
156
156
|
},
|
|
157
157
|
};
|
|
158
|
+
const R_P_08 = {
|
|
159
|
+
rule: {
|
|
160
|
+
id: "R-PAYMENT-08",
|
|
161
|
+
level: "MEDIUM",
|
|
162
|
+
category: "semantic",
|
|
163
|
+
title: "Payment scene binding (for_object + for_guard + index) — anti-reuse for exception branches",
|
|
164
|
+
description: "PaymentInfo supports for_object (binds to specific Order), for_guard (binds to specific Guard), " +
|
|
165
|
+
"and index (binds to specific Progress step) — payment.move#L66-71. When all three are set via " +
|
|
166
|
+
"payment_info_with_guard (payment.move#L82-86), the Payment is scene-bound: it can ONLY be used " +
|
|
167
|
+
"in the specific order + guard + progress context. This is the anti-reuse design for exception " +
|
|
168
|
+
"branch compensation (e.g., delivery delay >30min triggers auto-compensation). " +
|
|
169
|
+
"Payment is immutable (freeze_object, payment.move#L160) — binding cannot be altered. " +
|
|
170
|
+
"VERIFIER-EVIDENCE DESIGN: customer submits Payment, Guard verifies binding fields match current context.",
|
|
171
|
+
affected_stakeholders: ["signer", "recipient", "consumer"],
|
|
172
|
+
scenario: "Treasury creates compensation Payment with PaymentInfo(for_object=order, for_guard=exception_guard, index=current_progress) for delivery delay",
|
|
173
|
+
mitigation: "Use payment_info_with_guard for all exception branch Payments. Ensure for_object, for_guard, and index " +
|
|
174
|
+
"all match the intended context. Use tpl_payment_exception_compensation (guard-templates.ts) as design template.",
|
|
175
|
+
auto_fixable: false,
|
|
176
|
+
},
|
|
177
|
+
check: (ctx) => {
|
|
178
|
+
if (!ctx.uses_scene_binding)
|
|
179
|
+
return null;
|
|
180
|
+
const missing = [];
|
|
181
|
+
if (!ctx.has_for_object)
|
|
182
|
+
missing.push("for_object not set (Order binding missing)");
|
|
183
|
+
if (!ctx.has_for_guard)
|
|
184
|
+
missing.push("for_guard not set (Guard binding missing)");
|
|
185
|
+
if (!ctx.has_index)
|
|
186
|
+
missing.push("index not set (Progress step binding missing)");
|
|
187
|
+
if (missing.length === 0)
|
|
188
|
+
return null;
|
|
189
|
+
return { ...R_P_08.rule, evidence: `incomplete scene binding: ${missing.join(", ")}` };
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
const R_P_09 = {
|
|
193
|
+
rule: {
|
|
194
|
+
id: "R-PAYMENT-09",
|
|
195
|
+
level: "LOW",
|
|
196
|
+
category: "semantic",
|
|
197
|
+
title: "PaymentInfo variant selection — use payment_info_with_guard for exception branches",
|
|
198
|
+
description: "PaymentInfo has 4 constructor variants (payment.move#L66-86): " +
|
|
199
|
+
"payment_info (for_object+remark+index, no for_guard), " +
|
|
200
|
+
"payment_info2 (remark+index, no for_object/for_guard), " +
|
|
201
|
+
"payment_info_with_guard (for_object+for_guard+remark+index — FULL binding), " +
|
|
202
|
+
"payment_info2_with_guard (for_guard+remark+index, no for_object). " +
|
|
203
|
+
"For exception branch compensation, ALWAYS use payment_info_with_guard to get full scene binding. " +
|
|
204
|
+
"Using payment_info (without for_guard) or payment_info2 (without for_object) weakens anti-reuse protection.",
|
|
205
|
+
affected_stakeholders: ["signer", "consumer"],
|
|
206
|
+
scenario: "Caller uses payment_info instead of payment_info_with_guard for exception compensation; for_guard is lost",
|
|
207
|
+
mitigation: "For exception branch Payments: always use payment_info_with_guard(for_object, for_guard, remark, index). " +
|
|
208
|
+
"For simple Payments without scene binding: payment_info or payment_info2 is fine. " +
|
|
209
|
+
"SDK should auto-select the variant based on which fields are provided.",
|
|
210
|
+
auto_fixable: true,
|
|
211
|
+
},
|
|
212
|
+
check: (ctx) => {
|
|
213
|
+
if (!ctx.uses_scene_binding)
|
|
214
|
+
return null;
|
|
215
|
+
if (ctx.payment_info_variant === "payment_info_with_guard")
|
|
216
|
+
return null;
|
|
217
|
+
return {
|
|
218
|
+
...R_P_09.rule,
|
|
219
|
+
evidence: `uses_scene_binding=true but variant=${ctx.payment_info_variant ?? "unknown"} (should be payment_info_with_guard)`,
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
};
|
|
158
223
|
export const PAYMENT_RISK_RULES = [
|
|
159
224
|
R_P_01,
|
|
160
225
|
R_P_02,
|
|
@@ -163,6 +228,8 @@ export const PAYMENT_RISK_RULES = [
|
|
|
163
228
|
R_P_05,
|
|
164
229
|
R_P_06,
|
|
165
230
|
R_P_07,
|
|
231
|
+
R_P_08,
|
|
232
|
+
R_P_09,
|
|
166
233
|
];
|
|
167
234
|
export const PAYMENT_RISK_VERSION = "1.0.0";
|
|
168
235
|
export function checkPaymentRisks(ctx) {
|
|
@@ -25,6 +25,10 @@ export interface RepositoryOpCheckInput {
|
|
|
25
25
|
reward_count?: number;
|
|
26
26
|
is_data_remove_with_passport?: boolean;
|
|
27
27
|
description?: string;
|
|
28
|
+
has_quote_guard?: boolean;
|
|
29
|
+
quote_guard_is_depended?: boolean;
|
|
30
|
+
quote_guard_verifies_payment?: boolean;
|
|
31
|
+
has_owner_receive?: boolean;
|
|
28
32
|
}
|
|
29
33
|
export declare function preCheckRepositoryOp(input: RepositoryOpCheckInput): RepositoryConfirmItem[];
|
|
30
34
|
export declare function canProceedRepositoryOp(input: RepositoryOpCheckInput): {
|