@wowok/agent-mcp 2.2.13 → 2.2.14
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 +42 -98
- package/dist/schema-query/index.d.ts +29 -0
- package/dist/schema-query/index.js +149 -0
- package/dist/schemas/account_operation.schema.json +255 -0
- package/dist/schemas/guard2file.schema.json +71 -0
- package/dist/schemas/index.json +139 -0
- package/dist/schemas/local_info_operation.schema.json +142 -0
- package/dist/schemas/local_mark_operation.schema.json +119 -0
- package/dist/schemas/machineNode2file.schema.json +71 -0
- package/dist/schemas/messenger_operation.schema.json +1393 -0
- package/dist/schemas/onchain_events.schema.json +113 -0
- package/dist/schemas/onchain_operations.schema.json +376 -0
- package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
- package/dist/schemas/onchain_operations_contact.schema.json +853 -0
- package/dist/schemas/onchain_operations_demand.schema.json +984 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
- package/dist/schemas/onchain_operations_guard.schema.json +713 -0
- package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
- package/dist/schemas/onchain_operations_order.schema.json +830 -0
- package/dist/schemas/onchain_operations_payment.schema.json +717 -0
- package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
- package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
- package/dist/schemas/onchain_operations_progress.schema.json +751 -0
- package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
- package/dist/schemas/onchain_operations_reward.schema.json +955 -0
- package/dist/schemas/onchain_operations_service.schema.json +1411 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
- package/dist/schemas/onchain_table_data.schema.json +35 -0
- package/dist/schemas/operations/guard.json +163 -0
- package/dist/schemas/operations/permission.json +22 -0
- package/dist/schemas/query_toolkit.schema.json +32 -0
- package/dist/schemas/schema_query.schema.json +33 -0
- package/dist/schemas/wip_file.schema.json +27 -0
- package/dist/schemas/wowok_buildin_info.schema.json +487 -0
- package/package.json +7 -5
- package/dist/docs/index.d.ts +0 -3
- package/dist/docs/index.js +0 -2
- package/dist/docs/loader.d.ts +0 -12
- package/dist/docs/loader.js +0 -177
- package/dist/docs/search.d.ts +0 -17
- package/dist/docs/search.js +0 -325
- package/dist/docs/types.d.ts +0 -55
- package/dist/docs/types.js +0 -1
- package/docs/README.md +0 -249
- package/docs/WIP.md +0 -388
- package/docs/WTS.md +0 -536
- package/docs/docs/account.md +0 -914
- package/docs/docs/allocation.md +0 -635
- package/docs/docs/arbitration.md +0 -1804
- package/docs/docs/arbitration_state_machine.md +0 -270
- package/docs/docs/contact.md +0 -709
- package/docs/docs/demand.md +0 -948
- package/docs/docs/guard.md +0 -1465
- package/docs/docs/localinfo.md +0 -432
- package/docs/docs/localmark.md +0 -583
- package/docs/docs/machine.md +0 -2490
- package/docs/docs/messenger.md +0 -2098
- package/docs/docs/onchain_events.md +0 -267
- package/docs/docs/order.md +0 -1001
- package/docs/docs/payment.md +0 -512
- package/docs/docs/permission.md +0 -1438
- package/docs/docs/personal.md +0 -742
- package/docs/docs/progress.md +0 -1748
- package/docs/docs/query.md +0 -467
- package/docs/docs/repository.md +0 -1043
- package/docs/docs/reward.md +0 -833
- package/docs/docs/service.md +0 -2130
- package/docs/docs/stage-01-introduction.md +0 -243
- package/docs/docs/stage-02-trust.md +0 -302
- package/docs/docs/stage-03-collaboration.md +0 -337
- package/docs/docs/stage-04-transaction.md +0 -277
- package/docs/docs/stage-05-business.md +0 -151
- package/docs/docs/stage-06-personal.md +0 -203
- package/docs/docs/stage-07-query.md +0 -572
- package/docs/docs/stage-08-examples.md +0 -184
- package/docs/docs/treasury.md +0 -1149
- package/docs/docs/wowok_buildin_info.md +0 -740
- package/docs/examples/Insurance/Insurance.md +0 -594
- package/docs/examples/Insurance/Insurance_TestResults.md +0 -481
- package/docs/examples/Insurance/insurance_complete_guard_v1.json +0 -50
- package/docs/examples/MyShop/MyShop.md +0 -1353
- package/docs/examples/MyShop/MyShop_TestResults.md +0 -1003
- package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +0 -1898
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
- package/docs/examples/MyShop_Advanced/machine_nodes.json +0 -222
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -776
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
- package/docs/examples/Travel/Travel.md +0 -1157
- package/docs/examples/Travel/Travel_TestResults.md +0 -743
- package/docs/examples/Travel/calc-weather-timestamps.js +0 -8
- package/docs/examples/Travel/travel_machine_v2_export.json +0 -104
- package/docs/examples/Travel/weather_check_guard_v1.json +0 -51
- package/docs/skills/WOWOK.md +0 -650
- package/docs/skills/onchain_operations/_common.md +0 -406
- package/docs/skills/onchain_operations/_index.md +0 -196
- package/docs/skills/onchain_operations/allocation.md +0 -28
- package/docs/skills/onchain_operations/arbitration.md +0 -106
- package/docs/skills/onchain_operations/contact.md +0 -40
- package/docs/skills/onchain_operations/demand.md +0 -53
- package/docs/skills/onchain_operations/gen_passport.md +0 -23
- package/docs/skills/onchain_operations/guard.md +0 -56
- package/docs/skills/onchain_operations/machine.md +0 -89
- package/docs/skills/onchain_operations/order.md +0 -56
- package/docs/skills/onchain_operations/payment.md +0 -24
- package/docs/skills/onchain_operations/permission.md +0 -68
- package/docs/skills/onchain_operations/personal.md +0 -58
- package/docs/skills/onchain_operations/progress.md +0 -38
- package/docs/skills/onchain_operations/repository.md +0 -70
- package/docs/skills/onchain_operations/reward.md +0 -38
- package/docs/skills/onchain_operations/service.md +0 -78
- package/docs/skills/onchain_operations/treasury.md +0 -68
- package/docs/skills/schema-account_operation.md +0 -402
- package/docs/skills/schema-guard2file.md +0 -153
- package/docs/skills/schema-local_info_operation.md +0 -160
- package/docs/skills/schema-local_mark_operation.md +0 -148
- package/docs/skills/schema-machineNode2file.md +0 -155
- package/docs/skills/schema-messenger_operation.md +0 -547
- package/docs/skills/schema-onchain_events.md +0 -201
- package/docs/skills/schema-onchain_table_data.md +0 -334
- package/docs/skills/schema-query_toolkit.md +0 -395
- package/docs/skills/schema-wip_file.md +0 -240
- package/docs/skills/schema-wowok_buildin_info.md +0 -296
- package/docs/wip-examples/three_body.html +0 -57
- package/docs/wip-examples/three_body.wip +0 -30
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
## Arbitration State Machine
|
|
2
|
-
|
|
3
|
-
The arbitration process follows a strict state machine with defined transitions, time constraints, and financial flows.
|
|
4
|
-
|
|
5
|
-
### State Diagram
|
|
6
|
-
|
|
7
|
-
```mermaid
|
|
8
|
-
stateDiagram-v2
|
|
9
|
-
[*] --> PrincipalConfirming : create dispute
|
|
10
|
-
PrincipalConfirming --> ArbitratorConfirming : principal_confirm
|
|
11
|
-
ArbitratorConfirming --> Voting : arbitrator_confirm
|
|
12
|
-
Voting --> Arbitrated : arbitration
|
|
13
|
-
Arbitrated --> Finished : arb_claim_compensation
|
|
14
|
-
Arbitrated --> Objectionable : objection
|
|
15
|
-
Objectionable --> PrincipalConfirming : reset
|
|
16
|
-
|
|
17
|
-
note right of PrincipalConfirming
|
|
18
|
-
Status: PrincipalConfirming
|
|
19
|
-
Buyer confirms dispute
|
|
20
|
-
end note
|
|
21
|
-
|
|
22
|
-
note right of ArbitratorConfirming
|
|
23
|
-
Status: ArbitratorConfirming
|
|
24
|
-
Arbitrator reviews case
|
|
25
|
-
end note
|
|
26
|
-
|
|
27
|
-
note right of Voting
|
|
28
|
-
Status: Voting
|
|
29
|
-
Voting period active
|
|
30
|
-
voting_deadline must pass
|
|
31
|
-
end note
|
|
32
|
-
|
|
33
|
-
note right of Arbitrated
|
|
34
|
-
Status: Arbitrated
|
|
35
|
-
Ruling issued
|
|
36
|
-
indemnity set
|
|
37
|
-
end note
|
|
38
|
-
|
|
39
|
-
note right of Objectionable
|
|
40
|
-
Status: Objectionable
|
|
41
|
-
Appeal window open
|
|
42
|
-
end note
|
|
43
|
-
|
|
44
|
-
note right of Finished
|
|
45
|
-
Status: Finished
|
|
46
|
-
Compensation transferred
|
|
47
|
-
end note
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### State Descriptions
|
|
51
|
-
|
|
52
|
-
| Status | Description | Entry Condition | Exit Actions |
|
|
53
|
-
|--------|-------------|-----------------|--------------|
|
|
54
|
-
| PrincipalConfirming | Buyer confirms dispute | Dispute created by buyer | Confirm or reject dispute |
|
|
55
|
-
| ArbitratorConfirming | Arbitrator reviews case | Buyer confirmed dispute | Arbitrator accepts case |
|
|
56
|
-
| Voting | Voting period active | Arbitrator accepted case | Wait for voting_deadline |
|
|
57
|
-
| Arbitrated | Ruling issued | voting_deadline passed | Compensation set, can claim |
|
|
58
|
-
| Objectionable | Appeal window open | Objection filed | Reset to review or finalize |
|
|
59
|
-
| Finished | Process completed | Compensation claimed | Final state |
|
|
60
|
-
|
|
61
|
-
### State Transition Rules
|
|
62
|
-
|
|
63
|
-
1. **PrincipalConfirming**
|
|
64
|
-
- Entry: Buyer calls `dispute` to create arbitration
|
|
65
|
-
- Exit: Buyer calls `principal_confirm` to proceed or cancel
|
|
66
|
-
|
|
67
|
-
2. **ArbitratorConfirming**
|
|
68
|
-
- Entry: Buyer confirmed dispute
|
|
69
|
-
- Exit: Arbitrator calls `arbitrator_confirm` to accept case
|
|
70
|
-
|
|
71
|
-
3. **Voting**
|
|
72
|
-
- Entry: Arbitrator accepted case
|
|
73
|
-
- Constraint: Must wait until `voting_deadline` timestamp passes
|
|
74
|
-
- Exit: Arbitrator calls `arbitration` after deadline
|
|
75
|
-
|
|
76
|
-
4. **Arbitrated**
|
|
77
|
-
- Entry: Arbitrator issued ruling with `indemnity` amount
|
|
78
|
-
- Exit: Buyer calls `arb_claim_compensation` to receive payment, or `objection` to appeal
|
|
79
|
-
|
|
80
|
-
5. **Objectionable**
|
|
81
|
-
- Entry: Buyer filed objection within appeal window
|
|
82
|
-
- Exit: System resets to PrincipalConfirming for re-review
|
|
83
|
-
|
|
84
|
-
6. **Finished**
|
|
85
|
-
- Entry: Compensation successfully transferred to buyer
|
|
86
|
-
- Final state - no further transitions
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Financial Flow Diagram
|
|
91
|
-
|
|
92
|
-
```mermaid
|
|
93
|
-
flowchart LR
|
|
94
|
-
subgraph BuyerAction["Buyer Actions"]
|
|
95
|
-
B1[Pay Dispute Fee]
|
|
96
|
-
B2[Submit Evidence]
|
|
97
|
-
B3[Claim Compensation]
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
subgraph ArbProcess["Arbitration Process"]
|
|
101
|
-
A1[Arb Object<br/>Fee Locked]
|
|
102
|
-
A2[Voting Period]
|
|
103
|
-
A3[Ruling Issued<br/>Indemnity Set]
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
subgraph ServiceFund["Service Compensation"]
|
|
107
|
-
S1[Compensation Fund]
|
|
108
|
-
S2[Deduct Indemnity]
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
B1 --> A1
|
|
112
|
-
A1 --> A2
|
|
113
|
-
A2 --> A3
|
|
114
|
-
A3 --> S2
|
|
115
|
-
S2 --> B3
|
|
116
|
-
|
|
117
|
-
style B1 fill:#ffcccc
|
|
118
|
-
style B3 fill:#ccffcc
|
|
119
|
-
style S2 fill:#ffffcc
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Financial Flow Steps
|
|
123
|
-
|
|
124
|
-
1. **Buyer Pays Dispute Fee**
|
|
125
|
-
- Amount: Specified in arbitration `fee` parameter
|
|
126
|
-
- Destination: Locked in Arb object
|
|
127
|
-
- Purpose: Prevents spam disputes, compensates arbitrators
|
|
128
|
-
|
|
129
|
-
2. **Evidence Submission**
|
|
130
|
-
- Buyer and service provider submit evidence
|
|
131
|
-
- Can use WoWok Messenger for encrypted communication
|
|
132
|
-
- Evidence referenced via `feedback` parameter
|
|
133
|
-
|
|
134
|
-
3. **Voting Period**
|
|
135
|
-
- Time window for voting on propositions
|
|
136
|
-
- Duration controlled by `voting_deadline` parameter
|
|
137
|
-
- No financial transactions during this phase
|
|
138
|
-
|
|
139
|
-
4. **Ruling Issued**
|
|
140
|
-
- Arbitrator determines `indemnity` amount
|
|
141
|
-
- Amount deducted from Service compensation fund
|
|
142
|
-
- Ruling recorded on-chain with timestamp
|
|
143
|
-
|
|
144
|
-
5. **Compensation Claimed**
|
|
145
|
-
- Buyer receives `indemnity` amount
|
|
146
|
-
- Transaction completes arbitration process
|
|
147
|
-
- Arb object status changes to Finished (5)
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Evidence Submission Sequence
|
|
152
|
-
|
|
153
|
-
```mermaid
|
|
154
|
-
sequenceDiagram
|
|
155
|
-
participant Buyer as Buyer
|
|
156
|
-
participant Messenger as WoWok Messenger
|
|
157
|
-
participant Arb as Arb Object
|
|
158
|
-
participant Arbitrator as Arbitrator
|
|
159
|
-
|
|
160
|
-
Buyer->>Messenger: Send encrypted evidence
|
|
161
|
-
Messenger-->>Buyer: Return message hash
|
|
162
|
-
Buyer->>Arb: dispute(feedback=hash)
|
|
163
|
-
Arb-->>Buyer: Dispute created (Status 0)
|
|
164
|
-
|
|
165
|
-
Buyer->>Arb: principal_confirm(true)
|
|
166
|
-
Arb-->>Arb: Status 0→1
|
|
167
|
-
|
|
168
|
-
Arbitrator->>Arb: arbitrator_confirm()
|
|
169
|
-
Arb-->>Arb: Status 1→2
|
|
170
|
-
|
|
171
|
-
Note over Arb: Wait for voting_deadline
|
|
172
|
-
|
|
173
|
-
Arbitrator->>Arb: arbitration(feedback, indemnity)
|
|
174
|
-
Arb-->>Arb: Status 2→3<br/>Indemnity locked
|
|
175
|
-
|
|
176
|
-
Buyer->>Arb: arb_claim_compensation()
|
|
177
|
-
Arb-->>Buyer: Transfer indemnity
|
|
178
|
-
Arb-->>Arb: Status 3→5
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Evidence Submission Methods
|
|
182
|
-
|
|
183
|
-
| Method | Description | Use Case |
|
|
184
|
-
|--------|-------------|----------|
|
|
185
|
-
| **Plain Text** | Direct string in `feedback` parameter | Simple disputes, public resolution |
|
|
186
|
-
| **IPFS Hash** | Content-addressed storage reference | Large files, documents, images |
|
|
187
|
-
| **WoWok Messenger** | Encrypted on-chain messaging | Sensitive information, private disputes |
|
|
188
|
-
| **External Link** | URL with verification hash | Third-party evidence, timestamps |
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## Time Constraints
|
|
193
|
-
|
|
194
|
-
```mermaid
|
|
195
|
-
gantt
|
|
196
|
-
title Arbitration Timeline Example
|
|
197
|
-
dateFormat X
|
|
198
|
-
axisFormat %s
|
|
199
|
-
|
|
200
|
-
section Dispute
|
|
201
|
-
Create Dispute :a1, 0, 1s
|
|
202
|
-
Principal Confirm :a2, after a1, 1s
|
|
203
|
-
Arbitrator Confirm :a3, after a2, 1s
|
|
204
|
-
|
|
205
|
-
section Voting
|
|
206
|
-
Voting Period :crit, a4, after a3, 10s
|
|
207
|
-
|
|
208
|
-
section Ruling
|
|
209
|
-
Issue Arbitration :a5, after a4, 1s
|
|
210
|
-
Claim Compensation :a6, after a5, 5s
|
|
211
|
-
|
|
212
|
-
section Complete
|
|
213
|
-
Finished :milestone, after a6, 0s
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### Time Parameter Guidelines
|
|
217
|
-
|
|
218
|
-
| Parameter | Typical Value | Minimum | Purpose |
|
|
219
|
-
|-----------|---------------|---------|---------|
|
|
220
|
-
| `voting_deadline` | 7 days | 10 seconds | Allow time for evidence review |
|
|
221
|
-
| Appeal window | 3 days | 1 hour | Time to file objections |
|
|
222
|
-
| Evidence submission | Before voting_deadline | - | Ensure evidence is available |
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## Permission Requirements by State
|
|
227
|
-
|
|
228
|
-
```mermaid
|
|
229
|
-
flowchart TB
|
|
230
|
-
subgraph State0["Status 0: PrincipalConfirming"]
|
|
231
|
-
P0[principal_confirm] -->|Buyer| C0{Confirm?}
|
|
232
|
-
C0 -->|true| S1[Status 1]
|
|
233
|
-
C0 -->|false| Cancel[Cancel Dispute]
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
subgraph State1["Status 1: ArbitratorConfirming"]
|
|
237
|
-
P1[arbitrator_confirm] -->|Arbitrator| S2[Status 2]
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
subgraph State2["Status 2: Voting"]
|
|
241
|
-
P2[arbitration] -->|Arbitrator +<br/>voting_deadline passed| S3[Status 3]
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
subgraph State3["Status 3: Arbitrated"]
|
|
245
|
-
P3a[arb_claim_compensation] -->|Buyer| S5[Status 5]
|
|
246
|
-
P3b[objection] -->|Buyer| S4[Status 4]
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
subgraph State4["Status 4: Objectionable"]
|
|
250
|
-
P4[reset] -->|System| S0[Status 0]
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
S1 --> State1
|
|
254
|
-
S2 --> State2
|
|
255
|
-
S3 --> State3
|
|
256
|
-
S4 --> State4
|
|
257
|
-
S5 --> Finished[Finished]
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Permission Matrix
|
|
261
|
-
|
|
262
|
-
| Operation | Status Required | Actor | Additional Requirements |
|
|
263
|
-
|-----------|-----------------|-------|------------------------|
|
|
264
|
-
| `dispute` | - | Buyer | Order owner, arbitration unpaused |
|
|
265
|
-
| `principal_confirm` | 0 | Buyer | Must be dispute initiator |
|
|
266
|
-
| `arbitrator_confirm` | 1 | Arbitrator | Must be designated arbitrator |
|
|
267
|
-
| `arbitration` | 2 | Arbitrator | `voting_deadline` must pass |
|
|
268
|
-
| `arb_claim_compensation` | 3 | Buyer | Order owner, indemnity > 0 |
|
|
269
|
-
| `objection` | 3 | Buyer | Within appeal window |
|
|
270
|
-
| `reset` | 4 | System | Automatic on objection |
|