@wowok/skills 1.1.6 → 1.1.8
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 +9 -4
- package/dist/cli.js +4 -5
- package/dist/cli.js.map +1 -1
- package/dist/skills.js +1 -1
- package/dist/skills.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install.js +3 -1
- package/wowok-guard/SKILL.md +12 -12
- package/wowok-machine/SKILL.md +136 -150
- package/wowok-messenger/SKILL.md +148 -177
- package/wowok-order/SKILL.md +1 -1
- package/wowok-provider/SKILL.md +3 -3
- package/wowok-safety/SKILL.md +6 -4
- package/wowok-tools/SKILL.md +106 -156
package/wowok-messenger/SKILL.md
CHANGED
|
@@ -5,8 +5,8 @@ description: |
|
|
|
5
5
|
evidence collection, and dispute resolution.
|
|
6
6
|
|
|
7
7
|
Core features: send/receive encrypted messages, generate WTS evidence files,
|
|
8
|
-
verify message authenticity, manage
|
|
9
|
-
arbitration workflows.
|
|
8
|
+
verify message authenticity, manage conversations with anti-spam controls, and
|
|
9
|
+
integrate with arbitration workflows.
|
|
10
10
|
|
|
11
11
|
Used by customers, service providers, and arbitrators for secure off-chain
|
|
12
12
|
communication that creates tamper-proof audit trails.
|
|
@@ -22,11 +22,11 @@ always: false
|
|
|
22
22
|
|
|
23
23
|
# WoWok Messenger Guide
|
|
24
24
|
|
|
25
|
-
End-to-end encrypted messaging
|
|
25
|
+
End-to-end encrypted messaging with tamper-proof audit trails.
|
|
26
26
|
|
|
27
|
-
> **Role**: Any WoWok participant
|
|
28
|
-
> **
|
|
29
|
-
> **Related Skills**: [wowok-guard](../wowok-guard/SKILL.md) (guard
|
|
27
|
+
> **Role**: Any WoWok participant
|
|
28
|
+
> **Schema**: `schema_query({ action: "get", name: "messenger_operation" })` — all 16 operations with full parameter types and constraints. This document focuses on **design decisions and strategy** not captured by the schema.
|
|
29
|
+
> **Related Skills**: [wowok-guard](../wowok-guard/SKILL.md) (guard design), [wowok-arbitrator](../wowok-arbitrator/SKILL.md) (WTS evidence in disputes), [wowok-order](../wowok-order/SKILL.md) (customer perspective), [wowok-provider](../wowok-provider/SKILL.md) (service provider perspective), [wowok-safety](../wowok-safety/SKILL.md) (safety)
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -34,259 +34,230 @@ End-to-end encrypted messaging for secure off-chain business communication with
|
|
|
34
34
|
|
|
35
35
|
### Trust Model
|
|
36
36
|
|
|
37
|
-
The
|
|
38
|
-
|
|
39
|
-
**Key Design Decisions**:
|
|
40
|
-
- Messages are **NOT on-chain**. Communication is off-chain for privacy and cost efficiency.
|
|
41
|
-
- The server **cannot read** messages. Ciphertext is opaque; only endpoints hold decryption keys.
|
|
42
|
-
- The server **proves message order**. Its Falcon512 signature on the Merkle tree is verifiable by anyone.
|
|
43
|
-
- On-chain proof is **optional**. A message's Merkle root can be anchored to the blockchain via `proof_message`.
|
|
37
|
+
Messages are **off-chain**, end-to-end encrypted. The server cannot read content — ciphertext is opaque. The server provides **verifiable message ordering** via Falcon512 signatures on a Merkle tree. On-chain anchoring (`proof_message`) is optional.
|
|
44
38
|
|
|
45
39
|
### Evidence Closure Principle
|
|
46
40
|
|
|
47
41
|
> **A message becomes valid evidence ONLY when the recipient explicitly responds to or decrypts it.**
|
|
48
42
|
|
|
49
|
-
One-sided claims are not evidence. The system enforces this through cryptographic and behavioral rules:
|
|
50
43
|
- A message alone proves nothing about the recipient's awareness.
|
|
51
|
-
- ARK confirmation (recipient-signed receipt) creates cryptographic proof
|
|
44
|
+
- ARK confirmation (recipient-signed receipt) creates cryptographic proof of acknowledgment.
|
|
52
45
|
- A reply is the strongest form of acknowledgment — it proves the recipient held the session key and acted on the message.
|
|
53
|
-
-
|
|
54
|
-
- Arbitration requires **confirmed**, reciprocated evidence — never unilateral claims.
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## 1. Message Delivery Mechanism
|
|
46
|
+
- Arbitration requires **confirmed, reciprocated evidence** — never unilateral claims.
|
|
59
47
|
|
|
60
|
-
###
|
|
61
|
-
Messages from **strangers** (addresses not in the recipient's friends list) are subject to additional restrictions:
|
|
48
|
+
### Sessions
|
|
62
49
|
|
|
63
|
-
|
|
64
|
-
- **Reply unlocks**: When the recipient replies, the stranger is automatically added to the recipient's friends list, and both parties can message freely thereafter.
|
|
65
|
-
- **Cool-down window**: The one-message restriction persists for a configurable duration. If the recipient does not reply within this window, the stranger may retry one message.
|
|
66
|
-
- **Recipient opt-out**: A recipient can disable stranger messages entirely. When blocked, the sender receives the recipient's guard list as an alternative contact path.
|
|
50
|
+
Every conversation between two addresses has a deterministic session. Messages are ordered by a monotonically increasing `leafIndex` starting from zero, establishing their absolute position. Both parties share the same session context.
|
|
67
51
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
### 1.2 Guard Message Flow (Spam-Bypass Path)
|
|
52
|
+
---
|
|
71
53
|
|
|
72
|
-
|
|
54
|
+
## Setup
|
|
73
55
|
|
|
74
|
-
|
|
56
|
+
Before any communication:
|
|
75
57
|
|
|
76
|
-
|
|
58
|
+
1. **Account must exist** → `account_operation` (gen)
|
|
59
|
+
2. **Enable messenger** → `account_operation` (messenger), set a messenger name
|
|
60
|
+
3. **Get your address** → `account_operation` (get) — share this address with your counterparties
|
|
77
61
|
|
|
78
|
-
|
|
62
|
+
> The messenger name is required for message delivery. Without it, your account has no messenger endpoint and cannot receive messages.
|
|
79
63
|
|
|
80
64
|
---
|
|
81
65
|
|
|
82
|
-
##
|
|
66
|
+
## Daily Communication
|
|
83
67
|
|
|
84
|
-
|
|
68
|
+
The user's daily loop — these are the operations they will return to repeatedly.
|
|
85
69
|
|
|
86
|
-
|
|
70
|
+
### Check Inbox
|
|
87
71
|
|
|
88
|
-
|
|
72
|
+
Two approaches, depending on need:
|
|
89
73
|
|
|
90
|
-
|
|
74
|
+
- **Quick glance** — `watch_conversations` with `unreadOnly: true` lists all conversations with unread messages, sorted by activity. Each conversation shows a preview of the last messages.
|
|
75
|
+
- **Deep dive** — `watch_messages` with a specific `peerAddress` to view the full conversation with a particular counterparty. Supports keyword search, time-range filtering, direction filter, and status filter.
|
|
91
76
|
|
|
92
|
-
|
|
93
|
-
|------|---------|------------|-------------|
|
|
94
|
-
| **Blacklist** | Block specific addresses completely | `add`, `remove`, `clear`, `get`, `exist` | Server-configured max (default 1000) |
|
|
95
|
-
| **Friends List** | Allow trusted contacts to bypass all checks | `add`, `remove`, `clear`, `get`, `exist` | Server-configured max (default 1000) |
|
|
96
|
-
| **Guard List** | Specify which guards can verify strangers | `add`, `remove`, `get` | Server-configured max (default 100) |
|
|
77
|
+
**Design note**: By default, retrieving messages auto-marks them as viewed (`viewedAt` timestamp). Set `skipAutoMarkViewed: true` if you want to peek without marking read.
|
|
97
78
|
|
|
98
|
-
|
|
79
|
+
### Send Messages
|
|
99
80
|
|
|
100
|
-
|
|
101
|
-
- `guard`: The on-chain Guard object ID or name (see [wowok-guard](../wowok-guard/SKILL.md) for Guard design)
|
|
102
|
-
- `passportValiditySeconds`: How long a passport from this guard remains valid for messaging (typically 60s to 7 days)
|
|
81
|
+
Plain text via `send_message`; files (WTS, WIP, ZIP) via `send_file`.
|
|
103
82
|
|
|
104
|
-
|
|
83
|
+
**First-time contact with a stranger**: You get exactly one message. Make it count — include who you are, why you're contacting them, and what you need. After the recipient replies, you're auto-added to their friends list and can message freely.
|
|
105
84
|
|
|
106
|
-
|
|
85
|
+
**Guard-protected recipients**: If the recipient has disabled stranger messages, the rejection response includes their `guard_list`. Obtain a passport from one of those guards (`gen_passport` via `onchain_operations`), then resend with `guardAddress` + `passportAddress`.
|
|
107
86
|
|
|
108
|
-
|
|
87
|
+
**ZIP file attachments**: Use `send_file` for file delivery. Recipients extract via `extract_zip_messages`. The file is encrypted end-to-end; `zipMetadata` tracks download status locally.
|
|
109
88
|
|
|
110
|
-
|
|
89
|
+
### Mark as Read
|
|
111
90
|
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
- `false`: All stranger messages are rejected. The rejection response includes your `guard_list` so the sender can obtain a passport and retry.
|
|
115
|
-
|
|
116
|
-
- **`maxInboxSize`**: Maximum messages retained in your inbox (typically 10–1000). Older messages are removed when the limit is reached.
|
|
91
|
+
- `mark_conversation_as_viewed` — mark an entire conversation thread as read
|
|
92
|
+
- `mark_messages_as_viewed` — mark specific messages by ID
|
|
117
93
|
|
|
118
|
-
|
|
94
|
+
### Manage Contacts
|
|
119
95
|
|
|
120
|
-
|
|
96
|
+
Three independently managed lists. Schema covers all operations — here are the design choices:
|
|
121
97
|
|
|
122
|
-
|
|
98
|
+
| List | Design Intent |
|
|
99
|
+
|------|---------------|
|
|
100
|
+
| **Friends** | Mutual trust — added automatically when you reply to a stranger, or manually. Friends bypass all spam checks. |
|
|
101
|
+
| **Blacklist** | Permanent block — the address can never message you. |
|
|
102
|
+
| **Guard list** | Verified strangers — addresses holding a valid passport from any listed Guard can message you. Each entry pairs a Guard object ID with a validity duration (`passportValiditySeconds`: 10s to 10 years). |
|
|
123
103
|
|
|
124
|
-
|
|
104
|
+
---
|
|
125
105
|
|
|
126
|
-
|
|
106
|
+
## Anti-Spam Strategy
|
|
127
107
|
|
|
108
|
+
The four-layer protection model evaluates every incoming message:
|
|
128
109
|
|
|
129
|
-
|
|
110
|
+
```
|
|
111
|
+
Blacklist → Friends List → Guard Verification → Stranger Rules
|
|
112
|
+
(reject) (accept) (accept if passport valid) (one-message limit)
|
|
113
|
+
```
|
|
130
114
|
|
|
131
|
-
|
|
115
|
+
This section covers **how to configure these layers intelligently** for different user profiles — configuration combinations, not just field descriptions.
|
|
132
116
|
|
|
133
|
-
|
|
117
|
+
### Stranger Rules
|
|
134
118
|
|
|
135
|
-
|
|
119
|
+
Messages from non-friend, non-guard-verified addresses are subject to a **one-message limit**:
|
|
136
120
|
|
|
137
|
-
|
|
121
|
+
- Stranger sends one message. If the recipient replies, the stranger becomes a friend and messaging is unrestricted.
|
|
122
|
+
- If the recipient does not reply within the cool-down window, the stranger may retry with one new message.
|
|
123
|
+
- `allowStrangerMessages: false` disables stranger messages entirely.
|
|
138
124
|
|
|
139
|
-
|
|
125
|
+
### Strategy: Choosing Your Protection Profile
|
|
140
126
|
|
|
141
|
-
|
|
127
|
+
The optimal configuration depends on your role and openness needs:
|
|
142
128
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
129
|
+
| Profile | Settings | Who Should Use |
|
|
130
|
+
|---------|----------|----------------|
|
|
131
|
+
| **Open** | `allowStrangerMessages: true`, no guard list, empty blacklist | Public-facing services, open marketplaces |
|
|
132
|
+
| **Guarded** | `allowStrangerMessages: false`, guard list with 1-3 guards, friends list for known contacts | Service providers who want verified strangers only; customers discoverable by specific criteria |
|
|
133
|
+
| **Closed** | `allowStrangerMessages: false`, no guard list, friends-only | Private negotiations, internal team communication |
|
|
134
|
+
| **Defensive** | `allowStrangerMessages: true`, substantial blacklist | Users receiving harassment from specific addresses; open but monitoring |
|
|
146
135
|
|
|
147
|
-
**
|
|
136
|
+
**How to help the user choose**: Ask:
|
|
137
|
+
1. "Do you want strangers to be able to contact you at all?" → determines `allowStrangerMessages`
|
|
138
|
+
2. "If yes, should anyone be able to, or only those who meet certain criteria?" → determines Guard list need
|
|
139
|
+
3. "Are there specific addresses you want to block entirely?" → determines Blacklist use
|
|
148
140
|
|
|
149
|
-
|
|
141
|
+
### Strategy: Guard List Design
|
|
150
142
|
|
|
151
|
-
|
|
143
|
+
The Guard list is where anti-spam becomes programmable. A Guard validates that a stranger **meets a verifiable condition** before allowing their message through.
|
|
152
144
|
|
|
153
|
-
**
|
|
145
|
+
**Common Guard designs for messenger**:
|
|
154
146
|
|
|
155
|
-
|
|
147
|
+
| Guard Type | What It Verifies | Example Use |
|
|
148
|
+
|------------|-----------------|-------------|
|
|
149
|
+
| Token-gated | Sender holds a specific token/NFT | Premium customer community |
|
|
150
|
+
| Reputation | Sender's `personal` profile has ≥N likes | Verified reputation threshold |
|
|
151
|
+
| Order-based | Sender has an active order on your Service | Only current customers can message |
|
|
152
|
+
| Passport-based | Sender holds a valid passport from a trusted issuer | Whitelist of partner organizations |
|
|
153
|
+
| Payment | Sender has made a minimum payment | Paid consultation access |
|
|
156
154
|
|
|
157
|
-
|
|
155
|
+
**`passportValiditySeconds` trade-off**: Short (60s) = higher security, re-verification per message. Long (7 days) = better UX, one passport covers a week. Match to your Guard's use case: payment-based guards can use longer durations; order-status guards should use shorter durations (order state changes).
|
|
158
156
|
|
|
159
|
-
**
|
|
157
|
+
**Multiple guards**: Different guards can serve different purposes. A provider might use: (1) order-based guard for existing customers, (2) token-gated guard for premium access — both listed, either suffices for message delivery.
|
|
160
158
|
|
|
161
|
-
|
|
159
|
+
### Strategy: Troubleshooting Anti-Spam Issues
|
|
162
160
|
|
|
161
|
+
| Symptom | Diagnosis | Solution |
|
|
162
|
+
|---------|-----------|----------|
|
|
163
|
+
| "My message was rejected" | Recipient has `allowStrangerMessages: false` and you're not their friend | Check rejection response for `guard_list` → obtain passport → resend with `guardAddress`+`passportAddress` |
|
|
164
|
+
| "I'm getting too much spam" | `allowStrangerMessages: true` with no filtering | Switch to Guarded profile: set `allowStrangerMessages: false`, add at least one Guard to guard list |
|
|
165
|
+
| "A legitimate customer can't reach me" | Guard requirements too strict, or their passport expired | Lower Guard requirements, extend `passportValiditySeconds`, or add them to friends list manually |
|
|
166
|
+
| "Stranger keeps spamming after cool-down" | Working as designed — one retry per cool-down | Add to blacklist |
|
|
167
|
+
| "I disabled strangers but my friend can't message" | They may not actually be in your friends list | Use `friendslist` → `exist` to verify; add manually if needed |
|
|
163
168
|
|
|
164
|
-
|
|
169
|
+
### Strategy: Filtering Messages by Source
|
|
165
170
|
|
|
166
|
-
|
|
171
|
+
`watch_messages` supports `listFilterMode` to segment your inbox by relationship type:
|
|
167
172
|
|
|
168
|
-
|
|
173
|
+
- `friends` — only messages from your friends list
|
|
174
|
+
- `guard` — only messages from guard-verified senders
|
|
175
|
+
- `stranger` — only messages from unknown senders (highest priority for review)
|
|
176
|
+
- `any` — all messages (default)
|
|
169
177
|
|
|
170
|
-
|
|
178
|
+
Combine with `customListFilter` for fine-grained include/exclude logic.
|
|
171
179
|
|
|
172
|
-
|
|
180
|
+
**Practical use**: A service provider checking their inbox can first scan `listFilterMode: "friends"` for known-customer messages (low risk), then `listFilterMode: "stranger"` for new-customer inquiries (need attention).
|
|
173
181
|
|
|
174
182
|
---
|
|
175
183
|
|
|
176
|
-
##
|
|
177
|
-
|
|
178
|
-
### 4.1 Customer → Service Provider
|
|
184
|
+
## Evidence (WTS)
|
|
179
185
|
|
|
180
|
-
|
|
186
|
+
### Concept
|
|
181
187
|
|
|
182
|
-
|
|
183
|
-
- Query the Service object via `query_toolkit` with `query_type: "onchain_objects"` to extract `service.um` (Contact object ID)
|
|
184
|
-
- Query the Contact object to get `ims[].at` (list of messenger addresses the provider accepts messages at)
|
|
188
|
+
A WTS file is a **tamper-proof, self-verifying export** of a continuous conversation. Every message is cryptographically chained; any gap or modification breaks the chain. Participant signatures add non-repudiation.
|
|
185
189
|
|
|
186
|
-
|
|
187
|
-
- After order creation, check the Service's `customer_required` field (phone, email, delivery address, etc.)
|
|
188
|
-
- **AI should prompt**: Ask if the user wants to save this information to `local_info` for future use, or retrieve existing info from `local_info_list` to avoid re-entry
|
|
189
|
-
- Retrieve matching private information from local storage using `query_toolkit` → `local_info_list`
|
|
190
|
-
- Send via `messenger_operation` with `send_message` to the provider's customer service address
|
|
191
|
-
- **Request explicit confirmation** — unconfirmed delivery may stall order progress
|
|
192
|
-
- If this is first contact, you have exactly one message — make it count
|
|
190
|
+
### The Workflow
|
|
193
191
|
|
|
194
|
-
|
|
192
|
+
When a dispute requires evidence:
|
|
195
193
|
|
|
196
|
-
|
|
194
|
+
```
|
|
195
|
+
1. generate_wts → export messages by time/messageId/seqIndex range
|
|
196
|
+
2. sign_wts → add your Falcon512 signature (both parties can sign)
|
|
197
|
+
3. verify_wts → validate hash chain, continuity, and all signatures
|
|
198
|
+
4. wts2html → (optional) convert to human-readable HTML
|
|
199
|
+
5. send_file → submit signed WTS to the arbitrator via messenger
|
|
200
|
+
```
|
|
197
201
|
|
|
198
|
-
**
|
|
202
|
+
> **Key design decision**: Include the **full conversation** when generating WTS for arbitration — not just favorable messages. The arbitrator needs to see who said what, who acknowledged what, and the exact sequence. Selective exports undermine your credibility.
|
|
199
203
|
|
|
200
|
-
|
|
201
|
-
2. **Respond promptly**: Use `send_message` to reply. Your reply automatically adds the customer to your friends list if they were a stranger.
|
|
202
|
-
3. **Document agreements**: For any commitments (pricing, timeline changes, custom work), confirm them in messages. These become evidence if disputes arise.
|
|
203
|
-
4. **WTS for disputes**: If a disagreement escalates, the provider may generate and sign WTS to demonstrate good faith and support their position.
|
|
204
|
+
### On-Chain Proof (Optional)
|
|
204
205
|
|
|
205
|
-
|
|
206
|
-
- Respond promptly to maintain trust
|
|
207
|
-
- Document all agreements and changes in messages
|
|
208
|
-
- Confirm understanding before proceeding with orders
|
|
209
|
-
- Use guard list to allow verified strangers to reach you without opening to all strangers
|
|
206
|
+
`proof_message` anchors a message to the blockchain, creating an immutable timestamp proving the message existed before that point. Anyone can independently verify against this on-chain record.
|
|
210
207
|
|
|
211
|
-
|
|
208
|
+
### When to Generate WTS
|
|
212
209
|
|
|
213
|
-
|
|
210
|
+
- **Disputes only** — normal conversations are preserved server-side. WTS is evidence preparation, not archiving.
|
|
211
|
+
- **When the other party disputes a fact** — the WTS proves what was actually said and acknowledged.
|
|
212
|
+
- **When arbitration requires evidence submission** — signed WTS is the standard evidence format.
|
|
214
213
|
|
|
215
|
-
|
|
214
|
+
---
|
|
216
215
|
|
|
217
|
-
|
|
216
|
+
## Messenger Across Roles
|
|
218
217
|
|
|
219
|
-
|
|
220
|
-
2. **Messenger must be enabled**: Set a messenger name on the account via `account_operation` to enable Messenger functionality; clear it to disable.
|
|
218
|
+
This section shows **how Messenger fits into each participant's workflow** — not detailed SOP (see the role-specific skills for complete workflows), but the Messenger-specific touchpoints.
|
|
221
219
|
|
|
220
|
+
### Customer
|
|
222
221
|
|
|
223
|
-
|
|
222
|
+
| Touchpoint | Messenger Operation | When |
|
|
223
|
+
|------------|-------------------|------|
|
|
224
|
+
| Pre-order inquiry | `send_message` to service provider | Before order creation — ask about service details, pricing, custom requirements |
|
|
225
|
+
| Submit required info | `send_message` with delivery address, phone, etc. | After order creation — the Service's `customer_required` fields dictate what to send |
|
|
226
|
+
| Track progress | `watch_messages` with provider | During order fulfillment — receive status updates |
|
|
227
|
+
| Raise dispute | `generate_wts` + `sign_wts` + `send_file` to arbitrator | When resolution fails — submit evidence |
|
|
224
228
|
|
|
225
|
-
|
|
226
|
-
1. **Get current state**: Use `settings` (`get`) and list operations (`get`) to see the current configuration.
|
|
227
|
-
2. **Add trusted contacts**: Use `friendslist` (`add`) for known counterparties.
|
|
228
|
-
3. **Configure guards**: Use `guardlist` (`add`) if you want to accept verified strangers. The Guard objects must already exist on-chain (see [wowok-guard](../wowok-guard/SKILL.md)).
|
|
229
|
-
4. **Set stranger policy**: Use `settings` (`set`) with `allowStrangerMessages` to toggle stranger access.
|
|
230
|
-
5. **Block unwanted**: Use `blacklist` (`add`) for addresses you never want to hear from.
|
|
229
|
+
> **Full workflow**: See [wowok-order](../wowok-order/SKILL.md) for the complete customer journey.
|
|
231
230
|
|
|
232
|
-
|
|
231
|
+
### Service Provider
|
|
233
232
|
|
|
234
|
-
|
|
233
|
+
| Touchpoint | Messenger Operation | When |
|
|
234
|
+
|------------|-------------------|------|
|
|
235
|
+
| Monitor inquiries | `watch_conversations` with `unreadOnly` or `listFilterMode: "stranger"` | Daily — check for new customer messages |
|
|
236
|
+
| Respond to customers | `send_message` (reply auto-adds to friends) | As needed — timely response builds trust |
|
|
237
|
+
| Request customer info | `send_message` asking for `customer_required` fields | After order creation if not yet provided |
|
|
238
|
+
| Document agreements | `send_message` confirming terms, changes, custom work | Immediately after agreement — creates evidence trail |
|
|
239
|
+
| Dispute defense | `generate_wts` + `sign_wts` + `send_file` | When a customer escalates — prove good-faith communication |
|
|
235
240
|
|
|
236
|
-
|
|
241
|
+
> **Full workflow**: See [wowok-provider](../wowok-provider/SKILL.md) for the complete service provider journey.
|
|
237
242
|
|
|
238
|
-
|
|
243
|
+
### Arbitrator
|
|
239
244
|
|
|
240
|
-
|
|
245
|
+
| Touchpoint | Messenger Operation | When |
|
|
246
|
+
|------------|-------------------|------|
|
|
247
|
+
| Receive evidence | `watch_messages` or `watch_conversations` | When parties submit WTS files |
|
|
248
|
+
| Verify evidence | `verify_wts` on received files | Before reviewing — ensure evidence integrity |
|
|
249
|
+
| Communicate with parties | `send_message` for clarification requests | During dispute review |
|
|
250
|
+
| Sign attestation | `sign_wts` on verified evidence | After verification — arbitrator endorses authenticity |
|
|
241
251
|
|
|
242
|
-
|
|
252
|
+
> **Full workflow**: See [wowok-arbitrator](../wowok-arbitrator/SKILL.md) for the complete arbitration process.
|
|
243
253
|
|
|
244
|
-
| Purpose | Schema Name |
|
|
245
|
-
|---------|-------------|
|
|
246
|
-
| All messenger operations | `messenger_operation` |
|
|
247
|
-
| Query on-chain objects (services, guards, contacts) | `query_toolkit` |
|
|
248
|
-
| On-chain operations (gen_passport for guard) | `onchain_operations` |
|
|
249
|
-
| Local account management | `account_operation` |
|
|
250
|
-
| Local address book (marks) | `local_mark_operation` |
|
|
251
|
-
| Local private info storage | `local_info_operation` |
|
|
252
254
|
---
|
|
253
255
|
|
|
254
|
-
##
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
| View conversations | `watch_conversations` | `filter.unreadOnly?`, `filter.previewMessageCount?`, `filter.sortBy?` |
|
|
263
|
-
| View messages | `watch_messages` | `filter.peerAddress?`, `filter.direction?`, `filter.contentType?`, `filter.keyword?` |
|
|
264
|
-
| Mark as read | `mark_messages_as_viewed` | `messageIds`, `account?` |
|
|
265
|
-
| Mark convo read | `mark_conversation_as_viewed` | `peerAddress`, `account?` |
|
|
266
|
-
|
|
267
|
-
### Evidence (WTS)
|
|
268
|
-
|
|
269
|
-
| Goal | Operation | Key Parameters |
|
|
270
|
-
|------|-----------|----------------|
|
|
271
|
-
| Export | `generate_wts` | `params.myAccount`, `params.peerAccount`, `params.range?`, `params.outputDir` |
|
|
272
|
-
| Sign | `sign_wts` | `wtsFilePath`, `account`, `outputPath?` |
|
|
273
|
-
| Verify | `verify_wts` | `wtsFilePath` |
|
|
274
|
-
| View HTML | `wts2html` | `wtsPath`, `options.title?`, `options.theme?` |
|
|
275
|
-
| Prove on-chain | `proof_message` | `account`, `messageId`, `network` |
|
|
276
|
-
| Extract ZIP | `extract_zip_messages` | `account`, `messages`, `outputDir` |
|
|
277
|
-
|
|
278
|
-
### List Management
|
|
279
|
-
|
|
280
|
-
| Goal | Operation | Key Parameters |
|
|
281
|
-
|------|-----------|----------------|
|
|
282
|
-
| Add friend | `friendslist` (`add`) | `account`, `users` (addresses/names) |
|
|
283
|
-
| Block user | `blacklist` (`add`) | `account`, `users` (addresses/names) |
|
|
284
|
-
| Add guard | `guardlist` (`add`) | `account`, `guards[].guard`, `guards[].passportValiditySeconds` |
|
|
285
|
-
| Toggle strangers | `settings` (`set`) | `account`, `allowStrangerMessages` |
|
|
286
|
-
|
|
287
|
-
### Local Storage
|
|
288
|
-
|
|
289
|
-
| Goal | Tool | Key Parameters |
|
|
290
|
-
|------|------|----------------|
|
|
291
|
-
| Write private info | `local_info_operation` (add) | `data`: array of `{ name, default, contents }` |
|
|
292
|
-
| Read private info | `query_toolkit` → `local_info_list` | `filter.name?` |
|
|
256
|
+
## Common Pitfalls
|
|
257
|
+
|
|
258
|
+
- **One-message limit trap**: Sending a vague first message to a stranger wastes your only chance. Make the first message complete and actionable.
|
|
259
|
+
- **Disabled messenger**: Without a messenger name set, your account has no endpoint — counterparties cannot find or message you.
|
|
260
|
+
- **WTS range too narrow**: Selecting only favorable messages undermines evidence credibility. Include the full conversation.
|
|
261
|
+
- **Guard list without strategy**: Adding a Guard to your list without testing it (`gen_passport`) means you don't know what conditions strangers must meet — you may be blocking legitimate contacts.
|
|
262
|
+
- **`allowStrangerMessages: false` with no guard list and no friends**: Nobody can contact you. Always ensure at least one inbound path exists.
|
|
263
|
+
- **Stale passports**: `passportValiditySeconds` too short causes frequent re-verification failures. Match duration to your Guard's data volatility.
|
package/wowok-order/SKILL.md
CHANGED
|
@@ -62,7 +62,7 @@ From E1 `sales[]`. Skip `suspension === true` items.
|
|
|
62
62
|
|
|
63
63
|
**WIP Verification** (mandatory when `wip_hash` non-empty):
|
|
64
64
|
|
|
65
|
-
Use `wip_file` → `
|
|
65
|
+
Use `wip_file` → `op: "verify"`, `wipFilePath: "<wip_url>"`, `hash_equal: "<wip_hash>"`.
|
|
66
66
|
|
|
67
67
|
- `wip_hash` empty → no on-chain commitment (auto-verified, weaker evidence)
|
|
68
68
|
- Verification fails → 🔴 **WIP tampered after publish**
|
package/wowok-provider/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ when_to_use:
|
|
|
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)
|
|
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)
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
@@ -119,7 +119,7 @@ STEP 3: Business Logic (MODIFY)
|
|
|
119
119
|
│ Tool: onchain_operations (service) | Fields: order_allocators
|
|
120
120
|
├── Arbitrations (optional) — REUSE existing Arb services
|
|
121
121
|
│ Tool: onchain_operations (service) | Fields: arbitrations.list
|
|
122
|
-
├── Compensation Fund (optional): compensation_fund_add + setting_locked_time_add (
|
|
122
|
+
├── Compensation Fund (optional): compensation_fund_add + setting_locked_time_add (default 30 days, configurable)
|
|
123
123
|
│ Tool: onchain_operations (service)
|
|
124
124
|
└── Reward (optional) — incentive pools
|
|
125
125
|
|
|
@@ -210,7 +210,7 @@ Attach: onchain_operations (service) → sales.sales[{
|
|
|
210
210
|
|
|
211
211
|
### Compensation Fund (Optional but Recommended)
|
|
212
212
|
|
|
213
|
-
- Add: `compensation_fund_add` | Lock: `setting_locked_time_add` (
|
|
213
|
+
- Add: `compensation_fund_add` | Lock: `setting_locked_time_add` (default 30 days = 2592000000ms, configurable via `setting_lock_duration_add`)
|
|
214
214
|
- **Withdraw**: Pause Service → Wait lock duration → `compensation_fund_receive`
|
|
215
215
|
|
|
216
216
|
---
|
package/wowok-safety/SKILL.md
CHANGED
|
@@ -36,12 +36,14 @@ 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.
|
|
@@ -209,7 +211,7 @@ 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
|
|
|
@@ -256,8 +258,8 @@ 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>" })`
|