@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.
- package/dist/docs/index.d.ts +3 -0
- package/dist/docs/index.js +2 -0
- package/dist/docs/loader.d.ts +12 -0
- package/dist/docs/loader.js +177 -0
- package/dist/docs/search.d.ts +17 -0
- package/dist/docs/search.js +325 -0
- package/dist/docs/types.d.ts +55 -0
- package/dist/docs/types.js +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +146 -39
- package/docs/README.md +249 -0
- package/docs/WIP.md +388 -0
- package/docs/WTS.md +536 -0
- package/docs/docs/account.md +914 -0
- package/docs/docs/allocation.md +635 -0
- package/docs/docs/arbitration.md +1804 -0
- package/docs/docs/arbitration_state_machine.md +270 -0
- package/docs/docs/contact.md +709 -0
- package/docs/docs/demand.md +948 -0
- package/docs/docs/guard.md +1465 -0
- package/docs/docs/localinfo.md +432 -0
- package/docs/docs/localmark.md +583 -0
- package/docs/docs/machine.md +2490 -0
- package/docs/docs/messenger.md +2098 -0
- package/docs/docs/onchain_events.md +267 -0
- package/docs/docs/order.md +1001 -0
- package/docs/docs/payment.md +512 -0
- package/docs/docs/permission.md +1438 -0
- package/docs/docs/personal.md +742 -0
- package/docs/docs/progress.md +1748 -0
- package/docs/docs/query.md +467 -0
- package/docs/docs/repository.md +1043 -0
- package/docs/docs/reward.md +833 -0
- package/docs/docs/service.md +2130 -0
- package/docs/docs/stage-01-introduction.md +243 -0
- package/docs/docs/stage-02-trust.md +302 -0
- package/docs/docs/stage-03-collaboration.md +337 -0
- package/docs/docs/stage-04-transaction.md +277 -0
- package/docs/docs/stage-05-business.md +151 -0
- package/docs/docs/stage-06-personal.md +203 -0
- package/docs/docs/stage-07-query.md +572 -0
- package/docs/docs/stage-08-examples.md +184 -0
- package/docs/docs/treasury.md +1149 -0
- package/docs/docs/wowok_buildin_info.md +740 -0
- package/docs/examples/Insurance/Insurance.md +594 -0
- package/docs/examples/Insurance/Insurance_TestResults.md +481 -0
- package/docs/examples/Insurance/insurance_complete_guard_v1.json +50 -0
- package/docs/examples/MyShop/MyShop.md +1353 -0
- package/docs/examples/MyShop/MyShop_TestResults.md +1003 -0
- package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +1898 -0
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +1297 -0
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +743 -0
- package/docs/examples/MyShop_Advanced/machine_nodes.json +222 -0
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +776 -0
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +599 -0
- package/docs/examples/Travel/Travel.md +1157 -0
- package/docs/examples/Travel/Travel_TestResults.md +743 -0
- package/docs/examples/Travel/calc-weather-timestamps.js +8 -0
- package/docs/examples/Travel/travel_machine_v2_export.json +104 -0
- package/docs/examples/Travel/weather_check_guard_v1.json +51 -0
- package/docs/skills/WOWOK.md +650 -0
- package/docs/skills/onchain_operations/_common.md +406 -0
- package/docs/skills/onchain_operations/_index.md +196 -0
- package/docs/skills/onchain_operations/allocation.md +28 -0
- package/docs/skills/onchain_operations/arbitration.md +106 -0
- package/docs/skills/onchain_operations/contact.md +40 -0
- package/docs/skills/onchain_operations/demand.md +53 -0
- package/docs/skills/onchain_operations/gen_passport.md +23 -0
- package/docs/skills/onchain_operations/guard.md +56 -0
- package/docs/skills/onchain_operations/machine.md +89 -0
- package/docs/skills/onchain_operations/order.md +56 -0
- package/docs/skills/onchain_operations/payment.md +24 -0
- package/docs/skills/onchain_operations/permission.md +68 -0
- package/docs/skills/onchain_operations/personal.md +58 -0
- package/docs/skills/onchain_operations/progress.md +38 -0
- package/docs/skills/onchain_operations/repository.md +70 -0
- package/docs/skills/onchain_operations/reward.md +38 -0
- package/docs/skills/onchain_operations/service.md +78 -0
- package/docs/skills/onchain_operations/treasury.md +68 -0
- package/docs/skills/schema-account_operation.md +402 -0
- package/docs/skills/schema-guard2file.md +153 -0
- package/docs/skills/schema-local_info_operation.md +160 -0
- package/docs/skills/schema-local_mark_operation.md +148 -0
- package/docs/skills/schema-machineNode2file.md +155 -0
- package/docs/skills/schema-messenger_operation.md +547 -0
- package/docs/skills/schema-onchain_events.md +201 -0
- package/docs/skills/schema-onchain_table_data.md +334 -0
- package/docs/skills/schema-query_toolkit.md +395 -0
- package/docs/skills/schema-wip_file.md +240 -0
- package/docs/skills/schema-wowok_buildin_info.md +296 -0
- package/docs/wip-examples/three_body.html +57 -0
- package/docs/wip-examples/three_body.wip +30 -0
- package/package.json +3 -2
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Stage 5: Business Components 🏪
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
**[← Stage 4: Transaction Execution](stage-04-transaction.md) | [Stage 6: Personal Services →](stage-06-personal.md)**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🎯 Stage Objectives
|
|
10
|
+
|
|
11
|
+
In this stage, you will learn about business components in WoWok, including:
|
|
12
|
+
|
|
13
|
+
- How to use Repository to manage on-chain data
|
|
14
|
+
- How to use Treasury to manage team funds
|
|
15
|
+
- How to use Reward for marketing incentives
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📚 Learning Content
|
|
20
|
+
|
|
21
|
+
### 5.1 Repository (Data Management 🗄️)
|
|
22
|
+
|
|
23
|
+
**Why do we need Repository?**
|
|
24
|
+
|
|
25
|
+
Business requires data storage. Repository provides structured consensus data storage.
|
|
26
|
+
|
|
27
|
+
**Core Concepts:**
|
|
28
|
+
- 📦 **Object Container** - Store and manage objects
|
|
29
|
+
- 🔑 **Key-Value Pairs** - Access data by name
|
|
30
|
+
- 🔐 **Access Control** - Can set read/write permissions
|
|
31
|
+
|
|
32
|
+
**Core Features:**
|
|
33
|
+
- ✅ Create Repository
|
|
34
|
+
- ✅ Add/Remove data items
|
|
35
|
+
- ✅ Manage read/write permissions
|
|
36
|
+
- ✅ Link Guard verification
|
|
37
|
+
|
|
38
|
+
**→ [View Repository Detailed Documentation →](repository.md)**
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### 5.2 Treasury (Financial Management 💰)
|
|
43
|
+
|
|
44
|
+
**Why do we need Treasury?**
|
|
45
|
+
|
|
46
|
+
Teams need fund management. Treasury allows you to create and manage team fund pools.
|
|
47
|
+
|
|
48
|
+
**Core Concepts:**
|
|
49
|
+
- 🏦 **Fund Pool** - Team's shared funds
|
|
50
|
+
- 👥 **Managers** - People who can manage funds
|
|
51
|
+
- 💵 **Deposit/Withdraw** - Deposit or withdraw from the fund pool
|
|
52
|
+
- 📝 **Transaction Records** - All operations are recorded
|
|
53
|
+
|
|
54
|
+
**Core Features:**
|
|
55
|
+
- ✅ Create Treasury
|
|
56
|
+
- ✅ Deposit funds
|
|
57
|
+
- ✅ Withdraw funds
|
|
58
|
+
- ✅ Add/Remove managers
|
|
59
|
+
|
|
60
|
+
**→ [View Treasury Detailed Documentation →](treasury.md)**
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### 5.3 Reward (Marketing Incentives 🎁)
|
|
65
|
+
|
|
66
|
+
**Why do we need Reward?**
|
|
67
|
+
|
|
68
|
+
Business needs incentives. Reward allows you to create reward pools and incentive mechanisms.
|
|
69
|
+
|
|
70
|
+
**Core Concepts:**
|
|
71
|
+
- 🎁 **Reward Pool** - Fund pool for rewards
|
|
72
|
+
- 🎯 **Reward Items** - Specific reward definitions
|
|
73
|
+
- 🛡️ **Guard Verification** - Can bind Guard to verify claim conditions
|
|
74
|
+
- 📋 **Claim Records** - Record who claimed what rewards
|
|
75
|
+
|
|
76
|
+
**Core Features:**
|
|
77
|
+
- ✅ Create Reward
|
|
78
|
+
- ✅ Inject funds
|
|
79
|
+
- ✅ Set reward items
|
|
80
|
+
- ✅ Bind Guard verification
|
|
81
|
+
- ✅ Claim rewards
|
|
82
|
+
|
|
83
|
+
**→ [View Reward Detailed Documentation →](reward.md)**
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 🎓 Practice Exercises
|
|
88
|
+
|
|
89
|
+
### Exercise 1: Create a Repository
|
|
90
|
+
|
|
91
|
+
Create a data repository and add some data
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"operation_type": "repository",
|
|
96
|
+
"data": {
|
|
97
|
+
"object": {
|
|
98
|
+
"name": "my_data_repo"
|
|
99
|
+
},
|
|
100
|
+
"data_add": [
|
|
101
|
+
{
|
|
102
|
+
"name": "config",
|
|
103
|
+
"value": "my_config_value"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### Exercise 2: Create a Treasury
|
|
113
|
+
|
|
114
|
+
Create a team fund pool
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"operation_type": "treasury",
|
|
119
|
+
"data": {
|
|
120
|
+
"object": {
|
|
121
|
+
"name": "team_treasury"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 🏆 Stage Checklist
|
|
130
|
+
|
|
131
|
+
Before moving to the next stage, please confirm that you have:
|
|
132
|
+
|
|
133
|
+
- [ ] Understood Repository's data storage mechanism
|
|
134
|
+
- [ ] Created at least one Repository
|
|
135
|
+
- [ ] Added data to Repository
|
|
136
|
+
- [ ] Understood Treasury's fund management
|
|
137
|
+
- [ ] Created at least one Treasury
|
|
138
|
+
- [ ] Understood Reward's incentive mechanism
|
|
139
|
+
- [ ] Created at least one Reward
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 🎉 Congratulations!
|
|
144
|
+
|
|
145
|
+
You have completed Stage 5! Now you have mastered WoWok's business components and are ready to move on to the next stage to learn about personal services!
|
|
146
|
+
|
|
147
|
+
**[→ Go to Stage 6: Personal Services 👤 →](stage-06-personal.md)**
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
**[← Return to Main Directory](../README.md)**
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Stage 6: Personal Services 👤
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
**[← Stage 5: Business Components](stage-05-business.md) | [Stage 7: Data Query →](stage-07-query.md)**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🎯 Stage Objectives
|
|
10
|
+
|
|
11
|
+
In this stage, you will learn about personal services in WoWok, including:
|
|
12
|
+
|
|
13
|
+
- How to use LocalInfo to manage local private information
|
|
14
|
+
- How to use Demand to post bounty requests
|
|
15
|
+
- How to use Personal to manage your personal on-chain portal
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📚 Learning Content
|
|
20
|
+
|
|
21
|
+
### 6.1 LocalInfo (Private Information Management 🔒)
|
|
22
|
+
|
|
23
|
+
**Why do we need LocalInfo?**
|
|
24
|
+
|
|
25
|
+
Individuals need to manage private information. LocalInfo allows you to securely store sensitive information locally.
|
|
26
|
+
|
|
27
|
+
**Core Concepts:**
|
|
28
|
+
- 🔒 **Local Storage Only** - Will not be uploaded to the chain
|
|
29
|
+
- 📝 **Multiple Entries** - Can store multiple pieces of information
|
|
30
|
+
- ⭐ **Default Setting** - Can set default items
|
|
31
|
+
- 🗑️ **Deletable** - Can be deleted at any time
|
|
32
|
+
|
|
33
|
+
**Core Features:**
|
|
34
|
+
- ✅ Add information
|
|
35
|
+
- ✅ Remove information
|
|
36
|
+
- ✅ Set default
|
|
37
|
+
- ✅ Reset all
|
|
38
|
+
|
|
39
|
+
**Important Notes:**
|
|
40
|
+
- ⚠️ Only stored on local device!
|
|
41
|
+
- ⚠️ Will not be uploaded to the chain!
|
|
42
|
+
- ⚠️ Suitable for storing addresses, phone numbers, contacts, and other sensitive information!
|
|
43
|
+
|
|
44
|
+
**→ [View LocalInfo Detailed Documentation →](localinfo.md)**
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### 6.2 Demand (Seeking Assistance 🙋)
|
|
49
|
+
|
|
50
|
+
**Why do we need Demand?**
|
|
51
|
+
|
|
52
|
+
Sometimes you need help from others. Demand allows you to post requests and set rewards.
|
|
53
|
+
|
|
54
|
+
**Core Concepts:**
|
|
55
|
+
- 📋 **Request Description** - Describe what help you need
|
|
56
|
+
- 💰 **Reward Pool** - Rewards that can be claimed upon completion
|
|
57
|
+
- 👥 **Submitters** - People who can submit solutions
|
|
58
|
+
- ✅ **Claim Reward** - Rewards can be claimed after the request is resolved
|
|
59
|
+
|
|
60
|
+
**Core Features:**
|
|
61
|
+
- ✅ Create Demand
|
|
62
|
+
- ✅ Inject reward funds
|
|
63
|
+
- ✅ Add submitters
|
|
64
|
+
- ✅ Claim rewards
|
|
65
|
+
|
|
66
|
+
**→ [View Demand Detailed Documentation →](demand.md)**
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### 6.3 Personal (Personal On-Chain Portal 👤)
|
|
71
|
+
|
|
72
|
+
**Why do we need Personal?**
|
|
73
|
+
|
|
74
|
+
You need a public personal homepage. Personal allows you to manage your public profile and on-chain identity.
|
|
75
|
+
|
|
76
|
+
**Core Concepts:**
|
|
77
|
+
- 📝 **Description** — Personal description/bio
|
|
78
|
+
- 📎 **Information** — Public records (social handles, URLs, etc.) stored on-chain
|
|
79
|
+
- 🏷️ **Mark** — On-chain identity marks (public name and tags for addresses)
|
|
80
|
+
- 🔗 **Referrer** — Referrer ID for joining the on-chain network
|
|
81
|
+
- 🌐 **Public** — All information is public on the chain
|
|
82
|
+
|
|
83
|
+
**Core Features:**
|
|
84
|
+
- ✅ Set personal description
|
|
85
|
+
- ✅ Add/remove/clear public information records (social handles, URLs)
|
|
86
|
+
- ✅ Add/remove/clear/transfer/replace/destroy on-chain identity marks
|
|
87
|
+
- ✅ Set referrer
|
|
88
|
+
|
|
89
|
+
**Important Notes:**
|
|
90
|
+
- ⚠️ All information is public on the chain!
|
|
91
|
+
- ⚠️ Please be cautious when posting personal information!
|
|
92
|
+
- ⚠️ NEVER post phone numbers, addresses, or private keys on Personal!
|
|
93
|
+
- ⚠️ For private marks, use the `local` tool instead of on-chain Mark
|
|
94
|
+
|
|
95
|
+
**→ [View Personal Detailed Documentation →](personal.md)**
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### 6.4 Payment (Direct Transfer 💸)
|
|
100
|
+
|
|
101
|
+
**Why do we need Payment?**
|
|
102
|
+
|
|
103
|
+
Sometimes you need to transfer funds directly to someone. Payment allows you to make direct token transfers.
|
|
104
|
+
|
|
105
|
+
**Core Features:**
|
|
106
|
+
- ✅ Direct transfer
|
|
107
|
+
- ✅ Support multiple tokens
|
|
108
|
+
- ✅ Optional memo
|
|
109
|
+
|
|
110
|
+
**→ [View Payment Detailed Documentation →](payment.md)**
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 🎓 Practice Exercises
|
|
115
|
+
|
|
116
|
+
### Exercise 1: Add Local Information
|
|
117
|
+
|
|
118
|
+
Add a shipping address
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"operation": "add",
|
|
123
|
+
"name": "shipping_address",
|
|
124
|
+
"default": true,
|
|
125
|
+
"contents": ["123 Main St, New York, NY 10001", "10001"]
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### Exercise 2: Update Personal Profile
|
|
132
|
+
|
|
133
|
+
Set your public description
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"operation_type": "personal",
|
|
138
|
+
"data": {
|
|
139
|
+
"description": "This is my personal bio. I am a blockchain developer."
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Add public information records (safe: social handles, URLs)
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"operation_type": "personal",
|
|
149
|
+
"data": {
|
|
150
|
+
"information": {
|
|
151
|
+
"op": "add",
|
|
152
|
+
"data": [
|
|
153
|
+
{ "name": "github", "value_type": "String", "value": "https://github.com/alice" },
|
|
154
|
+
{ "name": "twitter", "value_type": "String", "value": "@alice_dev" }
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Add an on-chain identity mark for another address
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"operation_type": "personal",
|
|
166
|
+
"data": {
|
|
167
|
+
"mark": {
|
|
168
|
+
"op": "add",
|
|
169
|
+
"data": [
|
|
170
|
+
{ "address": "friend_address", "name": "Alice Smith", "tags": ["colleague", "dev"] }
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 🏆 Stage Checklist
|
|
180
|
+
|
|
181
|
+
Before moving to the next stage, please confirm that you have:
|
|
182
|
+
|
|
183
|
+
- [ ] Understood LocalInfo's local storage characteristics
|
|
184
|
+
- [ ] Added at least one piece of local information
|
|
185
|
+
- [ ] Understood Demand's bounty request mechanism
|
|
186
|
+
- [ ] Created at least one Demand
|
|
187
|
+
- [ ] Understood Personal's public characteristics
|
|
188
|
+
- [ ] Updated personal description
|
|
189
|
+
- [ ] Added/removed personal information records
|
|
190
|
+
- [ ] Managed on-chain identity marks (add/remove/clear/transfer)
|
|
191
|
+
- [ ] Used Payment for transfers
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 🎉 Congratulations!
|
|
196
|
+
|
|
197
|
+
You have completed Stage 6! Now you have mastered WoWok's personal services and are ready to move on to the final stage to learn about data query!
|
|
198
|
+
|
|
199
|
+
**[→ Go to Stage 7: Data Query 🔍 →](stage-07-query.md)**
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
**[← Return to Main Directory](../README.md)**
|