@wowok/skills 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/skills",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "WoWok AI Skills for Claude and other AI assistants - Helping AI use WoWok MCP tools correctly",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -86,7 +86,7 @@ The onboarding flow is gated by the MCP project-based 5-stage deployment pipelin
86
86
  | R1 | Account | `account_operation.gen` + `faucet` | New or reuse? |
87
87
  | R2 | Industry mode | `project_operation.analyze_intent` (pass `industry`) | Which driving mode? |
88
88
  | R3 | Service | `onchain_operations.service` CREATE | Name, type_parameter, description |
89
- | R4 | Permission | `onchain_operations.permission` CREATE/REUSE | Indexes 1000/1500 (customer uses `namedOperator:""`) |
89
+ | R4 | Permission | `onchain_operations.permission` CREATE/REUSE | Index 1000 = provider/merchant (customer uses `namedOperator:""` = OrderHolder; arbiter is NOT a Permission index — arbiters live in `Arbitration.voting_guard`) |
90
90
  | R5 | Machine | `onchain_operations.machine` CREATE | Nodes, forwards (mode defaults from MCP) |
91
91
  | R6 | Progress | `onchain_operations.progress` CREATE + bind | Mirror Machine nodes |
92
92
  | R7 | Guards | `onchain_operations.guard` CREATE + `gen_passport` test | 5 Guard templates (mode defaults from MCP) |
@@ -74,13 +74,14 @@ The ODG (Object Dependency Graph) is the single output artifact, persisted via `
74
74
  "status": "confirmed",
75
75
  "account": "merchant_v1",
76
76
  "objects": [
77
- { "id": "obj_permission", "type": "permission", "status": "planned", "reversible": true, "dependencies": [], "user_decisions": { "reuse": false, "indexes": { "provider": 1000, "arbiter": 1500 } } },
77
+ { "id": "obj_permission", "type": "permission", "status": "planned", "reversible": true, "dependencies": [], "user_decisions": { "reuse": false, "indexes": { "provider": 1000 } } },
78
78
  { "id": "obj_service", "type": "service", "status": "planned", "reversible": true, "dependencies": ["obj_permission"], "user_decisions": { "name": "...", "publish": "deferred" } },
79
- { "id": "obj_machine", "type": "machine", "status": "planned", "reversible": false, "dependencies": ["obj_permission"], "user_decisions": { "nodes": [...], "forwards": [...], "publish": "deferred" } }
79
+ { "id": "obj_machine", "type": "machine", "status": "planned", "reversible": false, "dependencies": ["obj_permission"], "user_decisions": { "nodes": [...], "forwards": [...], "publish": "deferred" } },
80
+ { "id": "obj_arbitration", "type": "arbitration", "status": "planned", "reversible": true, "dependencies": [], "user_decisions": { "voting_guard_count": 3, "fee_balance": "1000 WOW", "note": "arbiters live in voting_guard, NOT Permission index 1500" } }
80
81
  ],
81
82
  "phases": [
82
83
  { "phase": 1, "objects": ["obj_permission"], "gate": "user_confirm" },
83
- { "phase": 2, "objects": ["obj_service", "obj_machine"], "gate": "risk_check" },
84
+ { "phase": 2, "objects": ["obj_service", "obj_machine", "obj_arbitration"], "gate": "risk_check" },
84
85
  { "phase": 3, "objects": ["obj_guard_*"], "gate": "passport_test" },
85
86
  { "phase": 4, "objects": ["obj_allocator_*"], "gate": "allocation_audit" },
86
87
  { "phase": 5, "objects": ["publish"], "gate": "final_audit" }
@@ -113,29 +113,32 @@ When two modes specify different Permission indexes for the same role, user deci
113
113
 
114
114
  | Mode | Machine Shape | Guards | Allocators | Key Risk |
115
115
  |------|---------------|--------|------------|----------|
116
- | `freelance` | 7 nodes (ordered→...→completed/refunded) | 5 (buy/deliver/accept/withdraw/refund) | 2 (100% provider / 100% refund) | Customer never accepts delivery |
117
- | `rental` | 10 nodes (reserved→...→deposit_refunded/deducted) | 5 (deposit/return/inspect/refund/damage) | 3 (rent / refund / deduct) | Owner claims damage without pre-rental WIP |
116
+ | `freelance` | 7 nodes (ordered→...→completed→{wonder\|no_wonder}) | 5 (buy/deliver/accept/withdraw/rating_window) | 2 (100% provider at completed / 0 at wonder-no_wonder) | Customer never accepts delivery |
117
+ | `rental` | 10 nodes (reserved→...→completed→{wonder\|no_wonder}) | 5 (deposit/return/inspect/damage/rating_window) | 3 (rent at completed / refund-to-order via Allocator / damage deduct) | Owner claims damage without pre-rental WIP |
118
+
119
+ > **Dispute Independence**: `refunded`/`disputed`/`arb` MUST NOT appear as Machine nodes (R-M1-11 critical). Refunds flow through Allocator (100%→OrderHolder) or Arbitration (dispute → ruling → arb_withdraw), both off-Machine. Wonder/no_wonder are post-completion reputation terminals only.
118
120
 
119
121
  ### Freelance Audit Checklist (pre-publish BLOCKERS)
120
122
 
121
123
  - `accept_guard` exists + `gen_passport` tested — BLOCKER (no acceptance = funds stuck)
122
- - `refund_guard` + 100% refund Allocator — BLOCKER (no refund = dispute deadlock)
123
- - Machine has terminal nodes for both `completed` and `refunded` — BLOCKER (dead-end = stuck funds)
124
+ - 100% refund Allocator (sharing.who=OrderHolder) — BLOCKER (no refund path = dispute deadlock)
125
+ - Machine MUST NOT contain `refunded`/`disputed`/`arb` nodes (R-M1-11 critical) — BLOCKER. Refund flows through Allocator or Arbitration, both off-Machine
124
126
  - `withdraw_guard` only triggers at `Progress.current=completed` — BLOCKER (prevents premature payout)
125
127
  - `deliver_guard` validates WIP hash — recommended
128
+ - Optional: wonder/no_wonder terminals after `completed` for post-purchase rating (enables Reward wonder_praise template)
126
129
 
127
130
  ### Freelance Failure Playbooks
128
131
 
129
132
  - Customer never accepts: `accept_guard` includes timeout auto-accept forward (threshold met by `namedOperator:""` after N days)
130
133
  - Wrong deliverable hash: `deliver_guard` enforces WIP match → re-generate WIP, re-submit via `progress.hold:false`
131
- - No arbiter assigned: Permission must include `permissionIndex:1500`, bind Arbitration via `service.arbitrations.list` before publish
134
+ - No arbiter assigned: bind Arbitration via `service.arbitrations` AND configure `Arbitration.voting_guard` (NOT Permission index 1500 — arbiters live in voting_guard, never in Permission)
132
135
 
133
136
  ### Rental Audit Checklist (pre-publish BLOCKERS)
134
137
 
135
138
  - `deposit_guard` validates `Order.balance ≥ deposit_amount` — BLOCKER (renter runs off with item)
136
- - `refund_guard` + 100% refund Allocator — BLOCKER (no refund = deposit theft)
139
+ - 100% refund Allocator (sharing.who=OrderHolder) — BLOCKER (no refund = deposit theft)
137
140
  - `damage_guard` requires pre+post WIP hash diff — BLOCKER (no evidence = arbitrary deduction)
138
- - Machine has both `deposit_refunded` and `deposit_deducted` terminals — BLOCKER
141
+ - Machine MUST NOT contain `deposit_refunded`/`deposit_deducted`/`refunded` nodes (R-M1-11 critical) — BLOCKER. Deposit refund/deduction flows through Allocator, not Machine terminals
139
142
  - Pre-rental WIP generated + hash stored — BLOCKER (can't prove damage without pre-hash)
140
143
  - Rental period timeout forward on `in_use` node — recommended
141
144
 
@@ -154,7 +157,7 @@ When two modes specify different Permission indexes for the same role, user deci
154
157
 
155
158
  ### Mode Outline
156
159
 
157
- - **Default Machine**: enroll → pay_tuition → session_1 → session_2 → ... → session_N → completed / refunded
160
+ - **Default Machine**: enroll → pay_tuition → session_1 → session_2 → ... → session_N → completed {wonder | no_wonder}
158
161
  - **Default Guards**: `attendance_guard` (per session, student signs), `refund_guard` (institution approval OR arbiter)
159
162
  - **Default Allocator**: 1/N of tuition released per session attendance; unearned portion refundable on `refund_guard`
160
163
  - **Key trait**: `setting_locked_time` on Service prevents institution from changing rules mid-semester (regulatory compliance)
@@ -168,7 +171,7 @@ When two modes specify different Permission indexes for the same role, user deci
168
171
 
169
172
  ### Mode Outline
170
173
 
171
- - **Default Machine**: order → pay_deposit → pay_final → segment_D1 → segment_D2 → ... → return → completed / refunded
174
+ - **Default Machine**: order → pay_deposit → pay_final → segment_D1 → segment_D2 → ... → return → completed {wonder | no_wonder}
172
175
  - **Default Guards**: `segment_guard` (per-segment arrival WIP, e.g., hotel check-in), `refund_guard` (agency approval OR arbiter for trip interruption)
173
176
  - **Default Allocator**: multi-tier — deposit 20% to agency, final 80% to agency, then agency-side Allocation splits to hotel/guide/driver per segment
174
177
  - **Key trait**: multi-tier Allocation is WoWok's unique advantage over traditional travel platforms