@wowok/skills 3.2.0 → 3.2.1
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/package.json +1 -1
- package/wowok-arbitrator/SKILL.md +60 -189
- package/wowok-auditor/SKILL.md +3 -3
- package/wowok-collaborator/SKILL.md +33 -73
- package/wowok-governance/SKILL.md +32 -71
- package/wowok-machine/SKILL.md +64 -206
- package/wowok-market/SKILL.md +25 -62
- package/wowok-messenger/SKILL.md +50 -172
- package/wowok-onboard/SKILL.md +50 -124
- package/wowok-order/SKILL.md +93 -211
- package/wowok-output/SKILL.md +59 -168
- package/wowok-planner/SKILL.md +26 -74
- package/wowok-provider/SKILL.md +66 -168
- package/wowok-supplier/SKILL.md +51 -76
package/wowok-messenger/SKILL.md
CHANGED
|
@@ -2,221 +2,99 @@
|
|
|
2
2
|
name: wowok-messenger
|
|
3
3
|
description: "WoWok Messenger — end-to-end encrypted communication for pre-order negotiation, evidence collection, and dispute resolution. Core features: send/receive encrypted messages, generate WTS evidence files, verify message authenticity, manage conversations with anti-spam controls, and integrate with arbitration workflows. Used by customers, service providers, and arbitrators for secure off-chain communication that creates tamper-proof audit trails. Use when: User needs to communicate with another party (buyer, seller, arbitrator); User wants to send encrypted messages for negotiation; User needs to generate WTS evidence files from conversations; User wants to verify message authenticity; User needs to manage conversation lists (friends, blacklist, guard); User mentions \"messenger\", \"message\", \"chat\", \"communication\", \"WTS\", \"evidence\"."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "2.
|
|
5
|
+
version: "2.1.0"
|
|
6
6
|
role: shared
|
|
7
7
|
related: "wowok-order, wowok-provider, wowok-arbitrator"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# WoWok Messenger Guide
|
|
11
11
|
|
|
12
|
-
End-to-end encrypted messaging with tamper-proof audit trails.
|
|
12
|
+
End-to-end encrypted off-chain messaging with tamper-proof audit trails.
|
|
13
13
|
|
|
14
|
-
> **Role**:
|
|
15
|
-
> All 18 operations
|
|
16
|
-
>
|
|
17
|
-
>
|
|
14
|
+
> **Role**: any WoWok participant.
|
|
15
|
+
> All 18 operations and exact parameter constraints are authoritative in the MCP schema — `schema_query` action=`get` name=`messenger_operation` before an unfamiliar call. This file covers **timing, evidence discipline, and anti-spam strategy** the schema can't tell you.
|
|
16
|
+
> Guard table design: `schema_query` actions `get_guard_design_patterns` / `get_safety_rules`.
|
|
17
|
+
> Related: [wowok-arbitrator](../wowok-arbitrator/SKILL.md) · [wowok-order](../wowok-order/SKILL.md) · [wowok-provider](../wowok-provider/SKILL.md)
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
## Core
|
|
21
|
+
## Core concepts
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
### Evidence Closure Principle
|
|
28
|
-
|
|
29
|
-
> **A message becomes valid evidence ONLY when the recipient explicitly responds to or decrypts it.**
|
|
30
|
-
|
|
31
|
-
- A message alone proves nothing about the recipient's awareness.
|
|
32
|
-
- ARK confirmation (recipient-signed receipt) creates cryptographic proof of acknowledgment.
|
|
33
|
-
- A reply is the strongest form of acknowledgment — it proves the recipient held the session key and acted on the message.
|
|
34
|
-
- Arbitration requires **confirmed, reciprocated evidence** — never unilateral claims.
|
|
35
|
-
|
|
36
|
-
### Sessions
|
|
37
|
-
|
|
38
|
-
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.
|
|
23
|
+
- **Trust model**: messages are off-chain and E2EE — the server stores opaque ciphertext. Ordering is verifiable: each message carries Merkle-tree data (`leafIndex` from 0, `prevRoot`/`newRoot`) with a server signature; identities use Falcon512 keys. On-chain anchoring (`proof_message`) is optional.
|
|
24
|
+
- **Evidence closure**: a message proves nothing about the recipient until the recipient **responds or decrypts it**. ARK is the recipient-signed receipt (message status `read`); a reply is stronger — it proves the recipient held the session key and acted. Arbitration needs reciprocated evidence, never unilateral claims.
|
|
25
|
+
- **Session**: one deterministic session per address pair, shared by both sides; `leafIndex` gives the absolute position of every message.
|
|
39
26
|
|
|
40
27
|
---
|
|
41
28
|
|
|
42
29
|
## Setup
|
|
43
30
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
2. **Enable messenger** → `account_operation` (messenger), set `enabled: true`
|
|
48
|
-
3. **Get your address** → `account_operation` (get) — share this address with your counterparties
|
|
31
|
+
1. Account exists — `account_operation` (gen).
|
|
32
|
+
2. Messenger enabled — `account_operation` `{messenger:{enabled:true, name_or_account}}`, or implicitly via `send_message`/`send_file` option `enable_messenger: true`.
|
|
33
|
+
3. Share the account's address with counterparties (`account_operation` get).
|
|
49
34
|
|
|
50
|
-
|
|
35
|
+
Without an enabled endpoint the account cannot receive. The local SDK enforces a per-device messenger-account cap — do NOT hardcode the number (it is a versioned constant and layers may differ). When enabling throws `Maximum <N> messenger accounts allowed, current count: <M>` (W_ERROR InvalidParam), quote N/M from the error verbatim and offer to disable an unused account (`messenger:{enabled:false}`) to free a slot.
|
|
51
36
|
|
|
52
|
-
###
|
|
37
|
+
### Contact object — the on-chain bridge
|
|
53
38
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Contact Object (On-Chain Bridge)
|
|
57
|
-
|
|
58
|
-
The on-chain **Contact** object (`operation_type: "contact"`) is the bridge between a Service and Messenger: `Service.um` → Contact → `ims[]` (Messenger endpoint addresses). Customers query the Contact's `ims[]` to find where to send messages.
|
|
59
|
-
|
|
60
|
-
**When to create**: before Service publish, when `customer_required` is set (Service.um must point to a Contact). Reuse one Contact across multiple Services sharing the same support channel.
|
|
61
|
-
|
|
62
|
-
**Timing/gotchas (the mutable-object discipline)**: Contact stays mutable (unlike Proof/Guard); IM mutations require built-in permission index 453 (CONTACT_IM) and emit no events — re-poll `ims[]` after changing it. Before deleting a Contact bound as `Service.um`, clear the binding first or you leave a dangling pointer. Op shapes, limits, and field constraints are authoritative in the schema — `schema_query` action='get' name='contact'.
|
|
39
|
+
`Service.um`/`Arbitration.um` → a Contact → its `ims[]` endpoint addresses. Parties read `ims[]` to find where to send. IM mutations use built-in permission index **453 (CONTACT_IM)**, emit **no events** (re-poll after changes), and the Contact stays mutable (unlike Proof/Guard). Clear the `um` binding before deleting a bound Contact — schema: `onchain_operations_contact`.
|
|
63
40
|
|
|
64
41
|
---
|
|
65
42
|
|
|
66
|
-
## Daily
|
|
67
|
-
|
|
68
|
-
The user's daily loop — these are the operations they will return to repeatedly.
|
|
69
|
-
|
|
70
|
-
### Check Inbox
|
|
71
|
-
|
|
72
|
-
Two approaches, depending on need:
|
|
43
|
+
## Daily loop
|
|
73
44
|
|
|
74
|
-
|
|
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.
|
|
76
|
-
- **Server sync** — `pull_messages` fetches the latest messages from the server into local storage (optional `limit` caps batch size). Use this first when the local view looks stale (e.g. after downtime or on a new device session), then read via `watch_conversations` / `watch_messages`. Pass `allAccounts: true` (or `accounts: [...]`, optional `concurrency`, default 5) to fan out across every messenger-enabled account in one call — the result is one entry per account `{account, pulled, messages, error?}` with per-account failure isolation.
|
|
45
|
+
**Read.** `watch_conversations` (`unreadOnly`, previews, sort) for the inbox; `watch_messages` with `peerAddress` for one thread (keyword/direction/status/time/relationship filters, pagination). `pull_messages` syncs from server first when local data looks stale (new device, downtime); `allAccounts:true` fans out bounded concurrency (default 5) with one `{account, pulled, messages, error?}` entry per account. Reads auto-mark viewed — pass `skipAutoMarkViewed:true` to peek.
|
|
77
46
|
|
|
78
|
-
**
|
|
47
|
+
**Attachment read boundary.** Messages with `zipMetadata` never include payload bytes in any read op — only a byte-free `attachment` descriptor (`kind` image/video/audio/voice/file/wts/wip, `fileName`, `mimeType`, `size`, optional `caption`/media dims). Fetch bytes on demand with `save_attachment {messageId, outputDir?, saveAs?}` — sha256-verified before extraction, returns the absolute path, original filename restored.
|
|
79
48
|
|
|
80
|
-
**
|
|
49
|
+
**Send.** Text via `send_message` (≤10240 bytes); files/media/evidence via `send_file {filePath}` as an E2EE attachment envelope (encrypted `.wowok-manifest.json` + payload; server sees only `zipMetadata` — transport name/size/sha256/class; media uncompressed, docs/evidence deflated). Options include `kind` (set `voice` explicitly — webm can't be told apart from video), `caption` (E2EE), and `replyTo:{messageId}` for quote-reply (id must exist locally).
|
|
81
50
|
|
|
82
|
-
|
|
51
|
+
**First contact with a stranger = exactly one message.** Say who you are, why, and what you need. If delivery is rejected, the error carries `guardList`: get a passport from one of those Guards (`onchain_operations` `gen_passport`) and resend with `options.guardAddress` + `passportAddress` + `network` (Guard messages are a separate data system per network). When the recipient REPLIES, you are auto-added to **their** friends list and messaging opens up.
|
|
83
52
|
|
|
84
|
-
|
|
53
|
+
**Structured sends.**
|
|
54
|
+
- `send_required_info {fields:['phone',…]}` assembles a merchant's `customer_required` LocalInfo fields into one E2EE message (omit `fields` = all; explicit `content` overrides); result reports `sent_fields`. Never send without per-item user confirmation.
|
|
55
|
+
- Evidence-bearing acts inside an active Goal (`send_file` WTS/evidence, `proof_message`) take `goal_id` so they land on the Goal's TaskProcess stream.
|
|
85
56
|
|
|
86
|
-
**
|
|
87
|
-
|
|
88
|
-
**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`.
|
|
89
|
-
|
|
90
|
-
**Attachments (envelope v2)**: `send_file` transports the file as an E2EE attachment envelope — a zip container with an encrypted `.wowok-manifest.json` (original file name, MIME, kind, caption, media metadata) plus a `payload/<original-name>` entry. The server only sees the unchanged `zipMetadata` (transport file name + size + sha256 + wts/wip/zip class); media (jpg/mp4/webm/…) is stored uncompressed, documents and evidence are deflated. Options: `kind` (media type is auto-inferred from extension; pass `kind: "voice"` explicitly for voice messages — webm cannot be distinguished from video automatically), `mimeType`, `caption` (E2EE, invisible to the server), `durationMs`/`width`/`height`. Old single-entry zips without a manifest remain readable forever (extension/type inference).
|
|
91
|
-
|
|
92
|
-
**Structured sends**:
|
|
93
|
-
- `send_required_info` — the dedicated path for a Service's `customer_required` fields: pass LocalInfo field names (`fields: ['phone','shipping_address']`) and the op assembles `field: value` lines in one E2E message (explicit `content` overrides; missing fields must be added first via `local_info_operation`). Prefer it over hand-formatting `send_message` — the result also reports `sent_fields`. Never send without the user's per-item confirmation.
|
|
94
|
-
- Quote-reply: pass `options.replyTo: {messageId}` (same conversation; the id must exist in local storage) instead of hand-quoting text.
|
|
95
|
-
- Goal-linked acts: when an evidence-bearing act belongs to an active Goal (e.g. submitting a WTS/evidence file via `send_file`, or anchoring via `proof_message`), stamp `goal_id` so it is recorded as communication evidence on the goal's TaskProcess — omit it for ordinary chatter.
|
|
96
|
-
|
|
97
|
-
### Save Attachments
|
|
98
|
-
|
|
99
|
-
- `save_attachment` with `{account?, messageId, outputDir?, saveAs?}` — decode the attachment and persist the **original file** (transport `.zip` suffix stripped; wts/wip keep their extension). Defaults to `<workspace>/attachments`; filename collisions get a ` (1)` suffix; returns the absolute path. The zip blob is sha256-verified against `zipMetadata.fileHash` before extraction. This is the replacement for the retired `extract_zip_messages` — to verify an incoming WTS, save it first, then call `verify_wts` on the returned path.
|
|
100
|
-
- Desktop clients additionally have an in-memory read bridge for inline media rendering (no temp files); AI flows use `save_attachment`.
|
|
101
|
-
|
|
102
|
-
### Mark as Read
|
|
103
|
-
|
|
104
|
-
- `mark_conversation_as_viewed` — mark an entire conversation thread as read
|
|
105
|
-
- `mark_messages_as_viewed` — mark specific messages by ID
|
|
106
|
-
|
|
107
|
-
### Manage Contacts
|
|
108
|
-
|
|
109
|
-
Three independently managed lists. Schema covers all operations — here are the design choices:
|
|
110
|
-
|
|
111
|
-
| List | Design Intent |
|
|
112
|
-
|------|---------------|
|
|
113
|
-
| **Friends** | Mutual trust — added automatically when you reply to a stranger, or manually. Friends bypass all spam checks. |
|
|
114
|
-
| **Blacklist** | Permanent block — the address can never message you. |
|
|
115
|
-
| **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). |
|
|
116
|
-
|
|
117
|
-
> **"Friends" are local, not on-chain.** The friends list lives in the Messenger layer (`friendslist` op — server-side, per account) and gates message delivery only. The on-chain carrier is the Contact object's `ims[]` — owner-managed endpoints (permission 453, no request-accept flow). The two NEVER sync: replying to a stranger auto-adds them to YOUR local friends list; it does not touch any Contact. If a business flow needs an on-chain "friend" relationship, that is a contract-level feature request, not a messenger setting.
|
|
57
|
+
**Mark read.** `mark_conversation_as_viewed` (whole thread) or `mark_messages_as_viewed` (1–1000 ids).
|
|
118
58
|
|
|
119
59
|
---
|
|
120
60
|
|
|
121
|
-
##
|
|
122
|
-
|
|
123
|
-
The four-layer protection model evaluates every incoming message: Blacklist (reject) → Friends List (accept) → Guard Verification (accept if passport valid) → Stranger Rules (one-message limit).
|
|
124
|
-
|
|
125
|
-
This section covers **how to configure these layers intelligently** for different user profiles — configuration combinations, not just field descriptions.
|
|
61
|
+
## Lists & anti-spam
|
|
126
62
|
|
|
127
|
-
|
|
63
|
+
Three independent **local, per-account** lists (never on-chain, never synced to any Contact):
|
|
128
64
|
|
|
129
|
-
|
|
65
|
+
| List | Ops | Intent |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| friends | add/remove/clear/get/exist | Mutual trust; auto-added when you reply to a stranger; friends bypass every gate |
|
|
68
|
+
| blacklist | add/remove/clear/get/exist | Hard block |
|
|
69
|
+
| guard | add/remove/get (max 10 entries) | Holder of a valid passport from a listed Guard may pass; entry `{guard, passportValiditySeconds}` = 10s…10y |
|
|
130
70
|
|
|
131
|
-
|
|
132
|
-
- If the recipient does not reply within the cool-down window, the stranger may retry with one new message.
|
|
133
|
-
- `allowStrangerMessages: false` disables stranger messages entirely.
|
|
71
|
+
Delivery evaluates, in order: **blacklist (reject) → friends (accept) → guard passport (accept if valid) → stranger rule**. `settings {op:set, allowStrangerMessages, maxInboxSize}` toggles strangers entirely; the rejection error tells the sender what applies. The stranger window/retry timing is **server policy** — surface the server's rejection message rather than assuming a fixed cooldown; to stop repeat contact, blacklist the address.
|
|
134
72
|
|
|
135
|
-
|
|
73
|
+
`watch_messages` segments by relationship: `listFilterMode: friends|guard|stranger|any` (+ `customListFilter` include/exclude). Multiple guards are OR-ed — any one passing passport grants delivery. Match `passportValiditySeconds` to data volatility (payment gates tolerate days; order-state gates should be short) and test every guard with `gen_passport` before publishing it.
|
|
136
74
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
| Profile | Settings | Who Should Use |
|
|
140
|
-
|---------|----------|----------------|
|
|
141
|
-
| **Open** | `allowStrangerMessages: true`, no guard list, empty blacklist | Public-facing services, open marketplaces |
|
|
142
|
-
| **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 |
|
|
143
|
-
| **Closed** | `allowStrangerMessages: false`, no guard list, friends-only | Private negotiations, internal team communication |
|
|
144
|
-
| **Defensive** | `allowStrangerMessages: true`, substantial blacklist | Users receiving harassment from specific addresses; open but monitoring |
|
|
145
|
-
|
|
146
|
-
**How to help the user choose**: Ask:
|
|
147
|
-
1. "Do you want strangers to be able to contact you at all?" → determines `allowStrangerMessages`
|
|
148
|
-
2. "If yes, should anyone be able to, or only those who meet certain criteria?" → determines Guard list need
|
|
149
|
-
3. "Are there specific addresses you want to block entirely?" → determines Blacklist use
|
|
150
|
-
|
|
151
|
-
### Strategy: Guard List Design
|
|
152
|
-
|
|
153
|
-
The Guard list is where anti-spam becomes programmable. A Guard validates that a stranger **meets a verifiable condition** before allowing their message through (token/reputation/order/passport/payment gates — the design catalog with table shapes and query instructions lives in the MCP knowledge layer: `schema_query` action='get_guard_design_patterns'; do not re-derive Guard logic here).
|
|
154
|
-
|
|
155
|
-
**`passportValiditySeconds` trade-off**: Short (e.g. 60s) = higher security, re-verification per message. Long (e.g. 7 days) = better UX, one passport covers a week. Match to data volatility: payment-based guards tolerate longer durations; order-state guards should stay short (order state changes). Bounds (10s–10y) and the max-10 list size are enforced by the schema.
|
|
156
|
-
|
|
157
|
-
**Multiple guards**: listed guards are alternatives, not conjunctions — a passport from ANY one passes delivery. Use them to open different audience doors (e.g. one for existing customers, one for token holders).
|
|
158
|
-
|
|
159
|
-
### Strategy: Troubleshooting Anti-Spam Issues
|
|
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 |
|
|
168
|
-
|
|
169
|
-
### Strategy: Filtering Messages by Source
|
|
170
|
-
|
|
171
|
-
`watch_messages` segments the inbox by relationship via `listFilterMode` (`friends` / `guard` / `stranger` / `any`, default any; `customListFilter` adds include/exclude lists — exact semantics in the schema).
|
|
172
|
-
|
|
173
|
-
**Operational rhythm**: a service provider triaging inbox first scans `friends` (known customers, low risk), then `stranger` (new inquiries need attention); guard-verified traffic is checked last.
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Evidence (WTS)
|
|
178
|
-
|
|
179
|
-
### Concept
|
|
180
|
-
|
|
181
|
-
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.
|
|
182
|
-
|
|
183
|
-
### The Workflow
|
|
184
|
-
|
|
185
|
-
When a dispute requires evidence: (1) `generate_wts` → export messages by time/messageId/seqIndex range — each WTS file is written **together with a human-readable HTML companion** (`htmlFiles`; no separate conversion needed); (2) `sign_wts` → add your Falcon512 signature (both parties can sign); (3) `verify_wts` → validate hash chain, continuity, and all signatures; (4) `wts2html` → only if you need a custom theme/title or a standalone re-render (it always writes files); (5) `send_file` → submit the signed WTS to the arbitrator via messenger (stamp the active goal's `goal_id`).
|
|
186
|
-
|
|
187
|
-
> **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.
|
|
188
|
-
|
|
189
|
-
### On-Chain Proof (Optional)
|
|
190
|
-
|
|
191
|
-
`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.
|
|
192
|
-
|
|
193
|
-
### When to Generate WTS
|
|
194
|
-
|
|
195
|
-
- **Disputes only** — normal conversations are preserved server-side. WTS is evidence preparation, not archiving.
|
|
196
|
-
- **When the other party disputes a fact** — the WTS proves what was actually said and acknowledged.
|
|
197
|
-
- **When arbitration requires evidence submission** — signed WTS is the standard evidence format.
|
|
198
|
-
|
|
199
|
-
> Before filing a dispute, pre-screen your evidence collection via `evaluation_operation` action `evidence_review` (list mode): it partitions items into usable/manual/rejected and yields `proof_candidates` to reference in the dispute description (the human picks — nothing attaches automatically). Arbitrator-side flow: [wowok-arbitrator](../wowok-arbitrator/SKILL.md).
|
|
75
|
+
> Advisory profiles (NOT system states, just setting combinations): **Open** = strangers on, no guards, public-facing; **Guarded** = strangers off + 1–3 guards, verified-only; **Closed** = strangers off, no guards, friends-only; **Blocklist mode** = strangers on + a maintained blacklist. Choose by asking: may strangers reach you at all → if yes, anyone or guard-verified → anyone to hard-block. Always leave at least one inbound path.
|
|
200
76
|
|
|
201
77
|
---
|
|
202
78
|
|
|
203
|
-
##
|
|
79
|
+
## Evidence: WTS
|
|
204
80
|
|
|
205
|
-
|
|
81
|
+
WTS = tamper-proof, self-verifying export of a continuous conversation: messages are hash-chained (any gap/edit breaks verification), signatures give non-repudiation.
|
|
206
82
|
|
|
207
|
-
|
|
83
|
+
Workflow: `generate_wts {myAccount, peerAccount, range?}` (range by time/messageId/seqIndex; writes the `.wts` **and** a human-readable HTML companion — `htmlFiles`) → `sign_wts` (Falcon512; both parties may sign) → `verify_wts {wtsFilePath}` (`hashValid`, `signatureValid`, per-signer detail) → `wts2html` only for a custom theme/re-render (always writes files) → `send_file` to the arbitrator (stamp `goal_id`). To verify an incoming WTS, `save_attachment` it first, then `verify_wts` on the path.
|
|
208
84
|
|
|
209
|
-
|
|
85
|
+
- Export the **full conversation**, not favorable excerpts — selective exports destroy credibility.
|
|
86
|
+
- `proof_message {messageId, network}` anchors a message on-chain and returns `proofAddress` — a Proof object Guards can consume (`proof.signer`/`proof.time`), proving existence-before-time.
|
|
87
|
+
- WTS is dispute preparation, not routine archiving. Before filing, pre-sort with `evaluation_operation` action=`evidence_review` (usable/manual/rejected + `proof_candidates`; the human selects; nothing auto-attaches).
|
|
210
88
|
|
|
211
|
-
|
|
89
|
+
## Cross-role quick map
|
|
212
90
|
|
|
213
|
-
|
|
91
|
+
- **Customer**: inquire → `send_required_info` → track inbox → on dispute, full-range WTS, sign, send to arbitrator (see [wowok-order](../wowok-order/SKILL.md)).
|
|
92
|
+
- **Provider/merchant**: triage `stranger` inbox, reply (auto-friends), document agreements, defend with WTS (see [wowok-provider](../wowok-provider/SKILL.md)).
|
|
93
|
+
- **Arbitrator**: receive, `save_attachment` + `verify_wts` every piece, clarify via `send_message`, treat unverified material as non-evidence (see [wowok-arbitrator](../wowok-arbitrator/SKILL.md)).
|
|
214
94
|
|
|
215
|
-
|
|
216
|
-
- **Disabled messenger**: Without messenger enabled, your account has no endpoint — counterparties cannot find or message you.
|
|
217
|
-
- **WTS range too narrow**: Selecting only favorable messages undermines evidence credibility. Include the full conversation.
|
|
218
|
-
- **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.
|
|
219
|
-
- **`allowStrangerMessages: false` with no guard list and no friends**: Nobody can contact you. Always ensure at least one inbound path exists.
|
|
220
|
-
- **Stale passports**: `passportValiditySeconds` too short causes frequent re-verification failures. Match duration to your Guard's data volatility.
|
|
95
|
+
## Pitfalls
|
|
221
96
|
|
|
222
|
-
|
|
97
|
+
- Vague first message to a stranger wastes the only shot; a `friendslist exist` check answers "why can't my friend reach me".
|
|
98
|
+
- Strangers off + no guards + empty friends = nobody inbound.
|
|
99
|
+
- Guards are immutable from creation — untested guard-list entries block legitimate contacts; expired passports show as guard rejection, not friend failure.
|
|
100
|
+
- Never treat on-chain Contact `ims[]` and the local friends list as the same system.
|
package/wowok-onboard/SKILL.md
CHANGED
|
@@ -2,167 +2,93 @@
|
|
|
2
2
|
name: wowok-onboard
|
|
3
3
|
description: "WoWok First-Touch Onboarding — guides a NEW user from a vague first prompt to their first published Service: a Review opening, then AT MOST 8 mandatory business questions (never technical field prompts), then a dependency-aware auto-build (reuse / customize / discover). Every decision (industry, network, location, token, pricing, workflow, fund distribution, arbitration) is framed as who-wins-what and why. Produces Permission + Service + Machine + Progress + Guards + Allocation + Contact + Arbitration, verified by a test order. Not for existing merchants tuning operations — use wowok-provider. Use when: User is new to WoWok and wants to set up a service; User says \"open a shop\", \"create a service\", \"start selling\", \"onboard\"; User has no published Service yet; User asks \"what's next\" after account creation; User resumes an interrupted onboarding."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "2.
|
|
5
|
+
version: "2.1.0"
|
|
6
6
|
role: shared
|
|
7
7
|
related: "wowok-provider, wowok-machine"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# WoWok First-Touch Onboarding
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Take a new merchant from zero to first published Service via a **Review opening + AT MOST 8 mandatory business questions**. Speak business/commercial language — what each choice means for merchant and buyer (interests, causality, risk) — NEVER "set field X". The MCP owns technical defaults; this skill owns the **dialogue rhythm** and **dependency-aware build order**.
|
|
13
13
|
|
|
14
|
-
>
|
|
14
|
+
> Related: [wowok-provider](../wowok-provider/SKILL.md) (post-onboard ops) · [wowok-machine](../wowok-machine/SKILL.md) · [wowok-messenger](../wowok-messenger/SKILL.md) · [wowok-arbitrator](../wowok-arbitrator/SKILL.md)
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## MCP
|
|
18
|
+
## What the MCP already handles (don't duplicate)
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
| Common mistakes (field/unit/workflow pitfalls) | `wowok_buildin_info` info='common mistakes' | tool calls (proactive warnings) |
|
|
31
|
-
| Deployment checklist (publish readiness) | `goal_operation` action='aggregate_risks' (findings carry CRITICAL/WARN severity) + wowok-auditor pre-publish gates | before service/machine publish |
|
|
32
|
-
| Multi-round memory (decisions / feedback / problems) | `goal_operation` (Goal) + TaskProcess streams | every confirmation / user objection |
|
|
33
|
-
|
|
34
|
-
This Skill keeps the **business dialogue flow**, the **≤8-question gate**, and the **dependency-aware build order**. The user's intent is recorded as a Goal (`goal_operation` action='create'); actual on-chain objects are created via `onchain_operations` in dependency order.
|
|
20
|
+
| Content | Access |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Industry modes, recommendation, expert description guidance | `industry_pack_operation` `list_modes` / `recommend_industry` (items carry `location_sensitivity`, `trust_selling_points`, `build_notes`; full modes also carry `machine_shape`, `key_risk`, allocator/guards) |
|
|
23
|
+
| Cross-network build detection + migration checklist | `query_toolkit` query_type=`migration_preflight` (`account` required; direction defaults testnet→mainnet) |
|
|
24
|
+
| Faucet / bridge / airdrop / payment-token guidance | `wowok_buildin_info` info=`funding guidance` / `mainnet bridge tokens` (quote the served token list + `wowTypeTag`, never hardcode) |
|
|
25
|
+
| Third-party arbiters | `onchain_events` type=`ArbitrationEvent` (dedupe by `object`; shortlist by location/fee) |
|
|
26
|
+
| Field/unit/workflow pitfalls | `wowok_buildin_info` info=`common mistakes` |
|
|
27
|
+
| Safety + Guard/Machine/Arbitration design rules | `schema_query` `get_safety_rules` / `get_guard_design_patterns` |
|
|
28
|
+
| Publish readiness (CRITICAL/WARN findings) | `goal_operation` action=`aggregate_risks` |
|
|
29
|
+
| Multi-round memory (decisions/feedback) | `goal_operation` (Goal + TaskProcess streams) |
|
|
35
30
|
|
|
36
31
|
---
|
|
37
32
|
|
|
38
|
-
##
|
|
33
|
+
## Non-negotiable interaction rules
|
|
39
34
|
|
|
40
|
-
1. **Business-first
|
|
41
|
-
2. **Review-first**:
|
|
42
|
-
3.
|
|
43
|
-
4. **Reuse /
|
|
44
|
-
5. **Confirm
|
|
45
|
-
6. **
|
|
35
|
+
1. **Business-first**: every question is "what this means for you and your customer", never a technical field prompt. Translate defaults into consequences; offer them as recommendations.
|
|
36
|
+
2. **Review-first**: before Q1 output (a) restated understanding of the business, (b) abridged build journey with intervention points, (c) the contract — ≤8 questions, recommendations wait for confirmation, pause/object/revisit always allowed, reuse/customize/discover on every component, (d) testnet reassurance — free faucet, zero money at risk; mainnet needs gas only.
|
|
37
|
+
3. **≤8 mandatory questions**; everything else is an auto step with a disclosed `recommend` default — confirm or object, never a 9th question.
|
|
38
|
+
4. **Reuse / customize / discover** for Permission, Progress, Machine, Guards, Contact, Allocation, Arbitration, Reward, Repository.
|
|
39
|
+
5. **Confirm and remember** every business decision (Goal process streams); onboarding is multi-round.
|
|
40
|
+
6. **No silent defaults**: disclose configuration + business meaning before creating.
|
|
46
41
|
|
|
47
42
|
---
|
|
48
43
|
|
|
49
|
-
## Dependency
|
|
50
|
-
|
|
51
|
-
The technical build order (hidden from the user as a field list; surfaced as business consequences):
|
|
44
|
+
## Dependency chain (build order)
|
|
52
45
|
|
|
53
46
|
```
|
|
54
|
-
Account + network (testnet
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
Account + network (testnet first)
|
|
48
|
+
└─ Permission (operators; reuse strongly recommended)
|
|
49
|
+
├─ Service DRAFT (brand identity; editable until publish)
|
|
50
|
+
├─ Progress ledger (per-node accomplishment schema the Machine binds)
|
|
51
|
+
├─ Machine nodes/forwards + node Guards → PUBLISH Machine (immutable)
|
|
52
|
+
└─ Service bind: machine + buy_guard + sales + order_allocators
|
|
53
|
+
├─ Sales (products + WIP URL/hash) · Allocators (who gets paid, when)
|
|
54
|
+
├─ Contact (support inbox) · Arbitration (independent judge)
|
|
55
|
+
└─ aggregate_risks → PUBLISH Service → TEST ORDER
|
|
63
56
|
```
|
|
64
57
|
|
|
65
|
-
**Irreversibility
|
|
66
|
-
- `machine
|
|
67
|
-
- `
|
|
68
|
-
- Machine nodes/forwards and Guard
|
|
58
|
+
**Irreversibility to translate as "decide now"**:
|
|
59
|
+
- After Service publish, `machine` and `order_allocators` are **L1 permanent locks**.
|
|
60
|
+
- `arbitrations` / rewards are **L2 time-locks**: you may still ADD after publish; remove/clear requires pause + the lock duration to elapse.
|
|
61
|
+
- Machine nodes/forwards and each Guard are immutable once the Machine is published.
|
|
62
|
+
- `compensation_fund > 0` requires a bound Arbitration — independent of the Service's controllers (same Permission aborts 33).
|
|
69
63
|
|
|
70
64
|
---
|
|
71
65
|
|
|
72
|
-
##
|
|
73
|
-
|
|
74
|
-
When a new user expresses a vague intent, output this review FIRST (in business language), then ask the first question:
|
|
75
|
-
|
|
76
|
-
1. **Understanding** — restate what the user sells, to whom, and the rough business model.
|
|
77
|
-
2. **Journey overview** — show (abridged, non-technical) what will be built and where the user can intervene.
|
|
78
|
-
3. **Interaction contract** — state: at most 8 business questions; AI gives a `recommend` and waits; the user may pause/object/revisit at any time; every component offers reuse/customize/discover.
|
|
79
|
-
4. **Reassurance (first-use anxiety)** — testnet is completely free (faucet, no money at risk); mainnet needs gas only; you can practice before going live.
|
|
80
|
-
|
|
81
|
-
> ⚠️ No user-choice interaction happens before this review is complete.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## The 8 Mandatory Business Questions
|
|
86
|
-
|
|
87
|
-
Ask these in order; stop at 8. Frame each in business terms. Every question maps to MCP lookups that return business-grade defaults (never raw technical tables to the user).
|
|
88
|
-
|
|
89
|
-
### Q1 — What do you sell, and to whom? (industry alignment)
|
|
90
|
-
|
|
91
|
-
- **Business meaning**: Your business type determines the trust mechanism (how a buyer feels safe paying you), the workflow (how an order progresses), and the money split. It is the single most consequential choice.
|
|
92
|
-
- **MCP**: `industry_pack_operation` action='recommend_industry' with `intent`=<business description text> (→ top-3 modes), or action='list_modes'. Each mode returns `location_sensitivity`, `trust_selling_points`, and `build_notes` — surface these as "here is what buyers in your industry worry about, and what a trustworthy shop emphasizes".
|
|
93
|
-
- **Output to user**: the recommended industry + "buyers in this industry mainly worry about: …", in plain language.
|
|
94
|
-
|
|
95
|
-
### Q2 — Practice on testnet first, or go straight to mainnet?
|
|
96
|
-
|
|
97
|
-
- **Business meaning**: Testnet is a free sandbox (faucet, zero money at risk) for you to try everything; mainnet is real money and needs gas. Strongly recommend testnet first.
|
|
98
|
-
- **Existing-build detection (migration)**: call `query_toolkit` query_type='migration_preflight' with `account` (required); `source_network` / `target_network` are optional and default to testnet → mainnet (the resolved direction is echoed back in the result). If the account already built on testnet, switch to the **mainnet customization guide** — re-confirm payment token / location / arbitration (the checklist is returned by the same query), rather than re-asking everything.
|
|
99
|
-
- **Reassurance**: testnet is free; mainnet gas can be obtained via bridge/airdrop (`wowok_buildin_info` info='funding guidance').
|
|
100
|
-
|
|
101
|
-
### Q3 — Where do you serve? (service area / location)
|
|
66
|
+
## The 8 questions (ask in order, business-framed)
|
|
102
67
|
|
|
103
|
-
|
|
104
|
-
- **MCP**: the chosen mode's `location_sensitivity` — `strict`/`near` = must set a correct service area (non-mailing); `logistics` = delivery region (mailing).
|
|
68
|
+
**Q1 — What do you sell, to whom?** Determines trust mechanism, workflow, split. `recommend_industry {intent}` → top-3 modes; surface each mode's `trust_selling_points`/`build_notes` as "what buyers in this industry worry about". Builtin modes (8): `freelance` `rental` `education` `travel` `subscription` `retail` `retail_d2c` `general`; mid-onboarding tweaks use `derive_user_mode` / `evolve_user_mode`.
|
|
105
69
|
|
|
106
|
-
|
|
70
|
+
**Q2 — Testnet practice or mainnet now?** Recommend testnet. Run `migration_preflight` — if the account already built on testnet, switch to the migration checklist (re-confirm token/location/arbitration/WIP/gas), don't re-ask.
|
|
107
71
|
|
|
108
|
-
|
|
109
|
-
- **MCP**: `wowok_buildin_info` info='funding guidance' (testnet=WOW) + info='mainnet bridge tokens' (the authoritative bridge-token set with each `wowTypeTag` is served by MCP — quote that list, do not hardcode it here).
|
|
72
|
+
**Q3 — Where do you serve?** Purchase gate for local/in-person, delivery region for shipping. Use the mode's `location_sensitivity`: `strict` = location must match demand area; `near` = digital/global, location is a service region; `logistics` = delivery region.
|
|
110
73
|
|
|
111
|
-
|
|
74
|
+
**Q4 — Which currency?** Testnet settles WOW (free); mainnet may use USDT/USDC/ETH/WBTC to cut volatility — quote the served bridge-token list, not a hardcoded one.
|
|
112
75
|
|
|
113
|
-
|
|
114
|
-
- **WIP**: if a product needs an immutable deliverable description (a "what you will get" file), it MUST be deployed to a public URL — on-chain stores only URL + hash. Recommend deploying it; on testnet it can be skipped (`wip: ""`), on mainnet strongly recommend.
|
|
115
|
-
- **Confirm**: show the optimized description + prices and ask the user to confirm or adjust.
|
|
76
|
+
**Q5 — Products, prices, descriptions?** Propose expert-optimized storefront copy from `trust_selling_points` + `build_notes` + `key_risk`; confirm prices. WIP: an immutable deliverable spec lives at a public URL — on-chain stores URL + hash only; skippable on testnet, strongly recommended on mainnet.
|
|
116
77
|
|
|
117
|
-
|
|
78
|
+
**Q6 — How does an order progress?** Present the mode's `machine_shape` as a plain-language paid→delivered→confirmed flow (who proves what — e.g. buyer confirms receipt). Explicit confirmation/objection recorded. Nodes stay business states — no refund/dispute terminals (R-M1-11).
|
|
118
79
|
|
|
119
|
-
|
|
120
|
-
- **MCP**: the mode's `machine_shape` (business states) — present as a plain-language flow, disclose the default, let the user accept or propose changes.
|
|
121
|
-
- **Confirm + remember**: the AI MUST present a plain-language flow description and get explicit confirmation (or the user's objection/question), recorded in memory. Multi-round is expected.
|
|
80
|
+
**Q7 — How and when is money released?** Present the mode allocator default in business terms (e.g. merchant 97% + processor 3%; full refund on cancellation), including the cancellation path. Explicit confirmation; this is L1-locked at publish.
|
|
122
81
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
- **Business meaning**: Who receives the money and on what condition (e.g. funds released only after delivery confirmation). This is the revenue model and is frozen once live — decide carefully.
|
|
126
|
-
- **MCP**: the mode's allocator default (e.g. merchant 97% + processor 3%; full refund on cancellation). Present the split in business terms, disclose the default, let the user confirm or change.
|
|
127
|
-
- **Confirm + remember**: explicit confirmation required (including "who gets paid when an order is cancelled/refunded"), recorded in memory.
|
|
128
|
-
|
|
129
|
-
### Q8 — Who judges a dispute? (arbitration)
|
|
130
|
-
|
|
131
|
-
- **Business meaning**: When you and a customer disagree, an INDEPENDENT third party must judge — it cannot be the seller, or buyers won't trust you. On testnet you may skip it; on mainnet it is strongly recommended.
|
|
132
|
-
- **MCP**: discover independent arbiters via `onchain_events` type='ArbitrationEvent' (dedupe by `object`, shortlist by location/fee/description). Never create your own Arbitration for your own Service (conflict of interest).
|
|
133
|
-
- **Confirm**: recommend a third-party arbiter (or skip on testnet), get confirmation.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## After the 8 Questions — Auto-Build (reuse / customize / discover)
|
|
138
|
-
|
|
139
|
-
With the 8 business decisions captured, build the objects in dependency order. These are NOT new forced questions — the AI discloses each default and lets the user confirm or object:
|
|
140
|
-
|
|
141
|
-
- **Permission** — reuse an existing one (strongly recommended; single control surface), else create.
|
|
142
|
-
- **Service draft** — created from Q1/Q3/Q5 answers; brand name confirmed once.
|
|
143
|
-
- **Machine + Guards** — built from the Q6 workflow; nodes/forwards/guards disclosed, R-M1-11 compliant (business states only, no `refunded`/`disputed` terminals).
|
|
144
|
-
- **Sales** — from Q5 (products + WIP URL/hash).
|
|
145
|
-
- **order_allocators** — from Q7 (fund split), L1-locked.
|
|
146
|
-
- **Contact** — reuse/create the customer-service inbox (mutable; anti-spam policy disclosed).
|
|
147
|
-
- **Arbitration** — from Q8 (independent third party; compensation fund if configured).
|
|
148
|
-
- **Optional**: Reward (loyalty/discounts), supply-chain promises, Repository — offered as opt-in, never forced.
|
|
149
|
-
|
|
150
|
-
Run `goal_operation` action='aggregate_risks' before publish; fix ALL CRITICAL findings, then publish and run a user-driven test order (per-node disclosure: AI recommends the next step, the user decides).
|
|
82
|
+
**Q8 — Who judges disputes?** An INDEPENDENT third party — never the seller's own controllers. Discover via `ArbitrationEvent`; bind by reference. Skippable on testnet; strongly recommended mainnet.
|
|
151
83
|
|
|
152
84
|
---
|
|
153
85
|
|
|
154
|
-
##
|
|
86
|
+
## Auto-build & finish
|
|
155
87
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
---
|
|
88
|
+
With the 8 decisions captured, create in dependency order (each default disclosed, not a new question): Permission (reuse) → Service draft → Progress ledger → Machine + Guards (R-M1-11) → publish Machine → sales/WIP → order_allocators → Contact (support IMs; anti-spam disclosed) → Arbitration binding (+ compensation fund if chosen). Reward / supply-chain promises / Repository are opt-in offers.
|
|
159
89
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
Before declaring onboarding complete, run `goal_operation` action='aggregate_risks' — MCP auto-checks machine binding, order_allocators, buy_guard, arbitration isolation, R-M1-11 compliance, and the rest of publish readiness, returning findings with CRITICAL/WARN severity. Fix ALL CRITICAL findings, then verify remaining hard gates via `query_toolkit` (onchain_objects). The authoritative checklist is served by MCP — do not re-derive it here.
|
|
163
|
-
|
|
164
|
-
---
|
|
90
|
+
Then: `aggregate_risks` → fix ALL CRITICAL findings → publish Service → run a **user-driven test order** (AI recommends the next per-node step, user decides). Remaining hard gates via `query_toolkit` query_type=`onchain_objects`; the authoritative checklist is MCP-served — don't re-derive it.
|
|
165
91
|
|
|
166
|
-
##
|
|
92
|
+
## Errors
|
|
167
93
|
|
|
168
|
-
|
|
94
|
+
Pitfalls and error-code guidance (`E_ARBITRATION_PERMISSION_CONFLICT` 33, `E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND` 25, R-M1-11 refund routing) come from `common mistakes` / `get_safety_rules` / `get_guard_design_patterns` — consult them rather than keeping a duplicated table.
|