@wowok/skills 1.1.5 → 1.1.6
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 +8 -0
- package/dist/skills.js.map +1 -1
- package/package.json +1 -1
- package/wowok-arbitrator/SKILL.md +105 -111
- package/wowok-guard/SKILL.md +61 -28
- package/wowok-machine/SKILL.md +3 -3
- package/wowok-messenger/SKILL.md +1 -2
- 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 +4 -4
- package/wowok-tools/SKILL.md +1 -1
package/wowok-order/SKILL.md
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wowok-order
|
|
3
3
|
description: |
|
|
4
|
-
WoWok Customer Guide — complete order lifecycle
|
|
5
|
-
consensus building, order creation, progress
|
|
6
|
-
|
|
7
|
-
Covers the full buyer journey: pre-purchase due diligence based on on-chain objects, consensus establishment with Messenger as off-chain
|
|
8
|
-
but self-verifiable evidence supplement, order operations, progress advancement
|
|
9
|
-
with game theory, and arbitration when needed.
|
|
4
|
+
WoWok Customer Guide — complete buyer order lifecycle: pre-purchase due diligence
|
|
5
|
+
(E1-E10), consensus building, order creation, progress advancement, and arbitration.
|
|
10
6
|
when_to_use:
|
|
11
7
|
- User is a customer/buyer placing or managing orders
|
|
12
8
|
- User wants to evaluate services before purchasing
|
|
@@ -18,428 +14,306 @@ when_to_use:
|
|
|
18
14
|
|
|
19
15
|
# WoWok Customer Guide
|
|
20
16
|
|
|
21
|
-
Complete guide for buyers on WoWok — from service discovery to order completion.
|
|
22
|
-
|
|
23
17
|
> **Role**: Customer (Buyer/Order Holder)
|
|
24
|
-
> **Provider Guide**:
|
|
25
|
-
> **Arbitration Guide**: See [wowok-arbitrator](../wowok-arbitrator/SKILL.md)
|
|
26
|
-
> **Messenger**: See [wowok-messenger](../wowok-messenger/SKILL.md) for encrypted communication
|
|
27
|
-
> **Tools**: See [wowok-tools](../wowok-tools/SKILL.md)
|
|
18
|
+
> **Provider Guide**: [wowok-provider](../wowok-provider/SKILL.md) | **Arbitration Guide**: [wowok-arbitrator](../wowok-arbitrator/SKILL.md) | **Guard Design**: [wowok-guard](../wowok-guard/SKILL.md) | **Machine**: [wowok-machine](../wowok-machine/SKILL.md) | **Messenger**: [wowok-messenger](../wowok-messenger/SKILL.md) | **Safety**: [wowok-safety](../wowok-safety/SKILL.md) | **Tools**: [wowok-tools](../wowok-tools/SKILL.md)
|
|
28
19
|
|
|
29
20
|
---
|
|
30
21
|
|
|
31
|
-
## Core Concepts
|
|
22
|
+
## Core Concepts (Design Invariants Not in Schema)
|
|
32
23
|
|
|
33
|
-
###
|
|
24
|
+
### Object Relationships
|
|
34
25
|
|
|
35
|
-
|
|
26
|
+
Purchase creates three objects: **Order** (fund escrow, you are `builder`), **Progress** (Machine node tracker), **Allocation** (fund distribution engine). Only `builder` withdraws funds. Agents may operate but never access funds.
|
|
36
27
|
|
|
37
|
-
|
|
38
|
-
|--------|---------|------------|
|
|
39
|
-
| **Order** | Fund escrow & ownership | You are the `builder` (owner). Agents can help operate but **only you can withdraw funds**. |
|
|
40
|
-
| **Progress** | Workflow state tracking | Tracks which Machine node you're at. Advanced via Order operations. |
|
|
41
|
-
| **Allocation** | Fund distribution engine | Executes the winning allocator strategy when reaching exit nodes. |
|
|
28
|
+
### The No-Bypass Rule
|
|
42
29
|
|
|
43
|
-
|
|
30
|
+
A forward with `namedOperator === ""` signals "user-operable". **However**: if that forward also binds a Guard, passport verification is mandatory and **cannot be bypassed**. `order.next` fails without validated passport. This is a protocol invariant.
|
|
44
31
|
|
|
45
|
-
|
|
46
|
-
- **Allocation** (Order level): Auto-created execution engine that evaluates all allocator Guards and runs the strategy whose Guard returns `true`
|
|
32
|
+
### Weight Accumulation
|
|
47
33
|
|
|
48
|
-
|
|
49
|
-
- Allocation evaluates **whenever the Progress reaches a node** that triggers fund distribution
|
|
50
|
-
- **Any node** (not just exit nodes) can be configured to trigger Allocation evaluation
|
|
51
|
-
- The winning allocator is the one whose Guard validates `true` for the current state
|
|
52
|
-
- Guards can check: Progress node, time elapsed, signatures, or any on-chain data
|
|
34
|
+
Each forward contributes `weight` toward a node's `threshold`. `weight ≥ threshold` → one operation suffices. Multi-forward nodes may require cumulative multi-party contributions. Parse the `machineNode2file` JSON output; never query node-by-node.
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
### Allocation Triggers
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
Allocation evaluates when Progress reaches **any** configured node (not just exit nodes). The winning Allocator is the first whose Guard returns `true`. Rules are immutable after Service publish — both parties see identical conditions.
|
|
57
39
|
|
|
58
|
-
|
|
40
|
+
---
|
|
59
41
|
|
|
60
|
-
|
|
42
|
+
## Phase 1: Pre-Purchase Due Diligence (MANDATORY GATE)
|
|
61
43
|
|
|
62
|
-
|
|
44
|
+
> **⛔ Complete E1-E10 in order. User must explicitly confirm every item.**
|
|
45
|
+
> **⚠️ = explain risk, wait for decision. 🔴 = strongly advise against purchase.**
|
|
63
46
|
|
|
64
|
-
|
|
47
|
+
---
|
|
65
48
|
|
|
66
|
-
|
|
49
|
+
### E1 — Service Basic Status
|
|
67
50
|
|
|
68
|
-
|
|
51
|
+
Query `query_toolkit` → `onchain_objects` for `<service_name_or_id>`. Fields in schema. Save: `bPublished`, `bPaused`, `sales`, `machine`, `buy_guard`, `customer_required`, `arbitrations`, `compensation_fund`, `compensation_lock_duration`, `order_allocators`, `um`.
|
|
69
52
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| `machine` | Workflow complexity | Overly complex = higher dispute risk |
|
|
74
|
-
| `allocators` | Fund distribution rules | Unfair splits = reconsider purchase |
|
|
75
|
-
| `arbitrations` | Available dispute resolution | None available = higher risk |
|
|
76
|
-
| `compensation_fund` | Arbitration payout capacity | Low balance = limited recourse |
|
|
53
|
+
- `bPublished === false` → 🔴 **ABORT**
|
|
54
|
+
- `bPaused === true` → 🔴 **ABORT**
|
|
55
|
+
- OK → E2
|
|
77
56
|
|
|
78
|
-
|
|
79
|
-
- `wip`: URL to product description/images
|
|
80
|
-
- `wip_hash`: Integrity hash (if empty, auto-verified; if provided, must match)
|
|
81
|
-
- **This is the seller's immutable commitment on-chain** — serves as arbitration evidence
|
|
57
|
+
---
|
|
82
58
|
|
|
83
|
-
###
|
|
59
|
+
### E2 — Product & WIP Verification
|
|
84
60
|
|
|
85
|
-
|
|
61
|
+
From E1 `sales[]`. Skip `suspension === true` items.
|
|
86
62
|
|
|
87
|
-
**
|
|
63
|
+
**WIP Verification** (mandatory when `wip_hash` non-empty):
|
|
88
64
|
|
|
89
|
-
|
|
65
|
+
Use `wip_file` → `type: "verify"`, `wipFilePath: "<wip_url>"`, `hash_equal: "<wip_hash>"`.
|
|
90
66
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
| **Avg Resolution Time** | Time from creation to completion | Short |
|
|
96
|
-
| **Repeat Customer Rate** | % builders appearing multiple times | High |
|
|
97
|
-
| **Community Sentiment** | likes vs dislikes in EntityLinker | Positive |
|
|
67
|
+
- `wip_hash` empty → no on-chain commitment (auto-verified, weaker evidence)
|
|
68
|
+
- Verification fails → 🔴 **WIP tampered after publish**
|
|
69
|
+
- No `wip` URL → ⚠️ No product evidence
|
|
70
|
+
- Verified → E3
|
|
98
71
|
|
|
99
72
|
---
|
|
100
73
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Establish mutual understanding with seller BEFORE purchasing. Consensus is built on **immutable on-chain data** (Guard, Machine, Allocators), with Messenger serving as **off-chain but self-verifiable evidence supplement**.
|
|
74
|
+
### E3 — Machine Workflow Analysis (CORE)
|
|
104
75
|
|
|
105
|
-
|
|
76
|
+
**Step 1**: `query_toolkit` → `onchain_objects` for `<machine_id>`. Fail if `bPublished === false` or `bPaused === true`.
|
|
106
77
|
|
|
107
|
-
|
|
108
|
-
|-------|--------|--------------|---------|
|
|
109
|
-
| **On-Chain Foundation** | Service.machine, order_allocators, Guards | Immutable after publish | Transparent rules both parties agree to |
|
|
110
|
-
| **Off-Chain Supplement** | Messenger WTS files | Self-verifiable via signatures | Clarification, negotiation, evidence |
|
|
78
|
+
**Step 2**: `machineNode2file` → export the complete Machine JSON. Contains all nodes and forwards — parse locally, never node-by-node. Machine structure: see [wowok-machine](../wowok-machine/SKILL.md).
|
|
111
79
|
|
|
112
|
-
|
|
80
|
+
**Step 3: Classify every forward**:
|
|
113
81
|
|
|
114
|
-
|
|
82
|
+
| `namedOperator` | `guard` | User Can Execute? |
|
|
83
|
+
|-----------------|---------|-------------------|
|
|
84
|
+
| `Some("")` | `None` | ✅ Independently via `order.progress` |
|
|
85
|
+
| `Some("")` | `Some({...})` | ⚠️ Need Guard passport — **no bypass** |
|
|
86
|
+
| `None` | Any | ❌ Provider/permission-holder only |
|
|
87
|
+
| `Some("<other>")` | Any | ❌ Named operator required |
|
|
115
88
|
|
|
116
|
-
|
|
89
|
+
**Step 4: Detect paths**:
|
|
90
|
+
- Terminal nodes (no outgoing forwards) → order ends
|
|
91
|
+
- Refund paths → lead to 100%→Order Allocator (cross-check E5)
|
|
92
|
+
- Arbitration paths → lead to arbitration nodes
|
|
93
|
+
- User-blocked paths → all forwards require `namedOperator ≠ ""`
|
|
117
94
|
|
|
118
|
-
|
|
95
|
+
**Risk Rules**:
|
|
119
96
|
|
|
120
|
-
|
|
97
|
+
| Signal | Level |
|
|
98
|
+
|--------|-------|
|
|
99
|
+
| No user-operable path from critical node | 🔴 Stuck unless provider acts |
|
|
100
|
+
| No refund path | 🔴 No fund recovery |
|
|
101
|
+
| No arbitration path | 🔴 No recourse |
|
|
102
|
+
| All exits favor provider | ⚠️ Provider paid regardless |
|
|
103
|
+
| Forward requires Guard user can't pass | ⚠️ Cooperation needed |
|
|
121
104
|
|
|
122
|
-
|
|
123
|
-
- **Machine**: Workflow nodes and transitions — defines how order progresses
|
|
124
|
-
- **Allocators**: Fund distribution strategies — defines who gets what under which conditions
|
|
125
|
-
- **Guards**: Validation logic — determines which allocator executes
|
|
126
|
-
- **Arbitrations**: Available dispute resolution services
|
|
105
|
+
> **🔴 "No refund" + "No arbitration" → strongly advise against purchase.**
|
|
127
106
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
**Steps**:
|
|
131
|
-
1. Query Service object to extract `um` field (Contact object ID)
|
|
132
|
-
2. Query Contact object to retrieve `ims[]` array (Messenger addresses)
|
|
133
|
-
|
|
134
|
-
**Tool**: `query_toolkit` with `onchain_objects` query type.
|
|
107
|
+
---
|
|
135
108
|
|
|
136
|
-
###
|
|
109
|
+
### E4 — Guards Analysis
|
|
137
110
|
|
|
138
|
-
|
|
111
|
+
Guard structure and instruction reference: [wowok-guard](../wowok-guard/SKILL.md).
|
|
139
112
|
|
|
140
|
-
**
|
|
113
|
+
**Step 1**: Collect unique Guard IDs from E3 Machine JSON (`forward.guard.guard`), E1 `order_allocators`, E1 `buy_guard`. Deduplicate.
|
|
141
114
|
|
|
142
|
-
**
|
|
115
|
+
**Step 2**: `guard2file` → export each unique Guard as JSON. Skip duplicates (same address = same Guard).
|
|
143
116
|
|
|
144
|
-
**
|
|
117
|
+
**Step 3**: `wowok_buildin_info` → `info: "guard instructions"` for instruction reference.
|
|
145
118
|
|
|
146
|
-
**
|
|
147
|
-
- ✅ End-to-end encrypted (NOT on-chain) — privacy for negotiations
|
|
148
|
-
- ✅ Creates tamper-proof audit trail (WTS files) — see [wowok-messenger](../wowok-messenger/SKILL.md) for WTS generation
|
|
149
|
-
- ✅ Clarifies on-chain rules without modifying them
|
|
150
|
-
- ✅ Generates arbitration evidence for off-chain commitments
|
|
119
|
+
**Step 4**: For each exported Guard file, classify:
|
|
151
120
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
- Delivery logistics (address, phone)
|
|
158
|
-
- Custom requirements
|
|
121
|
+
| Level | Criteria | Action |
|
|
122
|
+
|-------|----------|--------|
|
|
123
|
+
| 🟢 Simple | Clear purpose, few conditions | Explain |
|
|
124
|
+
| 🟡 Complex | Multi-layer, intent clear | Explain step-by-step |
|
|
125
|
+
| 🔴 Ambiguous | Unclear logic or dependencies | **Warn. Never speculate. User must review file.** |
|
|
159
126
|
|
|
160
|
-
|
|
127
|
+
> **⛔ Never invent Guard logic. Prioritize Guards gating user-operable forwards and refund allocators.**
|
|
161
128
|
|
|
162
129
|
---
|
|
163
130
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
Once consensus is reached, create the order through Service operation.
|
|
131
|
+
### E5 — Fund Allocation Rules
|
|
167
132
|
|
|
168
|
-
|
|
133
|
+
From E1 `order_allocators.allocators[]`. Fields in schema. For each Allocator: cross-reference Guard (E4) → trigger condition; map to Machine node (E3) → when it fires; present distribution outcome.
|
|
169
134
|
|
|
170
|
-
**
|
|
135
|
+
**Risk Rules**:
|
|
171
136
|
|
|
172
|
-
|
|
137
|
+
| Check | Risk |
|
|
138
|
+
|-------|------|
|
|
139
|
+
| No 100%→Order Allocator | 🔴 No refund mechanism |
|
|
140
|
+
| Surplus receiver = provider | ⚠️ Remainder to provider |
|
|
141
|
+
| Triggers only on provider-only paths | ⚠️ Unilateral collection |
|
|
142
|
+
| No allocators on user-operable paths | ⚠️ No financial control |
|
|
173
143
|
|
|
174
|
-
**Key
|
|
144
|
+
> **Key safeguard**: 100%→Order Allocator on a user-operable forward.
|
|
175
145
|
|
|
176
|
-
|
|
177
|
-
|-----------|---------|-------|
|
|
178
|
-
| `buy.items` | Products to purchase | Reference `Service.sales` |
|
|
179
|
-
| `buy.total_pay` | Payment budget | **Excess automatically refunded** |
|
|
180
|
-
| `buy.discount` | Coupon object ID | Optional — see 3.1.1 below |
|
|
181
|
-
| `agents` | Delegated operators | Can operate order but **CANNOT withdraw funds** |
|
|
182
|
-
|
|
183
|
-
#### 3.1.1 Using Discount Coupons
|
|
184
|
-
|
|
185
|
-
When creating an order via the `buy` operation, you can apply a discount coupon by including the `discount` field with the coupon name/ID.
|
|
186
|
-
|
|
187
|
-
**Finding Available Discounts**:
|
|
146
|
+
---
|
|
188
147
|
|
|
189
|
-
|
|
148
|
+
### E6 — Arbitration Availability
|
|
190
149
|
|
|
191
|
-
|
|
150
|
+
Batch query E1 `arbitrations[]` via `onchain_objects`. Fields in schema. Arb process: [wowok-arbitrator](../wowok-arbitrator/SKILL.md).
|
|
192
151
|
|
|
193
|
-
|
|
152
|
+
Also: `onchain_events` → `type: "ArbEvent"`, `limit: 20`, filter for these Arb IDs.
|
|
194
153
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"name_or_address": "your_account_name",
|
|
199
|
-
"type": "0x2::service::Discount", // Discount type on-chain
|
|
200
|
-
"cursor": null,
|
|
201
|
-
"limit": 50
|
|
202
|
-
}
|
|
203
|
-
```
|
|
154
|
+
- `arbitrations[]` empty → 🔴 no recourse
|
|
155
|
+
- Any Arb `bPaused === true` → 🔴 unavailable
|
|
156
|
+
- High `fee` / closed `voting_guard` / no history → ⚠️
|
|
204
157
|
|
|
205
|
-
|
|
206
|
-
- `name`: Discount name
|
|
207
|
-
- `discount_type`: "rate" (percentage) or "fixed" (absolute amount)
|
|
208
|
-
- `benchmark`: Minimum order amount required
|
|
209
|
-
- `off`: Discount value (e.g., 1000 for 10% if rate, or 100 for 100 units if fixed)
|
|
210
|
-
- `time_start` / `time_end`: Validity period
|
|
211
|
-
- `service`: Parent Service object ID (which Service this discount belongs to)
|
|
212
|
-
- `transferable`: Whether it can be transferred to others
|
|
213
|
-
|
|
214
|
-
**Step 2: Filter discounts for the current Service**
|
|
215
|
-
|
|
216
|
-
Each Discount has a `service` field indicating which Service it can be used with. Filter the received Discount objects by comparing each Discount's `service` field with the target Service object ID you're purchasing from. Only Discounts where `service` matches the target Service can be applied to that Service.
|
|
217
|
-
|
|
218
|
-
**Step 3: Validate discount applicability**
|
|
219
|
-
|
|
220
|
-
Before using a discount, verify:
|
|
221
|
-
1. **Time validity**: `time_start` ≤ current_time ≤ `time_end`
|
|
222
|
-
2. **Minimum amount**: Order total ≥ `benchmark`
|
|
223
|
-
3. **Service match**: Discount's `service` field matches the Service being purchased
|
|
224
|
-
|
|
225
|
-
**Step 4: Apply discount in order creation**
|
|
226
|
-
|
|
227
|
-
Include the selected Discount object ID in the `buy.discount` field:
|
|
228
|
-
|
|
229
|
-
```json
|
|
230
|
-
{
|
|
231
|
-
"operation_type": "service",
|
|
232
|
-
"data": {
|
|
233
|
-
"buy": {
|
|
234
|
-
"items": [...],
|
|
235
|
-
"total_pay": "10000",
|
|
236
|
-
"discount": "discount_object_id_here"
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
```
|
|
158
|
+
---
|
|
241
159
|
|
|
242
|
-
|
|
243
|
-
- If `discount_type` is "rate": Discount = `total_pay` × (`off` / 10000)
|
|
244
|
-
- If `discount_type` is "fixed": Discount = min(`off`, `total_pay`)
|
|
245
|
-
- Final payment = `total_pay` - Discount
|
|
160
|
+
### E7 — Compensation Fund
|
|
246
161
|
|
|
247
|
-
|
|
248
|
-
| `namedNewProgress` | Local name for Progress | Recommended |
|
|
249
|
-
| `namedNewAllocation` | Local name for Allocation | Recommended |
|
|
162
|
+
From E1: `compensation_fund`, `compensation_lock_duration`. Balance type in schema.
|
|
250
163
|
|
|
251
|
-
|
|
164
|
+
- Balance < planned order amount → ⚠️ may not cover award
|
|
165
|
+
- Lock near expiry → ⚠️ provider may withdraw
|
|
252
166
|
|
|
253
|
-
|
|
167
|
+
---
|
|
254
168
|
|
|
255
|
-
|
|
256
|
-
2. **AI should prompt**: If the required info is not in `local_info`, ask if the user wants to save it there for future use. If it exists, present it for user confirmation before sending.
|
|
257
|
-
3. **Send via Messenger**: Use `messenger_operation` with `send_message` — **NEVER put private information on-chain**.
|
|
258
|
-
4. **Include order ID** in the message for traceability.
|
|
259
|
-
5. **Request explicit confirmation**: Unconfirmed delivery may stall order progress.
|
|
169
|
+
### E8 — Contact Channel
|
|
260
170
|
|
|
261
|
-
|
|
171
|
+
Query `onchain_objects` for E1 `um` ID. Contact fields in schema.
|
|
262
172
|
|
|
263
|
-
|
|
173
|
+
- `um === null` → 🔴 **ABORT**
|
|
174
|
+
- `ims[]` empty → 🔴 **No Messenger**
|
|
175
|
+
- Has active `ims[]` → E9
|
|
264
176
|
|
|
265
177
|
---
|
|
266
178
|
|
|
267
|
-
|
|
179
|
+
### E9 — Chain Reputation
|
|
268
180
|
|
|
269
|
-
|
|
181
|
+
**Sentiment**: `query_toolkit` → `onchain_table_item_entity_linker` for provider address. Compute likes/dislikes ratio from `votes[]` (fields in schema).
|
|
270
182
|
|
|
271
|
-
**
|
|
183
|
+
**Orders**: Batch query `votes[].address` via `onchain_objects` (50/batch, max 200). Filter Order-type objects where `service` matches. Aggregate dispute rate (`dispute ≠ []` / total) and repeat buyer ratio.
|
|
272
184
|
|
|
273
|
-
|
|
185
|
+
- Dispute rate >10% → ⚠️
|
|
274
186
|
|
|
275
|
-
|
|
276
|
-
|------|--------|-----------|
|
|
277
|
-
| **Builder** (You) | Everything + withdraw funds | — |
|
|
278
|
-
| **Agents** | Operate progress, arbitration, cancel | **Withdraw funds** |
|
|
187
|
+
---
|
|
279
188
|
|
|
280
|
-
|
|
189
|
+
### E10 — Privacy Information Matching
|
|
281
190
|
|
|
282
|
-
|
|
191
|
+
From E1 `customer_required[]`. Check locally via `query_toolkit` → `local_info_list`. Match against local `name` fields.
|
|
283
192
|
|
|
284
|
-
|
|
193
|
+
> **⛔ Never send private info without explicit user confirmation per item.**
|
|
285
194
|
|
|
286
|
-
|
|
287
|
-
- **Order-operable forwards**: `namedOperator === ""` — you can execute via `order.progress`
|
|
288
|
-
- **Permission-operable forwards**: Require specific namespace permission — typically for Service Provider or collaborators
|
|
195
|
+
For matched: present value, ask "correct?" and "OK to send?". For missing: ask user to provide. Transmission: **Messenger only** (Phase 2), never on-chain.
|
|
289
196
|
|
|
290
|
-
|
|
291
|
-
1. Query Order object to get `progress` (Progress ID) and `machine` (Machine ID)
|
|
292
|
-
2. Query Progress object to get `current_node`
|
|
293
|
-
3. Query Machine table to find valid transitions from current node
|
|
197
|
+
---
|
|
294
198
|
|
|
295
|
-
|
|
296
|
-
- `query_toolkit` with `onchain_objects` query type
|
|
297
|
-
- `query_toolkit` with `onchain_table` query type
|
|
199
|
+
### Pre-Purchase GATE
|
|
298
200
|
|
|
299
|
-
|
|
201
|
+
```
|
|
202
|
+
┌──────────────────────────────────────────────────────┐
|
|
203
|
+
│ PRE-PURCHASE GATE │
|
|
204
|
+
├──────────┬───────────────────────────────────────────┤
|
|
205
|
+
│ E1 │ Service Status [ ] OK [ ] ⚠️ │
|
|
206
|
+
│ E2 │ Product & WIP [ ] OK [ ] ⚠️ │
|
|
207
|
+
│ E3 │ Machine Workflow [ ] OK [ ] ⚠️ │
|
|
208
|
+
│ E4 │ Guards Logic [ ] OK [ ] 🔴 │
|
|
209
|
+
│ E5 │ Fund Allocation [ ] OK [ ] ⚠️ │
|
|
210
|
+
│ E6 │ Arbitration [ ] OK [ ] ⚠️ │
|
|
211
|
+
│ E7 │ Compensation Fund [ ] OK [ ] ⚠️ │
|
|
212
|
+
│ E8 │ Contact Channel [ ] OK [ ] ⚠️ │
|
|
213
|
+
│ E9 │ Chain Reputation [ ] OK [ ] ⚠️ │
|
|
214
|
+
│ E10 │ Privacy Info Match [ ] OK [ ] ⚠️ │
|
|
215
|
+
├──────────┴───────────────────────────────────────────┤
|
|
216
|
+
│ ⛔ E1 bPublished=false / E8 um=null → ABORT │
|
|
217
|
+
│ ⛔ E3 no-refund + E6 no-arb → strongly advise ABORT │
|
|
218
|
+
│ ⛔ E4 ambiguous Guards → user MUST manually review │
|
|
219
|
+
│ ⛔ Any ⚠️ → explain risk, wait for user decision │
|
|
220
|
+
│ ✅ All OK → Phase 2 │
|
|
221
|
+
└──────────────────────────────────────────────────────┘
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
300
225
|
|
|
301
|
-
|
|
226
|
+
## Phase 2: Consensus Building
|
|
302
227
|
|
|
303
|
-
|
|
228
|
+
Consensus foundation: immutable on-chain rules (Phase 1). Messenger: encrypted, self-verifiable supplement — clarifies, cannot override on-chain. Full operations: [wowok-messenger](../wowok-messenger/SKILL.md).
|
|
304
229
|
|
|
305
|
-
|
|
230
|
+
### 2.1 Send Privacy Info
|
|
306
231
|
|
|
307
|
-
|
|
308
|
-
Current Node: "delivery_pending"
|
|
309
|
-
├── Path A → "delivery_confirmed"
|
|
310
|
-
│ ├── Guard: buyer signs receipt
|
|
311
|
-
│ └── Allocation: 95% seller, 5% platform
|
|
312
|
-
│
|
|
313
|
-
├── Path B → "dispute_filed"
|
|
314
|
-
│ ├── Guard: arbitration requested
|
|
315
|
-
│ └── Allocation: funds frozen
|
|
316
|
-
│
|
|
317
|
-
└── Path C → "return_initiated"
|
|
318
|
-
├── Guard: within return window
|
|
319
|
-
└── Allocation: 90% refund, 10% fee
|
|
320
|
-
```
|
|
232
|
+
Contact `ims[]` from E8. Send E10 info via `messenger_operation` → `send_message`. **Messenger only — never on-chain.** Get explicit user confirmation per item.
|
|
321
233
|
|
|
322
|
-
|
|
234
|
+
### 2.2 Negotiate
|
|
323
235
|
|
|
324
|
-
|
|
325
|
-
2. **Evaluate Guard conditions** for each path
|
|
326
|
-
3. **Assess Allocation impact** (query `service.order_allocators`)
|
|
327
|
-
4. **Present options** with consequences:
|
|
236
|
+
Clarify via Messenger: deliverables (E2 WIP), timeline (E3 nodes), refund/cancellation (E3/E5), privacy info received (E10). Evidence value requires recipient **explicit confirmation** (ARK signature). WTS evidence: [wowok-messenger](../wowok-messenger/SKILL.md).
|
|
328
237
|
|
|
329
|
-
|
|
330
|
-
|------|----------------|-------------------|----------|
|
|
331
|
-
| A | Sign receipt | Pay seller 95% | Satisfied customer |
|
|
332
|
-
| B | Request arbitration | Frozen | Disputed order |
|
|
333
|
-
| C | Return in window | 90% refund | Unsatisfied customer |
|
|
238
|
+
### 2.3 Consensus GATE
|
|
334
239
|
|
|
335
|
-
|
|
336
|
-
-
|
|
337
|
-
-
|
|
338
|
-
- Map to Allocation consequences
|
|
339
|
-
- Recommend based on user's goals and evidence
|
|
240
|
+
- [ ] E10 info sent and acknowledged
|
|
241
|
+
- [ ] Seller confirmed deliverables and edge cases
|
|
242
|
+
- [ ] WTS evidence generated
|
|
340
243
|
|
|
341
244
|
---
|
|
342
245
|
|
|
343
|
-
## Phase
|
|
246
|
+
## Phase 3: Order Creation
|
|
344
247
|
|
|
345
|
-
|
|
248
|
+
Schema: `schema_query({ action: "get", name: "onchain_operations_service" })`. Safety: [wowok-safety](../wowok-safety/SKILL.md).
|
|
346
249
|
|
|
347
|
-
|
|
250
|
+
**Not in schema**:
|
|
251
|
+
- Excess `buy.total_pay` auto-refunded. Agents cannot withdraw.
|
|
252
|
+
- Discounts: query `onchain_received` (type `0x2::service::Discount`), filter by `service`, validate time/benchmark. Rate: `total_pay × (off / 10000)`. Fixed: `min(off, total_pay)`.
|
|
348
253
|
|
|
349
|
-
|
|
350
|
-
|------|-----------|------------|
|
|
351
|
-
| 1 | `arbitration.dispute` | Create Arb object, **pay fee separately** (NOT from Order) |
|
|
352
|
-
| 2 | Generate WTS | Export Messenger history as tamper-proof evidence |
|
|
353
|
-
| 3 | Send evidence | Via Messenger to Arbitration's contact (encrypted) |
|
|
354
|
-
| 4 | `order.arb_confirm` | Signal "all evidence submitted" |
|
|
355
|
-
| 5 | Wait for voting | Arbitration organizes voters |
|
|
356
|
-
| 6 | `order.arb_objection` | (Optional) Object to unfavorable result |
|
|
357
|
-
| 7 | `order.arb_claim_compensation` | Claim payout from `service.compensation_fund` |
|
|
254
|
+
Post-creation: notify via Messenger with order ID.
|
|
358
255
|
|
|
359
|
-
|
|
360
|
-
- `schema_query({ action: "get", name: "onchain_operations_arbitration" })`
|
|
361
|
-
- `schema_query({ action: "get", name: "onchain_operations_order" })`
|
|
362
|
-
- `schema_query({ action: "get", name: "messenger_operation" })`
|
|
256
|
+
---
|
|
363
257
|
|
|
364
|
-
|
|
258
|
+
## Phase 4: Order Operations
|
|
365
259
|
|
|
366
|
-
|
|
367
|
-
- **One Compensation**: Only ONE claim per Order (choose best result)
|
|
368
|
-
- **Time Sensitivity**: Long arbitration may exceed order deadlines — discuss timelines pre-purchase
|
|
369
|
-
- **Evidence Privacy**: WTS files verify authenticity via `messenger_operation` with `verify_wts` operation
|
|
260
|
+
Schema: `schema_query({ action: "get", name: "onchain_operations_order" })`.
|
|
370
261
|
|
|
371
|
-
###
|
|
262
|
+
### Progress Advancement
|
|
372
263
|
|
|
373
|
-
|
|
374
|
-
Principal_confirming → Arbitrator_confirming → Voting → Arbitrated → Objectionable → Finished/Withdrawn
|
|
375
|
-
```
|
|
264
|
+
When user reaches a node, AI MUST cross-reference Phase 1:
|
|
376
265
|
|
|
377
|
-
|
|
266
|
+
1. **E3 Machine JSON**: user-operable forwards from current node?
|
|
267
|
+
2. **E4 Guard files**: Guard requirements? Can user satisfy?
|
|
268
|
+
3. **E5 Allocation**: financial outcome of each path?
|
|
378
269
|
|
|
379
|
-
|
|
270
|
+
Present all three dimensions. Never just the operation name.
|
|
380
271
|
|
|
381
|
-
|
|
272
|
+
- `namedOperator === ""` + no Guard → `order.progress` directly
|
|
273
|
+
- `namedOperator === ""` + Guard → passport required, no bypass
|
|
274
|
+
- `namedOperator !== ""` → not user-operable
|
|
382
275
|
|
|
383
|
-
|
|
276
|
+
---
|
|
384
277
|
|
|
385
|
-
|
|
278
|
+
## Phase 5: Arbitration
|
|
386
279
|
|
|
387
|
-
|
|
280
|
+
Schema: `schema_query({ action: "get", name: "onchain_operations_arbitration" })`. Process: [wowok-arbitrator](../wowok-arbitrator/SKILL.md).
|
|
388
281
|
|
|
389
|
-
|
|
390
|
-
- Arbitration compensation (from `service.compensation_fund`)
|
|
391
|
-
- Service penalties (late delivery, quality issues)
|
|
392
|
-
- Collaboration payments
|
|
393
|
-
- Direct transfers
|
|
282
|
+
Flow: `arbitration.dispute` → WTS evidence → Messenger → `order.arb_confirm` → voting → (`order.arb_objection`) → `order.arb_claim_compensation`.
|
|
394
283
|
|
|
395
|
-
**
|
|
284
|
+
**Not in schema**: fee paid separately, not from Order. One compensation claim per Order. Source: `compensation_fund` (E7).
|
|
396
285
|
|
|
397
|
-
|
|
286
|
+
---
|
|
398
287
|
|
|
399
|
-
|
|
288
|
+
## Fund Management
|
|
400
289
|
|
|
401
|
-
|
|
290
|
+
Schema: `onchain_operations_order`. Builder-only operations: `order.transfer_to` (ownership), `order.receive` (withdraw — agents can execute, only builder receives).
|
|
402
291
|
|
|
403
292
|
---
|
|
404
293
|
|
|
405
294
|
## Quick Reference
|
|
406
295
|
|
|
407
|
-
|
|
296
|
+
Schemas: `schema_query({ action: "get", name: "<name>" })` for `onchain_operations_service`, `onchain_operations_order`, `onchain_operations_arbitration`, `messenger_operation`, `query_toolkit`, `onchain_table_data`, `wip_file`.
|
|
408
297
|
|
|
409
|
-
|
|
410
|
-
|---------|-------------|
|
|
411
|
-
| Service operations (purchase) | `onchain_operations_service` |
|
|
412
|
-
| Order operations (progress, arbitration, receive) | `onchain_operations_order` |
|
|
413
|
-
| Arbitration operations (dispute) | `onchain_operations_arbitration` |
|
|
414
|
-
| Messenger (encrypted communication) | `messenger_operation` |
|
|
415
|
-
| Query toolkit (object data, tables) | `query_toolkit` |
|
|
298
|
+
### Phase Dependency
|
|
416
299
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
300
|
+
```
|
|
301
|
+
E1 (Service) ──→ E2 (Products/WIP)
|
|
302
|
+
│ │
|
|
303
|
+
│ ├──→ E8 (Contact) ├──→ E7 (Compensation)
|
|
304
|
+
│ ├──→ E10 (Privacy) └──→ E6 (Arbitrations)
|
|
305
|
+
│
|
|
306
|
+
└──→ E3 (Machine) ──→ E4 (Guards) ──→ E5 (Allocators)
|
|
307
|
+
│
|
|
308
|
+
└──→ E9 (Reputation)
|
|
309
|
+
```
|
|
422
310
|
|
|
423
|
-
|
|
424
|
-
2. Messenger contact → Clarify terms, save WTS
|
|
425
|
-
3. Service operation → Create order with named objects
|
|
426
|
-
4. Order operations → Advance progress, choose paths
|
|
427
|
-
5. Receive funds or arbitration → Extract to wallet
|
|
311
|
+
> E3→E4→E5 is a strict chain. E6-E10 run in parallel after E1.
|
|
428
312
|
|
|
429
|
-
|
|
313
|
+
### ⚠️ Critical Attention Items
|
|
430
314
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
- [ ] Checked available arbitrations
|
|
437
|
-
- [ ] Established Messenger contact with seller
|
|
438
|
-
- [ ] Clarified deliverables, timeline, refund policy
|
|
439
|
-
- [ ] Saved conversation as WTS evidence
|
|
440
|
-
|
|
441
|
-
Before advancing progress:
|
|
442
|
-
- [ ] Understand ALL available paths
|
|
443
|
-
- [ ] Know Guard requirements for chosen path
|
|
444
|
-
- [ ] Aware of Allocation consequences
|
|
445
|
-
- [ ] Have required evidence/proof ready
|
|
315
|
+
1. **E4 Ambiguous Guards** — blind spot. User must review file directly. AI must not speculate.
|
|
316
|
+
2. **E3 no-refund + E6 no-arb** — no mechanism to recover funds. Single most important decision factor.
|
|
317
|
+
3. **E3 Forward with Guard** — "user-operable" is misleading if Guard blocks you. Verify requirements.
|
|
318
|
+
4. **E2 WIP hash mismatch** — seller altered claims post-publish. Red flag regardless of other factors.
|
|
319
|
+
5. **E9 High dispute rate** — >10% quantitative warning independent of structural analysis.
|