@wowok/skills 1.0.6 → 1.1.0
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 +11 -11
- package/package.json +1 -1
- package/schemas/onchain_operations/_common.md +270 -100
- package/schemas/onchain_operations/_index.md +176 -2
- package/schemas/onchain_operations/allocation.md +18 -40
- package/schemas/onchain_operations/arbitration.md +61 -50
- package/schemas/onchain_operations/contact.md +14 -10
- package/schemas/onchain_operations/demand.md +24 -23
- package/schemas/onchain_operations/gen_passport.md +12 -32
- package/schemas/onchain_operations/guard.md +29 -109
- package/schemas/onchain_operations/machine.md +47 -28
- package/schemas/onchain_operations/order.md +25 -26
- package/schemas/onchain_operations/payment.md +9 -17
- package/schemas/onchain_operations/permission.md +26 -15
- package/schemas/onchain_operations/personal.md +22 -23
- package/schemas/onchain_operations/progress.md +12 -9
- package/schemas/onchain_operations/repository.md +43 -54
- package/schemas/onchain_operations/reward.md +23 -25
- package/schemas/onchain_operations/service.md +31 -57
- package/schemas/onchain_operations/treasury.md +29 -35
- package/schemas/schema-messenger_operation.md +1 -1
- package/schemas/schema-query_toolkit.md +37 -17
- package/wowok-build/SKILL.md +89 -556
- package/wowok-guard/SKILL.md +57 -6
- package/wowok-machine/SKILL.md +48 -1
- package/wowok-order/SKILL.md +35 -1
- package/wowok-safety/SKILL.md +154 -279
- package/wowok-tools/SKILL.md +2 -2
|
@@ -2,135 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
Create immutable programmable validation rules that return boolean results.
|
|
4
4
|
|
|
5
|
+
> **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
|
|
6
|
+
> Guard is **CREATE-only** and immutable. No `object` field — use `namedNew` for naming.
|
|
7
|
+
|
|
5
8
|
## Data Schema
|
|
6
9
|
|
|
7
10
|
```typescript
|
|
8
11
|
CallGuard_Data {
|
|
9
|
-
namedNew?: NamedObject;
|
|
10
|
-
description?: string;
|
|
12
|
+
namedNew?: NamedObject; // Name for new Guard (optional naming)
|
|
13
|
+
description?: string; // Guard description (max 4000 bcs chars)
|
|
11
14
|
|
|
12
|
-
// Data table definitions
|
|
15
|
+
// Data table definitions (uses GuardTableItemBaseSchema — no object_type field)
|
|
13
16
|
table?: {
|
|
14
|
-
identifier: number;
|
|
15
|
-
b_submission: boolean;
|
|
16
|
-
value_type: ValueType;
|
|
17
|
-
value?: SupportedValue;
|
|
18
|
-
name?: string;
|
|
17
|
+
identifier: number; // 0-255
|
|
18
|
+
b_submission: boolean; // User submission required
|
|
19
|
+
value_type: ValueType; // Expected type
|
|
20
|
+
value?: SupportedValue; // Default value (if b_submission=false)
|
|
21
|
+
name?: string; // Description (default: "")
|
|
19
22
|
}[];
|
|
20
23
|
|
|
21
24
|
// Rule tree root (required)
|
|
22
25
|
root: {
|
|
23
26
|
type: "node";
|
|
24
|
-
node: GuardNode;
|
|
27
|
+
node: GuardNode; // Direct node tree
|
|
25
28
|
} | {
|
|
26
29
|
type: "file";
|
|
27
|
-
file_path: string;
|
|
28
|
-
format?: "json" | "markdown";
|
|
30
|
+
file_path: string; // Path to JSON or Markdown file
|
|
31
|
+
format?: "json" | "markdown"; // File format (default: "json")
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
// Dependent Guards
|
|
32
35
|
rely?: {
|
|
33
|
-
guards: string[];
|
|
34
|
-
logic_or?: boolean;
|
|
36
|
+
guards: string[]; // Dependent Guard object IDs
|
|
37
|
+
logic_or?: boolean; // OR logic (default: AND)
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
|
-
|
|
38
|
-
// GuardNode (recursive structure)
|
|
39
|
-
//
|
|
40
|
-
// The GuardNode is a recursive, strongly-typed computational tree.
|
|
41
|
-
// Each node has a `type` field that discriminates its behavior.
|
|
42
|
-
// Below are the major categories:
|
|
43
|
-
//
|
|
44
|
-
// Logic & Comparison:
|
|
45
|
-
// logic_and (nodes[], 2-8) → Bool: ALL must be true
|
|
46
|
-
// logic_or (nodes[], 2-8) → Bool: ANY must be true
|
|
47
|
-
// logic_not (node, 1) → Bool: Inverts boolean
|
|
48
|
-
// logic_equal (nodes[], 2-8) → Bool: Type+value equality
|
|
49
|
-
// logic_string_contains (nodes[], 2-8) → Bool: Substring (case-sensitive)
|
|
50
|
-
// logic_string_nocase_contains (nodes[], 2-8) → Bool: Substring (case-insensitive)
|
|
51
|
-
// logic_string_nocase_equal (nodes[], 2-8) → Bool: String equality (ci)
|
|
52
|
-
// logic_as_u256_equal (nodes[], 2-8) → Bool: Numeric equality
|
|
53
|
-
// logic_as_u256_greater (nodes[], 2-8) → Bool: First > all others
|
|
54
|
-
// logic_as_u256_lesser (nodes[], 2-8) → Bool: First < all others
|
|
55
|
-
// logic_as_u256_greater_or_equal (nodes[], 2-8) → Bool: First >= all others
|
|
56
|
-
// logic_as_u256_lesser_or_equal (nodes[], 2-8) → Bool: First <= all others
|
|
57
|
-
//
|
|
58
|
-
// Arithmetic (calc_*):
|
|
59
|
-
// calc_number_add (nodes[], 2-8) → U256: Sequential addition
|
|
60
|
-
// calc_number_subtract (nodes[], 2-8) → U256: Sequential subtraction
|
|
61
|
-
// calc_number_multiply (nodes[], 2-8) → U256: Sequential multiplication
|
|
62
|
-
// calc_number_divide (nodes[], 2-8) → U256: Sequential division
|
|
63
|
-
// calc_number_mod (nodes[], 2-8) → U256: Sequential modulo
|
|
64
|
-
// calc_string_length (node, 1) → U64: UTF-8 byte length
|
|
65
|
-
// calc_string_contains (nodes[], 2-8) → Bool: cs substring check
|
|
66
|
-
// calc_string_nocase_contains (nodes[], 2-8) → Bool: ci substring check
|
|
67
|
-
// calc_string_nocase_equal (nodes[], 2-8) → Bool: ci string equality
|
|
68
|
-
// calc_string_indexof (left+right+order) → U64: Find substring index
|
|
69
|
-
// calc_string_nocase_indexof (left+right+order) → U64: Find substring index (ci)
|
|
70
|
-
//
|
|
71
|
-
// Type Conversion (convert_*):
|
|
72
|
-
// convert_number_address (node, 1) → Address: Number → Address
|
|
73
|
-
// convert_address_number (node, 1) → U256: Address → Number
|
|
74
|
-
// convert_number_string (node, 1) → String: Number → String
|
|
75
|
-
// convert_string_number (node, 1) → U256: Parse string as number
|
|
76
|
-
// convert_safe_u8..convert_safe_u256 (node, 1) → U8..U256: Safe numeric cast
|
|
77
|
-
//
|
|
78
|
-
// Vector Operations (vec_*):
|
|
79
|
-
// vec_length (node, 1) → U64: Element count
|
|
80
|
-
// vec_contains_bool (nodes[], 2-8) → Bool: All values present
|
|
81
|
-
// vec_contains_address (nodes[], 2-8) → Bool: Address containment
|
|
82
|
-
// vec_contains_string (nodes[], 2-8) → Bool: String containment (cs)
|
|
83
|
-
// vec_contains_string_nocase (nodes[], 2-8) → Bool: String containment (ci)
|
|
84
|
-
// vec_contains_number (nodes[], 2-8) → Bool: Number containment
|
|
85
|
-
// vec_indexof_* (left+right+order) → U64: Find index in vector
|
|
86
|
-
//
|
|
87
|
-
// WoWok Object Query:
|
|
88
|
-
// query (query + object + parameters) → varies: Query on-chain data
|
|
89
|
-
// identifier (identifier 0-255) → varies: Read from Guard table
|
|
90
|
-
// value_type (node, 1) → U8: Get ValueType of child result
|
|
91
|
-
//
|
|
92
|
-
// Record Check Operations (record_*):
|
|
93
|
-
// record_check_recipient_order (...) → Bool: Order count by recipient
|
|
94
|
-
// record_check_recipient_progress (...) → Bool: Progress count by recipient
|
|
95
|
-
// record_check_recipient_reward (...) → Bool: Reward count by recipient
|
|
96
|
-
// record_check_treasury_history_item (...) → Bool: Treasury history
|
|
97
|
-
// record_check_progress_history_item (...) → Bool: Progress history
|
|
98
|
-
//
|
|
99
|
-
// For the complete canonical list of all 70+ types, see
|
|
100
|
-
// the MCP source at `src/schema/query/index.ts` `GuardNodeSchema`.
|
|
101
|
-
GuardNode = {
|
|
102
|
-
// Multi-operand nodes (2-8 children)
|
|
103
|
-
logic?: "and" | "or";
|
|
104
|
-
nodes: GuardNode[];
|
|
105
|
-
} | {
|
|
106
|
-
// Single-operand nodes
|
|
107
|
-
logic?: "not";
|
|
108
|
-
node: GuardNode;
|
|
109
|
-
} | {
|
|
110
|
-
// Query nodes
|
|
111
|
-
type: "query";
|
|
112
|
-
query: number | string;
|
|
113
|
-
object: {
|
|
114
|
-
identifier: number;
|
|
115
|
-
convert_witness?: number;
|
|
116
|
-
};
|
|
117
|
-
parameters: GuardNode[];
|
|
118
|
-
} | {
|
|
119
|
-
// Context nodes
|
|
120
|
-
type: "context";
|
|
121
|
-
context: "Signer" | "Clock" | "Guard";
|
|
122
|
-
} | {
|
|
123
|
-
// Identifier nodes
|
|
124
|
-
type: "identifier";
|
|
125
|
-
identifier: number;
|
|
126
|
-
} | {
|
|
127
|
-
// Constant value nodes
|
|
128
|
-
type: "constant";
|
|
129
|
-
value_type: ValueType;
|
|
130
|
-
value: SupportedValue;
|
|
131
|
-
}
|
|
132
40
|
```
|
|
133
41
|
|
|
42
|
+
## Guard Root Notes
|
|
43
|
+
|
|
44
|
+
- **`root.type === "node"`**: Build the Guard computational tree directly inline using `node: GuardNode`
|
|
45
|
+
- **`root.type === "file"`**: Load the Guard definition from a JSON or Markdown file. The file can define `namedNew`, `description`, `table`, `root`, `rely`. Any fields defined in the schema will **OVERRIDE** the corresponding fields in the file.
|
|
46
|
+
|
|
47
|
+
## GuardNode (recursive, lazy-evaluated)
|
|
48
|
+
|
|
49
|
+
The GuardNode is a recursive, strongly-typed computational tree with 70+ node types.
|
|
50
|
+
Each node has a `type` field that discriminates its behavior.
|
|
51
|
+
|
|
52
|
+
For the complete canonical list of all GuardNode types, see the MCP source at `src/schema/query/index.ts` `GuardNodeSchema`.
|
|
53
|
+
|
|
134
54
|
---
|
|
135
55
|
|
|
136
|
-
See [_common.md](./_common.md) for shared types: CallEnv,
|
|
56
|
+
See [_common.md](./_common.md) for shared types: CallEnv, NamedObject.
|
|
@@ -2,69 +2,88 @@
|
|
|
2
2
|
|
|
3
3
|
Design and deploy automated workflow templates (Machines) that define how services are delivered.
|
|
4
4
|
|
|
5
|
+
> **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
|
|
6
|
+
> Machine uses `WithPermissionObject`: object shape = CREATE, string = MODIFY.
|
|
7
|
+
|
|
5
8
|
## Data Schema
|
|
6
9
|
|
|
7
10
|
```typescript
|
|
8
11
|
CallMachine_Data {
|
|
9
12
|
// Object reference - string (existing) or object (create new)
|
|
13
|
+
// See _common.md: WithPermissionObject
|
|
10
14
|
object: WithPermissionObject;
|
|
11
15
|
|
|
12
16
|
// Generate new Progress
|
|
13
17
|
progress_new?: {
|
|
14
|
-
task?: string | null;
|
|
15
|
-
repository?: ObjectsOp;
|
|
16
|
-
progress_namedOperator?: {
|
|
18
|
+
task?: string | null; // Task ID bound to Progress
|
|
19
|
+
repository?: ObjectsOp; // Repository list
|
|
20
|
+
progress_namedOperator?: { // Manage namespace operators
|
|
17
21
|
op: "add" | "set" | "remove";
|
|
18
|
-
name: string;
|
|
22
|
+
name: string; // Namespace name (non-empty)
|
|
19
23
|
operators: ManyAccountOrMark_Address;
|
|
20
24
|
};
|
|
21
|
-
namedNew?: NamedObject;
|
|
25
|
+
namedNew?: NamedObject; // Name for new Progress
|
|
22
26
|
};
|
|
23
27
|
|
|
24
|
-
description?: string;
|
|
25
|
-
repository?: ObjectsOp;
|
|
28
|
+
description?: string; // Machine description
|
|
29
|
+
repository?: ObjectsOp; // Consensus repositories
|
|
26
30
|
|
|
27
31
|
// Node operations - TWO MODES (mutually exclusive)
|
|
28
32
|
node?:
|
|
29
33
|
// Mode 1: Incremental operations
|
|
30
34
|
| {
|
|
31
35
|
op: "add" | "set";
|
|
32
|
-
nodes: MachineNode[];
|
|
33
|
-
bReplace?: boolean;
|
|
36
|
+
nodes: MachineNode[]; // Node array
|
|
37
|
+
bReplace?: boolean; // Whether to replace existing
|
|
34
38
|
}
|
|
35
|
-
| { op: "remove"; nodes: string[] }
|
|
39
|
+
| { op: "remove"; nodes: string[] } // Node names to delete
|
|
36
40
|
| { op: "clear" }
|
|
37
|
-
| { op: "exchange"; node_one: string; node_other: string }
|
|
38
|
-
| { op: "rename"; node_name_old: string; node_name_new: string }
|
|
39
|
-
| { op: "remove prior node"; pairs:
|
|
40
|
-
| { op: "add forward"; data:
|
|
41
|
-
|
|
41
|
+
| { op: "exchange"; node_one: string; node_other: string } // Swap two nodes
|
|
42
|
+
| { op: "rename"; node_name_old: string; node_name_new: string } // Rename node
|
|
43
|
+
| { op: "remove prior node"; pairs: { prior_node_name: string[]; node_name: string; }[] } // Delete prev→next pairs
|
|
44
|
+
| { op: "add forward"; data: {
|
|
45
|
+
prior_node_name: string; // Previous node name
|
|
46
|
+
node_name: string; // Next node name
|
|
47
|
+
forward: {
|
|
48
|
+
name: string; // Operation name
|
|
49
|
+
namedOperator?: string | null; // Per-Progress namespace operator (null or empty "" = order permission)
|
|
50
|
+
permissionIndex?: number | null; // Shared permission index
|
|
51
|
+
weight: number; // Forward weight (0-65535)
|
|
52
|
+
}[];
|
|
53
|
+
threshold?: number | null; // Weight threshold (int >= 0)
|
|
54
|
+
}[] }
|
|
55
|
+
| { op: "remove forward"; data: {
|
|
56
|
+
prior_node_name: string;
|
|
57
|
+
node_name: string;
|
|
58
|
+
forward_name: string[]; // Operation names to delete
|
|
59
|
+
}[] }
|
|
42
60
|
// Mode 2: Complete replacement from file
|
|
43
61
|
| { json_or_markdown_file: string };
|
|
44
62
|
|
|
45
|
-
pause?: boolean;
|
|
46
|
-
publish?: boolean;
|
|
63
|
+
pause?: boolean; // Pause new Progress
|
|
64
|
+
publish?: boolean; // Publish (nodes immutable after)
|
|
47
65
|
owner_receive?: ReceivedObjectsOrRecently;
|
|
48
|
-
um?:
|
|
66
|
+
um?: NameOrAddress | null; // Contact object
|
|
49
67
|
}
|
|
50
68
|
|
|
51
|
-
// MachineNode definition
|
|
69
|
+
// MachineNode definition (referenced by node operations)
|
|
70
|
+
// For the canonical MachineNodeNodeSchema, see MCP source at src/schema/query
|
|
52
71
|
MachineNode {
|
|
53
|
-
name: string;
|
|
72
|
+
name: string; // Node name
|
|
54
73
|
pairs: {
|
|
55
|
-
prior_node: string;
|
|
74
|
+
prior_node: string; // Previous node name ("" for entry)
|
|
56
75
|
forwards: {
|
|
57
|
-
name: string;
|
|
58
|
-
namedOperator?: string;
|
|
59
|
-
permissionIndex?: number;
|
|
60
|
-
weight: number;
|
|
61
|
-
guard?:
|
|
76
|
+
name: string; // Forward name
|
|
77
|
+
namedOperator?: string; // Per-Progress namespace
|
|
78
|
+
permissionIndex?: number; // Shared permission index
|
|
79
|
+
weight: number; // Forward weight
|
|
80
|
+
guard?: MachineForwardGuard; // { guard: string; retained_submission?: number[] }
|
|
62
81
|
}[];
|
|
63
|
-
threshold?: number;
|
|
82
|
+
threshold?: number; // Weight threshold (null = any single forward triggers)
|
|
64
83
|
}[];
|
|
65
84
|
}
|
|
66
85
|
```
|
|
67
86
|
|
|
68
87
|
---
|
|
69
88
|
|
|
70
|
-
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, WithPermissionObject,
|
|
89
|
+
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, WithPermissionObject, NamedObject, ObjectsOp, ManyAccountOrMark_Address, ReceivedObjectsOrRecently.
|
|
@@ -1,57 +1,56 @@
|
|
|
1
1
|
# onchain_operations / order
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Track and manage service delivery lifecycle — progress, arbitration, compensation.
|
|
4
|
+
|
|
5
|
+
> **Note**: Order is **MODIFY-only**.
|
|
4
6
|
|
|
5
7
|
## Data Schema
|
|
6
8
|
|
|
7
9
|
```typescript
|
|
8
10
|
CallOrder_Data {
|
|
9
|
-
object:
|
|
11
|
+
object: NameOrAddress; // Order object ID or name (required)
|
|
10
12
|
|
|
11
|
-
//
|
|
12
|
-
agents?: ManyAccountOrMark_Address;
|
|
13
|
+
agents?: ManyAccountOrMark_Address; // Order agents (operate, but cannot receive funds)
|
|
13
14
|
|
|
14
|
-
//
|
|
15
|
-
required_info?: string | null;
|
|
15
|
+
required_info?: NameOrAddress | null; // Contact object ID (recipient) or WTS Proof (delivery proof)
|
|
16
16
|
|
|
17
|
-
// Advance progress
|
|
17
|
+
// Advance order progress workflow
|
|
18
18
|
progress?: {
|
|
19
19
|
operation: {
|
|
20
|
-
next_node_name: string;
|
|
21
|
-
forward: string;
|
|
20
|
+
next_node_name: string; // Target node name (max 64 bcs chars)
|
|
21
|
+
forward: string; // Forward (operation) name (max 64 bcs chars)
|
|
22
22
|
};
|
|
23
|
-
hold?: boolean;
|
|
24
|
-
adminUnhold?: boolean;
|
|
25
|
-
message?: string;
|
|
23
|
+
hold?: boolean; // Lock operation permission
|
|
24
|
+
adminUnhold?: boolean; // Allow admin to force unlock
|
|
25
|
+
message?: string; // Operation note
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
// Submit compensation request
|
|
28
|
+
// Submit compensation request and apply for arbitration
|
|
29
29
|
arb_confirm?: {
|
|
30
|
-
arb:
|
|
31
|
-
confirm: boolean;
|
|
32
|
-
description?: string;
|
|
33
|
-
proposition?: string[];
|
|
30
|
+
arb: NameOrAddress; // Arb object ID or name
|
|
31
|
+
confirm: boolean; // Confirm arbitration materials are valid
|
|
32
|
+
description?: string; // Message description for compensation (max 4000 bcs chars)
|
|
33
|
+
proposition?: string[]; // Compensation claims (each max 256 bcs chars)
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
//
|
|
36
|
+
// Oppose and appeal arbitration result
|
|
37
37
|
arb_objection?: {
|
|
38
|
-
arb:
|
|
39
|
-
objection: string;
|
|
38
|
+
arb: NameOrAddress; // Arb object ID or name
|
|
39
|
+
objection: string; // Reason for objection (max 4000 bcs chars)
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
// Claim compensation
|
|
42
|
+
// Claim order compensation from adjudicated Arb
|
|
43
43
|
arb_claim_compensation?: {
|
|
44
|
-
arb:
|
|
44
|
+
arb: NameOrAddress; // Arb object ID or name
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
//
|
|
47
|
+
// Unwrap received CoinWrappers/objects and transfer to owner
|
|
48
48
|
receive?: QueryReceivedResult;
|
|
49
49
|
|
|
50
|
-
// Transfer order ownership
|
|
51
|
-
transfer_to?: AccountOrMark_Address;
|
|
50
|
+
transfer_to?: AccountOrMark_Address; // Transfer order ownership
|
|
52
51
|
}
|
|
53
52
|
```
|
|
54
53
|
|
|
55
54
|
---
|
|
56
55
|
|
|
57
|
-
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, AccountOrMark_Address,
|
|
56
|
+
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, ManyAccountOrMark_Address, AccountOrMark_Address, QueryReceivedResult.
|
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
# onchain_operations / payment
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Token payment (transfer) operations with detailed remarks.
|
|
4
|
+
|
|
5
|
+
> **Note**: Payment is **CREATE-only** — it issues immutable payment records. No `submission` field.
|
|
4
6
|
|
|
5
7
|
## Data Schema
|
|
6
8
|
|
|
7
9
|
```typescript
|
|
8
10
|
CallPayment_Data {
|
|
9
|
-
//
|
|
10
|
-
object: {
|
|
11
|
-
name?: string; // Object name
|
|
12
|
-
tags?: string[]; // Tags
|
|
13
|
-
onChain?: boolean; // Public on-chain name
|
|
14
|
-
replaceExistName?: boolean; // Force claim name
|
|
15
|
-
type_parameter?: string; // Token type (default: "0x2::wow::WOW")
|
|
16
|
-
};
|
|
11
|
+
object: TypeNamedObject; // CREATE new payment object with {name, type_parameter?}
|
|
17
12
|
|
|
18
|
-
revenue: {
|
|
19
|
-
recipient: AccountOrMark_Address;
|
|
20
|
-
amount: CoinParam;
|
|
13
|
+
revenue: {
|
|
14
|
+
recipient: AccountOrMark_Address; // Payment recipient
|
|
15
|
+
amount: CoinParam; // Payment amount
|
|
21
16
|
}[];
|
|
22
17
|
|
|
23
|
-
info:
|
|
24
|
-
remark?: string; // Payment remark
|
|
25
|
-
index?: number; // Payment index
|
|
26
|
-
};
|
|
18
|
+
info: PaymentInfo; // Payment record info
|
|
27
19
|
}
|
|
28
20
|
```
|
|
29
21
|
|
|
30
22
|
---
|
|
31
23
|
|
|
32
|
-
See [_common.md](./_common.md) for shared types: CallEnv, CoinParam, AccountOrMark_Address.
|
|
24
|
+
See [_common.md](./_common.md) for shared types: CallEnv, TypeNamedObject, CoinParam, PaymentInfo, AccountOrMark_Address.
|
|
@@ -2,24 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
Define who can perform which operations on WoWok objects.
|
|
4
4
|
|
|
5
|
+
> **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
|
|
6
|
+
> Permission uses `NormalObject`: object shape = CREATE, string = MODIFY.
|
|
7
|
+
|
|
5
8
|
## Data Schema
|
|
6
9
|
|
|
7
10
|
```typescript
|
|
8
11
|
CallPermission_Data {
|
|
9
12
|
// Object reference - string (existing) or object (create new)
|
|
13
|
+
// See _common.md: NormalObject
|
|
10
14
|
object?: NormalObject;
|
|
11
15
|
|
|
12
|
-
description?: string;
|
|
16
|
+
description?: string; // Permission description (max 4000 bcs chars)
|
|
13
17
|
|
|
14
|
-
//
|
|
18
|
+
// Remark operations (discriminated union)
|
|
19
|
+
remark?: {
|
|
20
|
+
op: "set";
|
|
21
|
+
index: number; // Permission index (REQUIRED)
|
|
22
|
+
remark: string; // Permission remark (REQUIRED)
|
|
23
|
+
} | {
|
|
24
|
+
op: "remove";
|
|
25
|
+
index: number; // Permission index (REQUIRED)
|
|
26
|
+
} | {
|
|
27
|
+
op: "clear";
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// Permission table operations (discriminated union)
|
|
15
31
|
table?: {
|
|
32
|
+
// Permission-centric: assign ONE permission to MANY entities
|
|
16
33
|
op: "add perm by index" | "set perm by index" | "remove perm by index";
|
|
17
|
-
index: number;
|
|
34
|
+
index: number; // Permission index
|
|
18
35
|
entity: ManyAccountOrMark_Address;
|
|
19
36
|
} | {
|
|
37
|
+
// Entity-centric: assign MANY permissions to ONE entity
|
|
20
38
|
op: "add perm by entity" | "set perm by entity" | "remove perm by entity";
|
|
21
39
|
entity: AccountOrMark_Address;
|
|
22
|
-
index: number[];
|
|
40
|
+
index: number[]; // Permission indices
|
|
23
41
|
};
|
|
24
42
|
|
|
25
43
|
// Advanced entity operations (requires admin)
|
|
@@ -32,23 +50,16 @@ CallPermission_Data {
|
|
|
32
50
|
entity: AccountOrMark_Address;
|
|
33
51
|
};
|
|
34
52
|
|
|
35
|
-
// Admin management (builder only)
|
|
53
|
+
// Admin management (builder/owner only)
|
|
36
54
|
admin?: {
|
|
37
55
|
op: "add" | "remove" | "set";
|
|
38
56
|
addresses: ManyAccountOrMark_Address;
|
|
39
57
|
};
|
|
40
58
|
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
op: "set" | "remove" | "clear";
|
|
44
|
-
index?: number;
|
|
45
|
-
remark?: string;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
apply?: string[]; // Objects to apply permission to
|
|
49
|
-
builder?: AccountOrMark_Address; // Set/transfer ownership
|
|
59
|
+
apply?: NameOrAddress[]; // Object IDs to apply permission to
|
|
60
|
+
builder?: AccountOrMark_Address; // Set/transfer ownership
|
|
50
61
|
owner_receive?: ReceivedObjectsOrRecently;
|
|
51
|
-
um?: string | null;
|
|
62
|
+
um?: string | null; // Contact object
|
|
52
63
|
}
|
|
53
64
|
```
|
|
54
65
|
|
|
@@ -1,59 +1,58 @@
|
|
|
1
1
|
# onchain_operations / personal
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Manage your personal on-chain account profile and identity marks.
|
|
4
|
+
|
|
5
|
+
> **Note**: Personal has no `submission` field. There is only one Personal object per account, created automatically on first use.
|
|
4
6
|
|
|
5
7
|
## Data Schema
|
|
6
8
|
|
|
7
9
|
```typescript
|
|
8
10
|
CallPersonal_Data {
|
|
9
|
-
description?: string;
|
|
11
|
+
description?: string; // Personal description (max 4000 bcs chars)
|
|
10
12
|
|
|
11
|
-
referrer?:
|
|
13
|
+
referrer?: NameOrAddress | null; // Referrer ID for joining network
|
|
12
14
|
|
|
13
|
-
//
|
|
15
|
+
// Public personal info records (discriminated union)
|
|
14
16
|
information?: {
|
|
15
17
|
op: "add";
|
|
16
|
-
data:
|
|
17
|
-
name: string; // Record name (social handle, URL, etc.)
|
|
18
|
-
value_type: ValueType; // Value type
|
|
19
|
-
value: SupportedValue; // Value
|
|
20
|
-
}[];
|
|
18
|
+
data: RecordsInEntity[]; // Records to add (PUBLIC: social handles, URLs — NEVER private data)
|
|
21
19
|
} | {
|
|
22
20
|
op: "remove";
|
|
23
|
-
name: string[];
|
|
21
|
+
name: string[]; // Record names to remove
|
|
24
22
|
} | {
|
|
25
23
|
op: "clear";
|
|
26
24
|
};
|
|
27
25
|
|
|
28
|
-
//
|
|
26
|
+
// Public on-chain identity mark (discriminated union)
|
|
29
27
|
mark?: {
|
|
30
28
|
op: "add";
|
|
31
29
|
data: {
|
|
32
|
-
address: string;
|
|
33
|
-
name?: string;
|
|
34
|
-
tags?: string[];
|
|
30
|
+
address: string; // Address
|
|
31
|
+
name?: string; // Name (optional)
|
|
32
|
+
tags?: string[]; // Tags (optional)
|
|
35
33
|
}[];
|
|
36
34
|
} | {
|
|
37
35
|
op: "remove";
|
|
38
36
|
data: {
|
|
39
|
-
address: string;
|
|
40
|
-
tags?: string[];
|
|
37
|
+
address: string; // Address
|
|
38
|
+
tags?: string[]; // Tags to remove
|
|
41
39
|
}[];
|
|
42
40
|
} | {
|
|
43
41
|
op: "clear";
|
|
44
|
-
address: ManyAccountOrMark_Address;
|
|
42
|
+
address: ManyAccountOrMark_Address; // Addresses to clear
|
|
45
43
|
} | {
|
|
46
|
-
op: "transfer";
|
|
47
|
-
to:
|
|
44
|
+
op: "transfer";
|
|
45
|
+
to: string; // Transfer mark to another address
|
|
48
46
|
} | {
|
|
49
|
-
op: "replace";
|
|
50
|
-
new_mark_object: string;
|
|
47
|
+
op: "replace";
|
|
48
|
+
new_mark_object: string; // Replace with new mark object ID
|
|
51
49
|
} | {
|
|
52
|
-
op: "destroy";
|
|
50
|
+
op: "destroy"; // Permanently destroy identity mark
|
|
53
51
|
};
|
|
54
52
|
}
|
|
55
53
|
```
|
|
56
54
|
|
|
57
55
|
---
|
|
58
56
|
|
|
59
|
-
See [_common.md](./_common.md) for shared types: CallEnv, AccountOrMark_Address, ManyAccountOrMark_Address.
|
|
57
|
+
See [_common.md](./_common.md) for shared types: CallEnv, AccountOrMark_Address, ManyAccountOrMark_Address.
|
|
58
|
+
`RecordsInEntity` schema is defined in the MCP source at `src/schema/query/index.ts`.
|
|
@@ -2,30 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
Track and manage active workflows in real-time.
|
|
4
4
|
|
|
5
|
+
> **Note**: Progress is **MODIFY-only** — Progress objects are created via `machine.progress_new`, not directly.
|
|
6
|
+
|
|
5
7
|
## Data Schema
|
|
6
8
|
|
|
7
9
|
```typescript
|
|
8
10
|
CallProgress_Data {
|
|
9
|
-
object:
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
object: NameOrAddress; // Progress ID or name (required) — MODIFY only
|
|
12
|
+
|
|
13
|
+
task?: NameOrAddress; // Task ID (cannot be changed after setting)
|
|
14
|
+
repository?: ObjectsOp; // Context repositories
|
|
12
15
|
|
|
13
16
|
// Manage namespace operators
|
|
14
17
|
progress_namedOperator?: {
|
|
15
18
|
op: "add" | "set" | "remove";
|
|
16
|
-
name: string;
|
|
19
|
+
name: string; // Namespace name (non-empty, max 64 bcs chars)
|
|
17
20
|
operators: ManyAccountOrMark_Address;
|
|
18
21
|
};
|
|
19
22
|
|
|
20
23
|
// Advance workflow
|
|
21
24
|
operate?: {
|
|
22
25
|
operation: {
|
|
23
|
-
next_node_name: string;
|
|
24
|
-
forward: string;
|
|
26
|
+
next_node_name: string; // Target node name (max 64 bcs chars)
|
|
27
|
+
forward: string; // Forward (operation) name (max 64 bcs chars)
|
|
25
28
|
};
|
|
26
|
-
hold?: boolean;
|
|
27
|
-
adminUnhold?: boolean;
|
|
28
|
-
message?: string;
|
|
29
|
+
hold?: boolean; // Lock operation permission
|
|
30
|
+
adminUnhold?: boolean; // Allow admin to force unlock
|
|
31
|
+
message?: string; // Operation note
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
34
|
```
|