@wowok/skills 1.1.5 → 1.1.7
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/README.md +1 -0
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +9 -1
- package/dist/skills.js.map +1 -1
- package/package.json +1 -1
- package/wowok-arbitrator/SKILL.md +105 -111
- package/wowok-guard/SKILL.md +72 -39
- package/wowok-machine/SKILL.md +137 -151
- package/wowok-messenger/SKILL.md +148 -178
- package/wowok-order/SKILL.md +186 -312
- package/wowok-output/SKILL.md +4 -0
- package/wowok-provider/SKILL.md +130 -176
- package/wowok-safety/SKILL.md +10 -8
- package/wowok-tools/SKILL.md +107 -157
package/wowok-output/SKILL.md
CHANGED
|
@@ -137,6 +137,10 @@ When user asks about field meanings:
|
|
|
137
137
|
| Skill | Purpose |
|
|
138
138
|
|-------|---------|
|
|
139
139
|
| [wowok-safety](../wowok-safety/SKILL.md) | Pre-operation safety checks |
|
|
140
|
+
| [wowok-guard](../wowok-guard/SKILL.md) | Guard design & validation |
|
|
140
141
|
| [wowok-tools](../wowok-tools/SKILL.md) | Tool selection patterns |
|
|
141
142
|
| [wowok-order](../wowok-order/SKILL.md) | Order lifecycle (buyer) |
|
|
142
143
|
| [wowok-provider](../wowok-provider/SKILL.md) | Service management (merchant) |
|
|
144
|
+
| [wowok-arbitrator](../wowok-arbitrator/SKILL.md) | Dispute resolution |
|
|
145
|
+
| [wowok-machine](../wowok-machine/SKILL.md) | Workflow design |
|
|
146
|
+
| [wowok-messenger](../wowok-messenger/SKILL.md) | Encrypted communication |
|
package/wowok-provider/SKILL.md
CHANGED
|
@@ -21,93 +21,141 @@ when_to_use:
|
|
|
21
21
|
|
|
22
22
|
# WoWok Service Provider Guide
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Role**: Service Provider (Merchant/Seller)
|
|
25
|
+
> **Related Skills**: [wowok-order](../wowok-order/SKILL.md) (customer), [wowok-machine](../wowok-machine/SKILL.md) (workflow), [wowok-guard](../wowok-guard/SKILL.md) (validation rules), [wowok-messenger](../wowok-messenger/SKILL.md) (communication), [wowok-safety](../wowok-safety/SKILL.md) (safety), [wowok-tools](../wowok-tools/SKILL.md) (MCP tools)
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## ⚠️ PRE-FLIGHT: Required Items Checklist
|
|
30
|
+
|
|
31
|
+
**THIS SECTION IS MANDATORY.** Before ANY service creation or publication, the AI MUST collect explicit user confirmation for EVERY required item. **Do NOT skip, do NOT fabricate, do NOT proceed with missing items.**
|
|
32
|
+
|
|
33
|
+
### The Golden Rule
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
NEVER guess what the user sells, how their workflow operates, or how funds are distributed.
|
|
37
|
+
These are BUSINESS decisions that ONLY the user can make.
|
|
38
|
+
|
|
39
|
+
User hasn't provided it → ASK.
|
|
40
|
+
User provides incomplete info → ASK for clarification.
|
|
41
|
+
User says "just make something up" → REFUSE and explain why each item matters.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Required Items
|
|
45
|
+
|
|
46
|
+
For each item, the user must provide one of: **"Reuse existing: `<name_or_id>`"** OR **"Create new: `<details>`"**
|
|
47
|
+
|
|
48
|
+
| # | Item | User Must Provide | Why Not Fabricate |
|
|
49
|
+
|---|------|-------------------|--------------------|
|
|
50
|
+
| **R1** | **Account** | Account name/address. Default `""` is fine. | Safe default exists |
|
|
51
|
+
| **R2** | **Permission** | Existing Permission to reuse, OR name + type_parameter for new. **Reuse strongly recommended.** | Controls access to ALL your services |
|
|
52
|
+
| **R3** | **Service** | Service name, type_parameter. What kind of service? | Your brand identity on-chain |
|
|
53
|
+
| **R4** | **Machine** | Nodes, state transitions (pairs), forward paths. | IS your business process |
|
|
54
|
+
| **R5** | **Guards** | For each Guard: validation logic, conditions. Reuse or define new. | Enforces your business rules |
|
|
55
|
+
| **R6** | **Guard Bindings** | Which Guard validates which Machine forward? | Wrong binding = unauthorized access |
|
|
56
|
+
| **R7** | **Allocators** | For each outcome: who gets what %/amount? (e.g. "success: 95% me, 5% platform") | IS your revenue model |
|
|
57
|
+
|
|
58
|
+
**Conditionally Required:**
|
|
59
|
+
|
|
60
|
+
| # | Item | Trigger | User Must Provide |
|
|
61
|
+
|---|------|---------|-------------------|
|
|
62
|
+
| **C1** | **Contact (um)** | If `customer_required` is set | Contact name/ID |
|
|
63
|
+
| **C2** | **WIP Files** | Physical goods | Product description, images |
|
|
64
|
+
| **C3** | **Sales Products** | Listing products | Name, price, stock, WIP per product |
|
|
65
|
+
|
|
66
|
+
### Information Collection Protocol
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
STEP 0: Present checklist R1-R7 to user
|
|
70
|
+
├── Each item: "Reuse or create new? Provide details."
|
|
71
|
+
├── Track status: [pending] / [confirmed: reuse <id>] / [confirmed: create]
|
|
72
|
+
├── If user indicates physical goods / customer_required → also confirm C1-C3
|
|
73
|
+
└── ⛔ GATE: ALL R1-R7 must be [confirmed] before any on-chain action
|
|
74
|
+
└── NOT confirmed → STOP. Ask. Do NOT suggest creating service.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Anti-Fabrication Rules (HARD Constraints)
|
|
78
|
+
|
|
79
|
+
| Never... | Because... |
|
|
80
|
+
|----------|------------|
|
|
81
|
+
| Invent product names, prices, descriptions | You don't know what they sell |
|
|
82
|
+
| Design workflow nodes without user input | You don't know their business process |
|
|
83
|
+
| Decide fund splits | You don't know their revenue model |
|
|
84
|
+
| Assume Guard logic | You don't know their security requirements |
|
|
85
|
+
| Skip the checklist | Even if user seems to know what they want |
|
|
29
86
|
|
|
30
87
|
---
|
|
31
88
|
|
|
32
|
-
##
|
|
89
|
+
## Service Build Lifecycle
|
|
33
90
|
|
|
34
|
-
|
|
91
|
+
Once R1-R7 confirmed, execute in strict order. All operations use R1 (Account) as `env.account`.
|
|
35
92
|
|
|
36
93
|
```
|
|
37
|
-
STEP 1: Foundation
|
|
38
|
-
├── Permission — REUSE existing
|
|
94
|
+
STEP 1: Foundation
|
|
95
|
+
├── Permission — REUSE existing (strongly recommended)
|
|
96
|
+
│ Tool: onchain_operations (permission) | Fields: name, type_parameter
|
|
39
97
|
├── Service (unpublished) — CREATE new
|
|
98
|
+
│ Tool: onchain_operations (service) | Fields: name, type_parameter, permission
|
|
40
99
|
└── Machine (unpublished) — CREATE new or REUSE template
|
|
100
|
+
Tool: onchain_operations (machine) | Fields: nodes, pairs, forwards
|
|
101
|
+
Discovery: query_toolkit (account_list, local_mark_list, onchain_objects)
|
|
102
|
+
Template: machineNode2file (export existing for editing)
|
|
41
103
|
|
|
42
|
-
STEP 2: Trust Layer
|
|
104
|
+
STEP 2: Trust Layer
|
|
43
105
|
└── Guards — CREATE new or REUSE existing
|
|
106
|
+
Tool: onchain_operations (guard) | Fields: logic, instructions
|
|
107
|
+
Template: guard2file (export existing for editing)
|
|
108
|
+
⚠️ Design your Guard tables based on how the target object reads data:
|
|
109
|
+
- buy_guard → pass/fail only, no data extraction
|
|
110
|
+
- Allocator guard → pass/fail only
|
|
111
|
+
- Machine forward guard → if retained_submission is used, ensure b_submission:true entries match expected types
|
|
112
|
+
- Reward guard → pass/fail only
|
|
113
|
+
Full design reference: [wowok-guard](../wowok-guard/SKILL.md)
|
|
44
114
|
|
|
45
115
|
STEP 3: Business Logic (MODIFY)
|
|
46
|
-
├── Machine — bind Guards to
|
|
116
|
+
├── Machine — bind Guards to forwards
|
|
117
|
+
│ Tool: onchain_operations (machine)
|
|
47
118
|
├── Service — set Allocators
|
|
48
|
-
|
|
49
|
-
├──
|
|
50
|
-
|
|
119
|
+
│ Tool: onchain_operations (service) | Fields: order_allocators
|
|
120
|
+
├── Arbitrations (optional) — REUSE existing Arb services
|
|
121
|
+
│ Tool: onchain_operations (service) | Fields: arbitrations.list
|
|
122
|
+
├── Compensation Fund (optional): compensation_fund_add + setting_locked_time_add (default 30 days, configurable)
|
|
123
|
+
│ Tool: onchain_operations (service)
|
|
124
|
+
└── Reward (optional) — incentive pools
|
|
51
125
|
|
|
52
126
|
STEP 4: Publication
|
|
53
127
|
├── Publish Machine → IMMUTABLE
|
|
128
|
+
│ Tool: onchain_operations (machine) | publish: true
|
|
54
129
|
├── Bind Machine to Service
|
|
130
|
+
│ Tool: onchain_operations (service) | machine: "<machine_id>"
|
|
55
131
|
└── Publish Service → machine/allocators LOCKED
|
|
132
|
+
Tool: onchain_operations (service) | publish: true
|
|
56
133
|
|
|
57
|
-
|
|
134
|
+
⚠️ Pre-Publish Verification:
|
|
135
|
+
1. Re-check PRE-FLIGHT: all R1-R7 still confirmed?
|
|
136
|
+
2. guard2file export Guards → review
|
|
137
|
+
3. machineNode2file export Machine → review
|
|
138
|
+
4. Allocator splits match user's stated model?
|
|
139
|
+
5. Warn: publish = immutable. Proceed?
|
|
140
|
+
|
|
141
|
+
STEP 5: Post-Publish (MODIFY Service — mutable after publish)
|
|
58
142
|
├── description, location
|
|
59
|
-
├── sales (products with WIP)
|
|
143
|
+
├── sales (products with WIP) — ⛔ user MUST provide: name, price, stock, WIP
|
|
60
144
|
├── customer_required
|
|
61
|
-
└── um (REUSE existing
|
|
145
|
+
└── um — Contact (REUSE existing or CREATE new)
|
|
146
|
+
⚠️ If customer_required is set → um MUST be set
|
|
62
147
|
```
|
|
63
148
|
|
|
64
|
-
### Object Reuse
|
|
65
|
-
|
|
66
|
-
**General Rule**: Reuse existing objects when available. See wowok-safety for detailed reuse principles and CREATE vs MODIFY patterns.
|
|
149
|
+
### Object Reuse & Immutability
|
|
67
150
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
**Immutability Rules**:
|
|
77
|
-
| Object | When Locked | Impact |
|
|
78
|
-
|--------|-------------|--------|
|
|
79
|
-
| Guard | After creation | Cannot modify |
|
|
80
|
-
| Machine | After publish | Nodes frozen |
|
|
81
|
-
| Service | After publish | machine, order_allocators frozen |
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Service Build Checklist
|
|
86
|
-
|
|
87
|
-
Use this checklist when guiding users through service creation:
|
|
88
|
-
|
|
89
|
-
| Phase | Step | Required | Tool/Operation | Key Fields |
|
|
90
|
-
|-------|------|----------|----------------|------------|
|
|
91
|
-
| 1 | Permission | ✅ | `onchain_operations` (permission) | name, type_parameter |
|
|
92
|
-
| 1 | Service (unpublished) | ✅ | `onchain_operations` (service) | object: {name, type_parameter, permission} |
|
|
93
|
-
| 1 | Machine (unpublished) | ✅ | `onchain_operations` (machine) | nodes, pairs, forwards |
|
|
94
|
-
| 2 | Guards | ✅ | `onchain_operations` (guard) | logic, instructions |
|
|
95
|
-
| 3 | Machine + Guards | ✅ | `onchain_operations` (machine) | bind guards to forwards |
|
|
96
|
-
| 3 | Allocators | ✅ | `onchain_operations` (service) | order_allocators |
|
|
97
|
-
| 3 | Arbitrations | ❌ | `onchain_operations` (service) | arbitrations.list |
|
|
98
|
-
| 3 | Compensation Fund | ❌ | `onchain_operations` (service) | compensation_fund_add, setting_locked_time_add |
|
|
99
|
-
| 4 | Publish Machine | ✅ | `onchain_operations` (machine) | publish: true |
|
|
100
|
-
| 4 | Bind Machine | ✅ | `onchain_operations` (service) | machine: "<machine_id>" |
|
|
101
|
-
| 4 | Publish Service | ✅ | `onchain_operations` (service) | publish: true |
|
|
102
|
-
| 5 | Description/Location | ❌ | `onchain_operations` (service) | description, location |
|
|
103
|
-
| 5 | Sales Products | ❌ | `onchain_operations` (service) | sales.sales[] |
|
|
104
|
-
| 5 | Customer Required | ❌ | `onchain_operations` (service) | customer_required[], um |
|
|
105
|
-
|
|
106
|
-
**Critical Rules**:
|
|
107
|
-
1. **Reuse First**: Always ask if user has existing Permission/Machine/Guard/Contact to reuse
|
|
108
|
-
2. If `customer_required` is set → `um` (Contact) **MUST** be set
|
|
109
|
-
3. Physical goods **MUST** have WIP files
|
|
110
|
-
4. `wip_hash` default `""` (uses embedded hash)
|
|
151
|
+
| Object | Reuse Strategy | When Locked |
|
|
152
|
+
|--------|---------------|-------------|
|
|
153
|
+
| **Permission** | **Strongly recommended** — centralized control | Never |
|
|
154
|
+
| Machine | Reuse via `machineNode2file` template | After publish |
|
|
155
|
+
| Contact (um) | Reuse existing customer service Contact | Never |
|
|
156
|
+
| Arbitration | Always reuse existing Arb services | — |
|
|
157
|
+
| Guard | Reuse if logic matches | After creation |
|
|
158
|
+
| Service | — | After publish: machine, order_allocators frozen |
|
|
111
159
|
|
|
112
160
|
---
|
|
113
161
|
|
|
@@ -131,41 +179,17 @@ Order (per purchase)
|
|
|
131
179
|
└── allocation → Fund distribution engine
|
|
132
180
|
```
|
|
133
181
|
|
|
134
|
-
### WIP Files (Witness Immutable Promise)
|
|
135
|
-
|
|
136
|
-
**Purpose**: Immutable product commitment for arbitration evidence.
|
|
137
|
-
|
|
138
|
-
**Creating WIP**:
|
|
139
|
-
```
|
|
140
|
-
Tool: wip_file
|
|
141
|
-
type: "generate"
|
|
142
|
-
options.markdown_text: Product description
|
|
143
|
-
options.images: Product visuals
|
|
144
|
-
outputPath: Output file path
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**Attaching to Service**:
|
|
148
|
-
```
|
|
149
|
-
Operation: onchain_operations (service)
|
|
150
|
-
sales.op: "add"
|
|
151
|
-
sales.sales: [{
|
|
152
|
-
name: Product name
|
|
153
|
-
price: Token amount
|
|
154
|
-
stock: Quantity
|
|
155
|
-
wip: URL to WIP file
|
|
156
|
-
wip_hash: "" (default, uses embedded hash)
|
|
157
|
-
}]
|
|
158
|
-
```
|
|
159
|
-
|
|
160
182
|
### Allocators + Machine Integration
|
|
161
183
|
|
|
162
|
-
Design together for coherent fund flow:
|
|
184
|
+
Design together for coherent fund flow. **Allocation Modes** (execute in order):
|
|
185
|
+
1. **Amount** — Fixed U64 per recipient
|
|
186
|
+
2. **Rate** — Basis points (10000 = 100%)
|
|
187
|
+
3. **Surplus** — Receives remainder (max 1)
|
|
163
188
|
|
|
164
189
|
```
|
|
165
190
|
Example: Delivery workflow
|
|
166
191
|
"delivered" → "order_complete" (threshold: 1)
|
|
167
|
-
└── Forward: "customer_signed"
|
|
168
|
-
└── Allocator: 95% merchant, 5% platform
|
|
192
|
+
└── Forward: "customer_signed" → Allocator: 95% merchant, 5% platform
|
|
169
193
|
|
|
170
194
|
"delivered" → "package_lost" (threshold: 2)
|
|
171
195
|
├── Forward: "customer_reports_lost"
|
|
@@ -173,101 +197,37 @@ Example: Delivery workflow
|
|
|
173
197
|
└── Allocator: 100% to order (buyer withdraws)
|
|
174
198
|
```
|
|
175
199
|
|
|
176
|
-
|
|
177
|
-
1. **Amount**: Fixed U64 per recipient
|
|
178
|
-
2. **Rate**: Basis points (10000 = 100%)
|
|
179
|
-
3. **Surplus**: Receives remainder (max 1 per allocator)
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Phase Details
|
|
184
|
-
|
|
185
|
-
### Phase 1: Foundation
|
|
186
|
-
|
|
187
|
-
Create base objects. Service starts unpublished.
|
|
188
|
-
|
|
189
|
-
**Pre-Build Discovery**:
|
|
190
|
-
- `query_toolkit` (account_list) — list accounts
|
|
191
|
-
- `query_toolkit` (local_mark_list) — list marks
|
|
192
|
-
- `query_toolkit` (onchain_objects) — query existing
|
|
193
|
-
|
|
194
|
-
**Reuse Templates**:
|
|
195
|
-
- `machineNode2file` — export Machine for editing
|
|
196
|
-
- `guard2file` — export Guard for editing
|
|
197
|
-
|
|
198
|
-
### Phase 2: Trust Layer
|
|
199
|
-
|
|
200
|
-
Create all Guards needed for workflow validation.
|
|
201
|
-
|
|
202
|
-
### Phase 3: Business Logic
|
|
203
|
-
|
|
204
|
-
**Compensation Fund** (optional but recommended):
|
|
205
|
-
- `compensation_fund_add`: Add funds
|
|
206
|
-
- `setting_locked_time_add`: Lock duration (min 30 days = 2592000000ms)
|
|
207
|
-
|
|
208
|
-
**Merchant Withdrawal Constraints**:
|
|
209
|
-
1. Pause Service
|
|
210
|
-
2. Wait lock duration
|
|
211
|
-
3. Withdraw via `compensation_fund_receive`
|
|
212
|
-
|
|
213
|
-
**Arbitration** (optional):
|
|
214
|
-
- Without it: Lower setup, but customers bear full dispute risk
|
|
215
|
-
- With it: Customer trust ↑, dispute resolution available
|
|
216
|
-
|
|
217
|
-
### Phase 4: Publication
|
|
218
|
-
|
|
219
|
-
**Order Matters**: Publish Machine → Bind → Publish Service
|
|
220
|
-
|
|
221
|
-
After publish: machine, order_allocators are **LOCKED**
|
|
222
|
-
|
|
223
|
-
### Phase 5: Post-Publish Configuration
|
|
224
|
-
|
|
225
|
-
These can be updated after publication:
|
|
200
|
+
### WIP Files (Witness Immutable Promise)
|
|
226
201
|
|
|
227
|
-
|
|
228
|
-
|-------|---------|----------|
|
|
229
|
-
| description | Service description | ❌ |
|
|
230
|
-
| location | Service area | ❌ |
|
|
231
|
-
| sales | Products with WIP | ❌ (but needed to sell) |
|
|
232
|
-
| customer_required | Required customer info | ❌ |
|
|
233
|
-
| um | Contact for customer service | ❌ (REQUIRED if customer_required set) |
|
|
202
|
+
Immutable product commitment for arbitration evidence.
|
|
234
203
|
|
|
235
|
-
**Customer Required + Contact Rule**:
|
|
236
204
|
```
|
|
237
|
-
|
|
238
|
-
|
|
205
|
+
Create: wip_file → generate → markdown_text + images → outputPath
|
|
206
|
+
Attach: onchain_operations (service) → sales.sales[{
|
|
207
|
+
name, price, stock, wip: "<URL>", wip_hash: "" (auto)
|
|
208
|
+
}]
|
|
239
209
|
```
|
|
240
210
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
211
|
+
### Compensation Fund (Optional but Recommended)
|
|
212
|
+
|
|
213
|
+
- Add: `compensation_fund_add` | Lock: `setting_locked_time_add` (default 30 days = 2592000000ms, configurable via `setting_lock_duration_add`)
|
|
214
|
+
- **Withdraw**: Pause Service → Wait lock duration → `compensation_fund_receive`
|
|
245
215
|
|
|
246
216
|
---
|
|
247
217
|
|
|
248
218
|
## Order Fulfillment
|
|
249
219
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
| Object | Purpose | Target |
|
|
253
|
-
|--------|---------|--------|
|
|
220
|
+
| Object | Purpose | Operation |
|
|
221
|
+
|--------|---------|-----------|
|
|
254
222
|
| Order | Fund escrow | Read-only |
|
|
255
|
-
| Progress | Workflow state | **Operate this** |
|
|
256
|
-
|
|
257
|
-
**Two-Phase Pattern**:
|
|
258
|
-
1. Lock: `hold: true` (prevents race conditions)
|
|
259
|
-
2. Submit: `hold: false` (after off-chain work)
|
|
260
|
-
|
|
261
|
-
### Customer Service
|
|
223
|
+
| **Progress** | Workflow state | **Operate this** — `hold: true` (lock) → work → `hold: false` (submit) |
|
|
262
224
|
|
|
263
|
-
**AI Reminder**: When fulfilling
|
|
225
|
+
**AI Reminder**: When fulfilling, check `customer_required` fields. Missing → prompt via Messenger.
|
|
264
226
|
|
|
265
227
|
---
|
|
266
228
|
|
|
267
229
|
## Quick Reference
|
|
268
230
|
|
|
269
|
-
### Essential Schemas
|
|
270
|
-
|
|
271
231
|
| Purpose | Schema |
|
|
272
232
|
|---------|--------|
|
|
273
233
|
| Service ops | `onchain_operations_service` |
|
|
@@ -278,10 +238,4 @@ Then um: "<contact_id>" ← MUST be set
|
|
|
278
238
|
| Messenger | `messenger_operation` |
|
|
279
239
|
| Query | `query_toolkit` |
|
|
280
240
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
**Query Schema**: `schema_query({ action: "get", name: "<schema_name>" })`
|
|
284
|
-
|
|
285
|
-
**Export Templates**:
|
|
286
|
-
- `machineNode2file` — Machine → JSON
|
|
287
|
-
- `guard2file` — Guard → JSON
|
|
241
|
+
**Export**: `machineNode2file`, `guard2file` | **Query Schema**: `schema_query({ action: "get", name: "<name>" })`
|
package/wowok-safety/SKILL.md
CHANGED
|
@@ -36,18 +36,20 @@ always: true
|
|
|
36
36
|
- Use string value `"<name_or_id>"` to reference existing objects
|
|
37
37
|
- Use object shape `{ name?, ... }` only when creating new
|
|
38
38
|
|
|
39
|
-
**CREATE vs MODIFY Pattern
|
|
39
|
+
**CREATE vs MODIFY Pattern** (SDK-enforced, not Move-level):
|
|
40
40
|
| Format | Meaning | Use When |
|
|
41
41
|
|--------|---------|----------|
|
|
42
42
|
| String `"<name>"` or `"<0x...>"` | **REUSE** existing | Object already exists |
|
|
43
43
|
| Object `{ name?, ... }` | **CREATE** new | Need new object |
|
|
44
44
|
|
|
45
|
+
The SDK resolves names to addresses via `GetObjectExisted()` — a string that fails resolution triggers a hard error. An object shape always creates.
|
|
46
|
+
|
|
45
47
|
### 1.2 Security & Safety
|
|
46
48
|
|
|
47
49
|
- **Hot Wallet Usage**: WoWok never exposes private keys. Treat it as a spending account for transfers, receipts, and commerce. Flag large transactions for explicit user confirmation.
|
|
48
50
|
- **Amount-Sensitive Operations**: Any token transfer, payment, or reward distribution MUST be verbally confirmed with the user before execution. Use `Payment` objects for commercial transfers when possible (they offer Guard validation and purpose tracking).
|
|
49
51
|
|
|
50
|
-
### 1.
|
|
52
|
+
### 1.3 LOCAL vs ON-CHAIN
|
|
51
53
|
|
|
52
54
|
| Type | Tools | Gas | Confirmation |
|
|
53
55
|
|------|-------|-----|--------------|
|
|
@@ -56,7 +58,7 @@ always: true
|
|
|
56
58
|
| **QUERY** | `query_toolkit`, `onchain_table_data`, `onchain_events`, `guard2file`, `machineNode2file` | Read-only | Not needed |
|
|
57
59
|
| **ENCRYPTED** | `messenger_operation` (watch/send messages) | Local encryption | Not needed |
|
|
58
60
|
|
|
59
|
-
### 1.
|
|
61
|
+
### 1.4 Default Account
|
|
60
62
|
|
|
61
63
|
Empty string `""` means the default account. Always use `""` when the user does not specify an account.
|
|
62
64
|
|
|
@@ -209,9 +211,9 @@ Use `Payment` objects for commercial transfers when possible — they offer Guar
|
|
|
209
211
|
|
|
210
212
|
1. **Design Phase**: Use `wowok_buildin_info` to discover available permissions, Guard instructions, and value types
|
|
211
213
|
|
|
212
|
-
**Tool**: `wowok_buildin_info` with `info: "permissions"`, `info: "
|
|
214
|
+
**Tool**: `wowok_buildin_info` with `info: "built-in permissions"`, `info: "guard instructions"`, or `info: "value types"`.
|
|
213
215
|
|
|
214
|
-
###
|
|
216
|
+
### 8.1 Value Types — Built-in Type Annotation System
|
|
215
217
|
|
|
216
218
|
WoWok's value type system is the foundation for type-safe data declarations used across Guards, records, and query instructions. Every data field in a Guard table or Guard submission carries a `value_type` annotation, ensuring the protocol can validate and process data correctly.
|
|
217
219
|
|
|
@@ -256,10 +258,10 @@ For complex objects with many fields (Service, Machine), use **incremental build
|
|
|
256
258
|
| Guard export | `guard2file` |
|
|
257
259
|
| Machine export | `machineNode2file` |
|
|
258
260
|
| Build-in info | `wowok_buildin_info` |
|
|
259
|
-
| Built-in permissions | `wowok_buildin_info` with `info: "permissions"` |
|
|
260
|
-
| Guard instructions | `wowok_buildin_info` with `info: "
|
|
261
|
+
| Built-in permissions | `wowok_buildin_info` with `info: "built-in permissions"` |
|
|
262
|
+
| Guard instructions | `wowok_buildin_info` with `info: "guard instructions"` |
|
|
261
263
|
| Value types | `wowok_buildin_info` with `info: "value types"` |
|
|
262
264
|
|
|
263
265
|
**Query Schema**: `schema_query({ action: "get", name: "<schema_name>" })`
|
|
264
266
|
|
|
265
|
-
**Related Skills**: [wowok-tools](../wowok-tools/SKILL.md) | [wowok-guard](../wowok-guard/SKILL.md) | [wowok-machine](../wowok-machine/SKILL.md)
|
|
267
|
+
**Related Skills**: [wowok-tools](../wowok-tools/SKILL.md) | [wowok-guard](../wowok-guard/SKILL.md) | [wowok-machine](../wowok-machine/SKILL.md) | [wowok-order](../wowok-order/SKILL.md) | [wowok-provider](../wowok-provider/SKILL.md) | [wowok-arbitrator](../wowok-arbitrator/SKILL.md) | [wowok-messenger](../wowok-messenger/SKILL.md)
|