@wowok/skills 3.1.0 → 3.1.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wowok/skills",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "WoWok AI Skills for Claude Code, Codex, Cursor, Windsurf, Trae, CodeBuddy, Qoder, Roo Code, Cline, Kilo Code and GitHub Copilot - dialogue orchestration layer on top of the WoWok MCP server (rules/reference knowledge is served by MCP directly since v2.0.0)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@ The following content has been pushed down to the MCP knowledge layer and is app
|
|
|
21
21
|
| Content | Access via (MCP action) | Applied Via |
|
|
22
22
|
|---------|--------------------------|-------------|
|
|
23
23
|
| Permission safety rules (owner/admin/entity hierarchy) | `schema_query` action='get_safety_rules' | `onchain_operations` permission |
|
|
24
|
-
| Treasury/Permission/Personal object schema | `schema_query` action='
|
|
24
|
+
| Treasury/Permission/Personal object schema | `schema_query` action='get' name='treasury'/'permission'/'personal' | governance operations |
|
|
25
25
|
| Unclaimed-payment detection | `keeper_operation` (payment_unclaimed scan) | monitor loop |
|
|
26
26
|
| Fund-flow event meanings (TreasuryEvent / AllocationEvent / RewardClaimEvent / RewardFundEvent) | event semantic registry | audit & monitor |
|
|
27
27
|
|
|
@@ -39,9 +39,9 @@ Inventory → Decide → Execute → Audit. Governance objects are LIVE: a permi
|
|
|
39
39
|
|
|
40
40
|
A Permission object defines WHO can perform WHICH operations on your business objects (Service / Machine / Treasury …).
|
|
41
41
|
|
|
42
|
-
- **Indexes
|
|
43
|
-
- **
|
|
44
|
-
- **Entity table**:
|
|
42
|
+
- **Indexes**: role indexes are numeric IDs (custom indexes start at 1000 — built-ins are reserved). Naming one for readability is a `remark {op:'set', index, remark}` write, not a "create index" call.
|
|
43
|
+
- **Grants** (`table` field): assign with `add perm by index` (one index → many entities) or `add perm by entity` (one entity → many indexes); `set` variants REPLACE the existing list. `admin {op:'add'|'remove'|'set'}` controls admins; entity-level hygiene uses `del`/`swap`/`replace`/`copy`. A mis-assigned grant takes effect immediately. Exact op shapes: `schema_query` action='get' name='permission'.
|
|
44
|
+
- **Entity table**: review-first — read the current Permission via `query_toolkit` query_type='onchain_objects' before mutating.
|
|
45
45
|
- **Audit**: `query_toolkit` query_type='onchain_table_item_permission_perm' checks what a specific address may do; query_type='address_profile' shows an address's permission memberships across all objects.
|
|
46
46
|
|
|
47
47
|
Rules of thumb:
|
|
@@ -89,7 +89,7 @@ Governance goals close the loop through three channels:
|
|
|
89
89
|
|
|
90
90
|
## Quick Reference
|
|
91
91
|
|
|
92
|
-
- Permission:
|
|
92
|
+
- Permission: index remarks → grants (`add perm by index`/`by entity`) → audit via permission_perm + address_profile.
|
|
93
93
|
- Treasury: deposit/withdraw + history audit; external_guard gates withdrawals.
|
|
94
94
|
- Unclaimed payments: keeper scan owns reminders; recipients unwrap CoinWrappers.
|
|
95
95
|
- Personal data: permanently public — review before every write.
|
package/wowok-messenger/SKILL.md
CHANGED
|
@@ -12,9 +12,9 @@ metadata:
|
|
|
12
12
|
End-to-end encrypted messaging with tamper-proof audit trails.
|
|
13
13
|
|
|
14
14
|
> **Role**: Any WoWok participant
|
|
15
|
-
> All
|
|
15
|
+
> All 18 operations with full parameter types and constraints are in the MCP schema (`messenger_operation`) — query it via `schema_query` action='get' name='messenger_operation' before an unfamiliar call. This document focuses on **design decisions, timing, and cross-role strategy** not captured by the schema.
|
|
16
16
|
> **Related Skills**: [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)
|
|
17
|
-
> Guard design patterns and safety rules
|
|
17
|
+
> Guard design patterns and safety rules live in the MCP knowledge layer — query via `schema_query` actions `get_guard_design_patterns` / `get_safety_rules`; the per-tool action/parameter reference lives there too (`get_tool_reference`).
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -51,15 +51,15 @@ Before any communication:
|
|
|
51
51
|
|
|
52
52
|
### Account Limit
|
|
53
53
|
|
|
54
|
-
A single device supports up to
|
|
54
|
+
A single device supports up to 20 messenger accounts (`MAX_MESSENGER_ACCOUNTS`). Exceeding this returns "Maximum 20 messenger accounts allowed, current count: N". Use `account_operation → messenger { enabled: false }` to disable unused accounts.
|
|
55
55
|
|
|
56
56
|
### Contact Object (On-Chain Bridge)
|
|
57
57
|
|
|
58
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
59
|
|
|
60
|
-
**When to create**:
|
|
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
61
|
|
|
62
|
-
**
|
|
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'.
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -73,19 +73,31 @@ Two approaches, depending on need:
|
|
|
73
73
|
|
|
74
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
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`.
|
|
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.
|
|
77
|
+
|
|
78
|
+
**Read boundary for attachments**: Attachment messages (those with `zipMetadata`) never expose their base64 payload in `watch_messages` / `watch_conversations` / `pull_messages` / `search_messages` output — `plaintext` is omitted and a byte-free `attachment` descriptor is attached instead (`kind`: image/video/audio/voice/file/wts/wip, `fileName`, `mimeType`, `size`, optional `caption`/`durationMs`/`width`/`height`). This prevents multi-megabyte base64 blobs from flooding every read. Bytes are fetched on demand only (see Save Attachments below).
|
|
77
79
|
|
|
78
80
|
**Design note**: By default, retrieving messages auto-marks them as viewed (`viewedAt` timestamp). Set `skipAutoMarkViewed: true` if you want to peek without marking read.
|
|
79
81
|
|
|
80
82
|
### Send Messages
|
|
81
83
|
|
|
82
|
-
Plain text via `send_message`; files (
|
|
84
|
+
Plain text via `send_message`; files and media (images, audio, video, voice, documents, WTS/WIP evidence) via `send_file`.
|
|
83
85
|
|
|
84
86
|
**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.
|
|
85
87
|
|
|
86
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`.
|
|
87
89
|
|
|
88
|
-
**
|
|
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`.
|
|
89
101
|
|
|
90
102
|
### Mark as Read
|
|
91
103
|
|
|
@@ -138,21 +150,11 @@ The optimal configuration depends on your role and openness needs:
|
|
|
138
150
|
|
|
139
151
|
### Strategy: Guard List Design
|
|
140
152
|
|
|
141
|
-
The Guard list is where anti-spam becomes programmable. A Guard validates that a stranger **meets a verifiable condition** before allowing their message through.
|
|
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).
|
|
142
154
|
|
|
143
|
-
|
|
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.
|
|
144
156
|
|
|
145
|
-
|
|
146
|
-
|------------|-----------------|-------------|
|
|
147
|
-
| Token-gated | Sender holds a specific token/NFT | Premium customer community |
|
|
148
|
-
| Reputation | Sender's `personal` profile has ≥N likes | Verified reputation threshold |
|
|
149
|
-
| Order-based | Sender has an active order on your Service | Only current customers can message |
|
|
150
|
-
| Passport-based | Sender holds a valid passport from a trusted issuer | Whitelist of partner organizations |
|
|
151
|
-
| Payment | Sender has made a minimum payment | Paid consultation access |
|
|
152
|
-
|
|
153
|
-
**`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).
|
|
154
|
-
|
|
155
|
-
**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.
|
|
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).
|
|
156
158
|
|
|
157
159
|
### Strategy: Troubleshooting Anti-Spam Issues
|
|
158
160
|
|
|
@@ -166,16 +168,9 @@ The Guard list is where anti-spam becomes programmable. A Guard validates that a
|
|
|
166
168
|
|
|
167
169
|
### Strategy: Filtering Messages by Source
|
|
168
170
|
|
|
169
|
-
`watch_messages`
|
|
170
|
-
|
|
171
|
-
- `friends` — only messages from your friends list
|
|
172
|
-
- `guard` — only messages from guard-verified senders
|
|
173
|
-
- `stranger` — only messages from unknown senders (highest priority for review)
|
|
174
|
-
- `any` — all messages (default)
|
|
175
|
-
|
|
176
|
-
Combine with `customListFilter` for fine-grained include/exclude logic.
|
|
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).
|
|
177
172
|
|
|
178
|
-
**
|
|
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.
|
|
179
174
|
|
|
180
175
|
---
|
|
181
176
|
|
|
@@ -187,7 +182,7 @@ A WTS file is a **tamper-proof, self-verifying export** of a continuous conversa
|
|
|
187
182
|
|
|
188
183
|
### The Workflow
|
|
189
184
|
|
|
190
|
-
When a dispute requires evidence: (1) `generate_wts` → export messages by time/messageId/seqIndex range; (2) `sign_wts` → add your Falcon512 signature (both parties can sign); (3) `verify_wts` → validate hash chain, continuity, and all signatures; (4) `wts2html` →
|
|
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`).
|
|
191
186
|
|
|
192
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.
|
|
193
188
|
|
|
@@ -207,7 +202,7 @@ When a dispute requires evidence: (1) `generate_wts` → export messages by time
|
|
|
207
202
|
|
|
208
203
|
## Messenger Across Roles
|
|
209
204
|
|
|
210
|
-
**Customer**: Pre-order inquiry (`send_message` to provider) → submit required info (`customer_required` fields) → track progress (`watch_messages`) → raise dispute (`generate_wts` + `sign_wts` + `send_file` to arbitrator). Full workflow: [wowok-order](../wowok-order/SKILL.md).
|
|
205
|
+
**Customer**: Pre-order inquiry (`send_message` to provider) → submit required info (`send_required_info` over the `customer_required` fields) → track progress (`watch_messages`) → raise dispute (`generate_wts` + `sign_wts` + `send_file` to arbitrator). Full workflow: [wowok-order](../wowok-order/SKILL.md).
|
|
211
206
|
|
|
212
207
|
**Service Provider**: Monitor inquiries (`watch_conversations` with `unreadOnly` or `listFilterMode: "stranger"`) → respond to customers (reply auto-adds to friends) → request customer info → document agreements (creates evidence trail) → dispute defense (`generate_wts` + `sign_wts` + `send_file`). Full workflow: [wowok-provider](../wowok-provider/SKILL.md).
|
|
213
208
|
|
package/wowok-order/SKILL.md
CHANGED
|
@@ -176,7 +176,7 @@ Foundation = immutable on-chain rules (Phase 1). Messenger = encrypted, self-ver
|
|
|
176
176
|
|
|
177
177
|
### 2.1 Send Privacy Info
|
|
178
178
|
|
|
179
|
-
Contact `ims[]` from E8. Send E10 info via `messenger_operation` → `send_message
|
|
179
|
+
Contact `ims[]` from E8. Send E10 info via `messenger_operation` → `send_required_info` (LocalInfo field names assembled in one E2E message), or `send_message` for free-form text. **Messenger only — never on-chain.** Explicit user confirmation per item. After sending, persist any newly-provided value via `local_info_operation` `add` (so future orders auto-fill).
|
|
180
180
|
|
|
181
181
|
### 2.2 Negotiate
|
|
182
182
|
|
package/wowok-planner/SKILL.md
CHANGED
|
@@ -92,4 +92,4 @@ Each object has: `id`, `type`, `status` (planned/created/published), `reversible
|
|
|
92
92
|
5. **Contact (customer service)** is configured before Service publish — `Service.um → Contact → ims[]`, with the local account enabled as messenger and anti-spam set.
|
|
93
93
|
6. **Arbitration is third-party and before publish** — `arbitration.permission != service.permission` (`E_ARBITRATION_PERMISSION_CONFLICT`); `compensation_fund > 0` requires non-empty `arbitrations` (`E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND`).
|
|
94
94
|
|
|
95
|
-
These rules are the single source of truth for the dependency chain; the phase list above is their concrete serialization. Hand-off to `wowok-onboard` (Review opening +
|
|
95
|
+
These rules are the single source of truth for the dependency chain; the phase list above is their concrete serialization. Hand-off to `wowok-onboard` (Review opening + at most 8 business questions) follows this same chain.
|
package/wowok-provider/SKILL.md
CHANGED
|
@@ -108,7 +108,7 @@ Once R1-R7 confirmed, execute in strict order. Sub-tools are invoked via `wowok(
|
|
|
108
108
|
|
|
109
109
|
**STEP 5 — Revenue (order_allocators + Treasury)**: `onchain_operations` service order_allocators (L1-locked). Mode: amount / rate (bps sum=10000) / surplus. Recipient: `{Entity}` / `{GuardIdentifier}` / `{Signer}`. Personal → Permission owner (Entity); Org → Treasury (`Treasury.receive` index 253). Offer new/select Treasury (query onchain_objects type=treasury).
|
|
110
110
|
|
|
111
|
-
**STEP 6 — Customer Service (Contact + Messenger)**: `onchain_operations` contact (ims) + `account_operation` messenger (`enabled: true`). Contact mutable;
|
|
111
|
+
**STEP 6 — Customer Service (Contact + Messenger)**: `onchain_operations` contact (`ims` with op `add`/`set`/`remove`/`clear`) + `account_operation` messenger (`enabled: true`). Contact mutable; IM mutations need permission index 453 (CONTACT_IM) and emit no events. Anti-spam profiles: Open / Guarded / Closed / Defensive. Bind `onchain_operations` service `um` (if customer_required).
|
|
112
112
|
|
|
113
113
|
**STEP 7 — Trust (Arbitration + compensation_fund)**: REUSE third-party Arbitration (MUST NOT share Service's Permission — E_ARBITRATION_PERMISSION_CONFLICT 33; don't create your own). `compensation_fund_add` (internal Balance<T>, not Treasury); fund>0 requires non-empty arbitrations (E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND 25); withdraw needs bPaused + lock elapsed.
|
|
114
114
|
|