@wowok/skills 3.0.4 → 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.
Files changed (47) hide show
  1. package/README.md +146 -122
  2. package/dist/cli.d.ts +6 -0
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +223 -837
  5. package/dist/cli.js.map +1 -1
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +24 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/installer.d.ts +121 -0
  11. package/dist/installer.d.ts.map +1 -0
  12. package/dist/installer.js +802 -0
  13. package/dist/installer.js.map +1 -0
  14. package/dist/skills.d.ts +5 -2
  15. package/dist/skills.d.ts.map +1 -1
  16. package/dist/skills.js +86 -62
  17. package/dist/skills.js.map +1 -1
  18. package/dist/targets.d.ts +94 -0
  19. package/dist/targets.d.ts.map +1 -0
  20. package/dist/targets.js +421 -0
  21. package/dist/targets.js.map +1 -0
  22. package/dist/types.d.ts +5 -4
  23. package/dist/types.d.ts.map +1 -1
  24. package/dist/types.js +0 -32
  25. package/dist/types.js.map +1 -1
  26. package/package.json +5 -4
  27. package/scripts/install.js +21 -859
  28. package/wowok-arbitrator/SKILL.md +5 -12
  29. package/wowok-auditor/SKILL.md +5 -17
  30. package/wowok-collaborator/SKILL.md +5 -17
  31. package/wowok-governance/SKILL.md +10 -30
  32. package/wowok-machine/SKILL.md +5 -18
  33. package/wowok-market/SKILL.md +5 -21
  34. package/wowok-messenger/SKILL.md +32 -50
  35. package/wowok-onboard/SKILL.md +5 -22
  36. package/wowok-order/SKILL.md +6 -19
  37. package/wowok-output/SKILL.md +5 -10
  38. package/wowok-planner/SKILL.md +6 -20
  39. package/wowok-provider/SKILL.md +6 -18
  40. package/wowok-supplier/SKILL.md +5 -16
  41. package/examples/Insurance/Insurance.md +0 -1245
  42. package/examples/MyShop/MyShop.md +0 -2003
  43. package/examples/MyShop/myshop_machine_nodes.json +0 -93
  44. package/examples/MyShop_Advanced/MyShop_Advanced.md +0 -2880
  45. package/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -1831
  46. package/examples/Travel/Travel.md +0 -1849
  47. package/examples/Travel/calc-weather-timestamps.js +0 -12
@@ -1,17 +1,10 @@
1
1
  ---
2
2
  name: wowok-arbitrator
3
- description: |
4
- WoWok Arbitrator — build and operate on-chain arbitration services.
5
- Create Arbitration objects, configure voting rules (open or guard-based weighted),
6
- manage dispute cases through their full lifecycle, and earn fees from resolution.
7
-
8
- Core value: achieve trust consensus between merchants and users through
9
- transparent, fair, and efficient dispute resolution.
10
- when_to_use:
11
- - User wants to create/configure an Arbitration service
12
- - User needs to handle dispute cases and voting processes
13
- - User wants to design voter eligibility and weight mechanisms
14
- - User mentions "arbitration", "dispute", "voting", "arb", "judge"
3
+ description: "WoWok Arbitrator — build and operate on-chain arbitration services. Create Arbitration objects, configure voting rules (open or guard-based weighted), manage dispute cases through their full lifecycle, and earn fees from resolution. Core value: achieve trust consensus between merchants and users through transparent, fair, and efficient dispute resolution. Use when: User wants to create/configure an Arbitration service; User needs to handle dispute cases and voting processes; User wants to design voter eligibility and weight mechanisms; User mentions \"arbitration\", \"dispute\", \"voting\", \"arb\", \"judge\"."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: arbitrator
7
+ related: "wowok-order, wowok-messenger"
15
8
  ---
16
9
 
17
10
  # WoWok Arbitrator Guide
@@ -1,22 +1,10 @@
1
1
  ---
2
2
  name: wowok-auditor
3
- description: |
4
- WoWok pre-publish auditor — the static-analysis Skill that verifies
5
- Guard completeness, Machine soundness, fund-flow safety, permission
6
- consistency, and publish readiness BEFORE any irreversible publish
7
- operation (Service publish, Machine publish, Allocator binding freeze).
8
-
9
- This Skill is the knowledge base for the L4 Harness Verify Loop. It does
10
- not mutate objects. It queries, exports, and rules — emitting a
11
- pass/warn/fail audit report plus a publish decision.
12
- when_to_use:
13
- - User is about to publish a Service, Machine, or lock an Allocator set
14
- - User asks to "audit", "verify", "review", "check before publish"
15
- - L4 Harness Verify Loop is invoked before an irreversible operation
16
- - User mentions "fund flow", "refund path", "allocation sum", "guard completeness"
17
- - User mentions "machine cycle", "unreachable state", "permission index conflict"
18
- - User wants a pre-publish go/no-go decision
19
- - A publish operation failed and root-cause analysis is needed
3
+ description: "WoWok pre-publish auditor — the static-analysis Skill that verifies Guard completeness, Machine soundness, fund-flow safety, permission consistency, and publish readiness BEFORE any irreversible publish operation (Service publish, Machine publish, Allocator binding freeze). This Skill is the knowledge base for the L4 Harness Verify Loop. It does not mutate objects. It queries, exports, and rules — emitting a pass/warn/fail audit report plus a publish decision. Use when: User is about to publish a Service, Machine, or lock an Allocator set; User asks to \"audit\", \"verify\", \"review\", \"check before publish\"; L4 Harness Verify Loop is invoked before an irreversible operation; User mentions \"fund flow\", \"refund path\", \"allocation sum\", \"guard completeness\"; User mentions \"machine cycle\", \"unreachable state\", \"permission index conflict\"; User wants a pre-publish go/no-go decision; A publish operation failed and root-cause analysis is needed."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: shared
7
+ related: "wowok-planner, wowok-provider, wowok-machine"
20
8
  ---
21
9
 
22
10
  # WoWok Pre-Publish Auditor
@@ -1,22 +1,10 @@
1
1
  ---
2
2
  name: wowok-collaborator
3
- description: |
4
- WoWok Collaborator — the canonical skill for process collaborators who execute
5
- workflow forwards on behalf of a merchant: internal staff (permission entities)
6
- and external operators (named operators).
7
-
8
- Covers permission-index and named-operator routing, guard-gated evidence
9
- submission, and reputation protection. The collaborator carries PROCESS
10
- responsibility (no direct settlement stake) — the goal is to keep the workflow
11
- flowing and avoid stall blame.
12
-
13
- For the merchant who owns the Service, see wowok-provider. For the supplier who
14
- presents to Demands, see wowok-supplier.
15
- when_to_use:
16
- - User is an operator/employee executing workflow steps (permission index)
17
- - User is an external named operator advancing a Machine forward
18
- - User wants to submit guard evidence (proof/repository) for a forward
19
- - User mentions "collaborator", "operator", "permission index", "named operator", "execute forward"
3
+ description: "WoWok Collaborator — the canonical skill for process collaborators who execute workflow forwards on behalf of a merchant: internal staff (permission entities) and external operators (named operators). Covers permission-index and named-operator routing, guard-gated evidence submission, and reputation protection. The collaborator carries PROCESS responsibility (no direct settlement stake) — the goal is to keep the workflow flowing and avoid stall blame. For the merchant who owns the Service, see wowok-provider. For the supplier who presents to Demands, see wowok-supplier. Use when: User is an operator/employee executing workflow steps (permission index); User is an external named operator advancing a Machine forward; User wants to submit guard evidence (proof/repository) for a forward; User mentions \"collaborator\", \"operator\", \"permission index\", \"named operator\", \"execute forward\"."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: collaborator
7
+ related: "wowok-provider, wowok-machine, wowok-messenger"
20
8
  ---
21
9
 
22
10
  # WoWok Collaborator Guide
@@ -1,30 +1,10 @@
1
1
  ---
2
2
  name: wowok-governance
3
- description: |
4
- WoWok Governance — the canonical skill for on-chain permission, data, and
5
- financial governance: the account that OWNS the objects keeps them healthy
6
- after setup.
7
-
8
- Covers Permission lifecycle (indexes, role assignment, entity table, admin
9
- transfer), Treasury/Allocation fund stewardship (deposit/withdraw, history
10
- audit, unclaimed payments), and Personal data boundaries (public identity,
11
- profile records). Governance is a continuous loop — inventory, decide,
12
- execute, audit — not a one-time setup.
13
-
14
- For building services, see wowok-provider. For market operations, see
15
- wowok-market.
16
- when_to_use:
17
- - User wants to manage who can operate their objects (permission indexes, entity table)
18
- - User wants to deposit/withdraw treasury funds or audit fund history
19
- - User has unclaimed payments or wants to check claimable balances
20
- - User wants to update their public on-chain profile or personal data
21
- - User mentions "permission", "treasury", "governance", "manage assets", "audit funds"
22
- role: shared
23
- loading: on-demand
24
- related:
25
- - wowok-provider
26
- - wowok-market
27
- - wowok-messenger
3
+ description: "WoWok Governance — the canonical skill for on-chain permission, data, and financial governance: the account that OWNS the objects keeps them healthy after setup. Covers Permission lifecycle (indexes, role assignment, entity table, admin transfer), Treasury/Allocation fund stewardship (deposit/withdraw, history audit, unclaimed payments), and Personal data boundaries (public identity, profile records). Governance is a continuous loop — inventory, decide, execute, audit — not a one-time setup. For building services, see wowok-provider. For market operations, see wowok-market. Use when: User wants to manage who can operate their objects (permission indexes, entity table); User wants to deposit/withdraw treasury funds or audit fund history; User has unclaimed payments or wants to check claimable balances; User wants to update their public on-chain profile or personal data; User mentions \"permission\", \"treasury\", \"governance\", \"manage assets\", \"audit funds\"."
4
+ metadata:
5
+ version: "1.0.0"
6
+ role: shared
7
+ related: "wowok-provider, wowok-market, wowok-messenger"
28
8
  ---
29
9
 
30
10
  # WoWok Governance Guide
@@ -41,7 +21,7 @@ The following content has been pushed down to the MCP knowledge layer and is app
41
21
  | Content | Access via (MCP action) | Applied Via |
42
22
  |---------|--------------------------|-------------|
43
23
  | Permission safety rules (owner/admin/entity hierarchy) | `schema_query` action='get_safety_rules' | `onchain_operations` permission |
44
- | Treasury/Permission/Personal object schema | `schema_query` action='get_schema' | governance operations |
24
+ | Treasury/Permission/Personal object schema | `schema_query` action='get' name='treasury'/'permission'/'personal' | governance operations |
45
25
  | Unclaimed-payment detection | `keeper_operation` (payment_unclaimed scan) | monitor loop |
46
26
  | Fund-flow event meanings (TreasuryEvent / AllocationEvent / RewardClaimEvent / RewardFundEvent) | event semantic registry | audit & monitor |
47
27
 
@@ -59,9 +39,9 @@ Inventory → Decide → Execute → Audit. Governance objects are LIVE: a permi
59
39
 
60
40
  A Permission object defines WHO can perform WHICH operations on your business objects (Service / Machine / Treasury …).
61
41
 
62
- - **Indexes** (`permission.index_create`): create named role indexes (e.g. operator=1, finance=2) before assigning.
63
- - **Role assignment** (`permission.role_assign`): bind indexes onto target objects — a mis-assigned role grants unintended operational authority immediately.
64
- - **Entity table**: add/remove addresses per index. Review-first: list current entities before mutating (`query_objects` on the Permission object).
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.
65
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.
66
46
 
67
47
  Rules of thumb:
@@ -109,7 +89,7 @@ Governance goals close the loop through three channels:
109
89
 
110
90
  ## Quick Reference
111
91
 
112
- - Permission: indexes → role assignment → entity table; audit via permission_perm + address_profile.
92
+ - Permission: index remarks → grants (`add perm by index`/`by entity`) → audit via permission_perm + address_profile.
113
93
  - Treasury: deposit/withdraw + history audit; external_guard gates withdrawals.
114
94
  - Unclaimed payments: keeper scan owns reminders; recipients unwrap CoinWrappers.
115
95
  - Personal data: permanently public — review before every write.
@@ -1,23 +1,10 @@
1
1
  ---
2
2
  name: wowok-machine
3
- description: |
4
- WoWok Machine Workflow Design — the canonical skill for designing, building,
5
- and operating automated workflow templates (Machines) on WoWok. Machines are
6
- directed graphs that define how orders progress through stages, who can
7
- advance them, and what conditions must be met at each step.
8
-
9
- Covers Machine architecture (Nodes, Pairs, Forwards, Guards, Thresholds),
10
- lifecycle management (create, configure, publish, pause), node operations
11
- (add, exchange, rename, granular forward/prior-node manipulation),
12
- Progress integration, cross-Machine supply chain composition via Guard verification, privacy-preserving
13
- consensus patterns, and export/import workflows via machineNode2file.
14
- when_to_use:
15
- - User wants to create or modify a Machine workflow
16
- - User asks about workflow steps, state transitions, or progress
17
- - User needs to design order processing pipelines
18
- - User mentions "machine", "workflow", "progress", "state machine", "pipeline"
19
- - User wants to export Machine nodes to a file or import from a file
20
- - User needs to understand threshold mechanics, forward permissions, or guard bindings
3
+ description: "WoWok Machine Workflow Design — design, build and operate workflow templates (Machines): directed graphs that define how orders progress through stages, who can advance them, and what conditions must be met at each step. Covers Nodes/Pairs/Forwards/Guards/Thresholds, lifecycle (create, configure, publish, pause), node and forward operations, Progress integration, cross-Machine supply chains via Guard verification, and machineNode2file import/export. Use when: User wants to create or modify a Machine workflow; User asks about workflow steps, state transitions, or progress; User needs to design order processing pipelines; User mentions \"machine\", \"workflow\", \"progress\", \"state machine\", \"pipeline\"; User wants to export/import Machine nodes via a file; User needs threshold mechanics, forward permissions, or guard bindings."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: provider
7
+ related: "wowok-provider"
21
8
  ---
22
9
 
23
10
  # WoWok Machine Workflow Design
@@ -1,26 +1,10 @@
1
1
  ---
2
2
  name: wowok-market
3
- description: |
4
- WoWok Market — the canonical skill for market discovery and operations. It
5
- covers the "matchmaking + operations" layer (K3 13/14/15): how a demand finds
6
- candidate services, how a merchant picks a trustworthy arbitrator, how the
7
- account's on-chain attention is surfaced, and how the market is measured and
8
- governed.
9
-
10
- Covers match_discover / discover_services / discover_demands (discovery),
11
- arbitration_score (trust selection), account_events (attention), market_metrics
12
- (supply/demand/trust), anti_cheat (governance), market_operations (journey
13
- funnel / referral / CRM), and category match rules.
14
-
15
- For the merchant who owns a Service, see wowok-provider. For the customer
16
- placing an order, see wowok-order. For the arbitrator, see wowok-arbitrator.
17
- when_to_use:
18
- - User wants to discover services for an intent ("find a plumber in Shanghai")
19
- - Merchant wants to discover open Demands to present to
20
- - Merchant wants to pick/compare arbitrators (arbitration_score)
21
- - User wants their on-chain attention items surfaced (account_events)
22
- - User wants market metrics / anti-cheat signals / journey funnel / referral / CRM
23
- - User mentions "market", "match", "discover", "matchmaking", "operations", "funnel", "referral", "customer relationship"
3
+ description: "WoWok Market — market discovery and operations (the matchmaking layer): how a demand finds candidate services, how a merchant picks a trustworthy arbitrator, how the account's on-chain attention is surfaced, and how the market is measured and governed. Covers match_discover/discover_services/discover_demands, arbitration_score (trust selection), account_events (attention), market_metrics, anti_cheat, market_operations (journey funnel / referral / CRM) and category match rules. Use when: User wants to discover services for an intent (\"find a plumber in Shanghai\"); Merchant wants to find open Demands to present to; Merchant wants to pick or compare arbitrators; User wants their on-chain attention items surfaced; User wants market metrics, anti-cheat signals, journey funnel, referral or CRM; User mentions \"market\", \"match\", \"discover\", \"matchmaking\", \"funnel\", \"referral\"."
4
+ metadata:
5
+ version: "1.0.0"
6
+ role: shared
7
+ related: "wowok-provider, wowok-order, wowok-arbitrator"
24
8
  ---
25
9
 
26
10
  # WoWok Market Guide
@@ -1,23 +1,10 @@
1
1
  ---
2
2
  name: wowok-messenger
3
- description: |
4
- WoWok Messenger — end-to-end encrypted communication for pre-order negotiation,
5
- evidence collection, and dispute resolution.
6
-
7
- Core features: send/receive encrypted messages, generate WTS evidence files,
8
- verify message authenticity, manage conversations with anti-spam controls, and
9
- integrate with arbitration workflows.
10
-
11
- Used by customers, service providers, and arbitrators for secure off-chain
12
- communication that creates tamper-proof audit trails.
13
- when_to_use:
14
- - User needs to communicate with another party (buyer, seller, arbitrator)
15
- - User wants to send encrypted messages for negotiation
16
- - User needs to generate WTS evidence files from conversations
17
- - User wants to verify message authenticity
18
- - User needs to manage conversation lists (friends, blacklist, guard)
19
- - User mentions "messenger", "message", "chat", "communication", "WTS", "evidence"
20
- always: false
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
+ metadata:
5
+ version: "2.0.0"
6
+ role: shared
7
+ related: "wowok-order, wowok-provider, wowok-arbitrator"
21
8
  ---
22
9
 
23
10
  # WoWok Messenger Guide
@@ -25,9 +12,9 @@ always: false
25
12
  End-to-end encrypted messaging with tamper-proof audit trails.
26
13
 
27
14
  > **Role**: Any WoWok participant
28
- > All 17 operations with full parameter types and constraints are in the MCP schema (`messenger_operation`). This document focuses on **design decisions and strategy** not captured by the schema.
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.
29
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)
30
- > Guard design patterns and safety rules now live in the MCP knowledge layer — query via `schema_query` actions `get_guard_design_patterns` / `get_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`).
31
18
 
32
19
  ---
33
20
 
@@ -64,15 +51,15 @@ Before any communication:
64
51
 
65
52
  ### Account Limit
66
53
 
67
- A single device supports up to 1000 messenger accounts. Exceeding this returns "Maximum 1000 messenger accounts allowed". Use `account_operation → messenger { enabled: false }` to disable unused accounts.
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.
68
55
 
69
56
  ### Contact Object (On-Chain Bridge)
70
57
 
71
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.
72
59
 
73
- **When to create**: Before Service publish, when `customer_required` is set (Service.um must point to a Contact). Reuse an existing Contact if you serve multiple Services with the same support channel.
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.
74
61
 
75
- **Lifecycle**: Contact is mutable (unlike Proof/Guard). IM mutations (`onchain_operations` contact with `ims: {op:'add'|'set'|'remove'|'clear', im:[...]}`) require permission index 453 (CONTACT_IM). No events emitted on IM mutations — poll `ims[]` field. If Contact is bound to `Permission.um`, clear that binding (permission op: `um: null`) BEFORE deleting the Contact (else dangling pointer). Full field constraints: MCP `schema_query` action='get' name='contact'.
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'.
76
63
 
77
64
  ---
78
65
 
@@ -86,19 +73,31 @@ Two approaches, depending on need:
86
73
 
87
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.
88
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.
89
- - **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).
90
79
 
91
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.
92
81
 
93
82
  ### Send Messages
94
83
 
95
- Plain text via `send_message`; files (WTS, WIP, ZIP) via `send_file`.
84
+ Plain text via `send_message`; files and media (images, audio, video, voice, documents, WTS/WIP evidence) via `send_file`.
96
85
 
97
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.
98
87
 
99
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`.
100
89
 
101
- **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.
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`.
102
101
 
103
102
  ### Mark as Read
104
103
 
@@ -151,21 +150,11 @@ The optimal configuration depends on your role and openness needs:
151
150
 
152
151
  ### Strategy: Guard List Design
153
152
 
154
- 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).
155
154
 
156
- **Common Guard designs for messenger**:
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.
157
156
 
158
- | Guard Type | What It Verifies | Example Use |
159
- |------------|-----------------|-------------|
160
- | Token-gated | Sender holds a specific token/NFT | Premium customer community |
161
- | Reputation | Sender's `personal` profile has ≥N likes | Verified reputation threshold |
162
- | Order-based | Sender has an active order on your Service | Only current customers can message |
163
- | Passport-based | Sender holds a valid passport from a trusted issuer | Whitelist of partner organizations |
164
- | Payment | Sender has made a minimum payment | Paid consultation access |
165
-
166
- **`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).
167
-
168
- **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).
169
158
 
170
159
  ### Strategy: Troubleshooting Anti-Spam Issues
171
160
 
@@ -179,16 +168,9 @@ The Guard list is where anti-spam becomes programmable. A Guard validates that a
179
168
 
180
169
  ### Strategy: Filtering Messages by Source
181
170
 
182
- `watch_messages` supports `listFilterMode` to segment your inbox by relationship type:
183
-
184
- - `friends` — only messages from your friends list
185
- - `guard` — only messages from guard-verified senders
186
- - `stranger` — only messages from unknown senders (highest priority for review)
187
- - `any` — all messages (default)
188
-
189
- 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).
190
172
 
191
- **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
+ **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.
192
174
 
193
175
  ---
194
176
 
@@ -200,7 +182,7 @@ A WTS file is a **tamper-proof, self-verifying export** of a continuous conversa
200
182
 
201
183
  ### The Workflow
202
184
 
203
- 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` → (optional) convert to human-readable HTML; (5) `send_file` → submit signed WTS to the arbitrator via messenger.
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`).
204
186
 
205
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.
206
188
 
@@ -220,7 +202,7 @@ When a dispute requires evidence: (1) `generate_wts` → export messages by time
220
202
 
221
203
  ## Messenger Across Roles
222
204
 
223
- **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).
224
206
 
225
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).
226
208
 
@@ -1,27 +1,10 @@
1
1
  ---
2
2
  name: wowok-onboard
3
- description: |
4
- WoWok First-Touch Onboarding — guides a NEW user (vague first prompt) to their
5
- first published Service through a business-first dialogue: a Review opening
6
- followed by AT MOST 8 mandatory business questions (never technical field
7
- prompts), then a dependency-aware auto-build with reuse/customize/discover for
8
- the technical components. Every business decision (industry, network, location,
9
- payment token, pricing, workflow, fund distribution, arbitration) is framed in
10
- terms of who-wins-what and why — not which field to fill.
11
-
12
- Use when a new user says "I want to open a shop", "I want to sell something",
13
- "how do I start", or has no published Service yet. Produces a complete merchant
14
- capability stack: Permission + Service (published) + Machine (published) +
15
- Progress (bound) + Guards + Allocation + Contact + Arbitration, verified by a
16
- user-driven test order.
17
-
18
- Not for existing merchants tuning operations — hand off to wowok-provider.
19
- when_to_use:
20
- - User is new to WoWok and wants to set up a service
21
- - User says "open a shop", "create a service", "start selling", "onboard"
22
- - User has no published Service yet on the current account
23
- - User completed account creation and asks "what's next"
24
- - User resumes an interrupted onboarding (read checkpoint state)
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
+ metadata:
5
+ version: "2.0.0"
6
+ role: shared
7
+ related: "wowok-provider, wowok-machine"
25
8
  ---
26
9
 
27
10
  # WoWok First-Touch Onboarding
@@ -1,23 +1,10 @@
1
1
  ---
2
2
  name: wowok-order
3
- description: |
4
- WoWok Buyer Guide — TWO lifecycles in one skill:
5
-
6
- 1. PROSPECT (prospect due diligence, pre-purchase): E1-E11 due diligence + consensus
7
- building + trust-score synthesis, ending in a buy/no-buy decision.
8
- 2. CUSTOMER (in-order fulfillment, post-order): order creation, progress advancement,
9
- fund management, and arbitration.
10
-
11
- For suppliers presenting to Demands, see wowok-supplier. For process
12
- operators executing workflow forwards, see wowok-collaborator.
13
- when_to_use:
14
- - User is a potential buyer evaluating a service BEFORE purchasing (prospect)
15
- - User is a customer/buyer placing or managing orders (customer)
16
- - User wants to evaluate services, WIP, guards, allocations, arbitration
17
- - User needs to communicate with sellers via Messenger
18
- - User asks about order progress, payments, or refunds
19
- - User wants to file disputes or arbitration claims
20
- - User mentions "buy", "order", "purchase", "refund", "dispute", "arbitration", "due diligence"
3
+ description: "WoWok Buyer Guide — TWO lifecycles in one skill: 1. PROSPECT (prospect due diligence, pre-purchase): E1-E11 due diligence + consensus building + trust-score synthesis, ending in a buy/no-buy decision. 2. CUSTOMER (in-order fulfillment, post-order): order creation, progress advancement, fund management, and arbitration. For suppliers presenting to Demands, see wowok-supplier. For process operators executing workflow forwards, see wowok-collaborator. Use when: User is a potential buyer evaluating a service BEFORE purchasing (prospect); User is a customer/buyer placing or managing orders (customer); User wants to evaluate services, WIP, guards, allocations, arbitration; User needs to communicate with sellers via Messenger; User asks about order progress, payments, or refunds; User wants to file disputes or arbitration claims; User mentions \"buy\", \"order\", \"purchase\", \"refund\", \"dispute\", \"arbitration\", \"due diligence\"."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: customer
7
+ related: "wowok-provider, wowok-arbitrator, wowok-messenger"
21
8
  ---
22
9
 
23
10
  # WoWok Buyer Guide
@@ -189,7 +176,7 @@ Foundation = immutable on-chain rules (Phase 1). Messenger = encrypted, self-ver
189
176
 
190
177
  ### 2.1 Send Privacy Info
191
178
 
192
- Contact `ims[]` from E8. Send E10 info via `messenger_operation` → `send_message`. **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).
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).
193
180
 
194
181
  ### 2.2 Negotiate
195
182
 
@@ -1,15 +1,10 @@
1
1
  ---
2
2
  name: wowok-output
3
- description: |
4
- WoWok output processing and display — post-processes all WoWok tool responses
5
- for human-readable presentation. Handles address resolution, name mapping,
6
- amount formatting, and data visualization.
7
- when_to_use:
8
- - AI has received response from any WoWok MCP tool
9
- - Response contains addresses requiring name resolution
10
- - Response contains amounts requiring human-readable formatting
11
- - User queries on-chain data (events, objects, tables)
12
- always: true
3
+ description: "WoWok output processing and display — post-processes all WoWok tool responses for human-readable presentation. Handles address resolution, name mapping, amount formatting, and data visualization. Use when: AI has received response from any WoWok MCP tool; Response contains addresses requiring name resolution; Response contains amounts requiring human-readable formatting; User queries on-chain data (events, objects, tables)."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: shared
7
+ loading: always
13
8
  ---
14
9
 
15
10
  # Address Display Rules
@@ -1,24 +1,10 @@
1
1
  ---
2
2
  name: wowok-planner
3
- description: |
4
- WoWok Planning Skill — the main planning component of the L4 Harness Plan Loop.
5
- Converts user natural-language intent into an executable Object Dependency Graph
6
- (ODG) and a phased execution plan. Deterministic-first: rule tables and scenario
7
- templates drive planning; the LLM only clarifies intent and translates responses.
8
-
9
- Use when a user says "I want to build...", "plan a service", "help me set up X",
10
- or when the L4 Harness opens a new planning cycle. Produces an ODG JSON document
11
- consumed by the Harness execution loop, with checkpoints between phases.
12
-
13
- Not for direct execution — hand off to wowok-onboard or wowok-provider for
14
- step-by-step MCP orchestration once the ODG is confirmed.
15
- when_to_use:
16
- - User describes a new service intent and needs a build plan
17
- - L4 Harness opens a Plan Loop cycle (fresh task)
18
- - User asks "what do I need to create to support X"
19
- - User wants to reuse existing objects for a new service
20
- - User asks for a dependency graph or execution phases
21
- - User resumes an interrupted planning session (read ODG checkpoint)
3
+ description: "WoWok Planning Skill — the planning component of the L4 Harness Plan Loop. Converts natural-language intent into an executable Object Dependency Graph (ODG) plus a phased plan. Deterministic-first: rule tables and scenario templates drive planning; the LLM only clarifies intent. Produces an ODG consumed by the Harness execution loop, with checkpoints between phases. Not for direct execution — hand off to wowok-onboard or wowok-provider once the ODG is confirmed. Use when: User describes a new service intent and needs a build plan; the Harness opens a Plan Loop cycle; User asks \"what do I need to create to support X\"; User wants to reuse existing objects for a new service; User asks for a dependency graph or execution phases; User resumes an interrupted planning session."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: shared
7
+ related: "wowok-onboard, wowok-auditor, wowok-provider"
22
8
  ---
23
9
 
24
10
  # WoWok Planning Skill
@@ -106,4 +92,4 @@ Each object has: `id`, `type`, `status` (planned/created/published), `reversible
106
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.
107
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`).
108
94
 
109
- 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 + 12 rounds) follows this same chain.
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.
@@ -1,22 +1,10 @@
1
1
  ---
2
2
  name: wowok-provider
3
- description: |
4
- WoWok Service Provider — the canonical skill for service providers (merchants, sellers)
5
- to build, operate, and manage commercial services on WoWok.
6
-
7
- Covers service design (WIP products, Machine workflows, Allocator strategies),
8
- trust mechanisms (compensation funds, arbitration), customer attraction
9
- (discounts, rewards, supply chain promises), and order fulfillment.
10
-
11
- For customers placing orders, see wowok-order. For arbitrators, see wowok-arbitrator.
12
- when_to_use:
13
- - User is a service provider/merchant/seller on WoWok
14
- - User wants to create a commercial service/marketplace
15
- - User wants to design workflow (Machine) for order processing
16
- - User wants to set up fund distribution strategies (Allocators)
17
- - User wants to configure trust mechanisms (compensation, arbitration)
18
- - User wants to handle order fulfillment and customer service
19
- - User mentions "create service", "merchant", "seller", "provider", "workflow design", "compensation", "arbitration"
3
+ description: "WoWok Service Provider — the canonical skill for service providers (merchants, sellers) to build, operate, and manage commercial services on WoWok. Covers service design (WIP products, Machine workflows, Allocator strategies), trust mechanisms (compensation funds, arbitration), customer attraction (discounts, rewards, supply chain promises), and order fulfillment. For customers placing orders, see wowok-order. For arbitrators, see wowok-arbitrator. Use when: User is a service provider/merchant/seller on WoWok; User wants to create a commercial service/marketplace; User wants to design workflow (Machine) for order processing; User wants to set up fund distribution strategies (Allocators); User wants to configure trust mechanisms (compensation, arbitration); User wants to handle order fulfillment and customer service; User mentions \"create service\", \"merchant\", \"seller\", \"provider\", \"workflow design\", \"compensation\", \"arbitration\"."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: provider
7
+ related: "wowok-machine, wowok-messenger"
20
8
  ---
21
9
 
22
10
  # WoWok Service Provider Guide
@@ -120,7 +108,7 @@ Once R1-R7 confirmed, execute in strict order. Sub-tools are invoked via `wowok(
120
108
 
121
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).
122
110
 
123
- **STEP 6 — Customer Service (Contact + Messenger)**: `onchain_operations` contact (ims) + `account_operation` messenger (`enabled: true`). Contact mutable; `im_add`/`im_remove` need permission index 453 (CONTACT_IM). Anti-spam profiles: Open / Guarded / Closed / Defensive. Bind `onchain_operations` service `um` (if customer_required).
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).
124
112
 
125
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.
126
114
 
@@ -1,21 +1,10 @@
1
1
  ---
2
2
  name: wowok-supplier
3
- description: |
4
- WoWok Supplier — the canonical skill for suppliers (sub-order providers) who
5
- present their service to a Demand and fulfill the resulting sub-order.
6
-
7
- Covers demand discovery, service presentation (open or passport-gated),
8
- sub-order fulfillment via Progress, and settlement collection. The supplier
9
- is a PEER role with a two-sided position: deliver (to get paid) + collect
10
- (from the upstream merchant).
11
-
12
- For the merchant who owns the main Service, see wowok-provider. For the
13
- process operators executing the workflow, see wowok-collaborator.
14
- when_to_use:
15
- - User wants to present their service to a Demand (open RFP or gated call)
16
- - User is a sub-order provider / supplier fulfilling part of a transaction
17
- - User wants to collect settlement from an upstream merchant
18
- - User mentions "supplier", "sub-order", "demand", "present service", "RFP", "fulfill sub-order"
3
+ description: "WoWok Supplier — the canonical skill for suppliers (sub-order providers) who present their service to a Demand and fulfill the resulting sub-order. Covers demand discovery, service presentation (open or passport-gated), sub-order fulfillment via Progress, and settlement collection. The supplier is a PEER role with a two-sided position: deliver (to get paid) + collect (from the upstream merchant). For the merchant who owns the main Service, see wowok-provider. For the process operators executing the workflow, see wowok-collaborator. Use when: User wants to present their service to a Demand (open RFP or gated call); User is a sub-order provider / supplier fulfilling part of a transaction; User wants to collect settlement from an upstream merchant; User mentions \"supplier\", \"sub-order\", \"demand\", \"present service\", \"RFP\", \"fulfill sub-order\"."
4
+ metadata:
5
+ version: "2.0.0"
6
+ role: supplier
7
+ related: "wowok-provider, wowok-machine, wowok-messenger"
19
8
  ---
20
9
 
21
10
  # WoWok Supplier Guide