@wowok/agent-mcp 2.2.13 → 2.2.14
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/dist/index.js +42 -98
- package/dist/schema-query/index.d.ts +29 -0
- package/dist/schema-query/index.js +149 -0
- package/dist/schemas/account_operation.schema.json +255 -0
- package/dist/schemas/guard2file.schema.json +71 -0
- package/dist/schemas/index.json +139 -0
- package/dist/schemas/local_info_operation.schema.json +142 -0
- package/dist/schemas/local_mark_operation.schema.json +119 -0
- package/dist/schemas/machineNode2file.schema.json +71 -0
- package/dist/schemas/messenger_operation.schema.json +1393 -0
- package/dist/schemas/onchain_events.schema.json +113 -0
- package/dist/schemas/onchain_operations.schema.json +376 -0
- package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
- package/dist/schemas/onchain_operations_contact.schema.json +853 -0
- package/dist/schemas/onchain_operations_demand.schema.json +984 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
- package/dist/schemas/onchain_operations_guard.schema.json +713 -0
- package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
- package/dist/schemas/onchain_operations_order.schema.json +830 -0
- package/dist/schemas/onchain_operations_payment.schema.json +717 -0
- package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
- package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
- package/dist/schemas/onchain_operations_progress.schema.json +751 -0
- package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
- package/dist/schemas/onchain_operations_reward.schema.json +955 -0
- package/dist/schemas/onchain_operations_service.schema.json +1411 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
- package/dist/schemas/onchain_table_data.schema.json +35 -0
- package/dist/schemas/operations/guard.json +163 -0
- package/dist/schemas/operations/permission.json +22 -0
- package/dist/schemas/query_toolkit.schema.json +32 -0
- package/dist/schemas/schema_query.schema.json +33 -0
- package/dist/schemas/wip_file.schema.json +27 -0
- package/dist/schemas/wowok_buildin_info.schema.json +487 -0
- package/package.json +7 -5
- package/dist/docs/index.d.ts +0 -3
- package/dist/docs/index.js +0 -2
- package/dist/docs/loader.d.ts +0 -12
- package/dist/docs/loader.js +0 -177
- package/dist/docs/search.d.ts +0 -17
- package/dist/docs/search.js +0 -325
- package/dist/docs/types.d.ts +0 -55
- package/dist/docs/types.js +0 -1
- package/docs/README.md +0 -249
- package/docs/WIP.md +0 -388
- package/docs/WTS.md +0 -536
- package/docs/docs/account.md +0 -914
- package/docs/docs/allocation.md +0 -635
- package/docs/docs/arbitration.md +0 -1804
- package/docs/docs/arbitration_state_machine.md +0 -270
- package/docs/docs/contact.md +0 -709
- package/docs/docs/demand.md +0 -948
- package/docs/docs/guard.md +0 -1465
- package/docs/docs/localinfo.md +0 -432
- package/docs/docs/localmark.md +0 -583
- package/docs/docs/machine.md +0 -2490
- package/docs/docs/messenger.md +0 -2098
- package/docs/docs/onchain_events.md +0 -267
- package/docs/docs/order.md +0 -1001
- package/docs/docs/payment.md +0 -512
- package/docs/docs/permission.md +0 -1438
- package/docs/docs/personal.md +0 -742
- package/docs/docs/progress.md +0 -1748
- package/docs/docs/query.md +0 -467
- package/docs/docs/repository.md +0 -1043
- package/docs/docs/reward.md +0 -833
- package/docs/docs/service.md +0 -2130
- package/docs/docs/stage-01-introduction.md +0 -243
- package/docs/docs/stage-02-trust.md +0 -302
- package/docs/docs/stage-03-collaboration.md +0 -337
- package/docs/docs/stage-04-transaction.md +0 -277
- package/docs/docs/stage-05-business.md +0 -151
- package/docs/docs/stage-06-personal.md +0 -203
- package/docs/docs/stage-07-query.md +0 -572
- package/docs/docs/stage-08-examples.md +0 -184
- package/docs/docs/treasury.md +0 -1149
- package/docs/docs/wowok_buildin_info.md +0 -740
- package/docs/examples/Insurance/Insurance.md +0 -594
- package/docs/examples/Insurance/Insurance_TestResults.md +0 -481
- package/docs/examples/Insurance/insurance_complete_guard_v1.json +0 -50
- package/docs/examples/MyShop/MyShop.md +0 -1353
- package/docs/examples/MyShop/MyShop_TestResults.md +0 -1003
- package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +0 -1898
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
- package/docs/examples/MyShop_Advanced/machine_nodes.json +0 -222
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -776
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
- package/docs/examples/Travel/Travel.md +0 -1157
- package/docs/examples/Travel/Travel_TestResults.md +0 -743
- package/docs/examples/Travel/calc-weather-timestamps.js +0 -8
- package/docs/examples/Travel/travel_machine_v2_export.json +0 -104
- package/docs/examples/Travel/weather_check_guard_v1.json +0 -51
- package/docs/skills/WOWOK.md +0 -650
- package/docs/skills/onchain_operations/_common.md +0 -406
- package/docs/skills/onchain_operations/_index.md +0 -196
- package/docs/skills/onchain_operations/allocation.md +0 -28
- package/docs/skills/onchain_operations/arbitration.md +0 -106
- package/docs/skills/onchain_operations/contact.md +0 -40
- package/docs/skills/onchain_operations/demand.md +0 -53
- package/docs/skills/onchain_operations/gen_passport.md +0 -23
- package/docs/skills/onchain_operations/guard.md +0 -56
- package/docs/skills/onchain_operations/machine.md +0 -89
- package/docs/skills/onchain_operations/order.md +0 -56
- package/docs/skills/onchain_operations/payment.md +0 -24
- package/docs/skills/onchain_operations/permission.md +0 -68
- package/docs/skills/onchain_operations/personal.md +0 -58
- package/docs/skills/onchain_operations/progress.md +0 -38
- package/docs/skills/onchain_operations/repository.md +0 -70
- package/docs/skills/onchain_operations/reward.md +0 -38
- package/docs/skills/onchain_operations/service.md +0 -78
- package/docs/skills/onchain_operations/treasury.md +0 -68
- package/docs/skills/schema-account_operation.md +0 -402
- package/docs/skills/schema-guard2file.md +0 -153
- package/docs/skills/schema-local_info_operation.md +0 -160
- package/docs/skills/schema-local_mark_operation.md +0 -148
- package/docs/skills/schema-machineNode2file.md +0 -155
- package/docs/skills/schema-messenger_operation.md +0 -547
- package/docs/skills/schema-onchain_events.md +0 -201
- package/docs/skills/schema-onchain_table_data.md +0 -334
- package/docs/skills/schema-query_toolkit.md +0 -395
- package/docs/skills/schema-wip_file.md +0 -240
- package/docs/skills/schema-wowok_buildin_info.md +0 -296
- package/docs/wip-examples/three_body.html +0 -57
- package/docs/wip-examples/three_body.wip +0 -30
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# Guard2File Tool Schema
|
|
2
|
-
|
|
3
|
-
> **Tool Name**: `guard2file`
|
|
4
|
-
> **Description**: Export a Guard object's definition from the blockchain to a local JSON or Markdown file for editing and creating new Guard objects. Note: To query on-chain object information, use the 'query_toolkit' tool instead.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Tool Schema
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
guard2file: Guard2File_Input
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Input Schema
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
Guard2File_Input {
|
|
20
|
-
guard: NameOrAddress, // REQUIRED - Guard object ID or name to export
|
|
21
|
-
file_path: string, // REQUIRED - Output file path (absolute or relative)
|
|
22
|
-
format?: "json" | "markdown", // OPTIONAL - Output format (default: 'json')
|
|
23
|
-
env?: CallEnv // OPTIONAL - Environment configuration
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Sub Schemas
|
|
30
|
-
|
|
31
|
-
### NameOrAddress
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
NameOrAddress = string // Object ID (0x prefix + 64 hex chars) or name (max 64 chars)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### CallEnv
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
CallEnv {
|
|
41
|
-
account?: NameOrAddress, // Account/Object name or ID for signing
|
|
42
|
-
network?: "localnet" | "testnet", // Network entrypoint
|
|
43
|
-
no_cache?: boolean, // Whether to disable caching
|
|
44
|
-
permission_guard?: string[], // Permission guard IDs for extended permissions
|
|
45
|
-
referrer?: string // Referrer ID for first-time network users
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Output Schema
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
Guard2File_OutputWrapped {
|
|
55
|
-
result: Guard2File_Output // Guard2File operation output
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
Guard2File_Output =
|
|
59
|
-
| { status: "success"; data: Guard2File_SuccessData }
|
|
60
|
-
| { status: "error"; error: string }
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Success Data
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
Guard2File_SuccessData {
|
|
67
|
-
file_path: string, // Absolute path of the exported file
|
|
68
|
-
format: "json" | "markdown", // Export format
|
|
69
|
-
guard_object: string // Guard object ID
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Usage Guide
|
|
76
|
-
|
|
77
|
-
### Purpose
|
|
78
|
-
|
|
79
|
-
The `guard2file` tool is specifically designed to:
|
|
80
|
-
1. Export an existing Guard object's definition from the blockchain
|
|
81
|
-
2. Save it to a local file for editing
|
|
82
|
-
3. Use the exported file to create new Guard objects
|
|
83
|
-
|
|
84
|
-
### When to Use
|
|
85
|
-
|
|
86
|
-
| Scenario | Tool to Use |
|
|
87
|
-
|----------|-------------|
|
|
88
|
-
| Export Guard for editing | `guard2file` |
|
|
89
|
-
| Query Guard on-chain state | `query_toolkit` |
|
|
90
|
-
| Create new Guard | `onchain_operations` (guard) |
|
|
91
|
-
| Modify existing Guard | `onchain_operations` (guard) |
|
|
92
|
-
|
|
93
|
-
### File Formats
|
|
94
|
-
|
|
95
|
-
**JSON Format** (`format: "json"`):
|
|
96
|
-
- Machine-readable format
|
|
97
|
-
- Suitable for programmatic processing
|
|
98
|
-
- Default format
|
|
99
|
-
|
|
100
|
-
**Markdown Format** (`format: "markdown"`):
|
|
101
|
-
- Human-readable format with comments
|
|
102
|
-
- Suitable for manual editing
|
|
103
|
-
- Includes documentation
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Example
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
// Export a Guard to JSON file
|
|
111
|
-
guard2file: {
|
|
112
|
-
guard: "0x1234...abcd", // Guard object ID
|
|
113
|
-
file_path: "./my_guard.json", // Output path
|
|
114
|
-
format: "json"
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Export a Guard to Markdown file
|
|
118
|
-
guard2file: {
|
|
119
|
-
guard: "my_guard_name", // Guard name
|
|
120
|
-
file_path: "./my_guard.md", // Output path
|
|
121
|
-
format: "markdown"
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## Output Examples
|
|
128
|
-
|
|
129
|
-
### Success Response
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"result": {
|
|
134
|
-
"status": "success",
|
|
135
|
-
"data": {
|
|
136
|
-
"file_path": "/absolute/path/to/my_guard.json",
|
|
137
|
-
"format": "json",
|
|
138
|
-
"guard_object": "0x1234567890abcdef..."
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Error Response
|
|
145
|
-
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"result": {
|
|
149
|
-
"status": "error",
|
|
150
|
-
"error": "Guard object not found: 0x1234..."
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
```
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# Schema: local_info_operation
|
|
2
|
-
|
|
3
|
-
> 100% LOCAL, NEVER ON-CHAIN - Manage sensitive personal information stored ONLY on your device: delivery addresses, phone numbers, contacts.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Top-Level Structure
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
LocalInfoOperation {
|
|
11
|
-
// Exactly ONE operation type must be specified
|
|
12
|
-
add?: AddOperation;
|
|
13
|
-
remove?: RemoveOperation;
|
|
14
|
-
reset?: ResetOperation;
|
|
15
|
-
clear?: ClearOperation;
|
|
16
|
-
}
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Operation Types
|
|
22
|
-
|
|
23
|
-
### add
|
|
24
|
-
|
|
25
|
-
Add one or more info entries.
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
AddOperation {
|
|
29
|
-
op: "add";
|
|
30
|
-
data: InfoData[]; // At least 1 item required
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
InfoData {
|
|
34
|
-
name: string; // Unique identifier (max 64 bcs characters)
|
|
35
|
-
default: string; // Primary/default value (max 300 bcs characters)
|
|
36
|
-
contents?: string[]; // Additional values (max 50 items, each max 300 bcs)
|
|
37
|
-
createdAt?: number; // Unix timestamp (ms)
|
|
38
|
-
updatedAt?: number; // Unix timestamp (ms)
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Result**:
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
AddResult {
|
|
46
|
-
success: boolean;
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
### remove
|
|
53
|
-
|
|
54
|
-
Remove info entries by name.
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
RemoveOperation {
|
|
58
|
-
op: "remove";
|
|
59
|
-
data: string[]; // Array of info names to remove (at least 1)
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**Result**:
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
RemoveResult {
|
|
67
|
-
success: boolean;
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
### reset
|
|
74
|
-
|
|
75
|
-
Reset the contents of an existing info entry.
|
|
76
|
-
|
|
77
|
-
```typescript
|
|
78
|
-
ResetOperation {
|
|
79
|
-
op: "reset";
|
|
80
|
-
name: string; // Name of info entry to reset
|
|
81
|
-
contents: string[]; // New content list to replace existing
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**Result**:
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
ResetResult {
|
|
89
|
-
success: boolean;
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
### clear
|
|
96
|
-
|
|
97
|
-
Remove all info entries.
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
ClearOperation {
|
|
101
|
-
op: "clear";
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**Result**:
|
|
106
|
-
|
|
107
|
-
```typescript
|
|
108
|
-
ClearResult {
|
|
109
|
-
success: boolean;
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Output Structure
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
LocalInfoOperationOutput {
|
|
119
|
-
status: "success" | "error";
|
|
120
|
-
data?: LocalInfoOperationResult; // Present when status = "success"
|
|
121
|
-
error?: string; // Present when status = "error"
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
LocalInfoOperationResult {
|
|
125
|
-
success: boolean;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Wrapped format
|
|
129
|
-
{
|
|
130
|
-
result: LocalInfoOperationOutput;
|
|
131
|
-
}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Query Local Info List
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
QueryLocalInfoList {
|
|
140
|
-
filter?: LocalInfoFilter;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
LocalInfoFilter {
|
|
144
|
-
name?: string; // Filter by info name (fuzzy match)
|
|
145
|
-
default?: string; // Filter by default value (fuzzy match)
|
|
146
|
-
contents?: string[]; // Filter by contents (contains ANY of specified)
|
|
147
|
-
createdAt?: {
|
|
148
|
-
gte?: number; // Created on or after (ms)
|
|
149
|
-
lte?: number; // Created on or before (ms)
|
|
150
|
-
};
|
|
151
|
-
updatedAt?: {
|
|
152
|
-
gte?: number; // Updated on or after (ms)
|
|
153
|
-
lte?: number; // Updated on or before (ms)
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
QueryLocalInfoListResult {
|
|
158
|
-
result: InfoData[];
|
|
159
|
-
}
|
|
160
|
-
```
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
# Schema: local_mark_operation
|
|
2
|
-
|
|
3
|
-
> 100% LOCAL, NEVER ON-CHAIN - Manage ID names and tags stored ONLY on your local device for easy identification of user address or object IDs by name.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Top-Level Structure
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
LocalMarkOperation {
|
|
11
|
-
// Exactly ONE operation type must be specified
|
|
12
|
-
add?: AddOperation;
|
|
13
|
-
remove?: RemoveOperation;
|
|
14
|
-
clear?: ClearOperation;
|
|
15
|
-
}
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Operation Types
|
|
21
|
-
|
|
22
|
-
### add
|
|
23
|
-
|
|
24
|
-
Add one or more marks.
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
AddOperation {
|
|
28
|
-
op: "add";
|
|
29
|
-
data: MarkParam[]; // At least 1 item required
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
MarkParam {
|
|
33
|
-
address: string; // Valid ID: 0x prefix + 64 hex chars, or builtin ID
|
|
34
|
-
name?: {
|
|
35
|
-
value: string; // Mark name (max 64 bcs characters)
|
|
36
|
-
replaceExistName?: boolean; // Replace existing mark with same name
|
|
37
|
-
};
|
|
38
|
-
tags?: string[]; // Max 50 tags, each max 64 bcs characters
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Result**:
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
AddResult {
|
|
46
|
-
add: MarkData[]; // List of added mark data
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
MarkData {
|
|
50
|
-
name?: string; // Mark name (max 64 bcs characters)
|
|
51
|
-
address: string; // Valid ID
|
|
52
|
-
tags?: string[]; // Tags for categorization
|
|
53
|
-
createdAt?: number; // Unix timestamp (ms)
|
|
54
|
-
updatedAt?: number; // Unix timestamp (ms)
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
### remove
|
|
61
|
-
|
|
62
|
-
Remove marks by name or address.
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
RemoveOperation {
|
|
66
|
-
op: "remove";
|
|
67
|
-
names: string[]; // Array of mark names or addresses to remove (at least 1)
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Result**:
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
RemoveResult {
|
|
75
|
-
remove: MarkData[]; // List of removed mark data
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
### clear
|
|
82
|
-
|
|
83
|
-
Remove all marks.
|
|
84
|
-
|
|
85
|
-
```typescript
|
|
86
|
-
ClearOperation {
|
|
87
|
-
op: "clear";
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**Result**:
|
|
92
|
-
|
|
93
|
-
```typescript
|
|
94
|
-
ClearResult {
|
|
95
|
-
clear: boolean; // Whether all marks were successfully removed
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Output Structure
|
|
102
|
-
|
|
103
|
-
```typescript
|
|
104
|
-
LocalMarkOperationOutput {
|
|
105
|
-
status: "success" | "error";
|
|
106
|
-
data?: LocalMarkOperationResult; // Present when status = "success"
|
|
107
|
-
error?: string; // Present when status = "error"
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
LocalMarkOperationResult {
|
|
111
|
-
add?: MarkData[];
|
|
112
|
-
remove?: MarkData[];
|
|
113
|
-
clear?: boolean;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Wrapped format
|
|
117
|
-
{
|
|
118
|
-
result: LocalMarkOperationOutput;
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Query Local Mark List
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
QueryLocalMarkList {
|
|
128
|
-
filter?: LocalMarkFilter;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
LocalMarkFilter {
|
|
132
|
-
name?: string; // Filter by mark name (fuzzy match)
|
|
133
|
-
tags?: string[]; // Filter by tags (contains ANY of specified)
|
|
134
|
-
address?: string; // Filter by address (exact match)
|
|
135
|
-
createdAt?: {
|
|
136
|
-
gte?: number; // Created on or after (ms)
|
|
137
|
-
lte?: number; // Created on or before (ms)
|
|
138
|
-
};
|
|
139
|
-
updatedAt?: {
|
|
140
|
-
gte?: number; // Updated on or after (ms)
|
|
141
|
-
lte?: number; // Updated on or before (ms)
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
QueryLocalMarkListResult {
|
|
146
|
-
result: MarkData[];
|
|
147
|
-
}
|
|
148
|
-
```
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
# MachineNode2File Tool Schema
|
|
2
|
-
|
|
3
|
-
> **Tool Name**: `machineNode2file`
|
|
4
|
-
> **Description**: Export a Machine object's node definition from the blockchain to a local JSON or Markdown file for editing and creating new Machine objects. Note: To query on-chain object information, use the 'query_toolkit' tool instead.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Tool Schema
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
machineNode2file: MachineNode2File_Input
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Input Schema
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
MachineNode2File_Input {
|
|
20
|
-
machine: NameOrAddress, // REQUIRED - Machine object ID or name to export
|
|
21
|
-
file_path: string, // REQUIRED - Output file path (absolute or relative)
|
|
22
|
-
format?: "json" | "markdown", // OPTIONAL - Output format (default: 'json')
|
|
23
|
-
env?: CallEnv // OPTIONAL - Environment configuration
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Sub Schemas
|
|
30
|
-
|
|
31
|
-
### NameOrAddress
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
NameOrAddress = string // Object ID (0x prefix + 64 hex chars) or name (max 64 chars)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### CallEnv
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
CallEnv {
|
|
41
|
-
account?: NameOrAddress, // Account/Object name or ID for signing
|
|
42
|
-
network?: "localnet" | "testnet", // Network entrypoint
|
|
43
|
-
no_cache?: boolean, // Whether to disable caching
|
|
44
|
-
permission_guard?: string[], // Permission guard IDs for extended permissions
|
|
45
|
-
referrer?: string // Referrer ID for first-time network users
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Output Schema
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
MachineNode2File_OutputWrapped {
|
|
55
|
-
result: MachineNode2File_Output // MachineNode2File operation output
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
MachineNode2File_Output =
|
|
59
|
-
| { status: "success"; data: MachineNode2File_SuccessData }
|
|
60
|
-
| { status: "error"; error: string }
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Success Data
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
MachineNode2File_SuccessData {
|
|
67
|
-
file_path: string, // Absolute path of the exported file
|
|
68
|
-
format: "json" | "markdown", // Export format
|
|
69
|
-
machine_object: NameOrAddress, // Machine object ID
|
|
70
|
-
node_count: number // Number of nodes exported
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Usage Guide
|
|
77
|
-
|
|
78
|
-
### Purpose
|
|
79
|
-
|
|
80
|
-
The `machineNode2file` tool is specifically designed to:
|
|
81
|
-
1. Export an existing Machine object's node definition from the blockchain
|
|
82
|
-
2. Save it to a local file for editing
|
|
83
|
-
3. Use the exported file to create new Machine objects
|
|
84
|
-
|
|
85
|
-
### When to Use
|
|
86
|
-
|
|
87
|
-
| Scenario | Tool to Use |
|
|
88
|
-
|----------|-------------|
|
|
89
|
-
| Export Machine nodes for editing | `machineNode2file` |
|
|
90
|
-
| Query Machine on-chain state | `query_toolkit` |
|
|
91
|
-
| Create new Machine | `onchain_operations` (machine) |
|
|
92
|
-
| Modify existing Machine nodes | `onchain_operations` (machine) |
|
|
93
|
-
|
|
94
|
-
### File Formats
|
|
95
|
-
|
|
96
|
-
**JSON Format** (`format: "json"`):
|
|
97
|
-
- Machine-readable format
|
|
98
|
-
- Suitable for programmatic processing
|
|
99
|
-
- Default format
|
|
100
|
-
|
|
101
|
-
**Markdown Format** (`format: "markdown"`):
|
|
102
|
-
- Human-readable format with comments
|
|
103
|
-
- Suitable for manual editing
|
|
104
|
-
- Includes documentation
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## Example
|
|
109
|
-
|
|
110
|
-
```typescript
|
|
111
|
-
// Export a Machine's nodes to JSON file
|
|
112
|
-
machineNode2file: {
|
|
113
|
-
machine: "0x1234...abcd", // Machine object ID
|
|
114
|
-
file_path: "./my_machine.json", // Output path
|
|
115
|
-
format: "json"
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Export a Machine's nodes to Markdown file
|
|
119
|
-
machineNode2file: {
|
|
120
|
-
machine: "my_machine_name", // Machine name
|
|
121
|
-
file_path: "./my_machine.md", // Output path
|
|
122
|
-
format: "markdown"
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Output Examples
|
|
129
|
-
|
|
130
|
-
### Success Response
|
|
131
|
-
|
|
132
|
-
```json
|
|
133
|
-
{
|
|
134
|
-
"result": {
|
|
135
|
-
"status": "success",
|
|
136
|
-
"data": {
|
|
137
|
-
"file_path": "/absolute/path/to/my_machine.json",
|
|
138
|
-
"format": "json",
|
|
139
|
-
"machine_object": "0x1234567890abcdef...",
|
|
140
|
-
"node_count": 5
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Error Response
|
|
147
|
-
|
|
148
|
-
```json
|
|
149
|
-
{
|
|
150
|
-
"result": {
|
|
151
|
-
"status": "error",
|
|
152
|
-
"error": "Machine object not found: 0x1234..."
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
```
|