@wowok/agent-mcp 2.2.11 → 2.2.13

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 (93) hide show
  1. package/dist/docs/index.d.ts +3 -0
  2. package/dist/docs/index.js +2 -0
  3. package/dist/docs/loader.d.ts +12 -0
  4. package/dist/docs/loader.js +177 -0
  5. package/dist/docs/search.d.ts +17 -0
  6. package/dist/docs/search.js +325 -0
  7. package/dist/docs/types.d.ts +55 -0
  8. package/dist/docs/types.js +1 -0
  9. package/dist/index.d.ts +12 -0
  10. package/dist/index.js +146 -39
  11. package/docs/README.md +249 -0
  12. package/docs/WIP.md +388 -0
  13. package/docs/WTS.md +536 -0
  14. package/docs/docs/account.md +914 -0
  15. package/docs/docs/allocation.md +635 -0
  16. package/docs/docs/arbitration.md +1804 -0
  17. package/docs/docs/arbitration_state_machine.md +270 -0
  18. package/docs/docs/contact.md +709 -0
  19. package/docs/docs/demand.md +948 -0
  20. package/docs/docs/guard.md +1465 -0
  21. package/docs/docs/localinfo.md +432 -0
  22. package/docs/docs/localmark.md +583 -0
  23. package/docs/docs/machine.md +2490 -0
  24. package/docs/docs/messenger.md +2098 -0
  25. package/docs/docs/onchain_events.md +267 -0
  26. package/docs/docs/order.md +1001 -0
  27. package/docs/docs/payment.md +512 -0
  28. package/docs/docs/permission.md +1438 -0
  29. package/docs/docs/personal.md +742 -0
  30. package/docs/docs/progress.md +1748 -0
  31. package/docs/docs/query.md +467 -0
  32. package/docs/docs/repository.md +1043 -0
  33. package/docs/docs/reward.md +833 -0
  34. package/docs/docs/service.md +2130 -0
  35. package/docs/docs/stage-01-introduction.md +243 -0
  36. package/docs/docs/stage-02-trust.md +302 -0
  37. package/docs/docs/stage-03-collaboration.md +337 -0
  38. package/docs/docs/stage-04-transaction.md +277 -0
  39. package/docs/docs/stage-05-business.md +151 -0
  40. package/docs/docs/stage-06-personal.md +203 -0
  41. package/docs/docs/stage-07-query.md +572 -0
  42. package/docs/docs/stage-08-examples.md +184 -0
  43. package/docs/docs/treasury.md +1149 -0
  44. package/docs/docs/wowok_buildin_info.md +740 -0
  45. package/docs/examples/Insurance/Insurance.md +594 -0
  46. package/docs/examples/Insurance/Insurance_TestResults.md +481 -0
  47. package/docs/examples/Insurance/insurance_complete_guard_v1.json +50 -0
  48. package/docs/examples/MyShop/MyShop.md +1353 -0
  49. package/docs/examples/MyShop/MyShop_TestResults.md +1003 -0
  50. package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +1898 -0
  51. package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +1297 -0
  52. package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +743 -0
  53. package/docs/examples/MyShop_Advanced/machine_nodes.json +222 -0
  54. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +776 -0
  55. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +599 -0
  56. package/docs/examples/Travel/Travel.md +1157 -0
  57. package/docs/examples/Travel/Travel_TestResults.md +743 -0
  58. package/docs/examples/Travel/calc-weather-timestamps.js +8 -0
  59. package/docs/examples/Travel/travel_machine_v2_export.json +104 -0
  60. package/docs/examples/Travel/weather_check_guard_v1.json +51 -0
  61. package/docs/skills/WOWOK.md +650 -0
  62. package/docs/skills/onchain_operations/_common.md +406 -0
  63. package/docs/skills/onchain_operations/_index.md +196 -0
  64. package/docs/skills/onchain_operations/allocation.md +28 -0
  65. package/docs/skills/onchain_operations/arbitration.md +106 -0
  66. package/docs/skills/onchain_operations/contact.md +40 -0
  67. package/docs/skills/onchain_operations/demand.md +53 -0
  68. package/docs/skills/onchain_operations/gen_passport.md +23 -0
  69. package/docs/skills/onchain_operations/guard.md +56 -0
  70. package/docs/skills/onchain_operations/machine.md +89 -0
  71. package/docs/skills/onchain_operations/order.md +56 -0
  72. package/docs/skills/onchain_operations/payment.md +24 -0
  73. package/docs/skills/onchain_operations/permission.md +68 -0
  74. package/docs/skills/onchain_operations/personal.md +58 -0
  75. package/docs/skills/onchain_operations/progress.md +38 -0
  76. package/docs/skills/onchain_operations/repository.md +70 -0
  77. package/docs/skills/onchain_operations/reward.md +38 -0
  78. package/docs/skills/onchain_operations/service.md +78 -0
  79. package/docs/skills/onchain_operations/treasury.md +68 -0
  80. package/docs/skills/schema-account_operation.md +402 -0
  81. package/docs/skills/schema-guard2file.md +153 -0
  82. package/docs/skills/schema-local_info_operation.md +160 -0
  83. package/docs/skills/schema-local_mark_operation.md +148 -0
  84. package/docs/skills/schema-machineNode2file.md +155 -0
  85. package/docs/skills/schema-messenger_operation.md +547 -0
  86. package/docs/skills/schema-onchain_events.md +201 -0
  87. package/docs/skills/schema-onchain_table_data.md +334 -0
  88. package/docs/skills/schema-query_toolkit.md +395 -0
  89. package/docs/skills/schema-wip_file.md +240 -0
  90. package/docs/skills/schema-wowok_buildin_info.md +296 -0
  91. package/docs/wip-examples/three_body.html +57 -0
  92. package/docs/wip-examples/three_body.wip +30 -0
  93. package/package.json +3 -2
@@ -0,0 +1,243 @@
1
+ # Stage 1: Getting Started ⭐
2
+
3
+ ---
4
+
5
+ **[← Return to Main Directory](../README.md) | [Stage 2: Trust Management →](stage-02-trust.md)**
6
+
7
+ ---
8
+
9
+ ## 📚 Learning Content
10
+
11
+ ### 1.1 Account 🔐
12
+
13
+ **Why do we need Account?**
14
+
15
+ In WoWok, all on-chain operations need to be signed and initiated through Account. Account is the foundation of your digital identity.
16
+
17
+ > **📢 Important Notice:** WoWok will never expose your private key to AI under any circumstances. You can use WoWok as a regular hot wallet. We recommend keeping significant assets in your cold wallet.
18
+
19
+ **Core Features:**
20
+ - ✅ Generate new wallet accounts
21
+ - ✅ Get test coins (for test network)
22
+ - ✅ Suspend and resume accounts
23
+ - ✅ Transfer between accounts
24
+ - ✅ Query account information
25
+ - ✅ Sign data
26
+
27
+
28
+ **→ [View Account Detailed Documentation →](account.md)**
29
+
30
+ ---
31
+
32
+ ### 1.2 LocalMark (Local Address Book 📇)
33
+
34
+ **Why do we need LocalMark?**
35
+
36
+ Blockchain addresses are usually long strings of characters that are hard to remember. LocalMark allows you to give these addresses memorable names and tags.
37
+
38
+ **Core Features:**
39
+ - ✅ Add address marks (name + tags)
40
+ - ✅ Filter addresses by tags, names, and recent usage
41
+ - ✅ Remove address marks
42
+ - ✅ Clear all marks
43
+
44
+ **Important Notes:**
45
+ - ⚠️ Only stored on local device!
46
+ - ⚠️ Will not be uploaded to the chain!
47
+ - ⚠️ Can be modified and deleted at will!
48
+
49
+ **→ [View LocalMark Detailed Documentation →](localmark.md)**
50
+
51
+ ---
52
+
53
+ ## 🎓 Practice Exercises
54
+
55
+ ### Exercise 1: Create Your First Account
56
+
57
+ **💬 You**: Generate a new account named "my_first_account".
58
+
59
+ ---
60
+
61
+ **🤖 AI Generated Request JSON:**
62
+
63
+ ```json
64
+ {
65
+ "gen": {
66
+ "name": "my_first_account"
67
+ }
68
+ }
69
+ ```
70
+
71
+ **✅ Execution Successful:**
72
+
73
+ ```
74
+ Account successfully generated!
75
+ ```
76
+
77
+ **📤 Return Result:**
78
+
79
+ ```json
80
+ {
81
+ "gen": {
82
+ "address": "...",
83
+ "name": "my_first_account"
84
+ }
85
+ }
86
+ ```
87
+
88
+ ---
89
+
90
+ ### Exercise 2: Get Test Coins
91
+
92
+ **💬 You**: Please claim faucet test tokens for my_first_account from testnet.
93
+
94
+ ---
95
+
96
+ **🤖 AI Generated Request JSON:**
97
+
98
+ ```json
99
+ {
100
+ "faucet": {
101
+ "name_or_address": "my_first_account",
102
+ "network": "testnet"
103
+ }
104
+ }
105
+ ```
106
+
107
+ **✅ Execution Successful:**
108
+
109
+ ```
110
+ Successfully claimed test tokens from testnet!
111
+ ```
112
+
113
+ **📤 Return Result:**
114
+
115
+ ```json
116
+ {
117
+ "faucet": {
118
+ "name_or_address": "my_first_account",
119
+ "result": [...]
120
+ }
121
+ }
122
+ ```
123
+ ---
124
+
125
+ ### Exercise 3: Add Address Mark
126
+
127
+ **💬 You**: Add a mark to my_first_account named "Chat Account" with tag "Chat".
128
+
129
+ ---
130
+
131
+ **🤖 AI Generated Request JSON:**
132
+
133
+ ```json
134
+ {
135
+ "add": {
136
+ "op": "add",
137
+ "data": [
138
+ {
139
+ "name": { "value": "Chat Account" },
140
+ "address": "...",
141
+ "tags": ["Chat"]
142
+ }
143
+ ]
144
+ }
145
+ }
146
+ ```
147
+
148
+ **✅ Execution Successful:**
149
+
150
+ ```
151
+ Successfully added mark for my_first_account!
152
+ ```
153
+
154
+ **📤 Return Result:**
155
+
156
+ ```json
157
+ {
158
+ "add": [
159
+ {
160
+ "name": "Chat Account",
161
+ "address": "...",
162
+ "tags": ["Chat"],
163
+ "createdAt": ...,
164
+ "updatedAt": ...
165
+ }
166
+ ]
167
+ }
168
+ ```
169
+
170
+ ---
171
+
172
+ ### Exercise 4: Add a Friend Address
173
+
174
+ **💬 You**: Name the address "0x731f779a62d5f7a883e1111586fe260cb9fa558911e4223d073ff8c49347d4aa" as "Alice" with tag: "My Friend".
175
+
176
+ ---
177
+
178
+ **🤖 AI Generated Request JSON:**
179
+
180
+ ```json
181
+ {
182
+ "add": {
183
+ "op": "add",
184
+ "data": [
185
+ {
186
+ "name": { "value": "Alice" },
187
+ "address": "0x731f779a62d5f7a883e1111586fe260cb9fa558911e4223d073ff8c49347d4aa",
188
+ "tags": ["My Friend"]
189
+ }
190
+ ]
191
+ }
192
+ }
193
+ ```
194
+
195
+ **✅ Execution Successful:**
196
+
197
+ ```
198
+ Done! Successfully added mark for this address.
199
+ ```
200
+
201
+ **📤 Return Result:**
202
+
203
+ ```json
204
+ {
205
+ "add": [
206
+ {
207
+ "name": "Alice",
208
+ "address": "0x731f779a62d5f7a883e1111586fe260cb9fa558911e4223d073ff8c49347d4aa",
209
+ "tags": ["My Friend"],
210
+ "createdAt": ...,
211
+ "updatedAt": ...
212
+ }
213
+ ]
214
+ }
215
+ ```
216
+
217
+ ---
218
+
219
+ ## 🏆 Stage Checklist
220
+
221
+ Before moving to the next stage, please confirm that you have:
222
+
223
+ - [ ] Understood WoWok's core concepts
224
+ - [ ] Learned about WoWok's system architecture
225
+ - [ ] Understood the six pillars of the trust network
226
+ - [ ] Configured AI client
227
+ - [ ] Verified successful installation
228
+ - [ ] Successfully created at least one account
229
+ - [ ] Obtained test coins on test network
230
+ - [ ] Added several address marks
231
+ - [ ] Understood the difference between local operations and on-chain operations
232
+
233
+ ---
234
+
235
+ ## 🎉 Congratulations!
236
+
237
+ You have completed Stage 1! Now you have mastered WoWok's basic operations and can move on to the next stage to learn about trust management!
238
+
239
+ **[→ Go to Stage 2: Trust Management 🔐 →](stage-02-trust.md)**
240
+
241
+ ---
242
+
243
+ **[← Return to Main Directory](../README.md)**
@@ -0,0 +1,302 @@
1
+ # Stage 2: Trust Management 🔐
2
+
3
+ ---
4
+
5
+ **[← Stage 1: Getting Started](stage-01-introduction.md) | [Stage 3: Open Collaboration →](stage-03-collaboration.md)**
6
+
7
+ ---
8
+
9
+ ## 🎯 Stage Objectives
10
+
11
+ In this stage, you will learn about trust management mechanisms in WoWok, including:
12
+
13
+ - How to manage who can do what through Permission
14
+ - How to create programmable trust rules through Guard
15
+ - Understanding WoWok's permission index system
16
+
17
+ ---
18
+
19
+ ## 📚 Learning Content
20
+
21
+ ### 2.1 Permission (Permission Management 🔑)
22
+
23
+ **Why do we need Permission?**
24
+
25
+ In a decentralized world, we need to clearly define: **who can perform what operations on what objects**. Permission is WoWok's permission management system.
26
+
27
+ **Core Concepts:**
28
+ - 👤 **Subject (Who)** - Who (account address or Guard ID)
29
+ - 📦 **Object (What)** - On-chain objects (all objects that have set this Permission)
30
+ - 🎯 **Action (How)** - What to do (permission index)
31
+
32
+ > **📢 Notice:** Users can perform operations with specified permissions on specified objects through their account or by completing specified Guard verification.
33
+
34
+ **Built-in Permission Indexes:**
35
+ ```
36
+ SERVICE_NEW = 300 - Create service
37
+ SERVICE_DESCRIPTION = 301 - Modify service description
38
+ MACHINE_NEW = 500 - Create workflow
39
+ REPOSITORY_NEW = 700 - Create data repository
40
+ ... etc
41
+ ```
42
+
43
+ **Core Features:**
44
+ - ✅ Add/Remove permissions
45
+ - ✅ Remove permissions for accounts or Guard IDs
46
+ - ✅ Exchange, copy, and transfer permissions
47
+ - ✅ Query built-in permissions
48
+
49
+ **→ [View Permission Detailed Documentation →](permission.md)**
50
+
51
+ ---
52
+
53
+ ### 2.2 Guard (Trust Verification Engine 🛡️)
54
+
55
+ **Why do we need Guard?**
56
+
57
+ Permission is like permission management for specific groups and internal organization personnel, while Guard acts like a "guard" that can verify and authorize operations for unknown crowds, such as:
58
+ - If you have purchased a certain service before a certain time, you can claim $20 reward from the Reward object
59
+ - If you recommend a service approved by the user to their Demand, you can get $40 reward
60
+ - If a courier's delivery time in a certain process is less than 20 minutes, they can get 10 points
61
+ - etc.
62
+
63
+ **Core Concepts:**
64
+ - Guard can be defined in Markdown or JSON format
65
+ - Supports complex conditional verification logic
66
+ - Can interact with Reward, Machine, and other components
67
+
68
+ **Core Features:**
69
+ - ✅ Create Guard (Markdown format)
70
+ - ✅ Create Guard (JSON format)
71
+ - ✅ Query built-in Guard instructions
72
+ - ✅ Link Guard to other objects
73
+
74
+ **→ [View Guard Detailed Documentation →](guard.md)**
75
+
76
+ ---
77
+
78
+ ## 🎓 Practice Exercises
79
+
80
+ ### Exercise 1: Create a Permission
81
+
82
+ **💬 You**: On testnet, using my_first_account, create a new Permission object. And:
83
+ 1. Add description: "Test Permission";
84
+ 2. Add permissions for alice: create Service, and all permissions related to Machine;
85
+ 3. Name this new object P1
86
+
87
+ ---
88
+
89
+ **🤖 AI Generated Request JSON:**
90
+
91
+ ```json
92
+ {
93
+ "data": {
94
+ "description": "Test Permission",
95
+ "object": {
96
+ "name": "P1"
97
+ },
98
+ "table": {
99
+ "op": "add perm by entity",
100
+ "entity": {
101
+ "name_or_address": "alice"
102
+ },
103
+ "index": [
104
+ 300,
105
+ 200,
106
+ 201,
107
+ 203,
108
+ 204,
109
+ 205,
110
+ 206,
111
+ 207,
112
+ 208
113
+ ]
114
+ }
115
+ },
116
+ "operation_type": "permission",
117
+ "env": {
118
+ "account": "my_first_account",
119
+ "network": "testnet"
120
+ }
121
+ }
122
+ ```
123
+
124
+ **✅ Transaction executed successfully:**
125
+
126
+ ```
127
+ Transaction completed successfully...
128
+ ```
129
+
130
+ **📤 Return Result:**
131
+
132
+ ```json
133
+ [
134
+ {
135
+ "type": "Permission",
136
+ "type_raw": "0x2::permission::Permission",
137
+ "object": "...",
138
+ "version": "149",
139
+ "owner": {
140
+ "Shared": {
141
+ "initial_shared_version": 149
142
+ }
143
+ },
144
+ "change": "created"
145
+ }
146
+ ]
147
+ ```
148
+
149
+ ### Exercise 2: Create a Guard that Anyone Can Pass
150
+
151
+ **💬 You**: Create a Guard named "simple_guard": "Anyone can pass the verification".
152
+
153
+ ---
154
+
155
+ **🤖 AI Generated Request JSON:**
156
+
157
+ ```json
158
+ {
159
+ "data": {
160
+ "description": "Anyone can pass the verification",
161
+ "namedNew": {
162
+ "name": "simple_guard"
163
+ },
164
+ "table": [
165
+ {
166
+ "b_submission": false,
167
+ "identifier": 0,
168
+ "value": true,
169
+ "value_type": 0
170
+ }
171
+ ],
172
+ "root": {
173
+ "node": {
174
+ "type": "identifier",
175
+ "identifier": 0
176
+ },
177
+ "type": "node"
178
+ }
179
+ },
180
+ "operation_type": "guard"
181
+ }
182
+ ```
183
+
184
+
185
+ **✅ Transaction executed successfully:**
186
+
187
+ ```
188
+ Transaction completed successfully
189
+ [
190
+ {
191
+ "type": "Guard",
192
+ "type_raw": "0x2::guard::Guard",
193
+ "object": "...",
194
+ "version": "12687712",
195
+ "owner": "Immutable",
196
+ "change": "created"
197
+ }
198
+ ]
199
+ ```
200
+
201
+
202
+ ---
203
+
204
+ ### Exercise 3: Create a Guard that Only User alice Can Pass
205
+
206
+ **💬 You**: Create a new Guard object named G1 (mandatory). It needs to verify:
207
+ The signer has permission to create service objects in P1 object.
208
+
209
+ ---
210
+
211
+ **🤖 AI Generated Request JSON:**
212
+
213
+ ```json
214
+ {
215
+ "data": {
216
+ "description": "Verify that the signer has permission to create service in P1 object",
217
+ "namedNew": {
218
+ "name": "G1",
219
+ "replaceExistName": true
220
+ },
221
+ "table": [
222
+ {
223
+ "identifier": 0,
224
+ "b_submission": false,
225
+ "value_type": 1,
226
+ "value": "P1"
227
+ },
228
+ {
229
+ "identifier": 1,
230
+ "b_submission": false,
231
+ "value_type": 4,
232
+ "value": 300
233
+ }
234
+ ],
235
+ "root": {
236
+ "type": "node",
237
+ "node": {
238
+ "query": "permission.entity.perm has",
239
+ "type": "query",
240
+ "object": {
241
+ "identifier": 0
242
+ },
243
+ "parameters": [
244
+ {
245
+ "context": "Signer",
246
+ "type": "context"
247
+ },
248
+ {
249
+ "identifier": 1,
250
+ "type": "identifier"
251
+ }
252
+ ]
253
+ }
254
+ }
255
+ },
256
+ "operation_type": "guard"
257
+ }
258
+ ```
259
+
260
+
261
+ **✅ Transaction executed successfully:**
262
+
263
+ ```
264
+ Transaction completed successfully
265
+
266
+ [
267
+ {
268
+ "type": "Guard",
269
+ "type_raw": "0x2::guard::Guard",
270
+ "object": "...",
271
+ "version": "12685347",
272
+ "owner": "Immutable",
273
+ "change": "created"
274
+ }
275
+ ]
276
+ ```
277
+
278
+
279
+ ---
280
+
281
+ ## 🏆 Stage Checklist
282
+
283
+ Before moving to the next stage, please confirm that you have:
284
+
285
+ - [ ] Understood the three core elements of Permission (Who, What, How)
286
+ - [ ] Know how to query built-in permission indexes
287
+ - [ ] Created at least one Permission
288
+ - [ ] Understood the role of Guard
289
+ - [ ] Created at least one Guard
290
+ - [ ] Understood the combined use of Permission and Guard
291
+
292
+ ---
293
+
294
+ ## 🎉 Congratulations!
295
+
296
+ You have completed Stage 2! Now you have mastered WoWok's trust management mechanisms and can move on to the next stage to learn about open collaboration!
297
+
298
+ **[→ Go to Stage 3: Open Collaboration 🤝 →](stage-03-collaboration.md)**
299
+
300
+ ---
301
+
302
+ **[← Return to Main Directory](../README.md)**