@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.
- package/README.md +18 -7
- package/dist/installer.d.ts +4 -3
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +61 -13
- package/dist/installer.js.map +1 -1
- package/dist/targets.d.ts +34 -9
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +135 -21
- package/dist/targets.js.map +1 -1
- package/package.json +2 -2
- package/wowok-arbitrator/SKILL.md +60 -189
- package/wowok-auditor/SKILL.md +3 -3
- package/wowok-collaborator/SKILL.md +33 -73
- package/wowok-governance/SKILL.md +32 -71
- package/wowok-machine/SKILL.md +64 -206
- package/wowok-market/SKILL.md +25 -62
- package/wowok-messenger/SKILL.md +50 -172
- package/wowok-onboard/SKILL.md +50 -124
- package/wowok-order/SKILL.md +93 -211
- package/wowok-output/SKILL.md +59 -168
- package/wowok-planner/SKILL.md +26 -74
- package/wowok-provider/SKILL.md +66 -168
- package/wowok-supplier/SKILL.md +51 -76
package/wowok-provider/SKILL.md
CHANGED
|
@@ -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.
|
|
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
|
|
17
|
+
## What the MCP already enforces
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Do not re-derive these — the server applies them and returns findings/prompts:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
##
|
|
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**:
|
|
38
|
-
2. **User-driven**:
|
|
39
|
-
3. **Reuse /
|
|
40
|
-
4. **Default
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
|
69
|
-
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
59
|
+
## Build lifecycle
|
|
98
60
|
|
|
99
|
-
|
|
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
|
-
|
|
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
|
-
|
|
73
|
+
### Lock levels after publish
|
|
104
74
|
|
|
105
|
-
**
|
|
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
|
-
|
|
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
|
|
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
|
-
###
|
|
85
|
+
### Allocation: trigger + claim (two distinct steps)
|
|
161
86
|
|
|
162
|
-
|
|
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
|
-
|
|
166
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
96
|
+
### WIP files
|
|
174
97
|
|
|
175
|
-
-
|
|
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
|
-
###
|
|
100
|
+
### Compensation fund
|
|
179
101
|
|
|
180
|
-
|
|
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
|
-
-
|
|
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
|
-
|
|
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
|
-
##
|
|
110
|
+
## Iteration: in-place vs new version
|
|
191
111
|
|
|
192
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
122
|
+
## Operating live orders
|
|
216
123
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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).
|
package/wowok-supplier/SKILL.md
CHANGED
|
@@ -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.
|
|
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
|
|
17
|
+
## What the MCP already does for you
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Do not re-derive any of this — consume the tool output:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
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
|
|
32
|
+
The supplier is a **peer**. Its position is two-sided:
|
|
35
33
|
|
|
36
|
-
1. **DELIVER** — fulfill the sub-order
|
|
37
|
-
2. **COLLECT** — collect the
|
|
34
|
+
1. **DELIVER** — fulfill the sub-order to unlock settlement.
|
|
35
|
+
2. **COLLECT** — collect the share from the upstream merchant.
|
|
38
36
|
|
|
39
|
-
|
|
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
|
-
##
|
|
41
|
+
## Interaction principles
|
|
44
42
|
|
|
45
|
-
1. **Review-first**:
|
|
46
|
-
2. **User-driven**:
|
|
47
|
-
3. **
|
|
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
|
-
##
|
|
49
|
+
## Pre-flight: before presenting
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
Confirm with the user; never fabricate or auto-present:
|
|
55
52
|
|
|
56
|
-
| # | Item |
|
|
57
|
-
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
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
|
-
|
|
60
|
+
Not confirmed → STOP and ask.
|
|
64
61
|
|
|
65
62
|
---
|
|
66
63
|
|
|
67
|
-
## Phase 1
|
|
64
|
+
## Phase 1 — Discover & present
|
|
68
65
|
|
|
69
|
-
**Discover
|
|
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
|
-
|
|
72
|
+
Match honestly: presenting to every Demand dilutes reputation — present only where you genuinely fit.
|
|
72
73
|
|
|
73
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
83
|
+
If selected, a sub-order (Order + Progress) reaches you. For every advance:
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
|
89
|
+
## Phase 3 — Collect settlement
|
|
101
90
|
|
|
102
|
-
|
|
91
|
+
Settlement is released through the allocation waterfall when the sub-order completes — it is not enough to assume it arrived:
|
|
103
92
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
##
|
|
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
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
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).
|