@wowok/skills 3.1.2 → 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.
@@ -2,7 +2,7 @@
2
2
  name: wowok-provider
3
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
4
  metadata:
5
- version: "2.0.0"
5
+ version: "2.1.0"
6
6
  role: provider
7
7
  related: "wowok-machine, wowok-messenger"
8
8
  ---
@@ -10,219 +10,117 @@ metadata:
10
10
  # WoWok Service Provider Guide
11
11
 
12
12
  > **Role**: Service Provider (Merchant/Seller)
13
- > **Related Skills**: [wowok-order](../wowok-order/SKILL.md) (customer), [wowok-machine](../wowok-machine/SKILL.md) (workflow), [wowok-messenger](../wowok-messenger/SKILL.md) (communication)
13
+ > **Related Skills**: [wowok-order](../wowok-order/SKILL.md) (customer), [wowok-machine](../wowok-machine/SKILL.md) (workflow), [wowok-messenger](../wowok-messenger/SKILL.md) (communication), [wowok-planner](../wowok-planner/SKILL.md) (guided build pipeline)
14
14
 
15
15
  ---
16
16
 
17
- ## MCP Knowledge Layer
17
+ ## What the MCP already enforces
18
18
 
19
- The following rule tables have been pushed down to the MCP knowledge layer and are automatically applied during on-chain operations. You do NOT need to manually check these — the MCP server enforces them.
19
+ Do not re-derive these — the server applies them and returns findings/prompts:
20
20
 
21
- | Rule Category | Access via (MCP action) | Applied By |
22
- |---------------|--------------------------|------------|
23
- | Safety rules (confirmation, immutability, object reuse) | `schema_query` action='get_safety_rules' | `goal_operation` action='aggregate_risks' + `onchain_operations` pre-publish |
24
- | Guard design patterns | `schema_query` action='get_guard_design_patterns' | `goal_operation` action='aggregate_risks' (guard risk assessment) |
25
- | Machine topology rules | auto-applied | `goal_operation` action='aggregate_risks' (machine risk assessment) |
26
- | Scenario mode defaults | `industry_pack_operation` action='list_modes' / 'recommend_industry' | Referenced when recording the Goal and building the Service |
27
- | Tool reference (gas, faucet, wrappers) | `schema_query` action='get_tool_reference' | All tool calls automatically |
28
-
29
- **How to use**: Call `goal_operation` with `action: "aggregate_risks"` after completing your puzzle (pass your planned objects/operations) — the MCP server will automatically apply all relevant safety rules and return risk findings.
21
+ - **Pre-publish risk audit**: `goal_operation` action=`aggregate_risks` over your planned objects (safety rules, guard design, machine topology). Knowledge access: `schema_query` actions `get_safety_rules`, `get_guard_design_patterns`, `get_tool_reference`.
22
+ - **Guided build pipeline** (optional, recommended for non-trivial services): `industry_pack_operation` (recommend_industry / list_modes / derive_user_mode) and `goal_operation` action=`merchant_guide` (stateless 10-step wizard; the final step emits a topologically ordered `creation_plan`). This skill's lifecycle below is the manual path to the same result.
23
+ - **WIP network-deployment gate**, publish-time L1/L2 lock checks, and the compensation-fund-requires-arbitration pre-check are hard-enforced inside `onchain_operations`.
24
+ - **Execution routing for live orders** comes from `query_toolkit` query_type=`participation_radar` → `operable[].recommended_call`. Never hand-pick `order.progress` vs `progress.operate`.
30
25
 
31
26
  ---
32
27
 
33
- ## Core Interaction Principles
34
-
35
- These four principles govern every service build/modify step. They mirror the wowok-onboard model and are non-negotiable.
28
+ ## Interaction principles
36
29
 
37
- 1. **Review-first**: State (a) what the AI understood about the service, (b) the dependency order to build/modify, and (c) the interaction contract — before the first choice.
38
- 2. **User-driven**: Every step is an explicit user decision; the AI provides a `recommend` but never auto-advances. The user may pause at any important step.
39
- 3. **Reuse / Customize / Discover (choose one of three)**: For every component (Permission, Machine, Guard, Treasury, Contact, Arbitration, etc.), surface all three avenues — reuse an existing object (benefit), customize a new one (sub-task ability), or discover from other projects / the system.
40
- 4. **Default-config disclosure**: Disclose a new object's default config + important info + caveats BEFORE the user decides. No silent defaults.
30
+ 1. **Review-first**: state what you understood, the build/modify dependency order, and the interaction contract before the first choice.
31
+ 2. **User-driven**: every step is an explicit user decision; recommend, never auto-advance.
32
+ 3. **Reuse / customize / discover**: for every component (Permission, Machine, Guard, Treasury, Contact, Arbitration), surface all three avenues.
33
+ 4. **Default disclosure**: show a new object's defaults + caveats BEFORE the user decides. Default network is **testnet** — confirm mainnet explicitly.
41
34
 
42
35
  ---
43
36
 
44
- ## ⚠️ PRE-FLIGHT: Required Items Checklist
45
-
46
- **THIS SECTION IS MANDATORY.** Before ANY service creation or publication, the AI MUST collect explicit user confirmation for EVERY required item. **Do NOT skip, do NOT fabricate, do NOT proceed with missing items.**
47
-
48
- ### The Golden Rule
49
-
50
- > **Golden Rule**: NEVER guess what the user sells, how their workflow operates, or how funds are distributed — these are BUSINESS decisions only the user can make. Not provided → ASK; incomplete → ASK to clarify; "just make something up" → REFUSE and explain why each item matters.
51
-
52
- ### Required Items
37
+ ## Pre-flight: required business decisions
53
38
 
54
- For each item, the user must provide one of: **"Reuse existing: `<name_or_id>`"** OR **"Create new: `<details>`"** OR **"Discover from system / other projects"** — reuse / customize / discover, all three avenues must be surfaced.
39
+ > **Golden rule**: never guess what the user sells, how their workflow operates, or how funds split — these are BUSINESS decisions. Missing → ASK; "just make something up" → REFUSE.
55
40
 
56
- | # | Item | User Must Provide | Why Not Fabricate |
57
- |---|------|-------------------|--------------------|
58
- | **1** | **Account** | Account name/address. Default `""` is fine. | Safe default exists |
59
- | **2** | **Permission** | Existing Permission to reuse, OR name + type_parameter for new. **Reuse strongly recommended.** | Controls access to ALL your services |
60
- | **3** | **Service (DRAFT)** | Service name, type_parameter. Create the draft FIRST (unpublished) so Guards can reference it by LocalMark NAME. | Your brand identity on-chain; breaks Guard↔Service cycle |
61
- | **4** | **Machine** | Nodes, state transitions (pairs), forward paths. | IS your business process |
62
- | **5** | **Guards** | For each Guard: validation logic, conditions. Reuse or define new. | Enforces your business rules |
63
- | **6** | **Guard Bindings** | Which Guard validates which Machine forward? | Wrong binding = unauthorized access |
64
- | **7** | **Allocators** | For each outcome: who gets what %/amount? (e.g. "success: 95% me, 5% platform") | IS your revenue model |
41
+ For each item the user gives **"Reuse: `<name/id>`"** or **"Create new: `<details>`"** or **"Discover"**:
65
42
 
66
- **Conditionally Required:**
67
-
68
- | # | Item | Trigger | User Must Provide |
69
- |---|------|---------|-------------------|
70
- | **C1** | **Contact (um)** | If `customer_required` is set (or customer service is desired) | Contact name/ID; if NEW → local account as messenger (`enabled: true`) + anti-spam profile (Open/Guarded/Closed/Defensive) |
71
- | **C2** | **WIP Files** | Physical goods | Product description, images |
72
- | **C3** | **Sales Products** | Listing products | Name, price, stock, WIP per product |
73
-
74
- ### Information Collection Protocol
75
-
76
- ```
77
- STEP 0: Present checklist Steps 1-7 to user
78
- ├── Each item: "Reuse or create new? Provide details."
79
- ├── Track status: [pending] / [confirmed: reuse <id>] / [confirmed: create]
80
- ├── If user indicates physical goods / customer_required → also confirm C1-C3
81
- └── ⛔ GATE: ALL Steps 1-7 must be [confirmed] before any on-chain action
82
- └── NOT confirmed → STOP. Ask. Do NOT suggest creating service.
83
- ```
43
+ | # | Item | Why it cannot be fabricated |
44
+ |---|------|------------------------------|
45
+ | 1 | Account (`env.account`, default `""`) | — |
46
+ | 2 | Permission (reuse strongly recommended) | Controls ALL your services |
47
+ | 3 | Service DRAFT (name, type_parameter) — create FIRST, unpublished, so Guards can reference it by LocalMark name | Breaks the Guard↔Service cycle |
48
+ | 4 | Machine: nodes, pairs, forwards | IS the business process |
49
+ | 5 | Guards: validation logic per Guard | Enforces business rules |
50
+ | 6 | Guard bindings: which Guard gates which forward | Wrong binding = unauthorized access |
51
+ | 7 | Allocators: per outcome, who gets what | IS the revenue model |
84
52
 
85
- ### Anti-Fabrication Rules (HARD Constraints)
53
+ Conditional: **C1 Contact** when `customer_required` is set or customer service is wanted · **C2 WIP files** for physical goods (description, images) · **C3 Sales products** (name, price, stock, WIP each).
86
54
 
87
- | Never... | Because... |
88
- |----------|------------|
89
- | Invent product names, prices, descriptions | You don't know what they sell |
90
- | Design workflow nodes without user input | You don't know their business process |
91
- | Decide fund splits | You don't know their revenue model |
92
- | Assume Guard logic | You don't know their security requirements |
93
- | Skip the checklist | Even if user seems to know what they want |
55
+ ⛔ GATE: all items confirmed before any write. Track `[pending] / [confirmed: reuse <id>] / [confirmed: create]`. Never invent product names, prices, nodes, splits, or Guard logic — even if the user seems sure.
94
56
 
95
57
  ---
96
58
 
97
- ## Service Build Lifecycle
59
+ ## Build lifecycle
98
60
 
99
- Once Steps 1-7 confirmed, execute in strict order. Sub-tools are invoked via `wowok({ tool: "<name>", data: { operation_type: "<type>", ... } })`; all use Step 1 (Account) as `env.account`.
61
+ All writes go through `onchain_operations` with `operation_type`; account from item 1 is `env.account`. Discovery via `query_toolkit` (account_list / local_mark_list / onchain_objects); file exports via `machineNode2file` and `guard2file`.
100
62
 
101
- **STEP 1 — Foundation**: Account (`account_operation` gen) → Permission (`onchain_operations` permission) → Service DRAFT (`onchain_operations` service, `publish: false` — Guards reference it by LocalMark NAME) → Machine unpublished (`onchain_operations` machine: nodes/pairs/forwards). Discovery `query_toolkit` (account_list/local_mark_list/onchain_objects); template `machineNode2file`.
63
+ 1. **Foundation** — Permission (`permission`) → Service DRAFT (`service`, `publish: false`) → Machine unpublished (`machine`: nodes → pairs → forwards).
64
+ 2. **Guards** (`guard`) — design with `schema_query` action=`get_guard_design_patterns`; pass/fail gates vs runtime-submitted evidence (`b_submission` table entries) have different patterns — do not improvise, read the pattern output.
65
+ 3. **Bind + publish Machine, bind Service** — `machine` "add forward" with guards → machine `publish: true` (nodes/forwards become IMMUTABLE; re-export with machineNode2file and verify) → `service` bind `machine` (must already be published) and `buy_guard`.
66
+ 4. **Products** — `service` `sales: {op:'add'|'set'|'remove'|'clear', …}`; each sale `{name, price, stock, suspension, wip, wip_hash}` (price/stock are smallest-unit STRINGS). User supplies name/price/stock — never fabricate.
67
+ 5. **Revenue** — `service` `order_allocators` (set BEFORE publish). Modes: Amount / Rate (bps, sum exactly 10000) / Surplus (max one per allocator). Recipients: `Entity` (fixed address — an org address is usually a Treasury that must hold permission 253 TREASURY_RECEIVE to intake), `GuardIdentifier` (address submitted at allocation time, e.g. the Order), `Signer` (the allocation caller — do not overuse or splits collapse).
68
+ 6. **Customer service** — `contact` `ims: {op:'add'|'set'|'remove'|'clear'}` (IM list; mutations require permission 453 CONTACT_IM, emit no events) + enable messaging via `account_operation {messenger:{enabled:true, name_or_account}}`. Inbound filtering is the Messenger friends/guard/stranger lists (see wowok-messenger). Bind `service.um` when `customer_required`.
69
+ 7. **Trust** — bind a REUSED third-party Arbitration: it MUST use a different Permission than the Service (`E_ARBITRATION_PERMISSION_CONFLICT` = 33). `compensation_fund_add` funds an internal `Balance<T>` (not a Treasury, not a payment to the arb); a non-empty fund at publish requires non-empty `arbitrations` (`E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND` = 25).
70
+ 8. **Pre-publish verify** — machineNode2file + guard2file exports · `aggregate_risks` CRITICAL cleared · permission indices granted · arb Permission isolation · contact IM + messenger enabled → `service` `publish: true`.
71
+ 9. **Test order** — `service` `order_new` (requires bPublished, else E_NOT_PUBLISHED=7) → disclose the next nodes → advance each forward from radar `recommended_call` → trigger allocation (below) → verify every claimant received. Use a user-chosen test account.
102
72
 
103
- **STEP 2 — Trust Layer (Guards)**: `onchain_operations` guard (logic/instructions). Design per target: buy_guard / allocator / reward = pass/fail only; machine forward guard = retained_submission needs `b_submission: true` entries matching types. Patterns: `schema_query` action='get_guard_design_patterns'.
73
+ ### Lock levels after publish
104
74
 
105
- **STEP 3 — Bind + Publish Machine, Bind Service**: `onchain_operations` machine (`add forward`/`set` with guard) → machine `publish: true` (nodes/forwards IMMUTABLE; verify via machineNode2file) → `onchain_operations` service bind machine + buy_guard (machine must be PUBLISHED).
75
+ - **L1 permanent** (no exception, new Service version to change): `machine`, `order_allocators`.
76
+ - **L2 time-locked** (requires pause + `setting_lock_duration` elapsed; default 30 days = 2,592,000,000 ms): arbitrations/rewards **remove/clear**, `compensation_fund_withdraw`.
77
+ - **L3 stays mutable**: arbitrations/rewards **add**, `buy_guard`, `sales`, `discount`, `description`, `location`, `repositories` add, `compensation_fund_add`, `setting_lock_duration_add`, `customer_required`, `um`.
106
78
 
107
- **STEP 4 — Products (Sales + WIP)**: `onchain_operations` service sales (name/price/stock/wip/wip_hash); ⛔ user provides name/price(u64 min unit)/stock. `wip` = public URL + hash (on-chain stores URL+hash, not file); AI sub-task: generate WIP from web/doc → deploy to public URL (GitHub Pages). `wip <= MAX_WIP_LENGTH`, `wip_hash <= MAX_WIP_HASH_LENGTH`.
108
-
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
-
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
-
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
-
115
- **STEP 8 — Publication**: pre-publish verify — (1) machineNode2file, (2) guard2file, (3) `goal_operation` aggregate_risks → fix CRITICAL, (4) permission indexes granted, (5) arb permission isolation, (6) contact ims+enabled → `onchain_operations` service `publish: true` (L1-LOCKED: machine/order_allocators/arbitrations).
116
-
117
- **STEP 9 — Post-publish + Test Order**: mutable fields (description/location/sales/customer_required/rewards add/repositories add). Test order: `order_new` (requires bPublished, else E_NOT_PUBLISHED) → disclose next nodes → advance (order.progress / progress.operate) → alloc_by_guard → verify distribution. User chooses test account (default: service-creation account).
118
-
119
- ### Post-Publish Mutability (SDK-LOCKED vs mutable)
120
-
121
- Served by MCP `schema_query` action='get_safety_rules' (immutability-after-publish). Summary: `buy_guard` / `sales` / `description` / `repositories` / `rewards` are mutable; `machine` / `order_allocators` / `arbitrations` are SDK-LOCKED (a new Service version is required to change them).
79
+ Check current state with `query_toolkit` query_type=`service_panorama` (also machine_panorama for the bound Machine).
122
80
 
123
81
  ---
124
82
 
125
- ## Key Concepts
126
-
127
- ### Service Object Relationships
128
-
129
- > **Boundary conditions**: Service/Machine are IMMUTABLE after publish; Payment is FROZEN at creation; Order/Progress/Arbitration operations are irreversible. Use `query_toolkit` query_type='service_panorama' to check whether a Service has published objects.
130
-
131
- ```
132
- Service → permission, machine (immutable), order_allocators (immutable),
133
- arbitrations, compensation_fund (Balance<T>, NOT a Treasury ref),
134
- repositories, sales, rewards, um (Contact), customer_required, buy_guard
135
- Order (runtime) → builder, service snapshot, machine, progress, dispute (Arb[]), allocation
136
- ```
137
-
138
- Cross-object references — which object types host a Guard, which host a Machine, and which objects carry a `BuiltinPermissionIndex` — are served by MCP `schema_query` action='get_guard_design_patterns' (do not hardcode the counts; the object set evolves). Permission is the central access-control hub.
139
-
140
- ### Allocators + Machine Integration
141
-
142
- Design together for coherent fund flow. **Allocation modes** (amount / rate / surplus) and **recipient types** (`Entity` / `GuardIdentifier` / `Signer`) are served by MCP allocation knowledge — the authoritative table + customer-refund design pattern live there. Summary: `Entity` = fixed known recipient; `GuardIdentifier` = runtime-submitted address (customer/Order ID); `Signer` = the `alloc_by_guard` caller (rare — don't use for all entries or splits collapse to one recipient).
143
-
144
- ### Triggering Allocation Distribution
145
-
146
- After the Progress reaches a terminal state, the fund allocation is NOT automatic — it must be triggered explicitly. **Anyone can call this operation**; the caller does not need to be the merchant or customer. The Guard verification determines which allocator's rules apply.
147
-
148
- ```
149
- Tool: wowok({ tool: "onchain_operations", data: { operation_type: "allocation", ... } })
150
- Operation: alloc_by_guard
151
- Required submission: Order ID (matching the Guard's b_submission identifier)
152
- ```
153
-
154
- **Two-phase pattern** (same as other Guard operations):
155
- 1. Call without `submission` → SDK returns submission prompt
156
- 2. Re-call with `submission` containing the Order ID at the matching identifier
157
-
158
- **Post-allocation**: A Payment object is created with the distributed funds. Query the Allocation object to verify `balance` dropped to 0 and `payment` array has the new Payment ID.
83
+ ## Key mechanics
159
84
 
160
- ### WIP Files (Witness Immutable Promise)
85
+ ### Allocation: trigger + claim (two distinct steps)
161
86
 
162
- Immutable product commitment for arbitration evidence.
87
+ After Progress reaches a terminal node, distribution is NOT automatic. Anyone can trigger it — Guard verification decides which allocator applies:
163
88
 
164
89
  ```
165
- Create: wowok({ tool: "wip_file", data: { type: "generate", ... } }) → markdown_text + images → outputPath
166
- Attach: wowok({ tool: "onchain_operations", data: { operation_type: "service", ... } }) → sales.sales[{
167
- name, price, stock, wip: "<public-URL>", wip_hash: "" (auto)
168
- }]
90
+ onchain_operations operation_type="allocation"
91
+ data: { object: <Allocation>, alloc_by_guard: <Guard name/address> }
169
92
  ```
170
93
 
171
- > ⚠️ **WIP must be network-deployed.** `sale.wip` is stored ON-CHAIN and every customer fetches it when placing an order. A non-empty `wip` MUST be a publicly reachable URL (GitHub Pages / IPFS / your own website). A local file path (`C:\...`, `/path/file.wip`) or a localhost/LAN URL (`http://localhost:...`, `http://192.168.x.x`) is reachable only from the merchant's machine — it passes merchant-side set-time verification but **aborts customer `order_new` 100%**. Local-network URLs are INTERNAL TEST USE ONLY (set `env.network: "localnet"`); on testnet/mainnet they are rejected. If the WIP cannot be deployed, leave `sale.wip: ""` (TESTING ONLY, WIP verification skipped).
94
+ If the call returns a submission prompt, re-call with the top-level `submission` carrying the requested values (conventionally the Order address at the Guard's submitted identifier). The call creates immutable Payment objects and the result prints the DISTRIBUTION DETAILS. Recipients then **claim their CoinWrapper** — it is not spendable until claimed: EOA wallet → `payment` receive (auto-derived type; omit object to claim all); Order → `order` receive; Treasury → `treasury` receive (253). Find pending wrappers via `query_toolkit` query_type=`onchain_received`. A GuardIdentifier targeting the Order puts funds in escrow in the Payment — the order owner claims via order receive.
172
95
 
173
- ### Compensation Fund (Optional but Recommended)
96
+ ### WIP files
174
97
 
175
- - Add: `compensation_fund_add` | Lock: `setting_lock_duration_add` (default 30 days = 2592000000ms, configurable via `setting_lock_duration_add`)
176
- - **Withdraw**: Pause Service → Wait lock duration → `compensation_fund_receive`
98
+ `wip_file` type=`generate` ({markdown_text, images}, optional signing account) writes a `.wip` file; deploy it to a PUBLIC URL (GitHub Pages / IPFS / own site), then reference it as `sale.wip` (`wip_hash` is SHA-256, SDK auto-derives when omitted, but pin it explicitly). A local path / localhost / LAN URL passes merchant-side checks but **aborts customer `order_new` 100%** — allowed ONLY with `env.network:"localnet"`. Can't deploy? Leave `wip:""` (testing only, no integrity guarantee). Buyers should pin the on-chain `wip_hash` in each order item (anti-swap).
177
99
 
178
- ### Payment Tokens & Stablecoin Bridging (Mainnet Only)
100
+ ### Compensation fund
179
101
 
180
- WOW is the default settlement token. For stablecoin-denominated revenue (fiat-pegged pricing, large cross-period escrow), mainnet funds move via `bridge_operation`:
102
+ Add: `compensation_fund_add` (any time) · set waiting period: `setting_lock_duration_add` · withdraw ALL: `compensation_fund_withdraw` ONLY while paused AND the lock has elapsed (funds go to a new Payment owned by `receipt`). Note `compensation_fund_receive` is the CLAIM-side op for arbitration winners, not the merchant's withdrawal.
181
103
 
182
- - `query_supported_tokens` / `query_supported_evm_chains` — discover supported Bridge tokens (ETH/WETH/WBTC/USDC/USDT) and chains
183
- - `cross_chain_wow_to_evm` / `cross_chain_evm_to_wow` — WOW↔EVM transfer (mainnet env required; assets route through the auto-managed activeEvmAccount)
184
- - `query_transfer_status` / `query_transfer_list` — track transfers; `manage_evm_rpc` — handle EVM RPC rate limits (429)
104
+ ### Mainnet-only: stablecoins & bridging
185
105
 
186
- > Supported token addresses per network: `wowok_buildin_info` → 'mainnet bridge tokens'. Bridge is mainnet-only — testnet has no cross-chain path.
106
+ WOW is the default token; supported bridge tokens/chains: `bridge_operation` operation_type `query_supported_tokens` / `query_supported_evm_chains` (addresses also in `wowok_buildin_info` info="mainnet bridge tokens"). Transfers: `cross_chain_wow_to_evm` / `cross_chain_evm_to_wow` (latter auto-claims on WOW); tracking `query_transfer_status` / `query_transfer_list`; RPC 429s via `manage_evm_rpc`. Mainnet env required — no cross-chain path on testnet.
187
107
 
188
108
  ---
189
109
 
190
- ## Service Iteration: New Version vs In-Place
110
+ ## Iteration: in-place vs new version
191
111
 
192
- When a merchant wants to modify an existing service (change workflow, add allocators, update guards), the AI must determine whether to modify in place or build a new version.
112
+ | Situation | Strategy |
113
+ |-----------|----------|
114
+ | Unpublished draft | In-place modify |
115
+ | Published, change to an L1 field (Machine, allocators) | NEW version: create new objects only for changed parts, reuse the rest by address (Permission, Guards, Treasury, Contact…), publish v2 as a separate Service — v1 keeps running. There is no fork/upgrade tool. |
116
+ | Published, L3 change only (products, description, buy_guard…) | In-place mutate |
193
117
 
194
- ### Decision Rule
195
-
196
- | Scenario | Strategy | MCP Action |
197
- |----------|----------|------------|
198
- | Service NOT yet published | **In-place** — modify the current draft directly | `onchain_operations` (modify) |
199
- | Service IS published | **New version** — build v2 objects and publish as a separate Service; v1 keeps running | `onchain_operations` (create + publish) |
200
-
201
- ### New-Version Workflow
202
-
203
- Published objects are IMMUTABLE on-chain — there is no in-place structural change and no version-fork tool. When the service is already published and the user wants structural changes, build the new version's objects with `onchain_operations`: reuse v1 objects by address where unchanged (Permission, Guards, Treasury, Contact…) and create new objects only for the changed parts (e.g. a new Machine). Then publish v2 as its own Service — v1 continues running uninterrupted as a separate, still-live Service.
204
-
205
- Before building v2, verify necessity via `query_toolkit` query_type='service_panorama' — a published Service confirms a new version is required (published objects are immutable).
206
-
207
- ### When to Recommend a New Version
208
-
209
- - User says "I want to change my workflow" → check if published → recommend a new version
210
- - User says "I want to add a new product line" → if same Machine can handle it, in-place modify Service.sales; if it needs a new Machine, a new version
211
- - User says "I want to change fund distribution" → if Service not published, in-place; if published, a new version (allocators are frozen after publish)
118
+ Before deciding, confirm published state via `service_panorama`.
212
119
 
213
120
  ---
214
121
 
215
- ## Order Fulfillment
122
+ ## Operating live orders
216
123
 
217
- | Object | Purpose | Operation |
218
- |--------|---------|-----------|
219
- | Order | Fund escrow | Read-only |
220
- | **Progress** | Workflow state | **Operate this** — `hold: true` (lock) → work → `hold: false` (submit) |
221
-
222
- **⚠ Progress Routing Rule** (critical): served by MCP `schema_query` action='get_safety_rules' (operation classification). Summary: empty `namedOperator` (`""`) → `order.progress`; non-empty role name or `permissionIndex` → `progress.operate`. Wrong path → "Permission denied" (abort code 5).
223
-
224
- **AI Reminder**: When fulfilling, check `customer_required` fields. Missing → prompt via Messenger.
225
-
226
- **Demand/service matching** (`evaluation_operation`): `demand_match` ranks candidate services for a demand capability vector; `service_match` is the reverse; `capability_gap` lists unmet requirements; `compose_service` combines services to cover a demand. Read-only — the merchant decides whether to `present` (`onchain_operations` → `demand` → `present` with `recommend`/`by_guard`/`service`).
227
-
228
- ---
124
+ - Progress work item is the **Progress** object: canonical forward ops are `next` (advance; default), `hold` (block), `unhold` (release own hold), `adminUnhold` (force, permission 224). Execute exactly what radar `recommended_call` returns; no call suggested = not yours to execute.
125
+ - Check `customer_required` before fulfillment: missing info must arrive via encrypted Messenger to the Contact, with the Contact/WTS proof recorded as `order_required_info`.
126
+ - Demand-side business: `evaluation_operation` `demand_match` (demand→services), `service_match` (service→demands), `capability_gap`, `compose_service` are read-only; the supplier presents via `demand.present` (see wowok-supplier).
@@ -2,7 +2,7 @@
2
2
  name: wowok-supplier
3
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
4
  metadata:
5
- version: "2.0.0"
5
+ version: "2.1.0"
6
6
  role: supplier
7
7
  related: "wowok-provider, wowok-machine, wowok-messenger"
8
8
  ---
@@ -14,116 +14,91 @@ metadata:
14
14
 
15
15
  ---
16
16
 
17
- ## MCP Knowledge Layer
17
+ ## What the MCP already does for you
18
18
 
19
- The following content has been pushed down to the MCP knowledge layer and is applied automatically — this Skill does NOT duplicate it:
19
+ Do not re-derive any of this — consume the tool output:
20
20
 
21
- | Content | Access via (MCP action) | Applied Via |
22
- |---------|--------------------------|-------------|
23
- | Demand semantics (open vs guarded, present paths) | `schema_query` action='get' (demand object schema, or on-demand knowledge) | `onchain_operations` demand |
24
- | Supplier interest analysis (fund_flow / responsibility / leverage / stakes) | `query_toolkit` query_type='participation_radar' | role derivation → `supplier-interest` |
25
- | Demand/service matching | `evaluation_operation` action='demand_match' | read-only ranking |
26
- | Safety rules (immutability, object reuse, confirmation) | `schema_query` action='get_safety_rules' | `goal_operation` action='aggregate_risks' + pre-publish |
21
+ - **Discovery → present-path bridge**: `evaluation_operation` action=`demand_present` enumerates Demands, matches THIS service, and returns each match with a `next` block — `operation` (`demand.present_service` vs `demand.present_service_with_passport`), `preconditions` checklist, and rationale. Read-only; the write still needs user consent.
22
+ - **Ad-hoc ranking**: `demand_match` (one Demand vs candidate Services), `service_match` (one Service vs candidate Demands), `service_risk`. All accept an optional `presenter_history` (see reputation below).
23
+ - **Execution routing**: `query_toolkit` query_type=`participation_radar` returns `operable[].recommended_call` (tool/path/reason) for every forward the account can execute. Never hand-pick `order.progress` vs `progress.operate` yourself — no `recommended_call` means the forward is not yours to execute.
24
+ - **Own-interest analysis**: the radar derives role `supplier` and attaches `supplier-interest` (fund_flow / responsibility / leverage / stakes). Present it neutrally; the supplier decides.
27
25
 
28
- This Skill keeps the supplier **conversation flow** — discover → present → fulfill → collect. The MCP layer handles rules, matching, and own-interest surfacing.
26
+ The skill keeps only the **conversation flow**: discover → present → fulfill → collect.
29
27
 
30
28
  ---
31
29
 
32
30
  ## Role: the two-sided supplier
33
31
 
34
- The supplier is a **peer** (not weak like the customer, not strong like the merchant). Its position is two-sided:
32
+ The supplier is a **peer**. Its position is two-sided:
35
33
 
36
- 1. **DELIVER** — fulfill the sub-order deliverable to unlock settlement.
37
- 2. **COLLECT** — collect the settlement share from the upstream merchant.
34
+ 1. **DELIVER** — fulfill the sub-order to unlock settlement.
35
+ 2. **COLLECT** — collect the share from the upstream merchant.
38
36
 
39
- Your payment is a two-hop waterfall: main order escrow → allocation → your sub-order. You must protect BOTH sides — a delivery you can't prove is unpaid work; an upstream stall you don't chase is a lost claim.
37
+ Payment is a two-hop waterfall: main order escrow → allocation → your sub-order. A delivery you cannot prove is unpaid work; an upstream stall you do not chase is a lost claim. Protect both sides.
40
38
 
41
39
  ---
42
40
 
43
- ## Core Interaction Principles
41
+ ## Interaction principles
44
42
 
45
- 1. **Review-first**: State (a) what the AI understood, (b) the decision order, and (c) the interaction contract — before the first choice.
46
- 2. **User-driven**: Every step is an explicit user decision; the AI provides a `recommend` but never auto-advances.
47
- 3. **Reuse / Customize / Discover (choose one of three)**: For every component (service, passport, guard), surface reuse / customize / discover.
48
- 4. **Default-config disclosure**: Disclose defaults + caveats BEFORE the user decides.
43
+ 1. **Review-first**: state what you understood, the decision order, and the interaction contract before the first choice.
44
+ 2. **User-driven**: every write is an explicit user decision; you recommend, never auto-advance.
45
+ 3. **Default disclosure**: disclose defaults and caveats BEFORE the user decides. Default network is **testnet** — confirm mainnet explicitly.
49
46
 
50
47
  ---
51
48
 
52
- ## ⚠️ PRE-FLIGHT: Before Presenting to a Demand
49
+ ## Pre-flight: before presenting
53
50
 
54
- Before ANY presentation, confirm with the user. **Do NOT fabricate, do NOT auto-present.**
51
+ Confirm with the user; never fabricate or auto-present:
55
52
 
56
- | # | Item | User Must Provide | Why Not Fabricate |
57
- |---|------|-------------------|--------------------|
58
- | **S1** | **Account** | Which account operates. Default `""`. | Safe default exists |
59
- | **S2** | **Target Demand** | Which Demand to present to (name/address). | You don't know which RFP they're answering |
60
- | **S3** | **Service to present** | Which Service represents their offering. | It's their brand/offering identity |
61
- | **S4** | **Passport (if gated)** | A valid Passport passing the Demand's guards. | Guards filter presentations; wrong passport = rejection |
53
+ | # | Item | Notes |
54
+ |---|------|-------|
55
+ | S1 | Account | `env.account`, default `""` (SDK default account). |
56
+ | S2 | Target Demand | Which Demand (name/address) the presentation answers. |
57
+ | S3 | Service to present | Which published, non-paused Service represents the offering (`present.service`). |
58
+ | S4 | Guard path | If the Demand binds guards, `present.by_guard` selects which Guard's verification to pass through — the sender needs a Passport that satisfies it. The `demand_present` `next.preconditions` list states exactly this. |
62
59
 
63
- > ⛔ GATE: S1-S4 confirmed before calling `present` (with `by_guard` for guarded demands). Not confirmed → STOP and ask.
60
+ Not confirmed → STOP and ask.
64
61
 
65
62
  ---
66
63
 
67
- ## Phase 1: Discover & Present
64
+ ## Phase 1 — Discover & present
68
65
 
69
- **Discover** — `query_toolkit` / `onchain_objects` to list open Demands. A Demand is a user's service request with optional reward; presenters submit proposals.
66
+ 1. **Discover+match in one read-only call**: `evaluation_operation` action=`demand_present` with the service capability vector (plus optional location filter). Each item in `matches` carries the ranking `result` and the `next` present-path block.
67
+ 2. **Present (WRITE)** via `onchain_operations` operation_type=`demand`, `data: { object: <Demand>, present: { recommend, service?, by_guard? } }`:
68
+ - Unguarded Demand: plain `present` (`recommend` required).
69
+ - Guarded Demand: add `by_guard` (Guard ID/name from the Demand's guard list); verification runs at present time.
70
+ 3. The Demand's `presenters` table records the submission keyed by sender (recommend / service / update_time). The owner later gives feedback and selects; selection forms the Order on the chosen Service (`service.order_new`, issued by the Demand side — not by you).
70
71
 
71
- **Match** — `evaluation_operation` action='demand_match' ranks whether your service fits the Demand's capability vector. Read-only; you decide whether to present.
72
+ Match honestly: presenting to every Demand dilutes reputation — present only where you genuinely fit.
72
73
 
73
- **Present** — `onchain_operations` operation_type='demand':
74
- - Open Demand → `present`.
75
- - Guarded Demand → `present` with `by_guard` (a Passport that passes one of the Demand's guards).
74
+ ## Reputation: acceptance-score backflow
76
75
 
77
- > The Demand's `presenters` table records your submission (recommend / service / acceptance_score). The creator may give `feedback` + an `acceptance_score` — that is the selection signal.
76
+ The Demand owner's feedback scores your presentation. Feed it into future evaluations as `presenter_history` (entries `{demand_id?, acceptance_score, feedback_time?}`, collected per party):
78
77
 
79
- **Your acceptance history (reputation backflow)**: evaluations accept a `presenter_history` input (`evaluation_operation` demand_match / service_match / service_risk) — aggregate it yourself from on-chain sources, per party:
78
+ - Standalone `onchain_events` tool, type=`DemandFeedbackEvent` (carries `demand`, optional `service`, `feedback`, `acceptance_score`) — filter client-side by your presented Service. `DemandPresentEvent` is the presentation event; `DemandChangedEvent` signals reward changes.
79
+ - Or `query_toolkit` query_type=`onchain_table_item_demand_presenter` per Demand — the presenter row carries `acceptance_score` (null = not yet rated).
80
80
 
81
- 1. `onchain_events` type='DemandFeedbackEvent' → filter by your presented Service (`service` param) → each event yields `{ demand_id: object, acceptance_score }`.
82
- 2. Or `query_toolkit` query_type='onchain_table_item_demand_presenter' per Demand you presented to → the presenter row carries `acceptance_score` (null = not yet rated).
81
+ ## Phase 2 — Fulfill the sub-order
83
82
 
84
- High cumulative scores strengthen future matching; skipping feedback as a demand owner damages YOUR acceptance_score reputation.
83
+ If selected, a sub-order (Order + Progress) reaches you. For every advance:
85
84
 
86
- ---
87
-
88
- ## Phase 2: Fulfill the Sub-order
89
-
90
- If selected, you receive a sub-order. Fulfill it via Progress (same routing rule as the provider):
91
-
92
- - Empty `namedOperator` (`""`) → `order.progress`
93
- - Non-empty role name or `permissionIndex` → `progress.operate`
94
- - Guard-gated forwards need `b_submission` (evidence) entries.
95
-
96
- Upload delivery evidence (Repository/proof) BEFORE advancing — it protects your payment claim and pre-builds your arbitration defense.
97
-
98
- ---
85
+ 1. Run `participation_radar` with `radar_account` and `radar_targets: [{ progress: <sub-order Progress>, order: <sub-order Order, recommended> }]`.
86
+ 2. Execute exactly the `recommended_call` attached to an operable forward; if none is returned, the forward is not yours — say so, do not attempt a call.
87
+ 3. When the call asks for guard evidence (submission prompts), supply the evidence the call requests — upload delivery proof (Repository/WTS) BEFORE advancing. It protects the payment claim and pre-builds the arbitration defense.
99
88
 
100
- ## Phase 3: Collect Settlement
89
+ ## Phase 3 — Collect settlement
101
90
 
102
- Your settlement is released through the allocation waterfall when the sub-order completes. It is NOT automatic — verify your share arrived (query your sub-order's Allocation/Treasury).
91
+ Settlement is released through the allocation waterfall when the sub-order completes — it is not enough to assume it arrived:
103
92
 
104
- If the upstream merchant stalls or withholds, escalate in order:
105
- 1. Messenger nudge (WTS evidence).
106
- 2. Arbitration (if the upstream Service binds one).
107
- 3. On-chain reputation — the loss is permanent and public.
93
+ 1. Verify your share reached your address (query the sub-order's Allocation/Treasury; the supplier-interest `fund_flow` block tells you what to check).
94
+ 2. If the upstream merchant stalls: Messenger nudge (WTS-recorded) → arbitration if the upstream Service binds one → on-chain reputation (permanent, public).
95
+ 3. Know the recourse before you start: the upstream `compensation_fund` is the indemnity source; an empty fund leaves only the refund path + reputation.
108
96
 
109
97
  ---
110
98
 
111
- ## Own-Interest Surfacing
112
-
113
- Run `query_toolkit` query_type='participation_radar' with `radar_account` (your account) and `radar_targets: [{ progress: <sub-order Progress>, order: <sub-order, optional but recommended> }]`. The MCP derives your role (supplier) and attaches `supplier-interest` (fund_flow / responsibility / leverage / stakes). Present it as neutral information — the supplier decides.
114
-
115
- ---
116
-
117
- ## Design Principles
118
-
119
- - **Prove before you advance**: evidence first, then execute.
120
- - **Protect both sides**: deliver AND collect — neglect either and you lose.
121
- - **Match honestly**: presenting to every Demand dilutes your reputation; present only where you genuinely fit.
122
- - **Neutrality**: the AI surfaces trade-offs, never chooses the branch for you.
123
-
124
- ## Quick Reference
99
+ ## Quick rules
125
100
 
126
- - Open Demand → `present`; Guarded Demand → `present` with `by_guard`.
127
- - Guarded Demand accepts only Passports that pass its guards.
128
- - Settlement is two-hop (main order → allocation → sub-order) — verify the second hop too.
129
- - Upstream compensation_fund is your recourse for unpaid work; empty fund = refund + reputation only.
101
+ - Prefer `demand_present` (read-only, gives the present path) over manually discovering then guessing the write shape.
102
+ - One present schema: guarded Demands differ only by `by_guard`; never invent a second operation.
103
+ - Execute from radar `recommended_call`; evidence first, advance second.
104
+ - Two-hop money: deliver AND verify the second hop (allocation → you).