@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,184 +0,0 @@
|
|
|
1
|
-
# Stage 8: Practical Examples
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
**[← Stage 7: Data Query](stage-07-query.md)**
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 🎯 Stage Objectives
|
|
10
|
-
|
|
11
|
-
In this stage, you will explore three complete practical examples that demonstrate how to use WoWok in real-world scenarios. By the end, you will understand:
|
|
12
|
-
|
|
13
|
-
- How to build a basic e-commerce store with MyShop
|
|
14
|
-
- How to create a signed book service with ThreeBody_Signature
|
|
15
|
-
- How to implement advanced e-commerce with MyShop_Advanced
|
|
16
|
-
- Practical patterns and best practices from each example
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## 📚 Example Overview
|
|
21
|
-
|
|
22
|
-
### Example 1: MyShop - Basic E-Commerce
|
|
23
|
-
|
|
24
|
-
#### One-Sentence Introduction
|
|
25
|
-
A complete online toy store demonstrating how to build a basic e-commerce platform with order workflows, permission control, and customer communication.
|
|
26
|
-
|
|
27
|
-
#### Key Features
|
|
28
|
-
- Product listing and inventory management
|
|
29
|
-
- Automated order workflow (Order Confirmation → Shipping → In Transit → Completed)
|
|
30
|
-
- Permission-based merchant operations
|
|
31
|
-
- Arbitration support for dispute resolution
|
|
32
|
-
- WIP file verification for product authenticity
|
|
33
|
-
- Discount coupon system
|
|
34
|
-
- Private customer communication via encrypted Messenger
|
|
35
|
-
- Fund allocation with Guard-protected withdrawals
|
|
36
|
-
|
|
37
|
-
#### Skills You Will Learn
|
|
38
|
-
- How to design and implement order workflows - applicable to any business process requiring state tracking
|
|
39
|
-
- How to use Permission objects for role-based access control - solving enterprise application permission management issues
|
|
40
|
-
- How to implement secure customer communication through Contact and Messenger - protecting sensitive information from being on-chain
|
|
41
|
-
- How to use Guard objects to verify fund allocation conditions - ensuring withdrawals only occur when conditions are met
|
|
42
|
-
- How to integrate WIP files for product verification - applicable to digital goods requiring authenticity guarantees
|
|
43
|
-
|
|
44
|
-
#### 🔗 Project Links
|
|
45
|
-
- [MyShop Full Documentation](../examples/MyShop/MyShop.md)
|
|
46
|
-
- [MyShop Test Results](../examples/MyShop/MyShop_TestResults.md)
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
### Example 2: ThreeBody_Signature - Signed Book Service
|
|
51
|
-
|
|
52
|
-
#### One-Sentence Introduction
|
|
53
|
-
A specialized service for book signing by the Three-Body author, demonstrating Buy Guard protection and simple workflow management.
|
|
54
|
-
|
|
55
|
-
#### Key Features
|
|
56
|
-
- Buy Guard protection (only authorized user can purchase)
|
|
57
|
-
- Two-node workflow (Book Delivered → Signature Completed)
|
|
58
|
-
- WIP file integration with hash validation
|
|
59
|
-
- Fixed pricing model (888 tokens)
|
|
60
|
-
- Permission-based workflow progression
|
|
61
|
-
- Complete service configuration from creation to publication
|
|
62
|
-
|
|
63
|
-
#### Skills You Will Learn
|
|
64
|
-
- How to use Buy Guard to restrict service purchasers - solving access control issues for internal tools or authorized services
|
|
65
|
-
- How to design simple yet clear workflows - applicable to service delivery scenarios requiring step confirmation
|
|
66
|
-
- How to bind WIP files to sales items - implementing authenticity verification for digital goods
|
|
67
|
-
- How to properly configure and publish services - mastering the complete Service object lifecycle management
|
|
68
|
-
- How to verify system functionality through actual testing - establishing effective testing strategies
|
|
69
|
-
|
|
70
|
-
#### 🔗 Project Links
|
|
71
|
-
- [ThreeBody_Signature Full Documentation](../examples/ThreeBody_Signature/ThreeBody_Signature.md)
|
|
72
|
-
- [ThreeBody_Signature Test Results](../examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md)
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
### Example 3: MyShop_Advanced - Advanced E-Commerce
|
|
77
|
-
|
|
78
|
-
#### One-Sentence Introduction
|
|
79
|
-
An enterprise-grade e-commerce platform with multi-path workflows, milestone-based fund release, reward incentives, and Merkle Root privacy protection.
|
|
80
|
-
|
|
81
|
-
#### Key Features
|
|
82
|
-
- WIP-verified product with hash validation
|
|
83
|
-
- Multi-path order workflow (normal delivery, wonderful rating, returns, lost handling)
|
|
84
|
-
- Milestone-based fund allocation (100% to merchant on completion, 100% to customer on return/lost)
|
|
85
|
-
- Reward incentive system (Wonderful bonus, Lost compensation, Shipping timeout)
|
|
86
|
-
- Privacy-preserving logistics (tracking numbers via Messenger, only Merkle Root on-chain)
|
|
87
|
-
- Dual-signature return processes (requires both customer and merchant confirmation)
|
|
88
|
-
- Time-based auto-completion (order completes after 10 days from shipping)
|
|
89
|
-
- Complex Guard verification for each workflow step
|
|
90
|
-
- Arbitration integration for dispute resolution
|
|
91
|
-
|
|
92
|
-
#### Skills You Will Learn
|
|
93
|
-
- How to design multi-path workflows - solving state management issues for complex business scenarios
|
|
94
|
-
- How to use Merkle Root for privacy protection - providing verifiability without revealing specific information
|
|
95
|
-
- How to design incentive mechanisms - encouraging quality service and compensating for losses through Reward objects
|
|
96
|
-
- How to implement dual-signature processes - ensuring critical operations require multi-party confirmation to prevent unilateral tampering
|
|
97
|
-
- How to design time-based auto-trigger mechanisms - implementing timeout auto-completion to reduce manual intervention
|
|
98
|
-
- How to properly plan object creation order - understanding dependencies to avoid issues with post-publication modifications
|
|
99
|
-
|
|
100
|
-
#### 🔗 Project Links
|
|
101
|
-
- [MyShop_Advanced Full Documentation](../examples/MyShop_Advanced/MyShop_Advanced.md)
|
|
102
|
-
- [MyShop_Advanced Test Results (Order Flow)](../examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md)
|
|
103
|
-
- [MyShop_Advanced Test Results (Merchant System)](../examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md)
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## 💡 Key Insights from All Examples
|
|
108
|
-
|
|
109
|
-
### 1. Object Creation Order Matters
|
|
110
|
-
All examples emphasize the importance of correct creation order:
|
|
111
|
-
1. Permission first (foundation)
|
|
112
|
-
2. Machine next (workflow)
|
|
113
|
-
3. Service (unpublished, get address)
|
|
114
|
-
4. Guards (need Service address)
|
|
115
|
-
5. Configure Service (add machine, guards, allocators)
|
|
116
|
-
6. Publish Service (LAST!)
|
|
117
|
-
|
|
118
|
-
### 2. Naming Strategy is Critical
|
|
119
|
-
Consistent naming saves hours of confusion. Use patterns like:
|
|
120
|
-
- `xxx_permission`, `xxx_machine`, `xxx_guard`, `xxx_service`
|
|
121
|
-
- Document your naming convention before starting
|
|
122
|
-
|
|
123
|
-
### 3. Test Incrementally
|
|
124
|
-
Don't wait until everything is set up to test. Verify each step with queries as you go.
|
|
125
|
-
|
|
126
|
-
### 4. Privacy First
|
|
127
|
-
Sensitive information (shipping addresses, tracking numbers) should stay off-chain. Use Messenger for private communication and Merkle Roots for verification.
|
|
128
|
-
|
|
129
|
-
### 5. Guard Verification
|
|
130
|
-
Guards are your security backbone. Use them for:
|
|
131
|
-
- Buy restrictions
|
|
132
|
-
- Fund allocation conditions
|
|
133
|
-
- Workflow step verification
|
|
134
|
-
- Merkle Root validation
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## 🎓 Recommended Learning Path
|
|
139
|
-
|
|
140
|
-
1. **Start with MyShop** - Understand the basics of e-commerce in WoWok
|
|
141
|
-
2. **Then ThreeBody_Signature** - Learn about Buy Guards and simple workflows
|
|
142
|
-
3. **Finally MyShop_Advanced** - Master complex multi-path workflows and privacy patterns
|
|
143
|
-
|
|
144
|
-
Each example builds on the previous one, introducing new concepts incrementally.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 🏆 Stage Checklist
|
|
149
|
-
|
|
150
|
-
Before moving on, confirm you have:
|
|
151
|
-
- [ ] Read and understood all three examples
|
|
152
|
-
- [ ] Identified which example best matches your use case
|
|
153
|
-
- [ ] Learned the object creation order best practices
|
|
154
|
-
- [ ] Understand when to use each WoWok component
|
|
155
|
-
- [ ] Can apply these patterns to your own projects
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## 🎉 Congratulations!
|
|
160
|
-
|
|
161
|
-
You have completed all stages of WoWok learning! You are now ready to:
|
|
162
|
-
|
|
163
|
-
- Build complete e-commerce platforms
|
|
164
|
-
- Create signed digital services
|
|
165
|
-
- Implement complex workflow systems
|
|
166
|
-
- Protect user privacy with off-chain communication
|
|
167
|
-
- Secure fund allocation with Guard verification
|
|
168
|
-
- Design incentive mechanisms with Reward pools
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## 🚀 Next Steps
|
|
173
|
-
|
|
174
|
-
Now it's time to build your own application! We recommend:
|
|
175
|
-
|
|
176
|
-
1. Start small - pick one of the examples as a template
|
|
177
|
-
2. Modify incrementally - don't try to build everything at once
|
|
178
|
-
3. Test constantly - use query_toolkit and onchain_table_data to verify each step
|
|
179
|
-
4. Document everything - record object IDs and test results
|
|
180
|
-
5. Share your work - help others learn from your experience
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
**[← Return to Main Directory](../README.md)**
|