@wowok/skills 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +16 -20
  2. package/dist/cli.js +114 -19
  3. package/dist/cli.js.map +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +11 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/skills.d.ts +46 -1
  9. package/dist/skills.d.ts.map +1 -1
  10. package/dist/skills.js +154 -16
  11. package/dist/skills.js.map +1 -1
  12. package/dist/types.d.ts +31 -0
  13. package/dist/types.d.ts.map +1 -1
  14. package/package.json +3 -4
  15. package/scripts/install.js +5 -3
  16. package/wowok-arbitrator/SKILL.md +279 -0
  17. package/wowok-guard/SKILL.md +143 -167
  18. package/wowok-machine/SKILL.md +167 -279
  19. package/wowok-order/SKILL.md +281 -429
  20. package/wowok-provider/SKILL.md +453 -0
  21. package/wowok-safety/SKILL.md +42 -20
  22. package/wowok-tools/SKILL.md +328 -343
  23. package/schemas/onchain_operations/_common.md +0 -406
  24. package/schemas/onchain_operations/_index.md +0 -196
  25. package/schemas/onchain_operations/allocation.md +0 -28
  26. package/schemas/onchain_operations/arbitration.md +0 -106
  27. package/schemas/onchain_operations/contact.md +0 -40
  28. package/schemas/onchain_operations/demand.md +0 -53
  29. package/schemas/onchain_operations/gen_passport.md +0 -23
  30. package/schemas/onchain_operations/guard.md +0 -56
  31. package/schemas/onchain_operations/machine.md +0 -89
  32. package/schemas/onchain_operations/order.md +0 -56
  33. package/schemas/onchain_operations/payment.md +0 -24
  34. package/schemas/onchain_operations/permission.md +0 -68
  35. package/schemas/onchain_operations/personal.md +0 -58
  36. package/schemas/onchain_operations/progress.md +0 -38
  37. package/schemas/onchain_operations/repository.md +0 -70
  38. package/schemas/onchain_operations/reward.md +0 -38
  39. package/schemas/onchain_operations/service.md +0 -78
  40. package/schemas/onchain_operations/treasury.md +0 -68
  41. package/schemas/schema-account_operation.md +0 -402
  42. package/schemas/schema-guard2file.md +0 -153
  43. package/schemas/schema-local_info_operation.md +0 -160
  44. package/schemas/schema-local_mark_operation.md +0 -148
  45. package/schemas/schema-machineNode2file.md +0 -155
  46. package/schemas/schema-messenger_operation.md +0 -547
  47. package/schemas/schema-onchain_events.md +0 -201
  48. package/schemas/schema-onchain_table_data.md +0 -334
  49. package/schemas/schema-query_toolkit.md +0 -395
  50. package/schemas/schema-wip_file.md +0 -240
  51. package/schemas/schema-wowok_buildin_info.md +0 -296
  52. package/wowok-build/SKILL.md +0 -139
@@ -27,6 +27,27 @@ always: true
27
27
 
28
28
  # WoWok MCP Tool Usage Reference
29
29
 
30
+ ## Quick Template (Copy This)
31
+
32
+ When calling `onchain_operations`, always use this structure:
33
+
34
+ ```
35
+ {
36
+ "operation_type": "<select from 16 types below>",
37
+ "data": { /* see specific operation_type for details */ },
38
+ "env": { "account": "", "network": "testnet" },
39
+ "submission": { /* only when Guard requires user submission */ }
40
+ }
41
+ ```
42
+
43
+ **Critical Rules:**
44
+ 1. `operation_type` MUST be one of the 16 types listed below
45
+ 2. `data` structure changes based on `operation_type` — see each operation's details
46
+ 3. `submission` is ONLY needed when Guard validation requires user-provided data
47
+ 4. Most operations return directly; only Guard-triggered flows need a second call with `submission`
48
+
49
+ ---
50
+
30
51
  ## The 13 Tools
31
52
 
32
53
  | # | Tool | Type | Description |
@@ -57,338 +78,244 @@ The `operation_type` field determines WHICH `data` schema applies. Each type has
57
78
 
58
79
  #### service — Service Listing
59
80
 
60
- ```typescript
61
- // operation_type: "service"
62
- data: {
63
- object: TypedPermissionObject; // STRING for existing, OBJECT {name, permission, tags, type_parameter} for new
64
- description?: string;
65
- location?: string;
66
- sales?: {
67
- op: "add" | "set";
68
- sales: { name: string; price: number; stock: number; suspension: boolean; wip: string; wip_hash: string }[];
69
- } | { op: "remove"; sales_name: string[] } | { op: "clear" };
70
- repositories?: ObjectsOp;
71
- rewards?: ObjectsOp;
72
- arbitrations?: ObjectsOp;
73
- machine?: string | null;
74
- discount?: { name: string; discount_type: 0 | 1; discount_value: number; benchmark?: number; time_ms_start?: number; time_ms_end?: number; count?: number; recipient: ManyAccountOrMark_Address; transferable?: boolean };
75
- discount_destroy?: string[];
76
- customer_required?: string[];
77
- order_allocators?: { description: string; threshold: number; allocators: { guard: string; sharing: { who: Recipient; sharing: number; mode: "Amount" | "Rate" | "Surplus" }[]; fix?: number; max?: number }[] } | null;
78
- buy_guard?: string | null;
79
- change_guard?: string | null;
80
- pause?: boolean;
81
- publish?: boolean;
82
- owner_receive?: ReceivedObjectsOrRecently;
83
- um?: string | null;
84
- }
85
- ```
86
-
87
- Key rules:
81
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_service" })`
82
+
83
+ **Key Fields**:
84
+ - `object`: TypedPermissionObject STRING for existing, OBJECT for new
85
+ - `description`: Service description
86
+ - `location`: Service location
87
+ - `sales`: Sales configuration with operations (add/set/remove/clear)
88
+ - `repositories`: Repository objects
89
+ - `rewards`: Reward objects
90
+ - `arbitrations`: Arbitration objects
91
+ - `machine`: Machine object ID or null
92
+ - `discount`: Discount configuration
93
+ - `discount_destroy`: Array of discount names to destroy
94
+ - `customer_required`: Required customer info fields
95
+ - `order_allocators`: Fund distribution rules
96
+ - `buy_guard`: Guard ID for purchase validation
97
+ - `change_guard`: Guard ID for order changes
98
+ - `pause`: Pause service flag
99
+ - `publish`: Publish service flag (LOCKS machine and order_allocators)
100
+ - `owner_receive`: Owner fund extraction
101
+ - `um`: Contact object ID for Messenger
102
+
103
+ **Key Rules**:
88
104
  - `publish: true` LOCKS `machine` reference and `order_allocators` — unchangeable after publish
89
105
  - `rewards` and `arbitrations` can be ADDED after publish, not removed
90
106
  - `sales`, `discount`, `description`, `location` remain mutable after publish
91
107
 
92
108
  #### machine — Workflow Template
93
109
 
94
- ```typescript
95
- // operation_type: "machine"
96
- data: {
97
- object: WithPermissionObject; // STRING for existing, OBJECT for new
98
- progress_new?: ProgressNewSchema;
99
- description?: string;
100
- repository?: ObjectsSchema;
101
- node?: NodeFieldSchema; // { op: "add"|"set"|"remove"|"clear"|"exchange"|"rename", nodes: [...], bReplace?: boolean } OR { json_or_markdown_file: "path" }
102
- pause?: boolean;
103
- publish?: boolean;
104
- owner_receive?: ReceivedObjectsOrRecently;
105
- um?: string | null;
106
- }
107
- ```
110
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_machine" })`
108
111
 
109
- Key rules:
112
+ **Key Fields**:
113
+ - `object`: WithPermissionObject — STRING for existing, OBJECT for new
114
+ - `progress_new`: Progress new schema
115
+ - `description`: Machine description
116
+ - `repository`: Repository objects
117
+ - `node`: Node field schema with operations (add/set/remove/clear/exchange/rename) OR file path
118
+ - `pause`: Pause flag
119
+ - `publish`: Publish flag (makes nodes IMMUTABLE)
120
+ - `owner_receive`: Owner fund extraction
121
+ - `um`: Contact object ID
122
+
123
+ **Key Rules**:
110
124
  - `publish: true` makes node definitions IMMUTABLE
111
- - `node` supports incremental ops (add/set/remove/clear/exchange/rename/remove_prior_node/add_forward/remove_forward) OR complete replacement from file
112
125
  - Machine must be created BEFORE Service references it
113
126
 
114
127
  #### progress — Workflow Advancement
115
128
 
116
- ```typescript
117
- // operation_type: "progress"
118
- data: {
119
- object: NameOrAddress; // Progress object ID
120
- order: NameOrAddress;
121
-
122
- // Advance mode
123
- node?: { name: string; forward: number | string; hold?: boolean };
124
- nodes?: { name: string; forward: number | string; hold?: boolean }[]; // Multi-step advance
125
-
126
- // Admin control
127
- admin_hold?: boolean;
128
- admin_unhold?: boolean;
129
- admin_unhold_node?: number;
130
-
131
- // Acceptance
132
- accept?: boolean;
133
- recipient_accept?: NameOrAddress;
134
-
135
- owner_receive?: ReceivedObjectsOrRecently;
136
- um?: string | null;
137
- }
138
- ```
129
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_progress" })`
130
+
131
+ **Key Fields**:
132
+ - `object`: Progress object ID
133
+ - `order`: Order ID
134
+ - `node`: Single node advancement
135
+ - `nodes`: Multi-step advancement array
136
+ - `admin_hold`: Admin hold flag
137
+ - `admin_unhold`: Admin unhold flag
138
+ - `admin_unhold_node`: Admin unhold node index
139
+ - `accept`: Accept flag
140
+ - `recipient_accept`: Recipient for acceptance
141
+ - `owner_receive`: Owner fund extraction
142
+ - `um`: Contact object ID
139
143
 
140
144
  #### repository — Consensus Data
141
145
 
142
- ```typescript
143
- // operation_type: "repository"
144
- data: {
145
- object: WithPermissionObject;
146
- description?: string;
147
- entity?: string | NameOrAddress | null;
148
-
149
- // Submit records
150
- submit?: { op: "add" | "set" | "remove" | "clear"; records?: { address?: string; record: { timestamp: number; identifier: number; name?: string; description?: string; link?: string; linkPrototype?: string }; sign_buf?: number[]; sign_key_type?: string }[]; names?: string[] };
151
- // Submit & sign records
152
- submit_and_sign?: { op: "add" | "set" | "remove" | ...; records?: { ...; sign_buf?: number[] }[]; names?: string[] };
153
- // Verify records
154
- verify?: { records: { name: string }[]; verify_for_self?: boolean };
155
- // Vote on records
156
- vote?: { op: "add"; records?: { name: string; entity?: string }[] };
157
-
158
- owner_receive?: ReceivedObjectsOrRecently;
159
- um?: string | null;
160
- }
161
- ```
146
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_repository" })`
147
+
148
+ **Key Fields**:
149
+ - `object`: WithPermissionObject
150
+ - `description`: Repository description
151
+ - `entity`: Entity reference
152
+ - `submit`: Submit records operation
153
+ - `submit_and_sign`: Submit and sign records
154
+ - `verify`: Verify records
155
+ - `vote`: Vote on records
156
+ - `owner_receive`: Owner fund extraction
157
+ - `um`: Contact object ID
162
158
 
163
159
  #### arbitration — Dispute Resolution
164
160
 
165
- ```typescript
166
- // operation_type: "arbitration"
167
- data: {
168
- object: WithPermissionObject;
169
- description?: string;
170
- entity?: string | NameOrAddress | null;
161
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_arbitration" })`
171
162
 
172
- // Arbitrators
173
- arbitrators?: { op: "add" | "set" | "remove" | "clear"; accounts?: ManyAccountOrMark_Address[]; accounts_remove?: string[] };
174
-
175
- owner_receive?: ReceivedObjectsOrRecently;
176
- um?: string | null;
177
- }
178
- ```
163
+ **Key Fields**:
164
+ - `object`: WithPermissionObject
165
+ - `description`: Arbitration description
166
+ - `entity`: Entity reference
167
+ - `arbitrators`: Arbitrators configuration
168
+ - `owner_receive`: Owner fund extraction
169
+ - `um`: Contact object ID
179
170
 
180
171
  #### contact — IM Contact Profile
181
172
 
182
- ```typescript
183
- // operation_type: "contact"
184
- data: {
185
- object: WithPermissionObject;
186
- my_status?: string;
187
- description?: string;
188
- location?: string;
189
-
190
- ims?: { op: "add" | "set"; im: { at: string; description?: string }[] }
191
- | { op: "remove"; im: string[] }
192
- | { op: "clear" };
173
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_contact" })`
193
174
 
194
- owner_receive?: ReceivedObjectsOrRecently;
195
- }
196
- ```
175
+ **Key Fields**:
176
+ - `object`: WithPermissionObject
177
+ - `my_status`: Status message
178
+ - `description`: Contact description
179
+ - `location`: Location
180
+ - `ims`: IM addresses with operations (add/set/remove/clear)
181
+ - `owner_receive`: Owner fund extraction
197
182
 
198
183
  #### treasury — Team Fund
199
184
 
200
- ```typescript
201
- // operation_type: "treasury"
202
- data: {
203
- object: TypedPermissionObject;
204
- description?: string;
205
- receive?: ReceivedBalanceOrRecently;
206
-
207
- deposit?: { coin: CoinParam; by_external_deposit_guard?: string; payment_info: { remark?: string; index?: number }; namedNewPayment?: NamedObject };
208
- withdraw?: { amount: { fixed: number } | { by_external_withdraw_guard: string }; recipient: AccountOrMark_Address; payment_info: { remark?: string; index?: number }; namedNewPayment?: NamedObject };
209
-
210
- external_deposit_guard?: { op: "add" | "set"; guards: { guard: string; identifier?: number | null; store_from_id?: number | null }[] }
211
- | { op: "remove"; guards: string[] }
212
- | { op: "clear" };
213
- external_withdraw_guard?: { op: "add" | "set"; guards: { guard: string; identifier?: number | null; store_from_id?: number | null }[] }
214
- | { op: "remove"; guards: string[] }
215
- | { op: "clear" };
216
-
217
- owner_receive?: ReceivedObjectsOrRecently;
218
- um?: string | null;
219
- }
220
- ```
185
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_treasury" })`
186
+
187
+ **Key Fields**:
188
+ - `object`: TypedPermissionObject
189
+ - `description`: Treasury description
190
+ - `receive`: Received balance
191
+ - `deposit`: Deposit configuration
192
+ - `withdraw`: Withdraw configuration
193
+ - `external_deposit_guard`: External deposit guards
194
+ - `external_withdraw_guard`: External withdraw guards
195
+ - `owner_receive`: Owner fund extraction
196
+ - `um`: Contact object ID
221
197
 
222
198
  #### reward — Incentive Pool
223
199
 
224
- ```typescript
225
- // operation_type: "reward"
226
- data: {
227
- object: TypedPermissionObject;
228
- claim?: string; // Guard ID verify and trigger reward
229
- description?: string;
230
- coin_add?: CoinParam;
231
- receive?: ReceivedBalanceOrRecently;
232
-
233
- guard_add?: { guard: string; recipient: Recipient; amount: { type: "GuardU64Identifier"; value: number } | { type: "Fixed"; value: number }; expiration_time?: number; store_from_id?: number | null }[];
234
- guard_remove_expired?: boolean;
235
- guard_expiration_time?: number | null;
236
-
237
- owner_receive?: ReceivedObjectsOrRecently;
238
- um?: string | null;
239
- }
240
- ```
200
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_reward" })`
201
+
202
+ **Key Fields**:
203
+ - `object`: TypedPermissionObject
204
+ - `claim`: Guard ID for claim verification
205
+ - `description`: Reward description
206
+ - `coin_add`: Coin to add
207
+ - `receive`: Received balance
208
+ - `guard_add`: Guards for reward distribution
209
+ - `guard_remove_expired`: Remove expired guards flag
210
+ - `guard_expiration_time`: Guard expiration time
211
+ - `owner_receive`: Owner fund extraction
212
+ - `um`: Contact object ID
241
213
 
242
214
  #### allocation — Auto-Distribution
243
215
 
244
- ALLOCATION HAS TWO MODES discriminated by object format:
216
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_allocation" })`
245
217
 
246
- ```typescript
247
- // MODE 1: CREATE new Allocation
248
- data: {
249
- object: { name?: string; tags?: string[]; onChain?: boolean; replaceExistName?: boolean; type_parameter?: string };
250
- allocators: { description: string; threshold: number; allocators: { guard: string; sharing: { who: Recipient; sharing: number; mode: "Amount" | "Rate" | "Surplus" }[]; fix?: number; max?: number | null }[] };
251
- coin: CoinParam;
252
- payment_info: { remark?: string; index?: number };
253
- }
218
+ **Two Modes**:
254
219
 
255
- // MODE 2: OPERATE existing Allocation
256
- data: {
257
- object: string; // Allocation ID or name
258
- received_coins?: ReceivedBalanceOrRecently;
259
- alloc_by_guard?: string;
260
- }
261
- ```
220
+ **MODE 1: CREATE new Allocation**
221
+ - `object`: Object with name, tags, onChain, replaceExistName, type_parameter
222
+ - `allocators`: Allocator configuration
223
+ - `coin`: Coin parameter
224
+ - `payment_info`: Payment info
225
+
226
+ **MODE 2: OPERATE existing Allocation**
227
+ - `object`: Allocation ID or name (STRING)
228
+ - `received_coins`: Received balance
229
+ - `alloc_by_guard`: Guard for allocation
262
230
 
263
231
  #### permission — Access Control
264
232
 
265
- ```typescript
266
- // operation_type: "permission"
267
- data: {
268
- object: WithPermissionObject;
269
- description?: string;
233
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_permission" })`
270
234
 
271
- // Write Guard policies
272
- policy_add?: { who: AccountOrMark_Address; guard: string; store_from_id?: number | null }[];
273
- policy_remove?: { who: AccountOrMark_Address }[];
274
- policy_clear?: boolean;
275
-
276
- owner_receive?: ReceivedObjectsOrRecently;
277
- um?: string | null;
278
- }
279
- ```
235
+ **Key Fields**:
236
+ - `object`: WithPermissionObject
237
+ - `description`: Permission description
238
+ - `policy_add`: Add policies
239
+ - `policy_remove`: Remove policies
240
+ - `policy_clear`: Clear all policies
241
+ - `owner_receive`: Owner fund extraction
242
+ - `um`: Contact object ID
280
243
 
281
244
  #### guard — Programmable Validation
282
245
 
283
- ```typescript
284
- // operation_type: "guard"
285
- data: {
286
- namedNew?: NamedObject;
287
- description?: string;
288
-
289
- table?: { identifier: number; b_submission: boolean; value_type: ValueType; value?: SupportedValue; name?: string }[];
246
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_guard" })`
290
247
 
291
- root: { type: "node"; node: GuardNode } | { type: "file"; file_path: string; format?: "json" | "markdown" };
248
+ **Key Fields**:
249
+ - `namedNew`: Named object options
250
+ - `description`: Guard description
251
+ - `table`: Data table array with identifier, b_submission, value_type, value, name
252
+ - `root`: Computational tree — either inline node or file reference
253
+ - `type: "node"`: Inline GuardNode
254
+ - `type: "file"`: Load from file
255
+ - `rely`: Dependencies on other Guards
292
256
 
293
- rely?: { guards: string[]; logic_or?: boolean };
294
- }
295
- ```
296
-
297
- GuardNode types (70+ variants, see wowok-guard skill for complete reference):
298
- - Logic: `logic_and`, `logic_or`, `logic_not`, `logic_equal`, `logic_string_contains`, `logic_string_nocase_contains`, `logic_string_nocase_equal`, `logic_as_u256_equal`, `logic_as_u256_greater`, `logic_as_u256_lesser`, `logic_as_u256_greater_or_equal`, `logic_as_u256_lesser_or_equal`
299
- - Arithmetic: `calc_number_add`, `calc_number_subtract`, `calc_number_multiply`, `calc_number_divide`, `calc_number_mod`, `calc_string_length`, `calc_string_contains`, `calc_string_nocase_contains`, `calc_string_nocase_equal`, `calc_string_indexof`, `calc_string_nocase_indexof`
300
- - Conversion: `convert_number_address`, `convert_address_number`, `convert_number_string`, `convert_string_number`, `convert_safe_u8`..`convert_safe_u256`
301
- - Vector: `vec_length`, `vec_contains_bool`, `vec_contains_address`, `vec_contains_string`, `vec_contains_string_nocase`, `vec_contains_number`, `vec_indexof_bool`, `vec_indexof_address`, `vec_indexof_string`, `vec_indexof_string_nocase`, `vec_indexof_number`
302
- - Records: `record_check_recipient_order`, `record_check_recipient_progress`, `record_check_recipient_reward`, `record_check_treasury_history_item`, `record_check_progress_history_item`, and more
303
- - Special: `query`, `identifier`, `value_type`
257
+ See [wowok-guard](../wowok-guard/SKILL.md) skill for complete GuardNode reference.
304
258
 
305
259
  #### personal — On-Chain Public Identity
306
260
 
307
- ```typescript
308
- // operation_type: "personal"
309
- data: {
310
- description?: string;
311
- referrer?: string | AccountOrMark_Address | null;
312
-
313
- information?: { op: "add"; data: { name: string; value_type: ValueType; value: SupportedValue }[] }
314
- | { op: "remove"; name: string[] }
315
- | { op: "clear" };
316
-
317
- mark?: { op: "add"; data: { address: string; name?: string; tags?: string[] }[] }
318
- | { op: "remove"; data: { address: string; tags?: string[] }[] }
319
- | { op: "clear"; address: ManyAccountOrMark_Address }
320
- | { op: "transfer"; to: AccountOrMark_Address }
321
- | { op: "replace"; new_mark_object: string }
322
- | { op: "destroy" };
323
- }
324
- ```
261
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_personal" })`
262
+
263
+ **Key Fields**:
264
+ - `description`: Personal description
265
+ - `referrer`: Referrer reference
266
+ - `information`: Information operations (add/remove/clear)
267
+ - `mark`: Mark operations (add/remove/clear/transfer/replace/destroy)
325
268
 
326
269
  ⚠️ CRITICAL: Everything in `personal` is PERMANENTLY PUBLIC on-chain.
327
270
 
328
271
  #### payment — Irreversible Coin Transfer
329
272
 
330
- ```typescript
331
- // operation_type: "payment"
332
- data: {
333
- object: { name?: string; tags?: string[]; onChain?: boolean; replaceExistName?: boolean; type_parameter?: string };
334
- revenue: { recipient: AccountOrMark_Address; amount: CoinParam }[];
335
- info: { remark?: string; index?: number };
336
- }
337
- ```
273
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_payment" })`
274
+
275
+ **Key Fields**:
276
+ - `object`: Named object options
277
+ - `revenue`: Revenue recipients array
278
+ - `info`: Payment info (remark, index)
338
279
 
339
280
  ⚠️ CRITICAL: Payment is IRREVERSIBLE. Always confirm recipient, amount, and token type before executing.
340
281
 
341
282
  #### demand — Service Request
342
283
 
343
- ```typescript
344
- // operation_type: "demand"
345
- data: {
346
- object: WithPermissionObject;
347
- present?: { recommend: string; by_guard?: string; service?: string };
348
- description?: string;
349
- location?: string;
350
- rewards?: ObjectsOp;
351
-
352
- guards?: { op: "add" | "set"; guard: { guard: string; service_identifier?: number | null }[] }
353
- | { op: "remove"; guard: string[] }
354
- | { op: "clear" };
355
-
356
- feedback?: { who: AccountOrMark_Address; acceptance_score?: number; feedback?: string }[];
357
- owner_receive?: ReceivedObjectsOrRecently;
358
- um?: string | null;
359
- }
360
- ```
284
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_demand" })`
361
285
 
362
- #### order — Order Lifecycle
286
+ **Key Fields**:
287
+ - `object`: WithPermissionObject
288
+ - `present`: Present configuration
289
+ - `description`: Demand description
290
+ - `location`: Location
291
+ - `rewards`: Reward objects
292
+ - `guards`: Guards configuration
293
+ - `feedback`: Feedback entries
294
+ - `owner_receive`: Owner fund extraction
295
+ - `um`: Contact object ID
363
296
 
364
- ```typescript
365
- // operation_type: "order"
366
- data: {
367
- object: string | NameOrAddress; // Order ID or name (required)
368
-
369
- agents?: ManyAccountOrMark_Address;
370
- required_info?: string | null;
371
-
372
- progress?: { operation: { next_node_name: string; forward: string }; hold?: boolean; adminUnhold?: boolean; message?: string };
297
+ #### order — Order Lifecycle
373
298
 
374
- arb_confirm?: { arb: string; confirm: boolean; description?: string; proposition?: string[] };
375
- arb_objection?: { arb: string; objection: string };
376
- arb_claim_compensation?: { arb: string };
299
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_order" })`
377
300
 
378
- receive?: QueryReceivedResult;
379
- transfer_to?: AccountOrMark_Address;
380
- }
381
- ```
301
+ **Key Fields**:
302
+ - `object`: Order ID or name
303
+ - `agents`: Agent addresses
304
+ - `required_info`: Required info field
305
+ - `progress`: Progress advancement
306
+ - `arb_confirm`: Arbitration confirmation
307
+ - `arb_objection`: Arbitration objection
308
+ - `arb_claim_compensation`: Claim compensation
309
+ - `receive`: Receive funds
310
+ - `transfer_to`: Transfer order to new owner
382
311
 
383
312
  #### gen_passport — Immutable Credential
384
313
 
385
- ```typescript
386
- // operation_type: "gen_passport"
387
- data: {
388
- guard: string | string[]; // Guard object ID(s) to verify. Can be a single guard or an array of guards.
389
- info?: SubmissionCall;
390
- }
391
- ```
314
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_gen_passport" })`
315
+
316
+ **Key Fields**:
317
+ - `guard`: Guard ID(s) single string or array of strings
318
+ - `info`: Submission call info
392
319
 
393
320
  **Features:**
394
321
  - **Single Guard**: Pass a single guard ID or name as a string
@@ -402,15 +329,12 @@ data: {
402
329
  **WithPermissionObject**: Same as TypedPermissionObject but WITHOUT `type_parameter`
403
330
 
404
331
  **SubmissionCall** (for execution):
405
- ```typescript
406
- {
407
- sender: string;
408
- gas_budget: string;
409
- // additional network/execution params
410
- }
411
- ```
332
+ - `sender`: string
333
+ - `gas_budget`: string
334
+ - Additional network/execution params
412
335
 
413
336
  **CoinParam**: `number` (raw) or `string` (e.g., "2WOW", "100USDT")
337
+
414
338
  **NamedObject**: `{ name: string; tags?: string[]; onChain?: boolean; replaceExistName?: boolean }`
415
339
 
416
340
  ---
@@ -419,55 +343,60 @@ data: {
419
343
 
420
344
  **MCP Input**: `{ query_type: string, ... }` — discriminated union
421
345
 
346
+ **Schema Reference**: `schema_query({ action: "get", name: "query_toolkit" })`
347
+
422
348
  ### 8 query_types
423
349
 
424
350
  #### local_mark_list
425
- ```typescript
426
- { query_type: "local_mark_list"; network?: string }
427
- ```
428
- Returns: list of local name→address mappings
351
+ - `query_type`: "local_mark_list"
352
+ - `network`: Optional network
353
+ - Returns: list of local name→address mappings
429
354
 
430
355
  #### account_list
431
- ```typescript
432
- { query_type: "account_list" }
433
- ```
434
- Returns: list of local accounts
356
+ - `query_type`: "account_list"
357
+ - Returns: list of local accounts
435
358
 
436
359
  #### local_info_list
437
- ```typescript
438
- { query_type: "local_info_list"; network?: string }
439
- ```
440
- Returns: local private data entries
360
+ - `query_type`: "local_info_list"
361
+ - `network`: Optional network
362
+ - Returns: local private data entries
441
363
 
442
364
  #### token_list
443
- ```typescript
444
- { query_type: "token_list"; network?: string }
445
- ```
446
- Returns: available token types with precision info
365
+ - `query_type`: "token_list"
366
+ - `network`: Optional network
367
+ - Returns: available token types with precision info
447
368
 
448
369
  #### account_balance
449
- ```typescript
450
- { query_type: "account_balance"; address: string; token_type?: string; network?: string }
451
- ```
452
- Returns: account token balance
370
+ - `query_type`: "account_balance"
371
+ - `address`: Account address
372
+ - `token_type`: Optional token type
373
+ - `network`: Optional network
374
+ - Returns: account token balance
453
375
 
454
376
  #### onchain_personal_profile
455
- ```typescript
456
- { query_type: "onchain_personal_profile"; address: string; network?: string; no_cache?: boolean }
457
- ```
458
- Returns: on-chain public profile
377
+ - `query_type`: "onchain_personal_profile"
378
+ - `address`: Account address
379
+ - `network`: Optional network
380
+ - `no_cache`: Optional flag
381
+ - Returns: on-chain public profile
459
382
 
460
383
  #### onchain_objects
461
- ```typescript
462
- { query_type: "onchain_objects"; address?: string; name_or_address?: string; network?: string; no_cache?: boolean }
463
- ```
464
- Returns: on-chain objects owned by address
384
+ - `query_type`: "onchain_objects"
385
+ - `address`: Optional address
386
+ - `name_or_address`: Optional name or address
387
+ - `network`: Optional network
388
+ - `no_cache`: Optional flag
389
+ - Returns: on-chain objects owned by address
465
390
 
466
391
  #### onchain_received
467
- ```typescript
468
- { query_type: "onchain_received"; name_or_address: string | AccountOrMark_Address; all_type?: boolean; cursor?: string | null; limit?: number | null; no_cache?: boolean; network?: string }
469
- ```
470
- Returns: received CoinWrapper objects
392
+ - `query_type`: "onchain_received"
393
+ - `name_or_address`: Name or address
394
+ - `all_type`: Optional boolean
395
+ - `cursor`: Optional cursor
396
+ - `limit`: Optional limit
397
+ - `no_cache`: Optional flag
398
+ - `network`: Optional network
399
+ - Returns: received CoinWrapper objects
471
400
 
472
401
  ---
473
402
 
@@ -475,6 +404,8 @@ Returns: received CoinWrapper objects
475
404
 
476
405
  **MCP Input**: `{ query_type: string, parent: string, ... }` — 12 query_types
477
406
 
407
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_table_data" })`
408
+
478
409
  | query_type | Parent | Key | Returns |
479
410
  |------------|--------|-----|---------|
480
411
  | `onchain_table` | any object | — (paginated cursor) | TableAnswer |
@@ -498,6 +429,8 @@ All support: `no_cache?: boolean`, `network?: "localnet" | "testnet"`
498
429
 
499
430
  **MCP Input**: `{ operation_type: string, data: object }`
500
431
 
432
+ **Schema Reference**: `schema_query({ action: "get", name: "account_operation" })`
433
+
501
434
  Operations: `generate`, `suspend`, `resume`, `faucet`, `sign`, `signData`, `query`
502
435
 
503
436
  100% LOCAL — never touches blockchain.
@@ -508,16 +441,12 @@ Operations: `generate`, `suspend`, `resume`, `faucet`, `sign`, `signData`, `quer
508
441
 
509
442
  **MCP Input**: `{ operation_type: string, data: object }`
510
443
 
511
- ```typescript
512
- // Add marks
513
- { operation_type: "add", data: { marks: { name: string; address: string; tags?: string[] }[], network?: string } }
514
-
515
- // Remove marks
516
- { operation_type: "remove", data: { marks: { name: string }[]; network?: string } }
444
+ **Schema Reference**: `schema_query({ action: "get", name: "local_mark_operation" })`
517
445
 
518
- // Clear all
519
- { operation_type: "clear", data: { network?: string } }
520
- ```
446
+ Operations:
447
+ - `add`: Add marks with `{ marks: { name, address, tags? }[], network? }`
448
+ - `remove`: Remove marks with `{ marks: { name }[], network? }`
449
+ - `clear`: Clear all with `{ network? }`
521
450
 
522
451
  ---
523
452
 
@@ -525,6 +454,8 @@ Operations: `generate`, `suspend`, `resume`, `faucet`, `sign`, `signData`, `quer
525
454
 
526
455
  **MCP Input**: `{ operation_type: string, data: object }`
527
456
 
457
+ **Schema Reference**: `schema_query({ action: "get", name: "local_info_operation" })`
458
+
528
459
  Store sensitive info (phone, address, contacts) locally.
529
460
 
530
461
  ---
@@ -533,18 +464,57 @@ Store sensitive info (phone, address, contacts) locally.
533
464
 
534
465
  **MCP Input**: varies by operation
535
466
 
467
+ **Schema Reference**: `schema_query({ action: "get", name: "messenger_operation" })`
468
+
536
469
  Operations: `watch_conversations`, `send_message`, `send_file`, `watch_messages`, `extract_zip_messages`, `generate_wts`, `verify_wts`, `sign_wts`, `wts2html`, `proof_message`, `mark_messages_as_viewed`, `mark_conversation_as_viewed`, `blacklist`, `friendslist`, `guardlist`, `settings`
537
470
 
471
+ See [wowok-messenger](../wowok-messenger/SKILL.md) skill for detailed usage.
472
+
538
473
  ---
539
474
 
540
475
  ## 8-13 Quick Reference
541
476
 
542
- - **wip_file**: `{ operation: "generate"|"verify"|"sign"|"wip2html", data: object }`
543
- - **guard2file**: `{ guard: string; file_path: string; format?: "json"|"markdown" }`
544
- - **machineNode2file**: `{ machine: string; file_path: string; format?: "json"|"markdown" }`
545
- - **onchain_events**: `{ type: string; cursor?: string | null; limit?: number | null }`
546
- - **wowok_buildin_info**: `{ info_type: "constants"|"permissions"|"guard_instructions"|"network"|"value_types" }`
547
- - **documents_and_learn**: `{ document_type?: string }`
477
+ ### wip_file
478
+
479
+ **Schema Reference**: `schema_query({ action: "get", name: "wip_file" })`
480
+
481
+ Operations: `generate`, `verify`, `sign`, `wip2html`
482
+
483
+ ### guard2file
484
+
485
+ **Schema Reference**: `schema_query({ action: "get", name: "guard2file" })`
486
+
487
+ - `guard`: Guard ID or name
488
+ - `file_path`: Output file path
489
+ - `format`: "json" or "markdown"
490
+
491
+ ### machineNode2file
492
+
493
+ **Schema Reference**: `schema_query({ action: "get", name: "machineNode2file" })`
494
+
495
+ - `machine`: Machine ID or name
496
+ - `file_path`: Output file path
497
+ - `format`: "json" or "markdown"
498
+
499
+ ### onchain_events
500
+
501
+ **Schema Reference**: `schema_query({ action: "get", name: "onchain_events" })`
502
+
503
+ - `type`: Event type
504
+ - `cursor`: Optional cursor
505
+ - `limit`: Optional limit
506
+
507
+ ### wowok_buildin_info
508
+
509
+ **Schema Reference**: `schema_query({ action: "get", name: "wowok_buildin_info" })`
510
+
511
+ - `info_type`: "constants", "permissions", "guard_instructions", "network", "value_types"
512
+
513
+ ### documents_and_learn
514
+
515
+ **Schema Reference**: `schema_query({ action: "get", name: "documents_and_learn" })`
516
+
517
+ - `document_type`: Optional document type
548
518
 
549
519
  ---
550
520
 
@@ -613,23 +583,38 @@ User wants to...
613
583
 
614
584
  ---
615
585
 
616
- ## Bundled Schema Reference
617
-
618
- When MCP tool schemas are unavailable or ambiguous, consult the complete schema files bundled with this package. Each file contains the full discriminated union, all nested sub-fields, and exact type definitions.
619
-
620
- | Tool | Schema File | Contents |
621
- |------|-----------|----------|
622
- | `onchain_operations` | [schemas/onchain_operations/](../schemas/onchain_operations/) | 16 types split by operation_type. [_index.md](../schemas/onchain_operations/_index.md) for lookup, Value Types, and principles; [_common.md](../schemas/onchain_operations/_common.md) for shared schemas (CallEnv, SubmissionCall, Recipient, etc.) |
623
- | `query_toolkit` | [schemas/schema-query_toolkit.md](../schemas/schema-query_toolkit.md) | 8 query_types, pagination params, filter structures |
624
- | `onchain_table_data` | [schemas/schema-onchain_table_data.md](../schemas/schema-onchain_table_data.md) | 12 query_types, parent/key structures, result schemas |
625
- | `onchain_events` | [schemas/schema-onchain_events.md](../schemas/schema-onchain_events.md) | Event query types, pagination |
626
- | `account_operation` | [schemas/schema-account_operation.md](../schemas/schema-account_operation.md) | Local wallet operations (generate, sign, faucet, etc.) |
627
- | `local_mark_operation` | [schemas/schema-local_mark_operation.md](../schemas/schema-local_mark_operation.md) | Address book mark operations |
628
- | `local_info_operation` | [schemas/schema-local_info_operation.md](../schemas/schema-local_info_operation.md) | Private local data operations |
629
- | `messenger_operation` | [schemas/schema-messenger_operation.md](../schemas/schema-messenger_operation.md) | Encrypted messaging operations |
630
- | `wip_file` | [schemas/schema-wip_file.md](../schemas/schema-wip_file.md) | Witness promise file operations |
631
- | `guard2file` | [schemas/schema-guard2file.md](../schemas/schema-guard2file.md) | Guard export to file |
632
- | `machineNode2file` | [schemas/schema-machineNode2file.md](../schemas/schema-machineNode2file.md) | Machine nodes export to file |
633
- | `wowok_buildin_info` | [schemas/schema-wowok_buildin_info.md](../schemas/schema-wowok_buildin_info.md) | Protocol constants, permissions, guard instructions |
634
-
635
- **When to use**: Always verify the schema before calling complex tools like `onchain_operations` — the discriminated union has 16 branches with 5-6 levels of nesting, and one wrong field name causes immediate failure.
586
+ ## Schema Query Tool — Authoritative Schema Source
587
+
588
+ Use the `schema_query` MCP tool to retrieve complete JSON schemas for any WoWok tool or operation. This is the **authoritative source** returns schemas directly from the MCP server with all properties, types, and descriptions.
589
+
590
+ ### Usage Examples
591
+
592
+ **List all available schemas:**
593
+ ```
594
+ schema_query({ action: "list" })
595
+ ```
596
+
597
+ **Get a specific tool schema:**
598
+ ```
599
+ schema_query({ action: "get", name: "onchain_operations" })
600
+ schema_query({ action: "get", name: "onchain_operations_service" })
601
+ schema_query({ action: "get", name: "query_toolkit" })
602
+ ```
603
+
604
+ **Search schemas by keyword:**
605
+ ```
606
+ schema_query({ action: "search", query: "guard" })
607
+ ```
608
+
609
+ **List all on-chain operation types:**
610
+ ```
611
+ schema_query({ action: "list_operations" })
612
+ ```
613
+
614
+ ### Available Schema Names
615
+
616
+ **Main Tools:** `onchain_operations`, `query_toolkit`, `onchain_table_data`, `onchain_events`, `account_operation`, `local_mark_operation`, `local_info_operation`, `messenger_operation`, `wip_file`, `guard2file`, `machineNode2file`, `wowok_buildin_info`, `schema_query`
617
+
618
+ **Individual Operations:** `onchain_operations_service`, `onchain_operations_machine`, `onchain_operations_order`, `onchain_operations_progress`, `onchain_operations_guard`, `onchain_operations_permission`, `onchain_operations_arbitration`, `onchain_operations_repository`, `onchain_operations_contact`, `onchain_operations_treasury`, `onchain_operations_reward`, `onchain_operations_allocation`, `onchain_operations_personal`, `onchain_operations_payment`, `onchain_operations_demand`, `onchain_operations_gen_passport`
619
+
620
+ **When to use**: Always call `schema_query` before using complex tools like `onchain_operations` — the discriminated unions have 16 branches with 5-6 levels of nesting, and one wrong field name causes immediate failure. Use `action: "get"` with the specific operation name (e.g., `onchain_operations_service`) when you need the complete structure for a single operation type.