wowok_agent 2.1.27 → 2.1.28

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.d.ts CHANGED
@@ -6905,7 +6905,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
6905
6905
  onChain?: boolean | undefined;
6906
6906
  } | undefined;
6907
6907
  }>]>;
6908
- description: z.ZodEffects<z.ZodString, string, string>;
6908
+ description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6909
6909
  receive: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
6910
6910
  balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
6911
6911
  token_type: z.ZodEffects<z.ZodString, string, string>;
@@ -7176,38 +7176,13 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7176
7176
  }[];
7177
7177
  }>, z.ZodObject<{
7178
7178
  op: z.ZodLiteral<"remove">;
7179
- guards: z.ZodArray<z.ZodObject<{
7180
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7181
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7182
- onChain: z.ZodOptional<z.ZodBoolean>;
7183
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
7184
- }, "strict", z.ZodTypeAny, {
7185
- name?: string | undefined;
7186
- replaceExistName?: boolean | undefined;
7187
- tags?: string[] | undefined;
7188
- onChain?: boolean | undefined;
7189
- }, {
7190
- name?: string | undefined;
7191
- replaceExistName?: boolean | undefined;
7192
- tags?: string[] | undefined;
7193
- onChain?: boolean | undefined;
7194
- }>, "many">;
7179
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
7195
7180
  }, "strict", z.ZodTypeAny, {
7196
7181
  op: "remove";
7197
- guards: {
7198
- name?: string | undefined;
7199
- replaceExistName?: boolean | undefined;
7200
- tags?: string[] | undefined;
7201
- onChain?: boolean | undefined;
7202
- }[];
7182
+ guards: string[];
7203
7183
  }, {
7204
7184
  op: "remove";
7205
- guards: {
7206
- name?: string | undefined;
7207
- replaceExistName?: boolean | undefined;
7208
- tags?: string[] | undefined;
7209
- onChain?: boolean | undefined;
7210
- }[];
7185
+ guards: string[];
7211
7186
  }>, z.ZodObject<{
7212
7187
  op: z.ZodLiteral<"clear">;
7213
7188
  }, "strict", z.ZodTypeAny, {
@@ -7265,38 +7240,13 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7265
7240
  }[];
7266
7241
  }>, z.ZodObject<{
7267
7242
  op: z.ZodLiteral<"remove">;
7268
- guards: z.ZodArray<z.ZodObject<{
7269
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7270
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7271
- onChain: z.ZodOptional<z.ZodBoolean>;
7272
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
7273
- }, "strict", z.ZodTypeAny, {
7274
- name?: string | undefined;
7275
- replaceExistName?: boolean | undefined;
7276
- tags?: string[] | undefined;
7277
- onChain?: boolean | undefined;
7278
- }, {
7279
- name?: string | undefined;
7280
- replaceExistName?: boolean | undefined;
7281
- tags?: string[] | undefined;
7282
- onChain?: boolean | undefined;
7283
- }>, "many">;
7243
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
7284
7244
  }, "strict", z.ZodTypeAny, {
7285
7245
  op: "remove";
7286
- guards: {
7287
- name?: string | undefined;
7288
- replaceExistName?: boolean | undefined;
7289
- tags?: string[] | undefined;
7290
- onChain?: boolean | undefined;
7291
- }[];
7246
+ guards: string[];
7292
7247
  }, {
7293
7248
  op: "remove";
7294
- guards: {
7295
- name?: string | undefined;
7296
- replaceExistName?: boolean | undefined;
7297
- tags?: string[] | undefined;
7298
- onChain?: boolean | undefined;
7299
- }[];
7249
+ guards: string[];
7300
7250
  }>, z.ZodObject<{
7301
7251
  op: z.ZodLiteral<"clear">;
7302
7252
  }, "strict", z.ZodTypeAny, {
@@ -7377,7 +7327,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7377
7327
  onChain?: boolean | undefined;
7378
7328
  } | undefined;
7379
7329
  };
7380
- description: string;
7330
+ description?: string | undefined;
7381
7331
  owner_receive?: {
7382
7332
  received: {
7383
7333
  id: string;
@@ -7410,12 +7360,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7410
7360
  }[];
7411
7361
  } | {
7412
7362
  op: "remove";
7413
- guards: {
7414
- name?: string | undefined;
7415
- replaceExistName?: boolean | undefined;
7416
- tags?: string[] | undefined;
7417
- onChain?: boolean | undefined;
7418
- }[];
7363
+ guards: string[];
7419
7364
  } | {
7420
7365
  op: "clear";
7421
7366
  } | undefined;
@@ -7433,12 +7378,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7433
7378
  }[];
7434
7379
  } | {
7435
7380
  op: "remove";
7436
- guards: {
7437
- name?: string | undefined;
7438
- replaceExistName?: boolean | undefined;
7439
- tags?: string[] | undefined;
7440
- onChain?: boolean | undefined;
7441
- }[];
7381
+ guards: string[];
7442
7382
  } | {
7443
7383
  op: "clear";
7444
7384
  } | undefined;
@@ -7509,7 +7449,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7509
7449
  onChain?: boolean | undefined;
7510
7450
  } | undefined;
7511
7451
  };
7512
- description: string;
7452
+ description?: string | undefined;
7513
7453
  owner_receive?: {
7514
7454
  received: {
7515
7455
  id: string;
@@ -7542,12 +7482,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7542
7482
  }[];
7543
7483
  } | {
7544
7484
  op: "remove";
7545
- guards: {
7546
- name?: string | undefined;
7547
- replaceExistName?: boolean | undefined;
7548
- tags?: string[] | undefined;
7549
- onChain?: boolean | undefined;
7550
- }[];
7485
+ guards: string[];
7551
7486
  } | {
7552
7487
  op: "clear";
7553
7488
  } | undefined;
@@ -7565,12 +7500,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7565
7500
  }[];
7566
7501
  } | {
7567
7502
  op: "remove";
7568
- guards: {
7569
- name?: string | undefined;
7570
- replaceExistName?: boolean | undefined;
7571
- tags?: string[] | undefined;
7572
- onChain?: boolean | undefined;
7573
- }[];
7503
+ guards: string[];
7574
7504
  } | {
7575
7505
  op: "clear";
7576
7506
  } | undefined;
@@ -7842,7 +7772,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7842
7772
  onChain?: boolean | undefined;
7843
7773
  } | undefined;
7844
7774
  };
7845
- description: string;
7775
+ description?: string | undefined;
7846
7776
  owner_receive?: {
7847
7777
  received: {
7848
7778
  id: string;
@@ -7875,12 +7805,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7875
7805
  }[];
7876
7806
  } | {
7877
7807
  op: "remove";
7878
- guards: {
7879
- name?: string | undefined;
7880
- replaceExistName?: boolean | undefined;
7881
- tags?: string[] | undefined;
7882
- onChain?: boolean | undefined;
7883
- }[];
7808
+ guards: string[];
7884
7809
  } | {
7885
7810
  op: "clear";
7886
7811
  } | undefined;
@@ -7898,12 +7823,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
7898
7823
  }[];
7899
7824
  } | {
7900
7825
  op: "remove";
7901
- guards: {
7902
- name?: string | undefined;
7903
- replaceExistName?: boolean | undefined;
7904
- tags?: string[] | undefined;
7905
- onChain?: boolean | undefined;
7906
- }[];
7826
+ guards: string[];
7907
7827
  } | {
7908
7828
  op: "clear";
7909
7829
  } | undefined;
@@ -8011,7 +7931,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
8011
7931
  onChain?: boolean | undefined;
8012
7932
  } | undefined;
8013
7933
  };
8014
- description: string;
7934
+ description?: string | undefined;
8015
7935
  owner_receive?: {
8016
7936
  received: {
8017
7937
  id: string;
@@ -8044,12 +7964,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
8044
7964
  }[];
8045
7965
  } | {
8046
7966
  op: "remove";
8047
- guards: {
8048
- name?: string | undefined;
8049
- replaceExistName?: boolean | undefined;
8050
- tags?: string[] | undefined;
8051
- onChain?: boolean | undefined;
8052
- }[];
7967
+ guards: string[];
8053
7968
  } | {
8054
7969
  op: "clear";
8055
7970
  } | undefined;
@@ -8067,12 +7982,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
8067
7982
  }[];
8068
7983
  } | {
8069
7984
  op: "remove";
8070
- guards: {
8071
- name?: string | undefined;
8072
- replaceExistName?: boolean | undefined;
8073
- tags?: string[] | undefined;
8074
- onChain?: boolean | undefined;
8075
- }[];
7985
+ guards: string[];
8076
7986
  } | {
8077
7987
  op: "clear";
8078
7988
  } | undefined;
package/dist/index.js CHANGED
@@ -8,10 +8,156 @@ import packageJson from "../package.json" with { type: "json" };
8
8
  // Import schema
9
9
  import { CallService_DataSchema, CallMachine_DataSchema, MachineNode2File_InputSchema, MachineNode2File_OutputWrappedSchema, CallProgress_DataSchema, CallPermission_DataSchema, CallGuard_DataSchema, Guard2File_InputSchema, Guard2File_OutputWrappedSchema, CallArbitration_DataSchema, CallRepository_DataSchema, CallContact_DataSchema, CallTreasury_DataSchema, CallReward_DataSchema, CallAllocation_DataSchema, CallPersonal_DataSchema, CallPayment_DataSchema, CallDemand_DataSchema, CallOrder_DataSchema, CallEnvSchema, SubmissionCallSchema, strictParse, CallOutputSchema, handleCallResult, createServerConfig, createCapabilitiesConfig, createToolMeta, transformSubmission, getEnvConfig, WipGenerationOptionsSchema, WipToHtmlOptionsSchema, TokenDataFilterSchema, LocalInfoFilterSchema, LocalMarkFilterSchema, AccountFilterSchema, TokenTypeSchema, OnchainEventsInputSchema, OnchainEventsResultSchema, ProtocolInfoQuerySchema, ProtocolInfoResultSchema, WatchQueryOperationsResultSchema, NameOrAddressSchema, AccountOrMark_AddressSchema, ObjectTypeSchema, AccountOperationOutputWrappedSchema, LocalMarkOperationOutputWrappedSchema, LocalInfoOperationOutputWrappedSchema, WipOperationOutputSchema, MessengerOperationOutputSchema, AccountOperationSchema, LocalMarkOperationSchema, LocalInfoOperationSchema, parseMachineNodesFromText, formatNodeErrors as formatMachineNodeErrors, MessengerOperationInputSchema, } from "./schema/index.js";
10
10
  // Import wowok SDK
11
- import { CallService, CallMachine, CallProgress, CallPermission, CallGuard, CallArbitration, CallRepository, CallContact, CallTreasury, CallReward, CallAllocation, CallPersonal, CallPayment, CallDemand, CallOrder, gen_passport, guard2file, parseGuardFile, formatGuardParseErrors, machineNode2file, generateNodeComments, generate_wip, verify_wip, sign_wip, wip2html, account_operation, local_mark_operation, local_info_operation, watch_conversations, send_message, send_file, watch_messages, extract_zip_messages, generate_wts, verify_wts, sign_wts, wts2html, proof_message, query_local_mark_list, query_account_list, query_local_info_list, query_local_token_list, query_account, query_personal, query_objects, query_table, queryProtocolInfo, query_received, queryTableItem_RepositoryData, queryTableItem_PermissionPerm, queryTableItem_RewardRecord, queryTableItem_DemandPresenter, queryTableItem_TreasuryHistory, queryTableItem_MachineNode, queryTableItem_ProgressHistory, queryTableItem_AddressMark, queryTableItem_EntityRegistrar, queryTableItem_EntityLinker, query_events, blacklist, friendslist, guardlist, settings, } from "wowok";
11
+ import { CallService, CallMachine, CallProgress, CallPermission, CallGuard, CallArbitration, CallRepository, CallContact, CallTreasury, CallReward, CallAllocation, CallPersonal, CallPayment, CallDemand, CallOrder, gen_passport, guard2file, parseGuardFile, formatGuardParseErrors, machineNode2file, generateNodeComments, generate_wip, verify_wip, sign_wip, wip2html, account_operation, local_mark_operation, local_info_operation, watch_conversations, send_message, send_file, watch_messages, extract_zip_messages, generate_wts, verify_wts, sign_wts, wts2html, proof_message, query_local_mark_list, query_account_list, query_local_info_list, query_local_token_list, query_account, query_personal, query_objects, query_table, queryProtocolInfo, query_received, queryTableItem_RepositoryData, queryTableItem_PermissionPerm, queryTableItem_RewardRecord, queryTableItem_DemandPresenter, queryTableItem_TreasuryHistory, queryTableItem_MachineNode, queryTableItem_ProgressHistory, queryTableItem_AddressMark, queryTableItem_EntityRegistrar, queryTableItem_EntityLinker, query_events, blacklist, friendslist, guardlist, settings, AmountType, } from "wowok";
12
+ const SERVER_DESCRIPTION = `WoWok MCP Server - Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.
13
+
14
+ ## Token System Overview
15
+
16
+ ### Default Platform Token: WOW
17
+ - Token Type: 0x2::wow::WOW
18
+ - Precision: 1_000_000_000 (9 decimal places)
19
+ - This is the default token for all operations unless specified otherwise
20
+
21
+ ### Multi-Token Support
22
+ The platform supports ANY token (e.g., USDT, USDC, custom tokens). To use non-WOW tokens:
23
+ 1. Use query_toolkit with query_type='token_list' to query available tokens and their precision info
24
+ 2. Use the token's full type string (e.g., '0x2::usdt::USDT') in token_type parameter
25
+ 3. Each token has its own precision - always verify before operations
26
+
27
+ ### Token Precision Handling
28
+ Different tokens have different precisions. ALWAYS query to verify:
29
+ - WOW (default): 1_000_000_000 (9 decimals)
30
+ - Other tokens: Use query_toolkit with query_type='token_list' to get actual precision
31
+ - Never assume a token's decimal places - always query first
32
+
33
+ ## CRITICAL: Token Amount Handling
34
+
35
+ ### Amount Input Rules
36
+ 1. WITH currency unit (e.g., '2WOW', '10.5WOW', '100USDT'):
37
+ - Auto-converted using token's precision: 2WOW -> 2_000_000_000
38
+ - Use for: All on-chain token operations
39
+ - MUST match the token_type parameter
40
+
41
+ 2. WITHOUT currency unit (e.g., '2', '100'):
42
+ - Used as-is: 2 -> 2
43
+ - Use for: Regular numeric parameters (counts, indices, etc.)
44
+
45
+ ### Multi-Token Operation Examples
46
+ - Create USDT-priced Service: token_type='0x2::usdt::USDT', amount='100USDT'
47
+ - Allocate USDC rewards: token_type='0x2::usdc::USDC', amount='500USDC'
48
+ - WOW remains default: omit token_type or use '0x2::wow::WOW'
49
+
50
+ ### Security Warning
51
+ Token amounts are HIGHLY SENSITIVE. Always:
52
+ - Confirm user's intent before executing transfers
53
+ - Verify token type and amount format (with/without unit)
54
+ - Query token precision if unsure
55
+ - Double-check large amount transactions
56
+ - Never assume decimal places - use explicit token unit
57
+
58
+ ## Tool Selection Guide
59
+
60
+ | User Intent | Correct Tool | Wrong Tool (Avoid) |
61
+ |------------|--------------|-------------------|
62
+ | Create service listing | onchain_operations (service) | query_toolkit |
63
+ | Send coins to address | onchain_operations (payment) | account_operation |
64
+ | Check my balance | query_toolkit (account_balance) | onchain_operations |
65
+ | Manage local wallet | account_operation | onchain_operations |
66
+ | Export Guard for edit | guard2file | query_toolkit |
67
+ | Send/Watch encrypted message | messenger_operation | onchain_operations |
68
+ | Create workflow template | onchain_operations (machine) | wip_file |
69
+ | Store my phone number | local_info_operation | onchain_operations |
70
+ | Buy service (create order) | onchain_operations (order) | onchain_operations (service) |
71
+ | Manage my orders | onchain_operations (order) | query_toolkit |
72
+ | Apply for arbitration | onchain_operations (order) | onchain_operations (arbitration) |
73
+ | Create reward pool for marketing | onchain_operations (reward) | onchain_operations (treasury) |
74
+ | Claim rewards from pool | onchain_operations (reward) | query_toolkit |
75
+ | Create fund allocation plan | onchain_operations (allocation) | onchain_operations (treasury) |
76
+ | Execute fund distribution | onchain_operations (allocation) | onchain_operations (payment) |
77
+ | Post service demand with reward | onchain_operations (demand) | onchain_operations (service) |
78
+ | Submit solution for demand | onchain_operations (demand) | onchain_operations (order) |
79
+ | Create team treasury | onchain_operations (treasury) | onchain_operations (allocation) |
80
+ | Deposit/Withdraw from treasury | onchain_operations (treasury) | onchain_operations (payment) |
81
+ | Create access control rules | onchain_operations (permission) | onchain_operations (guard) |
82
+ | Create validation rules (Guard) | onchain_operations (guard) | onchain_operations (permission) |
83
+ | Export Guard for editing | guard2file | query_toolkit |
84
+ | Export Machine nodes for editing | machineNode2file | query_toolkit |
85
+ | Query token list and precision | query_toolkit (token_list) | wowok_buildin_info |
86
+ | Watch on-chain events | onchain_events | query_toolkit |
87
+ | Generate WIP promise file | wip_file (generate) | messenger_operation |
88
+ | Sign WIP file | wip_file (sign) | account_operation (signData) |
89
+ | Verify WIP file integrity | wip_file (verify) | query_toolkit |
90
+ | Send encrypted file via messenger | messenger_operation (send_file) | wip_file |
91
+ | Generate witness timestamp (WTS) | messenger_operation (generate_wts) | wip_file |
92
+ | Query protocol constants | wowok_buildin_info | query_toolkit |
93
+ | Get documentation URL | documents_and_learn | wowok_buildin_info |
94
+
95
+ ## Local vs On-chain Operations
96
+
97
+ ### LOCAL ONLY (Never touch blockchain):
98
+ - account_operation
99
+ - local_mark_operation
100
+ - local_info_operation
101
+
102
+ ### ON-CHAIN (Blockchain transactions):
103
+ - onchain_operations
104
+ - messenger_operation (some operations)
105
+ - wip_file (sign operation)
106
+
107
+ ### QUERY (Read-only):
108
+ - query_toolkit
109
+ - onchain_events
110
+ - wowok_buildin_info
111
+ - documents_and_learn
112
+ - guard2file
113
+ - machineNode2file
114
+ `;
12
115
  // Create server instance
13
116
  const server = new McpServer(createServerConfig(packageJson), createCapabilitiesConfig());
14
117
  // ================================================
118
+ // Helper Functions
119
+ // ================================================
120
+ /**
121
+ * Convert string amount type to AmountType enum
122
+ * Handles case-insensitive matching
123
+ */
124
+ function convertAmountType(type) {
125
+ if (typeof type === "number")
126
+ return type;
127
+ const upperType = type.toUpperCase();
128
+ if (upperType === "GUARDU64IDENTIFIER" || upperType === "GUARD_U64_IDENTIFIER") {
129
+ return AmountType.GuardU64Identifier;
130
+ }
131
+ if (upperType === "FIXED") {
132
+ return AmountType.Fixed;
133
+ }
134
+ return AmountType.Fixed; // default
135
+ }
136
+ /**
137
+ * Transform reward data to convert string amount types to enum values
138
+ */
139
+ function transformRewardData(data) {
140
+ if (!data)
141
+ return data;
142
+ const transformed = { ...data };
143
+ // Transform guard_add array
144
+ if (transformed.guard_add && Array.isArray(transformed.guard_add)) {
145
+ transformed.guard_add = transformed.guard_add.map((guard) => {
146
+ if (guard.amount && typeof guard.amount.type === "string") {
147
+ return {
148
+ ...guard,
149
+ amount: {
150
+ ...guard.amount,
151
+ type: convertAmountType(guard.amount.type)
152
+ }
153
+ };
154
+ }
155
+ return guard;
156
+ });
157
+ }
158
+ return transformed;
159
+ }
160
+ // ================================================
15
161
  // Schema Definitions
16
162
  // ================================================
17
163
  // On-chain Operations Schema (Merged from Merchant and Personal Operations)
@@ -314,7 +460,9 @@ async function handleOnchainOperations(args) {
314
460
  return handleCallResult(result);
315
461
  }
316
462
  case "reward": {
317
- const callReward = new CallReward(validated.data);
463
+ // Transform reward data to convert string amount types to enum values
464
+ const transformedData = transformRewardData(validated.data);
465
+ const callReward = new CallReward(transformedData);
318
466
  const result = validated.submission
319
467
  ? await callReward.call_with_submission(env, transformSubmission(validated.submission))
320
468
  : await callReward.call(env);
@@ -236,38 +236,13 @@ export declare const ExternalDepositGuardSchema: z.ZodDiscriminatedUnion<"op", [
236
236
  }[];
237
237
  }>, z.ZodObject<{
238
238
  op: z.ZodLiteral<"remove">;
239
- guards: z.ZodArray<z.ZodObject<{
240
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
241
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
242
- onChain: z.ZodOptional<z.ZodBoolean>;
243
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
244
- }, "strict", z.ZodTypeAny, {
245
- name?: string | undefined;
246
- replaceExistName?: boolean | undefined;
247
- tags?: string[] | undefined;
248
- onChain?: boolean | undefined;
249
- }, {
250
- name?: string | undefined;
251
- replaceExistName?: boolean | undefined;
252
- tags?: string[] | undefined;
253
- onChain?: boolean | undefined;
254
- }>, "many">;
239
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
255
240
  }, "strict", z.ZodTypeAny, {
256
241
  op: "remove";
257
- guards: {
258
- name?: string | undefined;
259
- replaceExistName?: boolean | undefined;
260
- tags?: string[] | undefined;
261
- onChain?: boolean | undefined;
262
- }[];
242
+ guards: string[];
263
243
  }, {
264
244
  op: "remove";
265
- guards: {
266
- name?: string | undefined;
267
- replaceExistName?: boolean | undefined;
268
- tags?: string[] | undefined;
269
- onChain?: boolean | undefined;
270
- }[];
245
+ guards: string[];
271
246
  }>, z.ZodObject<{
272
247
  op: z.ZodLiteral<"clear">;
273
248
  }, "strict", z.ZodTypeAny, {
@@ -325,38 +300,13 @@ export declare const ExternalWithdrawGuardSchema: z.ZodDiscriminatedUnion<"op",
325
300
  }[];
326
301
  }>, z.ZodObject<{
327
302
  op: z.ZodLiteral<"remove">;
328
- guards: z.ZodArray<z.ZodObject<{
329
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
330
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
331
- onChain: z.ZodOptional<z.ZodBoolean>;
332
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
333
- }, "strict", z.ZodTypeAny, {
334
- name?: string | undefined;
335
- replaceExistName?: boolean | undefined;
336
- tags?: string[] | undefined;
337
- onChain?: boolean | undefined;
338
- }, {
339
- name?: string | undefined;
340
- replaceExistName?: boolean | undefined;
341
- tags?: string[] | undefined;
342
- onChain?: boolean | undefined;
343
- }>, "many">;
303
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
344
304
  }, "strict", z.ZodTypeAny, {
345
305
  op: "remove";
346
- guards: {
347
- name?: string | undefined;
348
- replaceExistName?: boolean | undefined;
349
- tags?: string[] | undefined;
350
- onChain?: boolean | undefined;
351
- }[];
306
+ guards: string[];
352
307
  }, {
353
308
  op: "remove";
354
- guards: {
355
- name?: string | undefined;
356
- replaceExistName?: boolean | undefined;
357
- tags?: string[] | undefined;
358
- onChain?: boolean | undefined;
359
- }[];
309
+ guards: string[];
360
310
  }>, z.ZodObject<{
361
311
  op: z.ZodLiteral<"clear">;
362
312
  }, "strict", z.ZodTypeAny, {
@@ -420,7 +370,7 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
420
370
  onChain?: boolean | undefined;
421
371
  } | undefined;
422
372
  }>]>;
423
- description: z.ZodEffects<z.ZodString, string, string>;
373
+ description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
424
374
  receive: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
425
375
  balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
426
376
  token_type: z.ZodEffects<z.ZodString, string, string>;
@@ -691,38 +641,13 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
691
641
  }[];
692
642
  }>, z.ZodObject<{
693
643
  op: z.ZodLiteral<"remove">;
694
- guards: z.ZodArray<z.ZodObject<{
695
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
696
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
697
- onChain: z.ZodOptional<z.ZodBoolean>;
698
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
699
- }, "strict", z.ZodTypeAny, {
700
- name?: string | undefined;
701
- replaceExistName?: boolean | undefined;
702
- tags?: string[] | undefined;
703
- onChain?: boolean | undefined;
704
- }, {
705
- name?: string | undefined;
706
- replaceExistName?: boolean | undefined;
707
- tags?: string[] | undefined;
708
- onChain?: boolean | undefined;
709
- }>, "many">;
644
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
710
645
  }, "strict", z.ZodTypeAny, {
711
646
  op: "remove";
712
- guards: {
713
- name?: string | undefined;
714
- replaceExistName?: boolean | undefined;
715
- tags?: string[] | undefined;
716
- onChain?: boolean | undefined;
717
- }[];
647
+ guards: string[];
718
648
  }, {
719
649
  op: "remove";
720
- guards: {
721
- name?: string | undefined;
722
- replaceExistName?: boolean | undefined;
723
- tags?: string[] | undefined;
724
- onChain?: boolean | undefined;
725
- }[];
650
+ guards: string[];
726
651
  }>, z.ZodObject<{
727
652
  op: z.ZodLiteral<"clear">;
728
653
  }, "strict", z.ZodTypeAny, {
@@ -780,38 +705,13 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
780
705
  }[];
781
706
  }>, z.ZodObject<{
782
707
  op: z.ZodLiteral<"remove">;
783
- guards: z.ZodArray<z.ZodObject<{
784
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
785
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
786
- onChain: z.ZodOptional<z.ZodBoolean>;
787
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
788
- }, "strict", z.ZodTypeAny, {
789
- name?: string | undefined;
790
- replaceExistName?: boolean | undefined;
791
- tags?: string[] | undefined;
792
- onChain?: boolean | undefined;
793
- }, {
794
- name?: string | undefined;
795
- replaceExistName?: boolean | undefined;
796
- tags?: string[] | undefined;
797
- onChain?: boolean | undefined;
798
- }>, "many">;
708
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
799
709
  }, "strict", z.ZodTypeAny, {
800
710
  op: "remove";
801
- guards: {
802
- name?: string | undefined;
803
- replaceExistName?: boolean | undefined;
804
- tags?: string[] | undefined;
805
- onChain?: boolean | undefined;
806
- }[];
711
+ guards: string[];
807
712
  }, {
808
713
  op: "remove";
809
- guards: {
810
- name?: string | undefined;
811
- replaceExistName?: boolean | undefined;
812
- tags?: string[] | undefined;
813
- onChain?: boolean | undefined;
814
- }[];
714
+ guards: string[];
815
715
  }>, z.ZodObject<{
816
716
  op: z.ZodLiteral<"clear">;
817
717
  }, "strict", z.ZodTypeAny, {
@@ -892,7 +792,7 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
892
792
  onChain?: boolean | undefined;
893
793
  } | undefined;
894
794
  };
895
- description: string;
795
+ description?: string | undefined;
896
796
  owner_receive?: {
897
797
  received: {
898
798
  id: string;
@@ -925,12 +825,7 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
925
825
  }[];
926
826
  } | {
927
827
  op: "remove";
928
- guards: {
929
- name?: string | undefined;
930
- replaceExistName?: boolean | undefined;
931
- tags?: string[] | undefined;
932
- onChain?: boolean | undefined;
933
- }[];
828
+ guards: string[];
934
829
  } | {
935
830
  op: "clear";
936
831
  } | undefined;
@@ -948,12 +843,7 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
948
843
  }[];
949
844
  } | {
950
845
  op: "remove";
951
- guards: {
952
- name?: string | undefined;
953
- replaceExistName?: boolean | undefined;
954
- tags?: string[] | undefined;
955
- onChain?: boolean | undefined;
956
- }[];
846
+ guards: string[];
957
847
  } | {
958
848
  op: "clear";
959
849
  } | undefined;
@@ -1024,7 +914,7 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
1024
914
  onChain?: boolean | undefined;
1025
915
  } | undefined;
1026
916
  };
1027
- description: string;
917
+ description?: string | undefined;
1028
918
  owner_receive?: {
1029
919
  received: {
1030
920
  id: string;
@@ -1057,12 +947,7 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
1057
947
  }[];
1058
948
  } | {
1059
949
  op: "remove";
1060
- guards: {
1061
- name?: string | undefined;
1062
- replaceExistName?: boolean | undefined;
1063
- tags?: string[] | undefined;
1064
- onChain?: boolean | undefined;
1065
- }[];
950
+ guards: string[];
1066
951
  } | {
1067
952
  op: "clear";
1068
953
  } | undefined;
@@ -1080,12 +965,7 @@ export declare const CallTreasury_DataSchema: z.ZodObject<{
1080
965
  }[];
1081
966
  } | {
1082
967
  op: "remove";
1083
- guards: {
1084
- name?: string | undefined;
1085
- replaceExistName?: boolean | undefined;
1086
- tags?: string[] | undefined;
1087
- onChain?: boolean | undefined;
1088
- }[];
968
+ guards: string[];
1089
969
  } | {
1090
970
  op: "clear";
1091
971
  } | undefined;
@@ -1199,7 +1079,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1199
1079
  onChain?: boolean | undefined;
1200
1080
  } | undefined;
1201
1081
  }>]>;
1202
- description: z.ZodEffects<z.ZodString, string, string>;
1082
+ description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1203
1083
  receive: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1204
1084
  balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1205
1085
  token_type: z.ZodEffects<z.ZodString, string, string>;
@@ -1470,38 +1350,13 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1470
1350
  }[];
1471
1351
  }>, z.ZodObject<{
1472
1352
  op: z.ZodLiteral<"remove">;
1473
- guards: z.ZodArray<z.ZodObject<{
1474
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1475
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1476
- onChain: z.ZodOptional<z.ZodBoolean>;
1477
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
1478
- }, "strict", z.ZodTypeAny, {
1479
- name?: string | undefined;
1480
- replaceExistName?: boolean | undefined;
1481
- tags?: string[] | undefined;
1482
- onChain?: boolean | undefined;
1483
- }, {
1484
- name?: string | undefined;
1485
- replaceExistName?: boolean | undefined;
1486
- tags?: string[] | undefined;
1487
- onChain?: boolean | undefined;
1488
- }>, "many">;
1353
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1489
1354
  }, "strict", z.ZodTypeAny, {
1490
1355
  op: "remove";
1491
- guards: {
1492
- name?: string | undefined;
1493
- replaceExistName?: boolean | undefined;
1494
- tags?: string[] | undefined;
1495
- onChain?: boolean | undefined;
1496
- }[];
1356
+ guards: string[];
1497
1357
  }, {
1498
1358
  op: "remove";
1499
- guards: {
1500
- name?: string | undefined;
1501
- replaceExistName?: boolean | undefined;
1502
- tags?: string[] | undefined;
1503
- onChain?: boolean | undefined;
1504
- }[];
1359
+ guards: string[];
1505
1360
  }>, z.ZodObject<{
1506
1361
  op: z.ZodLiteral<"clear">;
1507
1362
  }, "strict", z.ZodTypeAny, {
@@ -1559,38 +1414,13 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1559
1414
  }[];
1560
1415
  }>, z.ZodObject<{
1561
1416
  op: z.ZodLiteral<"remove">;
1562
- guards: z.ZodArray<z.ZodObject<{
1563
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1564
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1565
- onChain: z.ZodOptional<z.ZodBoolean>;
1566
- replaceExistName: z.ZodOptional<z.ZodBoolean>;
1567
- }, "strict", z.ZodTypeAny, {
1568
- name?: string | undefined;
1569
- replaceExistName?: boolean | undefined;
1570
- tags?: string[] | undefined;
1571
- onChain?: boolean | undefined;
1572
- }, {
1573
- name?: string | undefined;
1574
- replaceExistName?: boolean | undefined;
1575
- tags?: string[] | undefined;
1576
- onChain?: boolean | undefined;
1577
- }>, "many">;
1417
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1578
1418
  }, "strict", z.ZodTypeAny, {
1579
1419
  op: "remove";
1580
- guards: {
1581
- name?: string | undefined;
1582
- replaceExistName?: boolean | undefined;
1583
- tags?: string[] | undefined;
1584
- onChain?: boolean | undefined;
1585
- }[];
1420
+ guards: string[];
1586
1421
  }, {
1587
1422
  op: "remove";
1588
- guards: {
1589
- name?: string | undefined;
1590
- replaceExistName?: boolean | undefined;
1591
- tags?: string[] | undefined;
1592
- onChain?: boolean | undefined;
1593
- }[];
1423
+ guards: string[];
1594
1424
  }>, z.ZodObject<{
1595
1425
  op: z.ZodLiteral<"clear">;
1596
1426
  }, "strict", z.ZodTypeAny, {
@@ -1671,7 +1501,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1671
1501
  onChain?: boolean | undefined;
1672
1502
  } | undefined;
1673
1503
  };
1674
- description: string;
1504
+ description?: string | undefined;
1675
1505
  owner_receive?: {
1676
1506
  received: {
1677
1507
  id: string;
@@ -1704,12 +1534,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1704
1534
  }[];
1705
1535
  } | {
1706
1536
  op: "remove";
1707
- guards: {
1708
- name?: string | undefined;
1709
- replaceExistName?: boolean | undefined;
1710
- tags?: string[] | undefined;
1711
- onChain?: boolean | undefined;
1712
- }[];
1537
+ guards: string[];
1713
1538
  } | {
1714
1539
  op: "clear";
1715
1540
  } | undefined;
@@ -1727,12 +1552,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1727
1552
  }[];
1728
1553
  } | {
1729
1554
  op: "remove";
1730
- guards: {
1731
- name?: string | undefined;
1732
- replaceExistName?: boolean | undefined;
1733
- tags?: string[] | undefined;
1734
- onChain?: boolean | undefined;
1735
- }[];
1555
+ guards: string[];
1736
1556
  } | {
1737
1557
  op: "clear";
1738
1558
  } | undefined;
@@ -1803,7 +1623,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1803
1623
  onChain?: boolean | undefined;
1804
1624
  } | undefined;
1805
1625
  };
1806
- description: string;
1626
+ description?: string | undefined;
1807
1627
  owner_receive?: {
1808
1628
  received: {
1809
1629
  id: string;
@@ -1836,12 +1656,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1836
1656
  }[];
1837
1657
  } | {
1838
1658
  op: "remove";
1839
- guards: {
1840
- name?: string | undefined;
1841
- replaceExistName?: boolean | undefined;
1842
- tags?: string[] | undefined;
1843
- onChain?: boolean | undefined;
1844
- }[];
1659
+ guards: string[];
1845
1660
  } | {
1846
1661
  op: "clear";
1847
1662
  } | undefined;
@@ -1859,12 +1674,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
1859
1674
  }[];
1860
1675
  } | {
1861
1676
  op: "remove";
1862
- guards: {
1863
- name?: string | undefined;
1864
- replaceExistName?: boolean | undefined;
1865
- tags?: string[] | undefined;
1866
- onChain?: boolean | undefined;
1867
- }[];
1677
+ guards: string[];
1868
1678
  } | {
1869
1679
  op: "clear";
1870
1680
  } | undefined;
@@ -2136,7 +1946,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
2136
1946
  onChain?: boolean | undefined;
2137
1947
  } | undefined;
2138
1948
  };
2139
- description: string;
1949
+ description?: string | undefined;
2140
1950
  owner_receive?: {
2141
1951
  received: {
2142
1952
  id: string;
@@ -2169,12 +1979,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
2169
1979
  }[];
2170
1980
  } | {
2171
1981
  op: "remove";
2172
- guards: {
2173
- name?: string | undefined;
2174
- replaceExistName?: boolean | undefined;
2175
- tags?: string[] | undefined;
2176
- onChain?: boolean | undefined;
2177
- }[];
1982
+ guards: string[];
2178
1983
  } | {
2179
1984
  op: "clear";
2180
1985
  } | undefined;
@@ -2192,12 +1997,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
2192
1997
  }[];
2193
1998
  } | {
2194
1999
  op: "remove";
2195
- guards: {
2196
- name?: string | undefined;
2197
- replaceExistName?: boolean | undefined;
2198
- tags?: string[] | undefined;
2199
- onChain?: boolean | undefined;
2200
- }[];
2000
+ guards: string[];
2201
2001
  } | {
2202
2002
  op: "clear";
2203
2003
  } | undefined;
@@ -2304,7 +2104,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
2304
2104
  onChain?: boolean | undefined;
2305
2105
  } | undefined;
2306
2106
  };
2307
- description: string;
2107
+ description?: string | undefined;
2308
2108
  owner_receive?: {
2309
2109
  received: {
2310
2110
  id: string;
@@ -2337,12 +2137,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
2337
2137
  }[];
2338
2138
  } | {
2339
2139
  op: "remove";
2340
- guards: {
2341
- name?: string | undefined;
2342
- replaceExistName?: boolean | undefined;
2343
- tags?: string[] | undefined;
2344
- onChain?: boolean | undefined;
2345
- }[];
2140
+ guards: string[];
2346
2141
  } | {
2347
2142
  op: "clear";
2348
2143
  } | undefined;
@@ -2360,12 +2155,7 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
2360
2155
  }[];
2361
2156
  } | {
2362
2157
  op: "remove";
2363
- guards: {
2364
- name?: string | undefined;
2365
- replaceExistName?: boolean | undefined;
2366
- tags?: string[] | undefined;
2367
- onChain?: boolean | undefined;
2368
- }[];
2158
+ guards: string[];
2369
2159
  } | {
2370
2160
  op: "clear";
2371
2161
  } | undefined;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { TypedPermissionObjectSchema, CoinParamSchema, NamedObjectSchema, SubmissionCallSchema, CallEnvSchema } from "./base.js";
3
3
  import { AmountFromDepositGuardSchema, AmountFromWithdrawGuardSchema, PaymentInfoSchema } from "../query/index.js";
4
- import { AccountOrMark_AddressSchema, DescriptionSchema, ReceivedBalanceOrRecentlySchema, ReceivedObjectsOrRecentlySchema } from "../common/index.js";
4
+ import { AccountOrMark_AddressSchema, DescriptionSchema, ReceivedBalanceOrRecentlySchema, ReceivedObjectsOrRecentlySchema, NameOrAddressSchema } from "../common/index.js";
5
5
  import { BalanceTypeSchema } from "../common/index.js";
6
6
  // Deposit 接口
7
7
  export const DepositSchema = z.object({
@@ -33,7 +33,7 @@ export const ExternalDepositGuardSchema = z.discriminatedUnion("op", [
33
33
  }).strict(),
34
34
  z.object({
35
35
  op: z.literal("remove"),
36
- guards: z.array(NamedObjectSchema),
36
+ guards: z.array(NameOrAddressSchema).describe("List of Guard object IDs or names to remove"),
37
37
  }).strict(),
38
38
  z.object({
39
39
  op: z.literal("clear"),
@@ -51,7 +51,7 @@ export const ExternalWithdrawGuardSchema = z.discriminatedUnion("op", [
51
51
  }).strict(),
52
52
  z.object({
53
53
  op: z.literal("remove"),
54
- guards: z.array(NamedObjectSchema),
54
+ guards: z.array(NameOrAddressSchema).describe("List of Guard object IDs or names to remove"),
55
55
  }).strict(),
56
56
  z.object({
57
57
  op: z.literal("clear"),
@@ -60,7 +60,7 @@ export const ExternalWithdrawGuardSchema = z.discriminatedUnion("op", [
60
60
  // CallTreasury_Data 接口
61
61
  export const CallTreasury_DataSchema = z.object({
62
62
  object: TypedPermissionObjectSchema,
63
- description: DescriptionSchema,
63
+ description: DescriptionSchema.optional(),
64
64
  receive: ReceivedBalanceOrRecentlySchema.optional().describe("Receive CoinWrapper objects received by the object and deposit them into its balance."),
65
65
  deposit: DepositSchema.optional().describe("Deposit to Treasury object"),
66
66
  withdraw: WithdrawSchema.optional().describe("Withdraw from Treasury object"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wowok_agent",
3
- "version": "2.1.27",
3
+ "version": "2.1.28",
4
4
  "description": "Making It Easy for Agents to Communicate, Collaborate, Trade, and Trust.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/sdk": "^1.29.0",
32
32
  "lodash": "^4.18.1",
33
- "wowok": "2.1.27",
33
+ "wowok": "2.1.28",
34
34
  "zod": "^3.25.76"
35
35
  },
36
36
  "devDependencies": {