@wowok/skills 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/wowok-machine/SKILL.md
CHANGED
|
@@ -65,9 +65,9 @@ This Skill keeps the **workflow conversation guidance**, **business flow design
|
|
|
65
65
|
| `permissionIndex` | Shared across ALL Progress instances | Internal staff (warehouse, admin, platform) — same for every order |
|
|
66
66
|
| `namedOperator` | Per-Progress namespace | Roles that differ per order (delivery person, reviewer, agent) |
|
|
67
67
|
|
|
68
|
-
- `namedOperator: ""` (empty string): grants **order owner and agents** the right to execute. Standard way to let customers operate.
|
|
69
|
-
- `namedOperator: "<role_name>"`: role-based operators managed per Progress instance. Each Progress independently assigns addresses to role names.
|
|
70
|
-
- **Both fields set**: executor needs EITHER permission — internal staff OR external roles.
|
|
68
|
+
- `namedOperator: ""` (empty string): grants **order owner and agents** the right to execute. Standard way to let customers operate. **⚠ Must be advanced via `order.progress`** (uses `order.has_op_permission`); direct `progress::next` aborts with Permission denied (code 5).
|
|
69
|
+
- `namedOperator: "<role_name>"`: role-based operators managed per Progress instance. Each Progress independently assigns addresses to role names. **Advanced via `progress.operate`** directly.
|
|
70
|
+
- **Both fields set**: executor needs EITHER permission — internal staff OR external roles. **Advanced via `progress.operate`** (the non-empty namedOperator takes precedence for routing).
|
|
71
71
|
- **Design principle**: Use custom permissions (dedicated Permission object with custom indices), not built-in indices. Define workflow-specific roles, reference those indices in Forwards.
|
|
72
72
|
|
|
73
73
|
### Guard on Forwards
|
package/wowok-messenger/SKILL.md
CHANGED
|
@@ -56,14 +56,14 @@ Every conversation between two addresses has a deterministic session. Messages a
|
|
|
56
56
|
Before any communication:
|
|
57
57
|
|
|
58
58
|
1. **Account must exist** → `account_operation` (gen)
|
|
59
|
-
2. **Enable messenger** → `account_operation` (messenger), set
|
|
59
|
+
2. **Enable messenger** → `account_operation` (messenger), set `enabled: true`
|
|
60
60
|
3. **Get your address** → `account_operation` (get) — share this address with your counterparties
|
|
61
61
|
|
|
62
|
-
>
|
|
62
|
+
> Messenger must be enabled for message delivery. Without it, your account has no messenger endpoint and cannot receive messages. Account name is used for messenger identity lookup.
|
|
63
63
|
|
|
64
64
|
### Account Limit
|
|
65
65
|
|
|
66
|
-
A single device supports up to 1000 messenger accounts. Exceeding this returns "Maximum 1000 messenger accounts allowed". Use `account_operation → messenger {
|
|
66
|
+
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.
|
|
67
67
|
|
|
68
68
|
### Contact Object (On-Chain Bridge)
|
|
69
69
|
|
|
@@ -225,7 +225,7 @@ When a dispute requires evidence: (1) `generate_wts` → export messages by time
|
|
|
225
225
|
## Common Pitfalls
|
|
226
226
|
|
|
227
227
|
- **One-message limit trap**: Sending a vague first message to a stranger wastes your only chance. Make the first message complete and actionable.
|
|
228
|
-
- **Disabled messenger**: Without
|
|
228
|
+
- **Disabled messenger**: Without messenger enabled, your account has no endpoint — counterparties cannot find or message you.
|
|
229
229
|
- **WTS range too narrow**: Selecting only favorable messages undermines evidence credibility. Include the full conversation.
|
|
230
230
|
- **Guard list without strategy**: Adding a Guard to your list without testing it (`gen_passport`) means you don't know what conditions strangers must meet — you may be blocking legitimate contacts.
|
|
231
231
|
- **`allowStrangerMessages: false` with no guard list and no friends**: Nobody can contact you. Always ensure at least one inbound path exists.
|
package/wowok-order/SKILL.md
CHANGED
|
@@ -79,12 +79,14 @@ Use `wip_file` → `op: "verify"`, `wipFilePath: "<wip_url>"`, `hash_equal: "<wi
|
|
|
79
79
|
|
|
80
80
|
**Step 3: Classify every forward**:
|
|
81
81
|
|
|
82
|
-
| `namedOperator` | `guard` | User Can Execute? |
|
|
83
|
-
|
|
84
|
-
| `Some("")` | `None` | ✅ Independently
|
|
85
|
-
| `Some("")` | `Some({...})` | ⚠️ Need Guard passport — **no bypass** |
|
|
86
|
-
| `None` | Any | ❌ Provider/permission-holder only |
|
|
87
|
-
| `Some("<other>")` | Any | ❌ Named operator required |
|
|
82
|
+
| `namedOperator` | `guard` | User Can Execute? | Operation Path |
|
|
83
|
+
|-----------------|---------|-------------------|----------------|
|
|
84
|
+
| `Some("")` | `None` | ✅ Independently | **`order.progress`** (uses `order.has_op_permission`) |
|
|
85
|
+
| `Some("")` | `Some({...})` | ⚠️ Need Guard passport — **no bypass** | **`order.progress`** + Passport |
|
|
86
|
+
| `None` | Any | ❌ Provider/permission-holder only | `progress.operate` (provider path) |
|
|
87
|
+
| `Some("<other>")` | Any | ❌ Named operator required | `progress.operate` (named operator path) |
|
|
88
|
+
|
|
89
|
+
> **⚠ CRITICAL ROUTING RULE**: When `namedOperator=""` (empty string = OrderHolder), you MUST use `order.progress` (NOT `progress.operate`). Direct `progress::next` will abort with "Permission denied" (code 5) because the Progress-level permission check does not recognize the OrderHolder short-circuit. The empty-string `namedOperator` is set automatically by `service::buy` when an Order is created — the customer (order.builder) becomes the operator for the `""` namespace. In ALL other cases (non-empty `namedOperator` or `permissionIndex`-only), use `progress.operate` on the Progress object directly.
|
|
88
90
|
|
|
89
91
|
**Step 4: Detect paths**:
|
|
90
92
|
- Terminal nodes (no outgoing forwards) → order ends
|
package/wowok-provider/SKILL.md
CHANGED
|
@@ -311,6 +311,16 @@ Before forking, verify necessity via `get_project_detail` → `has_published_obj
|
|
|
311
311
|
| Order | Fund escrow | Read-only |
|
|
312
312
|
| **Progress** | Workflow state | **Operate this** — `hold: true` (lock) → work → `hold: false` (submit) |
|
|
313
313
|
|
|
314
|
+
**⚠ Progress Routing Rule** (critical):
|
|
315
|
+
|
|
316
|
+
| Forward `namedOperator` | Required Operation | Why |
|
|
317
|
+
|------------------------|--------------------|-----|
|
|
318
|
+
| `""` (empty = OrderHolder) | `order.progress` | Uses `order.has_op_permission` — order owner/agents authorized |
|
|
319
|
+
| `"<role_name>"` (non-empty) | `progress.operate` | Uses Progress named_operator namespace |
|
|
320
|
+
| `None` + `permissionIndex` | `progress.operate` | Uses Permission object entity table |
|
|
321
|
+
|
|
322
|
+
Wrong path → "Permission denied" (Move abort code 5). The empty-string `namedOperator` is set automatically by `service::buy` — the customer becomes the operator. Providers who need to act on a forward should either use a non-empty `namedOperator` (and `progress.operate`) or use `permissionIndex` (requiring a custom permission grant in the Service's Permission object).
|
|
323
|
+
|
|
314
324
|
**AI Reminder**: When fulfilling, check `customer_required` fields. Missing → prompt via Messenger.
|
|
315
325
|
|
|
316
326
|
---
|
package/wowok-safety/SKILL.md
CHANGED
|
@@ -118,16 +118,19 @@ When users request complex systems without naming, propose this scheme:
|
|
|
118
118
|
|
|
119
119
|
### 4.1 `replaceExistName` Flag
|
|
120
120
|
|
|
121
|
-
Controls name collision behavior
|
|
121
|
+
Controls name collision behavior. **DISCOURAGED** — prefer versioned names (`_v1`, `_v2`).
|
|
122
122
|
|
|
123
123
|
| Value | Effect |
|
|
124
124
|
|-------|--------|
|
|
125
125
|
| `false` (default) | Throws error if name is in use — safe default |
|
|
126
|
-
| `true` |
|
|
126
|
+
| `true` | Existing object/account with the same name is **suspended** (deactivated) to free the name |
|
|
127
127
|
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
128
|
+
**Account-specific rules** (stricter than on-chain objects):
|
|
129
|
+
- `replaceExistName: true` on the **default account** (`name=''` or omitted) is **FORBIDDEN** — throws error. The default account is unique and cannot be suspended by replacement; use `suspend()` explicitly if needed.
|
|
130
|
+
- On non-default account names, `replaceExistName: true` **suspends** the old account (moves to Suspended tab, clears name + messenger). The old account can be reactivated via `resume(address, new_name)`.
|
|
131
|
+
- This prevents the "orphan unnamed account" bug where old accounts leaked into the Active list without a name.
|
|
132
|
+
|
|
133
|
+
**On-chain objects** (NamedObjectSchema): `replaceExistName: true` steals the name; the old object becomes unnamed (address-only reference). Prefer versioned names for production.
|
|
131
134
|
|
|
132
135
|
---
|
|
133
136
|
|
package/wowok-tools/SKILL.md
CHANGED
|
@@ -152,11 +152,11 @@ Step 3: MODIFY reward { object: "reward_v1", guard_add: [...] } // bind guard
|
|
|
152
152
|
|-----------------|----------------------------------|
|
|
153
153
|
| `service` | `machine` must be **published**. Allocators: array order = priority (first-Guard-wins). Publish locks `machine`/`order_allocators`; `sales`/`discount`/`description` stay mutable. |
|
|
154
154
|
| `machine` | Nodes immutable after publish. Forward needs ≥1 of `namedOperator`/`permissionIndex` (both empty = SDK error). `""` = entry node. → [wowok-machine](../wowok-machine/SKILL.md) |
|
|
155
|
-
| `progress` | Two-phase: `hold:true` (lock) → `hold:false` (submit). `adminUnhold:true` force-releases. SDK auto-fetches Machine when resolving `object_address`. |
|
|
155
|
+
| `progress` | Two-phase: `hold:true` (lock) → `hold:false` (submit). `adminUnhold:true` force-releases. SDK auto-fetches Machine when resolving `object_address`. **⚠ Routing rule**: Use `progress.operate` ONLY for forwards with non-empty `namedOperator` or `permissionIndex`-only. For forwards with `namedOperator=""` (OrderHolder), use `order.progress` instead — direct `progress::next` aborts with Permission denied (code 5). |
|
|
156
156
|
| `arbitration` | MAX 20 propositions, 520 voters. Verdict (2→3) **irreversible** — only customer can `order.arb_objection`. Non-Finished withdrawal = 30-day wait. → [wowok-arbitrator](../wowok-arbitrator/SKILL.md) |
|
|
157
157
|
| `guard` | `root.type:"node"` (inline) or `"file"` (JSON/MD). MAX 4 `rely`. `rep:false` Guards excluded from others' `rely`. System addresses `0xaab`/`0xaaa` need table entries. → [wowok-guard](../wowok-guard/SKILL.md) |
|
|
158
158
|
| `gen_passport` | MAX 20 Guards/call (AND-ed). Omit `info` to auto-fetch. Passport = frozen immutable credential. |
|
|
159
|
-
| `order` | Agents can operate but **cannot withdraw** — only builder. `order.progress`+Guard requires Passport. Arb via `order.arb_confirm`/`arb_objection` (not `arbitration` directly). `arb_claim_compensation` once-only. → [wowok-order](../wowok-order/SKILL.md) |
|
|
159
|
+
| `order` | Agents can operate but **cannot withdraw** — only builder. `order.progress`+Guard requires Passport. **⚠ Routing rule**: `order.progress` works ONLY for forwards with `namedOperator=""` (OrderHolder) — uses `order.has_op_permission`. For non-empty `namedOperator` or `permissionIndex`-only forwards, use `progress.operate` on the Progress object directly. Arb via `order.arb_confirm`/`arb_objection` (not `arbitration` directly). `arb_claim_compensation` once-only. → [wowok-order](../wowok-order/SKILL.md) |
|
|
160
160
|
| `payment` | `type_parameter` required. **Irreversible** — no refund. |
|
|
161
161
|
| `personal` | **Permanently public** — warn users before writing sensitive data. |
|
|
162
162
|
| `demand` | Guard-gated: `guards` filter presenters. Separate from Service. |
|
|
@@ -177,7 +177,7 @@ Step 3: MODIFY reward { object: "reward_v1", guard_add: [...] } // bind guard
|
|
|
177
177
|
|------|----------------|
|
|
178
178
|
| `query_toolkit` | `token_list` cached (first query populates). `account_balance`: `balance=true` for totals, `coin={cursor,limit}` for paginated. `onchain_objects` batches 50/req. `local_names` resolves accounts + marks. |
|
|
179
179
|
| `onchain_table_data` | 12 types. Global (no `parent`): `entity_registrar`, `entity_linker`. `onchain_table_item_generic` = universal fallback. |
|
|
180
|
-
| `account_operation` | `faucet` testnet/localnet only. Mainnet funding: `transfer` from existing account (1 WOW = 10^9 base units). `gen` with `
|
|
180
|
+
| `account_operation` | `faucet` testnet/localnet only. Mainnet funding: `transfer` from existing account (1 WOW = 10^9 base units). `gen` with `messenger: true` enables Messenger. **Naming convention**: `<role>-<number>` (e.g. `shop-001`, `user-001`, `arb-001`) for easy filtering. `gen.replaceExistName:true` is DISCOURAGED — suspends old account; FORBIDDEN on default account (name=''). Private keys never leave device. |
|
|
181
181
|
| `local_mark_operation` | Max 50 tags/entry (64 chars). `replaceExistName:true` steals names — prefer `_v1`/`_v2`. |
|
|
182
182
|
| `local_info_operation` | Max 50 contents/entry, 300 chars each. |
|
|
183
183
|
| `messenger_operation` | Stranger: 1 msg before reply (~480 chars). Guard block → rejection includes guard list; sender needs Passport. WTS: `generate` needs continuous sequences. → [wowok-messenger](../wowok-messenger/SKILL.md) |
|