@wowok/skills 1.1.11 → 1.1.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/examples/Insurance/Insurance.md +142 -23
- package/examples/MyShop/MyShop.md +216 -218
- package/examples/MyShop/myshop_machine_nodes.json +14 -8
- package/examples/MyShop_Advanced/MyShop_Advanced.md +57 -56
- package/examples/ThreeBody_Signature/ThreeBody_Signature.md +431 -111
- package/examples/Travel/Travel.md +64 -18
- package/package.json +1 -1
- package/wowok-arbitrator/APPENDIX.md +545 -0
- package/wowok-arbitrator/SKILL.md +8 -535
- package/wowok-auditor/APPENDIX.md +487 -0
- package/wowok-auditor/SKILL.md +9 -480
- package/wowok-guard/APPENDIX.md +428 -0
- package/wowok-guard/SKILL.md +117 -421
- package/wowok-machine/APPENDIX.md +407 -0
- package/wowok-machine/SKILL.md +9 -400
- package/wowok-messenger/APPENDIX.md +550 -0
- package/wowok-messenger/SKILL.md +9 -543
- package/wowok-onboard/APPENDIX.md +472 -0
- package/wowok-onboard/SKILL.md +10 -465
- package/wowok-order/APPENDIX.md +777 -0
- package/wowok-order/SKILL.md +110 -506
- package/wowok-output/APPENDIX.md +575 -0
- package/wowok-output/SKILL.md +9 -568
- package/wowok-planner/APPENDIX.md +700 -0
- package/wowok-planner/SKILL.md +9 -693
- package/wowok-provider/APPENDIX.md +425 -0
- package/wowok-provider/SKILL.md +8 -415
- package/wowok-safety/APPENDIX.md +561 -0
- package/wowok-safety/SKILL.md +9 -554
- package/wowok-scenario/APPENDIX.md +97 -0
- package/wowok-scenario/MODE-DETAILS.md +275 -0
- package/wowok-scenario/SKILL.md +20 -353
- package/wowok-tools/APPENDIX.md +388 -0
- package/wowok-tools/SKILL.md +9 -381
|
@@ -90,6 +90,21 @@ Before running this example, ensure you have:
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
+
## Environment Parameters
|
|
94
|
+
|
|
95
|
+
All on-chain operations in this example use the following `env` fields:
|
|
96
|
+
|
|
97
|
+
| Field | Value | Purpose |
|
|
98
|
+
|-------|-------|---------|
|
|
99
|
+
| `network` | `"testnet"` | Target network |
|
|
100
|
+
| `account` | Account name | Signer account for the transaction |
|
|
101
|
+
| `no_cache` | `true` | Bypass local cache to avoid stale reads during sequential object creation. Without this, operations that depend on recently created objects may fail with "object not found". |
|
|
102
|
+
| `confirmed` | `true` | Explicitly confirm the on-chain transaction (MCP ConfirmGate). Required for all write operations. |
|
|
103
|
+
|
|
104
|
+
Additionally, `onChain: true` is required when an object's name needs to be resolved across different accounts (see Step 0.3).
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
93
108
|
## Step 0: Setup Weather Data
|
|
94
109
|
|
|
95
110
|
Before creating the travel service, set up the weather Repository with the next 5 days of weather data. The weather data is keyed by timestamp, and the `weather_check_guard` (Step 3.1) will query this repository at runtime when the customer enters the "Ice Scooting" node (Step 7.3). You must use timestamps that are valid at the time you run this example.
|
|
@@ -139,7 +154,9 @@ Day 5: 1783900800000 (2026-07-13T00:00:00.000Z)
|
|
|
139
154
|
},
|
|
140
155
|
"env": {
|
|
141
156
|
"account": "weather_provider",
|
|
142
|
-
"network": "testnet"
|
|
157
|
+
"network": "testnet",
|
|
158
|
+
"no_cache": true,
|
|
159
|
+
"confirmed": true
|
|
143
160
|
}
|
|
144
161
|
}
|
|
145
162
|
```
|
|
@@ -155,7 +172,8 @@ Day 5: 1783900800000 (2026-07-13T00:00:00.000Z)
|
|
|
155
172
|
"object": {
|
|
156
173
|
"name": "weather_repo",
|
|
157
174
|
"permission": "weather_permission",
|
|
158
|
-
"replaceExistName": true
|
|
175
|
+
"replaceExistName": true,
|
|
176
|
+
"onChain": true
|
|
159
177
|
},
|
|
160
178
|
"description": "Weather data repository for Iceland travel activities",
|
|
161
179
|
"policies": {
|
|
@@ -173,11 +191,15 @@ Day 5: 1783900800000 (2026-07-13T00:00:00.000Z)
|
|
|
173
191
|
},
|
|
174
192
|
"env": {
|
|
175
193
|
"account": "weather_provider",
|
|
176
|
-
"network": "testnet"
|
|
194
|
+
"network": "testnet",
|
|
195
|
+
"no_cache": true,
|
|
196
|
+
"confirmed": true
|
|
177
197
|
}
|
|
178
198
|
}
|
|
179
199
|
```
|
|
180
200
|
|
|
201
|
+
> **Note**: `onChain: true` is required here because `weather_repo` is created by the `weather_provider` account, but its name will be referenced in the Guard table (Step 3.1) by the `travel_provider` account. Without `onChain: true`, the name is stored locally only on `weather_provider`'s device and cannot be resolved by `travel_provider`. When `onChain: true` is set, the name is published on-chain and becomes publicly visible, allowing cross-account name resolution.
|
|
202
|
+
|
|
181
203
|
### 0.4 Add Weather Data
|
|
182
204
|
|
|
183
205
|
Add 5 days of weather data. The `weather_check_guard` (Step 3.1) only verifies that a record **exists** for the activity date (via `repository.data has`), so all 5 days will pass the Guard regardless of the condition value. The "rainy" value on Day 5 is informational only — to actually reject based on weather condition, you would need a Guard that queries `repository.data` and compares the value, which is more complex and not used in this example.
|
|
@@ -206,7 +228,9 @@ Add 5 days of weather data. The `weather_check_guard` (Step 3.1) only verifies t
|
|
|
206
228
|
},
|
|
207
229
|
"env": {
|
|
208
230
|
"account": "weather_provider",
|
|
209
|
-
"network": "testnet"
|
|
231
|
+
"network": "testnet",
|
|
232
|
+
"no_cache": true,
|
|
233
|
+
"confirmed": true
|
|
210
234
|
}
|
|
211
235
|
}
|
|
212
236
|
```
|
|
@@ -239,7 +263,9 @@ Create a Permission object to manage access control for the travel service. Add
|
|
|
239
263
|
},
|
|
240
264
|
"env": {
|
|
241
265
|
"account": "travel_provider",
|
|
242
|
-
"network": "testnet"
|
|
266
|
+
"network": "testnet",
|
|
267
|
+
"no_cache": true,
|
|
268
|
+
"confirmed": true
|
|
243
269
|
}
|
|
244
270
|
}
|
|
245
271
|
```
|
|
@@ -267,7 +293,9 @@ Create an Arbitration object for dispute resolution.
|
|
|
267
293
|
},
|
|
268
294
|
"env": {
|
|
269
295
|
"account": "travel_provider",
|
|
270
|
-
"network": "testnet"
|
|
296
|
+
"network": "testnet",
|
|
297
|
+
"no_cache": true,
|
|
298
|
+
"confirmed": true
|
|
271
299
|
}
|
|
272
300
|
}
|
|
273
301
|
```
|
|
@@ -337,7 +365,9 @@ repository.data has("Condition", convert_number_address(activity_date))
|
|
|
337
365
|
},
|
|
338
366
|
"env": {
|
|
339
367
|
"account": "travel_provider",
|
|
340
|
-
"network": "testnet"
|
|
368
|
+
"network": "testnet",
|
|
369
|
+
"no_cache": true,
|
|
370
|
+
"confirmed": true
|
|
341
371
|
}
|
|
342
372
|
}
|
|
343
373
|
```
|
|
@@ -409,7 +439,9 @@ clock > progress.current_time + 1000
|
|
|
409
439
|
},
|
|
410
440
|
"env": {
|
|
411
441
|
"account": "travel_provider",
|
|
412
|
-
"network": "testnet"
|
|
442
|
+
"network": "testnet",
|
|
443
|
+
"no_cache": true,
|
|
444
|
+
"confirmed": true
|
|
413
445
|
}
|
|
414
446
|
}
|
|
415
447
|
```
|
|
@@ -455,7 +487,9 @@ Creates a Guard that allows order cancellation. This Guard always passes (return
|
|
|
455
487
|
},
|
|
456
488
|
"env": {
|
|
457
489
|
"account": "travel_provider",
|
|
458
|
-
"network": "testnet"
|
|
490
|
+
"network": "testnet",
|
|
491
|
+
"no_cache": true,
|
|
492
|
+
"confirmed": true
|
|
459
493
|
}
|
|
460
494
|
}
|
|
461
495
|
```
|
|
@@ -507,7 +541,9 @@ Checks if order progress current node is "Complete". If passed, merchant receive
|
|
|
507
541
|
},
|
|
508
542
|
"env": {
|
|
509
543
|
"account": "travel_provider",
|
|
510
|
-
"network": "testnet"
|
|
544
|
+
"network": "testnet",
|
|
545
|
+
"no_cache": true,
|
|
546
|
+
"confirmed": true
|
|
511
547
|
}
|
|
512
548
|
}
|
|
513
549
|
```
|
|
@@ -583,7 +619,9 @@ Checks if progress current is "Cancel" or "Ice Scooting". If passed, merchant ge
|
|
|
583
619
|
},
|
|
584
620
|
"env": {
|
|
585
621
|
"account": "travel_provider",
|
|
586
|
-
"network": "testnet"
|
|
622
|
+
"network": "testnet",
|
|
623
|
+
"no_cache": true,
|
|
624
|
+
"confirmed": true
|
|
587
625
|
}
|
|
588
626
|
}
|
|
589
627
|
```
|
|
@@ -635,7 +673,9 @@ Checks if progress current is "SPA". If passed, merchant gets 5%, user gets 95%
|
|
|
635
673
|
},
|
|
636
674
|
"env": {
|
|
637
675
|
"account": "travel_provider",
|
|
638
|
-
"network": "testnet"
|
|
676
|
+
"network": "testnet",
|
|
677
|
+
"no_cache": true,
|
|
678
|
+
"confirmed": true
|
|
639
679
|
}
|
|
640
680
|
}
|
|
641
681
|
```
|
|
@@ -762,7 +802,9 @@ Create a Machine to define the travel service workflow with all nodes and forwar
|
|
|
762
802
|
},
|
|
763
803
|
"env": {
|
|
764
804
|
"account": "travel_provider",
|
|
765
|
-
"network": "testnet"
|
|
805
|
+
"network": "testnet",
|
|
806
|
+
"no_cache": true,
|
|
807
|
+
"confirmed": true
|
|
766
808
|
}
|
|
767
809
|
}
|
|
768
810
|
```
|
|
@@ -883,7 +925,9 @@ Create the travel service with all configurations and publish it in one operatio
|
|
|
883
925
|
},
|
|
884
926
|
"env": {
|
|
885
927
|
"account": "travel_provider",
|
|
886
|
-
"network": "testnet"
|
|
928
|
+
"network": "testnet",
|
|
929
|
+
"no_cache": true,
|
|
930
|
+
"confirmed": true
|
|
887
931
|
}
|
|
888
932
|
}
|
|
889
933
|
```
|
|
@@ -960,7 +1004,9 @@ The customer (Alice) purchases the travel package. This creates an Order, a Prog
|
|
|
960
1004
|
},
|
|
961
1005
|
"env": {
|
|
962
1006
|
"account": "alice",
|
|
963
|
-
"network": "testnet"
|
|
1007
|
+
"network": "testnet",
|
|
1008
|
+
"no_cache": true,
|
|
1009
|
+
"confirmed": true
|
|
964
1010
|
}
|
|
965
1011
|
}
|
|
966
1012
|
```
|
|
@@ -1284,7 +1330,7 @@ For refund scenarios (Cancel or SPA), use the corresponding Guard. The same subm
|
|
|
1284
1330
|
"submission": [{"identifier": 0, "b_submission": true, "value_type": "Address", "value": "<ORDER_OBJECT_ID>", "name": "Order ID"}]
|
|
1285
1331
|
}]
|
|
1286
1332
|
},
|
|
1287
|
-
"env": {"account": "travel_provider", "network": "testnet", "no_cache": true}
|
|
1333
|
+
"env": {"account": "travel_provider", "network": "testnet", "no_cache": true, "confirmed": true}
|
|
1288
1334
|
}
|
|
1289
1335
|
```
|
|
1290
1336
|
|
|
@@ -1305,7 +1351,7 @@ For refund scenarios (Cancel or SPA), use the corresponding Guard. The same subm
|
|
|
1305
1351
|
"submission": [{"identifier": 0, "b_submission": true, "value_type": "Address", "value": "<ORDER_OBJECT_ID>", "name": "Order ID"}]
|
|
1306
1352
|
}]
|
|
1307
1353
|
},
|
|
1308
|
-
"env": {"account": "travel_provider", "network": "testnet", "no_cache": true}
|
|
1354
|
+
"env": {"account": "travel_provider", "network": "testnet", "no_cache": true, "confirmed": true}
|
|
1309
1355
|
}
|
|
1310
1356
|
```
|
|
1311
1357
|
|
|
@@ -1440,6 +1486,6 @@ Customers place orders using the `order_new` field in the Service operation. Thi
|
|
|
1440
1486
|
"namedNewAllocation": {"name": "allocation_name", "replaceExistName": true}
|
|
1441
1487
|
}
|
|
1442
1488
|
},
|
|
1443
|
-
"env": {"account": "customer", "network": "testnet"}
|
|
1489
|
+
"env": {"account": "customer", "network": "testnet", "no_cache": true, "confirmed": true}
|
|
1444
1490
|
}
|
|
1445
1491
|
```
|
package/package.json
CHANGED