wowok_agent 2.1.20 → 2.1.21

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.
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { NameOrAddressSchema, EntrypointSchema, ManyAccountOrMark_AddressSchema, AccountOrMark_AddressSchema } from "../common/index.js";
2
+ import { NameOrAddressSchema, EntrypointSchema, AccountOrMark_AddressAISchema, ManyAccountOrMark_AddressAISchema } from "../common/index.js";
3
3
  // ============================================================
4
4
  // Messenger Schema Definitions (strictly based on messenger-api.ts and types.ts)
5
5
  // ============================================================
@@ -67,7 +67,7 @@ export const MessageFilterSchema = z.object({
67
67
  account: z.string().optional().describe("Account to filter messages for"),
68
68
  direction: MessageDirectionSchema.optional().describe("Filter by message direction"),
69
69
  status: MessageStatusSchema.optional().describe("Filter by message status"),
70
- peerAddress: AccountOrMark_AddressSchema.optional().describe("Filter by peer address"),
70
+ peerAddress: AccountOrMark_AddressAISchema.optional().describe("Filter by peer address - can be a string (name/address) or full object"),
71
71
  msgType: MessageTypeSchema.optional().describe("Filter by message type"),
72
72
  contentType: MessageContentTypeSchema.optional().describe("Filter by content type"),
73
73
  decryptedOnly: z.boolean().optional().describe("Only return decrypted messages"),
@@ -128,6 +128,7 @@ export const SendMessageResultSchema = z.object({
128
128
  serverPublicKey: z.string().describe("Server public key"),
129
129
  }).optional().describe("Merkle Tree proof data"),
130
130
  guardList: z.array(z.string()).optional().describe("Guard list (only returned on error)"),
131
+ lastReceivedLeafIndex: z.number().optional().describe("Last received leaf index (for message confirmation)"),
131
132
  }).describe("Send message result");
132
133
  // WTS Range Types
133
134
  const BaseRangeSchema = z.object({
@@ -158,7 +159,7 @@ export const WtsRangeSchema = z.discriminatedUnion("type", [
158
159
  // WtsGenerationParams
159
160
  export const WtsGenerationParamsSchema = z.object({
160
161
  myAccount: NameOrAddressSchema.describe("My account name or address (string)"),
161
- peerAccount: AccountOrMark_AddressSchema.describe("Peer account name or address"),
162
+ peerAccount: AccountOrMark_AddressAISchema.describe("Peer account name or address - can be a string (name/address) or full object"),
162
163
  range: WtsRangeSchema.optional().describe("Range filter parameters"),
163
164
  excludePlaintext: z.boolean().optional().describe("Whether to exclude plaintext"),
164
165
  outputDir: z.string().describe("Output directory path"),
@@ -217,11 +218,11 @@ export const ListOperationResponseSchema = z.object({
217
218
  export const BlacklistOperationSchema = z.discriminatedUnion("op", [
218
219
  z.object({
219
220
  op: z.literal("add"),
220
- users: ManyAccountOrMark_AddressSchema.describe("Users to add to blacklist"),
221
+ users: ManyAccountOrMark_AddressAISchema.describe("Users to add to blacklist - can be array of strings (names/addresses) or full object"),
221
222
  }),
222
223
  z.object({
223
224
  op: z.literal("remove"),
224
- users: ManyAccountOrMark_AddressSchema.describe("Users to remove from blacklist"),
225
+ users: ManyAccountOrMark_AddressAISchema.describe("Users to remove from blacklist - can be array of strings (names/addresses) or full object"),
225
226
  }),
226
227
  z.object({
227
228
  op: z.literal("clear"),
@@ -231,18 +232,18 @@ export const BlacklistOperationSchema = z.discriminatedUnion("op", [
231
232
  }),
232
233
  z.object({
233
234
  op: z.literal("exist"),
234
- users: ManyAccountOrMark_AddressSchema.describe("Users to check existence"),
235
+ users: ManyAccountOrMark_AddressAISchema.describe("Users to check existence - can be array of strings (names/addresses) or full object"),
235
236
  }),
236
237
  ]).describe("Blacklist management operation");
237
238
  // Friendslist Operations
238
239
  export const FriendslistOperationSchema = z.discriminatedUnion("op", [
239
240
  z.object({
240
241
  op: z.literal("add"),
241
- users: ManyAccountOrMark_AddressSchema.describe("Users to add to friends list"),
242
+ users: ManyAccountOrMark_AddressAISchema.describe("Users to add to friends list - can be array of strings (names/addresses) or full object"),
242
243
  }),
243
244
  z.object({
244
245
  op: z.literal("remove"),
245
- users: ManyAccountOrMark_AddressSchema.describe("Users to remove from friends list"),
246
+ users: ManyAccountOrMark_AddressAISchema.describe("Users to remove from friends list - can be array of strings (names/addresses) or full object"),
246
247
  }),
247
248
  z.object({
248
249
  op: z.literal("clear"),
@@ -252,7 +253,7 @@ export const FriendslistOperationSchema = z.discriminatedUnion("op", [
252
253
  }),
253
254
  z.object({
254
255
  op: z.literal("exist"),
255
- users: ManyAccountOrMark_AddressSchema.describe("Users to check existence"),
256
+ users: ManyAccountOrMark_AddressAISchema.describe("Users to check existence - can be array of strings (names/addresses) or full object"),
256
257
  }),
257
258
  ]).describe("Friends list management operation");
258
259
  // Guardlist Operations
@@ -273,6 +274,25 @@ export const GuardlistOperationSchema = z.discriminatedUnion("op", [
273
274
  op: z.literal("get"),
274
275
  }),
275
276
  ]).describe("Guard list management operation");
277
+ // Settings Operations
278
+ export const SettingsOperationSchema = z.discriminatedUnion("op", [
279
+ z.object({
280
+ op: z.literal("get"),
281
+ }),
282
+ z.object({
283
+ op: z.literal("set"),
284
+ allowStrangerMessages: z.boolean().optional().describe("Allow messages from strangers"),
285
+ maxInboxSize: z.number().min(1).optional().describe("Maximum inbox size"),
286
+ }),
287
+ ]).describe("Settings management operation");
288
+ // Settings Response Schema
289
+ export const GetSettingsResponseSchema = z.object({
290
+ allowStrangerMessages: z.boolean().optional().describe("Whether messages from strangers are allowed"),
291
+ maxInboxSize: z.number().optional().describe("Current maximum inbox size"),
292
+ serverMinInboxSizeLimit: z.number().describe("Server minimum allowed inbox size limit"),
293
+ serverMaxInboxSizeLimit: z.number().describe("Server maximum allowed inbox size limit"),
294
+ serverDefaultAllowStrangerMessages: z.boolean().describe("Server default setting for allowing stranger messages"),
295
+ }).describe("Get settings response");
276
296
  // ============================================================
277
297
  // Input Schema (Discriminated Union by "operation")
278
298
  // ============================================================
@@ -284,14 +304,14 @@ export const MessengerOperationInputSchema = z.discriminatedUnion("operation", [
284
304
  z.object({
285
305
  operation: z.literal("send_message"),
286
306
  from: NameOrAddressSchema.optional().describe("Sender account name or address. If not specified, uses default account"),
287
- to: AccountOrMark_AddressSchema.describe("Recipient address or account name"),
307
+ to: AccountOrMark_AddressAISchema.describe("Recipient address or account name - can be a string (name/address) or full object"),
288
308
  content: z.string().max(10000).describe("Message content text"),
289
309
  options: SendMessageOptionsSchema.optional().describe("Optional message settings"),
290
310
  }),
291
311
  z.object({
292
312
  operation: z.literal("send_file"),
293
313
  from: NameOrAddressSchema.optional().describe("Sender account name or address. If not specified, uses default account"),
294
- to: AccountOrMark_AddressSchema.describe("Recipient address or account name"),
314
+ to: AccountOrMark_AddressAISchema.describe("Recipient address or account name - can be a string (name/address) or full object"),
295
315
  filePath: z.string().describe("Local file path to send. File will be compressed as ZIP before sending"),
296
316
  options: SendFileOptionsSchema.optional().describe("Optional file sending settings"),
297
317
  }),
@@ -345,6 +365,11 @@ export const MessengerOperationInputSchema = z.discriminatedUnion("operation", [
345
365
  account: NameOrAddressSchema.optional().describe("Account name or address. If not specified, uses default account"),
346
366
  guardlist: GuardlistOperationSchema.describe("Guard list management operation"),
347
367
  }),
368
+ z.object({
369
+ operation: z.literal("settings"),
370
+ account: NameOrAddressSchema.optional().describe("Account name or address. If not specified, uses default account"),
371
+ settings: SettingsOperationSchema.describe("Settings management operation"),
372
+ }),
348
373
  ]).describe("Messenger operation input schema");
349
374
  // ============================================================
350
375
  // Output Schema (Discriminated Union by "operation")
@@ -408,5 +433,10 @@ export const MessengerOperationOutputSchema = z.object({
408
433
  op: z.enum(["add", "remove", "get"]).describe("Operation type"),
409
434
  result: ListOperationResponseSchema.describe("Guard list operation result"),
410
435
  }),
436
+ z.object({
437
+ operation: z.literal("settings"),
438
+ op: z.enum(["get", "set"]).describe("Operation type"),
439
+ result: z.union([GetSettingsResponseSchema, z.boolean()]).describe("Settings operation result - GetSettingsResponse for 'get' operation, boolean for 'set' operation"),
440
+ }),
411
441
  ]).describe("Messenger operation result discriminated union"),
412
442
  }).describe("Messenger operation output schema");
@@ -8486,7 +8486,7 @@ export declare const ObjectGuardSchema: z.ZodObject<{
8486
8486
  local_mark_first?: boolean | undefined;
8487
8487
  }[];
8488
8488
  check_all_founded?: boolean | undefined;
8489
- } | boolean[] | string[] | number[] | number[][] | undefined;
8489
+ } | string[] | boolean[] | number[] | number[][] | undefined;
8490
8490
  object_type?: import("wowok").ObjectType | undefined;
8491
8491
  }, {
8492
8492
  identifier: number;
@@ -8501,7 +8501,7 @@ export declare const ObjectGuardSchema: z.ZodObject<{
8501
8501
  local_mark_first?: boolean | undefined;
8502
8502
  }[];
8503
8503
  check_all_founded?: boolean | undefined;
8504
- } | boolean[] | string[] | number[] | number[][] | undefined;
8504
+ } | string[] | boolean[] | number[] | number[][] | undefined;
8505
8505
  name?: string | undefined;
8506
8506
  object_type?: import("wowok").ObjectType | undefined;
8507
8507
  }>, "many">;
@@ -8636,7 +8636,7 @@ export declare const ObjectGuardSchema: z.ZodObject<{
8636
8636
  local_mark_first?: boolean | undefined;
8637
8637
  }[];
8638
8638
  check_all_founded?: boolean | undefined;
8639
- } | boolean[] | string[] | number[] | number[][] | undefined;
8639
+ } | string[] | boolean[] | number[] | number[][] | undefined;
8640
8640
  object_type?: import("wowok").ObjectType | undefined;
8641
8641
  }, {
8642
8642
  identifier: number;
@@ -8651,7 +8651,7 @@ export declare const ObjectGuardSchema: z.ZodObject<{
8651
8651
  local_mark_first?: boolean | undefined;
8652
8652
  }[];
8653
8653
  check_all_founded?: boolean | undefined;
8654
- } | boolean[] | string[] | number[] | number[][] | undefined;
8654
+ } | string[] | boolean[] | number[] | number[][] | undefined;
8655
8655
  name?: string | undefined;
8656
8656
  object_type?: import("wowok").ObjectType | undefined;
8657
8657
  }>, "many">;
@@ -8786,7 +8786,7 @@ export declare const ObjectGuardSchema: z.ZodObject<{
8786
8786
  local_mark_first?: boolean | undefined;
8787
8787
  }[];
8788
8788
  check_all_founded?: boolean | undefined;
8789
- } | boolean[] | string[] | number[] | number[][] | undefined;
8789
+ } | string[] | boolean[] | number[] | number[][] | undefined;
8790
8790
  object_type?: import("wowok").ObjectType | undefined;
8791
8791
  }, {
8792
8792
  identifier: number;
@@ -8801,7 +8801,7 @@ export declare const ObjectGuardSchema: z.ZodObject<{
8801
8801
  local_mark_first?: boolean | undefined;
8802
8802
  }[];
8803
8803
  check_all_founded?: boolean | undefined;
8804
- } | boolean[] | string[] | number[] | number[][] | undefined;
8804
+ } | string[] | boolean[] | number[] | number[][] | undefined;
8805
8805
  name?: string | undefined;
8806
8806
  object_type?: import("wowok").ObjectType | undefined;
8807
8807
  }>, "many">;
@@ -17167,7 +17167,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
17167
17167
  local_mark_first?: boolean | undefined;
17168
17168
  }[];
17169
17169
  check_all_founded?: boolean | undefined;
17170
- } | boolean[] | string[] | number[] | number[][] | undefined;
17170
+ } | string[] | boolean[] | number[] | number[][] | undefined;
17171
17171
  object_type?: import("wowok").ObjectType | undefined;
17172
17172
  }, {
17173
17173
  identifier: number;
@@ -17182,7 +17182,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
17182
17182
  local_mark_first?: boolean | undefined;
17183
17183
  }[];
17184
17184
  check_all_founded?: boolean | undefined;
17185
- } | boolean[] | string[] | number[] | number[][] | undefined;
17185
+ } | string[] | boolean[] | number[] | number[][] | undefined;
17186
17186
  name?: string | undefined;
17187
17187
  object_type?: import("wowok").ObjectType | undefined;
17188
17188
  }>, "many">;
@@ -17317,7 +17317,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
17317
17317
  local_mark_first?: boolean | undefined;
17318
17318
  }[];
17319
17319
  check_all_founded?: boolean | undefined;
17320
- } | boolean[] | string[] | number[] | number[][] | undefined;
17320
+ } | string[] | boolean[] | number[] | number[][] | undefined;
17321
17321
  object_type?: import("wowok").ObjectType | undefined;
17322
17322
  }, {
17323
17323
  identifier: number;
@@ -17332,7 +17332,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
17332
17332
  local_mark_first?: boolean | undefined;
17333
17333
  }[];
17334
17334
  check_all_founded?: boolean | undefined;
17335
- } | boolean[] | string[] | number[] | number[][] | undefined;
17335
+ } | string[] | boolean[] | number[] | number[][] | undefined;
17336
17336
  name?: string | undefined;
17337
17337
  object_type?: import("wowok").ObjectType | undefined;
17338
17338
  }>, "many">;
@@ -17467,7 +17467,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
17467
17467
  local_mark_first?: boolean | undefined;
17468
17468
  }[];
17469
17469
  check_all_founded?: boolean | undefined;
17470
- } | boolean[] | string[] | number[] | number[][] | undefined;
17470
+ } | string[] | boolean[] | number[] | number[][] | undefined;
17471
17471
  object_type?: import("wowok").ObjectType | undefined;
17472
17472
  }, {
17473
17473
  identifier: number;
@@ -17482,7 +17482,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
17482
17482
  local_mark_first?: boolean | undefined;
17483
17483
  }[];
17484
17484
  check_all_founded?: boolean | undefined;
17485
- } | boolean[] | string[] | number[] | number[][] | undefined;
17485
+ } | string[] | boolean[] | number[] | number[][] | undefined;
17486
17486
  name?: string | undefined;
17487
17487
  object_type?: import("wowok").ObjectType | undefined;
17488
17488
  }>, "many">;
@@ -25299,7 +25299,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
25299
25299
  local_mark_first?: boolean | undefined;
25300
25300
  }[];
25301
25301
  check_all_founded?: boolean | undefined;
25302
- } | boolean[] | string[] | number[] | number[][] | undefined;
25302
+ } | string[] | boolean[] | number[] | number[][] | undefined;
25303
25303
  object_type?: import("wowok").ObjectType | undefined;
25304
25304
  }, {
25305
25305
  identifier: number;
@@ -25314,7 +25314,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
25314
25314
  local_mark_first?: boolean | undefined;
25315
25315
  }[];
25316
25316
  check_all_founded?: boolean | undefined;
25317
- } | boolean[] | string[] | number[] | number[][] | undefined;
25317
+ } | string[] | boolean[] | number[] | number[][] | undefined;
25318
25318
  name?: string | undefined;
25319
25319
  object_type?: import("wowok").ObjectType | undefined;
25320
25320
  }>, "many">;
@@ -25449,7 +25449,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
25449
25449
  local_mark_first?: boolean | undefined;
25450
25450
  }[];
25451
25451
  check_all_founded?: boolean | undefined;
25452
- } | boolean[] | string[] | number[] | number[][] | undefined;
25452
+ } | string[] | boolean[] | number[] | number[][] | undefined;
25453
25453
  object_type?: import("wowok").ObjectType | undefined;
25454
25454
  }, {
25455
25455
  identifier: number;
@@ -25464,7 +25464,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
25464
25464
  local_mark_first?: boolean | undefined;
25465
25465
  }[];
25466
25466
  check_all_founded?: boolean | undefined;
25467
- } | boolean[] | string[] | number[] | number[][] | undefined;
25467
+ } | string[] | boolean[] | number[] | number[][] | undefined;
25468
25468
  name?: string | undefined;
25469
25469
  object_type?: import("wowok").ObjectType | undefined;
25470
25470
  }>, "many">;
@@ -25599,7 +25599,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
25599
25599
  local_mark_first?: boolean | undefined;
25600
25600
  }[];
25601
25601
  check_all_founded?: boolean | undefined;
25602
- } | boolean[] | string[] | number[] | number[][] | undefined;
25602
+ } | string[] | boolean[] | number[] | number[][] | undefined;
25603
25603
  object_type?: import("wowok").ObjectType | undefined;
25604
25604
  }, {
25605
25605
  identifier: number;
@@ -25614,7 +25614,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
25614
25614
  local_mark_first?: boolean | undefined;
25615
25615
  }[];
25616
25616
  check_all_founded?: boolean | undefined;
25617
- } | boolean[] | string[] | number[] | number[][] | undefined;
25617
+ } | string[] | boolean[] | number[] | number[][] | undefined;
25618
25618
  name?: string | undefined;
25619
25619
  object_type?: import("wowok").ObjectType | undefined;
25620
25620
  }>, "many">;
@@ -30948,7 +30948,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
30948
30948
  local_mark_first?: boolean | undefined;
30949
30949
  }[];
30950
30950
  check_all_founded?: boolean | undefined;
30951
- } | boolean[] | string[] | number[] | number[][] | undefined;
30951
+ } | string[] | boolean[] | number[] | number[][] | undefined;
30952
30952
  object_type?: import("wowok").ObjectType | undefined;
30953
30953
  }, {
30954
30954
  identifier: number;
@@ -30963,7 +30963,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
30963
30963
  local_mark_first?: boolean | undefined;
30964
30964
  }[];
30965
30965
  check_all_founded?: boolean | undefined;
30966
- } | boolean[] | string[] | number[] | number[][] | undefined;
30966
+ } | string[] | boolean[] | number[] | number[][] | undefined;
30967
30967
  name?: string | undefined;
30968
30968
  object_type?: import("wowok").ObjectType | undefined;
30969
30969
  }>, "many">;
@@ -33660,7 +33660,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
33660
33660
  local_mark_first?: boolean | undefined;
33661
33661
  }[];
33662
33662
  check_all_founded?: boolean | undefined;
33663
- } | boolean[] | string[] | number[] | number[][] | undefined;
33663
+ } | string[] | boolean[] | number[] | number[][] | undefined;
33664
33664
  object_type?: import("wowok").ObjectType | undefined;
33665
33665
  }, {
33666
33666
  identifier: number;
@@ -33675,7 +33675,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
33675
33675
  local_mark_first?: boolean | undefined;
33676
33676
  }[];
33677
33677
  check_all_founded?: boolean | undefined;
33678
- } | boolean[] | string[] | number[] | number[][] | undefined;
33678
+ } | string[] | boolean[] | number[] | number[][] | undefined;
33679
33679
  name?: string | undefined;
33680
33680
  object_type?: import("wowok").ObjectType | undefined;
33681
33681
  }>, "many">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wowok_agent",
3
- "version": "2.1.20",
3
+ "version": "2.1.21",
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.20",
33
+ "wowok": "2.1.21",
34
34
  "zod": "^3.25.76"
35
35
  },
36
36
  "devDependencies": {