wowok_agent 2.1.34 → 2.1.36

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
@@ -144,7 +144,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
144
144
  }[];
145
145
  check_all_founded?: boolean | undefined;
146
146
  }>>;
147
- order_required_info: z.ZodString;
147
+ order_required_info: z.ZodOptional<z.ZodString>;
148
148
  transfer: z.ZodOptional<z.ZodObject<{
149
149
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
150
150
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
@@ -219,7 +219,6 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
219
219
  payment_remark?: string | undefined;
220
220
  payment_index?: number | undefined;
221
221
  };
222
- order_required_info: string;
223
222
  transfer?: {
224
223
  name_or_address?: string | undefined;
225
224
  local_mark_first?: boolean | undefined;
@@ -231,6 +230,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
231
230
  }[];
232
231
  check_all_founded?: boolean | undefined;
233
232
  } | undefined;
233
+ order_required_info?: string | undefined;
234
234
  namedNewOrder?: {
235
235
  name?: string | undefined;
236
236
  replaceExistName?: boolean | undefined;
@@ -265,7 +265,6 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
265
265
  payment_remark?: string | undefined;
266
266
  payment_index?: number | undefined;
267
267
  };
268
- order_required_info: string;
269
268
  transfer?: {
270
269
  name_or_address?: string | undefined;
271
270
  local_mark_first?: boolean | undefined;
@@ -277,6 +276,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
277
276
  }[];
278
277
  check_all_founded?: boolean | undefined;
279
278
  } | undefined;
279
+ order_required_info?: string | undefined;
280
280
  namedNewOrder?: {
281
281
  name?: string | undefined;
282
282
  replaceExistName?: boolean | undefined;
@@ -700,6 +700,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
700
700
  fix?: string | number | undefined;
701
701
  }[];
702
702
  }>, z.ZodNull]>>;
703
+ buy_guard: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNull]>>;
703
704
  compensation_fund_add: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
704
705
  balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
705
706
  }, "strip", z.ZodTypeAny, {
@@ -884,6 +885,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
884
885
  } | {
885
886
  op: "clear";
886
887
  } | undefined;
888
+ buy_guard?: string | null | undefined;
887
889
  customer_required?: string[] | undefined;
888
890
  arbitrations?: {
889
891
  op: "set" | "add";
@@ -935,7 +937,6 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
935
937
  payment_remark?: string | undefined;
936
938
  payment_index?: number | undefined;
937
939
  };
938
- order_required_info: string;
939
940
  transfer?: {
940
941
  name_or_address?: string | undefined;
941
942
  local_mark_first?: boolean | undefined;
@@ -947,6 +948,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
947
948
  }[];
948
949
  check_all_founded?: boolean | undefined;
949
950
  } | undefined;
951
+ order_required_info?: string | undefined;
950
952
  namedNewOrder?: {
951
953
  name?: string | undefined;
952
954
  replaceExistName?: boolean | undefined;
@@ -1074,6 +1076,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1074
1076
  } | {
1075
1077
  op: "clear";
1076
1078
  } | undefined;
1079
+ buy_guard?: string | null | undefined;
1077
1080
  customer_required?: string[] | undefined;
1078
1081
  arbitrations?: {
1079
1082
  op: "set" | "add";
@@ -1125,7 +1128,6 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1125
1128
  payment_remark?: string | undefined;
1126
1129
  payment_index?: number | undefined;
1127
1130
  };
1128
- order_required_info: string;
1129
1131
  transfer?: {
1130
1132
  name_or_address?: string | undefined;
1131
1133
  local_mark_first?: boolean | undefined;
@@ -1137,6 +1139,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1137
1139
  }[];
1138
1140
  check_all_founded?: boolean | undefined;
1139
1141
  } | undefined;
1142
+ order_required_info?: string | undefined;
1140
1143
  namedNewOrder?: {
1141
1144
  name?: string | undefined;
1142
1145
  replaceExistName?: boolean | undefined;
@@ -1465,6 +1468,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1465
1468
  } | {
1466
1469
  op: "clear";
1467
1470
  } | undefined;
1471
+ buy_guard?: string | null | undefined;
1468
1472
  customer_required?: string[] | undefined;
1469
1473
  arbitrations?: {
1470
1474
  op: "set" | "add";
@@ -1516,7 +1520,6 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1516
1520
  payment_remark?: string | undefined;
1517
1521
  payment_index?: number | undefined;
1518
1522
  };
1519
- order_required_info: string;
1520
1523
  transfer?: {
1521
1524
  name_or_address?: string | undefined;
1522
1525
  local_mark_first?: boolean | undefined;
@@ -1528,6 +1531,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1528
1531
  }[];
1529
1532
  check_all_founded?: boolean | undefined;
1530
1533
  } | undefined;
1534
+ order_required_info?: string | undefined;
1531
1535
  namedNewOrder?: {
1532
1536
  name?: string | undefined;
1533
1537
  replaceExistName?: boolean | undefined;
@@ -1692,6 +1696,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1692
1696
  } | {
1693
1697
  op: "clear";
1694
1698
  } | undefined;
1699
+ buy_guard?: string | null | undefined;
1695
1700
  customer_required?: string[] | undefined;
1696
1701
  arbitrations?: {
1697
1702
  op: "set" | "add";
@@ -1743,7 +1748,6 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1743
1748
  payment_remark?: string | undefined;
1744
1749
  payment_index?: number | undefined;
1745
1750
  };
1746
- order_required_info: string;
1747
1751
  transfer?: {
1748
1752
  name_or_address?: string | undefined;
1749
1753
  local_mark_first?: boolean | undefined;
@@ -1755,6 +1759,7 @@ declare const OnchainOperationsSchema: z.ZodDiscriminatedUnion<"operation_type",
1755
1759
  }[];
1756
1760
  check_all_founded?: boolean | undefined;
1757
1761
  } | undefined;
1762
+ order_required_info?: string | undefined;
1758
1763
  namedNewOrder?: {
1759
1764
  name?: string | undefined;
1760
1765
  replaceExistName?: boolean | undefined;
@@ -13383,14 +13388,17 @@ declare const WipOperationsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
13383
13388
  type: z.ZodLiteral<"verify">;
13384
13389
  wipFilePath: z.ZodString;
13385
13390
  hash_equal: z.ZodOptional<z.ZodString>;
13391
+ requireSignature: z.ZodOptional<z.ZodBoolean>;
13386
13392
  }, "strip", z.ZodTypeAny, {
13387
13393
  type: "verify";
13388
13394
  wipFilePath: string;
13389
13395
  hash_equal?: string | undefined;
13396
+ requireSignature?: boolean | undefined;
13390
13397
  }, {
13391
13398
  type: "verify";
13392
13399
  wipFilePath: string;
13393
13400
  hash_equal?: string | undefined;
13401
+ requireSignature?: boolean | undefined;
13394
13402
  }>, z.ZodObject<{
13395
13403
  type: z.ZodLiteral<"sign">;
13396
13404
  wipFilePath: z.ZodString;
package/dist/index.js CHANGED
@@ -269,6 +269,7 @@ const WipOperationsSchema = z.discriminatedUnion("type", [
269
269
  type: z.literal("verify"),
270
270
  wipFilePath: z.string().describe("WIP file path to verify. Supports: 1) Local file path (e.g., '/path/to/file.wip', 'C:\\Users\\name\\doc.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip', 'http://site.com/file.wip'), 3) Data URL (e.g., 'data:application/json;base64,eyJ3aXAiOi...')"),
271
271
  hash_equal: z.string().optional().describe("Optional expected hash value. If provided, the function will first verify if the file's hash matches this value. If not matched, returns hash mismatch error."),
272
+ requireSignature: z.boolean().optional().describe("Optional flag to require digital signature. If true, verification will fail if WIP file has no signature"),
272
273
  }).describe("Verify WIP file integrity and signatures"),
273
274
  z.object({
274
275
  type: z.literal("sign"),
@@ -388,7 +389,7 @@ async function handleOnchainOperations(args) {
388
389
  case "service": {
389
390
  const callService = new CallService(validated.data);
390
391
  const result = validated.submission
391
- ? await callService.call_with_submission(env, transformSubmission(validated.submission))
392
+ ? await callService.call_with_submission(env, await transformSubmission(validated.submission))
392
393
  : await callService.call(env);
393
394
  return handleCallResult(result);
394
395
  }
@@ -421,42 +422,42 @@ async function handleOnchainOperations(args) {
421
422
  }
422
423
  const callMachine = new CallMachine(validated.data);
423
424
  const result = validated.submission
424
- ? await callMachine.call_with_submission(env, transformSubmission(validated.submission))
425
+ ? await callMachine.call_with_submission(env, await transformSubmission(validated.submission))
425
426
  : await callMachine.call(env);
426
427
  return handleCallResult(result);
427
428
  }
428
429
  case "progress": {
429
430
  const callProgress = new CallProgress(validated.data);
430
431
  const result = validated.submission
431
- ? await callProgress.call_with_submission(env, transformSubmission(validated.submission))
432
+ ? await callProgress.call_with_submission(env, await transformSubmission(validated.submission))
432
433
  : await callProgress.call(env);
433
434
  return handleCallResult(result);
434
435
  }
435
436
  case "repository": {
436
437
  const callRepository = new CallRepository(validated.data);
437
438
  const result = validated.submission
438
- ? await callRepository.call_with_submission(env, transformSubmission(validated.submission))
439
+ ? await callRepository.call_with_submission(env, await transformSubmission(validated.submission))
439
440
  : await callRepository.call(env);
440
441
  return handleCallResult(result);
441
442
  }
442
443
  case "arbitration": {
443
444
  const callArbitration = new CallArbitration(validated.data);
444
445
  const result = validated.submission
445
- ? await callArbitration.call_with_submission(env, transformSubmission(validated.submission))
446
+ ? await callArbitration.call_with_submission(env, await transformSubmission(validated.submission))
446
447
  : await callArbitration.call(env);
447
448
  return handleCallResult(result);
448
449
  }
449
450
  case "contact": {
450
451
  const callContact = new CallContact(validated.data);
451
452
  const result = validated.submission
452
- ? await callContact.call_with_submission(env, transformSubmission(validated.submission))
453
+ ? await callContact.call_with_submission(env, await transformSubmission(validated.submission))
453
454
  : await callContact.call(env);
454
455
  return handleCallResult(result);
455
456
  }
456
457
  case "treasury": {
457
458
  const callTreasury = new CallTreasury(validated.data);
458
459
  const result = validated.submission
459
- ? await callTreasury.call_with_submission(env, transformSubmission(validated.submission))
460
+ ? await callTreasury.call_with_submission(env, await transformSubmission(validated.submission))
460
461
  : await callTreasury.call(env);
461
462
  return handleCallResult(result);
462
463
  }
@@ -465,14 +466,14 @@ async function handleOnchainOperations(args) {
465
466
  const transformedData = transformRewardData(validated.data);
466
467
  const callReward = new CallReward(transformedData);
467
468
  const result = validated.submission
468
- ? await callReward.call_with_submission(env, transformSubmission(validated.submission))
469
+ ? await callReward.call_with_submission(env, await transformSubmission(validated.submission))
469
470
  : await callReward.call(env);
470
471
  return handleCallResult(result);
471
472
  }
472
473
  case "allocation": {
473
474
  const callAllocation = new CallAllocation(validated.data);
474
475
  const result = validated.submission
475
- ? await callAllocation.call_with_submission(env, transformSubmission(validated.submission))
476
+ ? await callAllocation.call_with_submission(env, await transformSubmission(validated.submission))
476
477
  : await callAllocation.call(env);
477
478
  return handleCallResult(result);
478
479
  }
@@ -599,14 +600,14 @@ async function handleOnchainOperations(args) {
599
600
  case "demand": {
600
601
  const callDemand = new CallDemand(validated.data);
601
602
  const result = validated.submission
602
- ? await callDemand.call_with_submission(env, transformSubmission(validated.submission))
603
+ ? await callDemand.call_with_submission(env, await transformSubmission(validated.submission))
603
604
  : await callDemand.call(env);
604
605
  return handleCallResult(result);
605
606
  }
606
607
  case "order": {
607
608
  const callOrder = new CallOrder(validated.data);
608
609
  const result = validated.submission
609
- ? await callOrder.call_with_submission(env, transformSubmission(validated.submission))
610
+ ? await callOrder.call_with_submission(env, await transformSubmission(validated.submission))
610
611
  : await callOrder.call(env);
611
612
  return handleCallResult(result);
612
613
  }
@@ -722,7 +723,7 @@ async function handleWipOperations(args) {
722
723
  break;
723
724
  }
724
725
  case "verify": {
725
- const result = await verify_wip(validated.wipFilePath, validated.hash_equal);
726
+ const result = await verify_wip(validated.wipFilePath, validated.hash_equal, validated.requireSignature);
726
727
  structuredContent = { result: { type: "verify", ...result } };
727
728
  break;
728
729
  }
@@ -62,10 +62,12 @@ export declare function createToolAnnotations(readOnlyHint?: boolean, destructiv
62
62
  };
63
63
  /**
64
64
  * Process submission parameter transformation
65
+ * Resolves Guard names to addresses using LocalMark
66
+ * Throws error if name cannot be resolved to address
65
67
  * @param submission submission parameter
66
68
  * @returns Transformed submission parameter
67
69
  */
68
- export declare function transformSubmission(submission: any): any;
70
+ export declare function transformSubmission(submission: any): Promise<any>;
69
71
  /**
70
72
  * Validate input data
71
73
  * @param data Input data
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Wowok.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { ResponseData } from "wowok";
3
+ import { ResponseData, LocalMark } from "wowok";
4
4
  /**
5
5
  * Process Call result and return unified MCP output format
6
6
  * @param result Call operation result
@@ -141,20 +141,56 @@ export function createToolAnnotations(readOnlyHint = false, destructiveHint = fa
141
141
  }
142
142
  /**
143
143
  * Process submission parameter transformation
144
+ * Resolves Guard names to addresses using LocalMark
145
+ * Throws error if name cannot be resolved to address
144
146
  * @param submission submission parameter
145
147
  * @returns Transformed submission parameter
146
148
  */
147
- export function transformSubmission(submission) {
149
+ export async function transformSubmission(submission) {
148
150
  if (!submission)
149
151
  return undefined;
152
+ // Collect all guard names/addresses that need resolution
153
+ const guardNames = (submission.guard || []).map((g) => g.object).filter(Boolean);
154
+ const submissionGuardNames = (submission.submission || []).map((s) => s.guard).filter(Boolean);
155
+ const allNames = [...new Set([...guardNames, ...submissionGuardNames])];
156
+ // Batch resolve names to addresses
157
+ const resolvedAddresses = allNames.length > 0
158
+ ? await LocalMark.Instance().get_many_address(allNames)
159
+ : [];
160
+ // Create name to address mapping
161
+ const nameToAddress = new Map();
162
+ allNames.forEach((name, index) => {
163
+ const addr = resolvedAddresses[index];
164
+ if (addr) {
165
+ nameToAddress.set(name, addr);
166
+ }
167
+ });
168
+ // Helper function: get address or throw error if not found
169
+ const getAddress = (name) => {
170
+ // If it's already a valid address, return it
171
+ if (nameToAddress.has(name)) {
172
+ return nameToAddress.get(name);
173
+ }
174
+ // If it was resolved from a name, return the address
175
+ for (const [n, addr] of nameToAddress.entries()) {
176
+ if (n === name)
177
+ return addr;
178
+ }
179
+ // If name looks like an address (starts with 0x), return it directly
180
+ if (name.startsWith("0x") && name.length === 66) {
181
+ return name;
182
+ }
183
+ // Otherwise, throw error
184
+ throw new Error(`Guard name or address not found: ${name}`);
185
+ };
150
186
  return {
151
187
  type: "submission",
152
188
  guard: (submission.guard || []).map((g) => ({
153
- object: g.object || "",
189
+ object: getAddress(g.object),
154
190
  impack: g.impack || false,
155
191
  })),
156
192
  submission: (submission.submission || []).map((s) => ({
157
- guard: s.guard || "",
193
+ guard: getAddress(s.guard),
158
194
  submission: s.submission || [],
159
195
  })),
160
196
  };
@@ -21,7 +21,7 @@ export const NodeAddForwardDataSchema = z.object({
21
21
  node_name: NameSchema.describe('Name of the next node.'),
22
22
  forward: z.array(z.object({
23
23
  name: NameSchema.describe('Name of the operation'),
24
- namedOperator: z.union([NotEmptyNameSchema, z.null()]).optional().describe('One of the operation permissions: use operators within the permission space name in the Machine object. Each Progress object can manage operators independently.'),
24
+ namedOperator: z.union([NotEmptyNameSchema, z.null()]).optional().describe('One of the operation permissions: use operators within the permission space name in the Machine object. Each Progress object can manage operators independently. Use empty string "" to indicate the order permission (order owner and agents can operate). When using Order object to operate progress, empty string namedOperator allows order owner/agents to execute the forward without needing other permissions.'),
25
25
  permissionIndex: z.union([PermissionIndexTypeSchema, z.null()]).optional().describe('Second operation permission: use operators specified by the permission index of the Permission object in the Machine object. All Progress objects share the same operators.'),
26
26
  weight: z.number().min(0).max(65535).int().describe('Weight of the operation'),
27
27
  }).strict()).describe('List of operations between the previous and next nodes.'),
@@ -223,7 +223,7 @@ export declare const OrderNewSchema: z.ZodObject<{
223
223
  }[];
224
224
  check_all_founded?: boolean | undefined;
225
225
  }>>;
226
- order_required_info: z.ZodString;
226
+ order_required_info: z.ZodOptional<z.ZodString>;
227
227
  transfer: z.ZodOptional<z.ZodObject<{
228
228
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
229
229
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
@@ -298,7 +298,6 @@ export declare const OrderNewSchema: z.ZodObject<{
298
298
  payment_remark?: string | undefined;
299
299
  payment_index?: number | undefined;
300
300
  };
301
- order_required_info: string;
302
301
  transfer?: {
303
302
  name_or_address?: string | undefined;
304
303
  local_mark_first?: boolean | undefined;
@@ -310,6 +309,7 @@ export declare const OrderNewSchema: z.ZodObject<{
310
309
  }[];
311
310
  check_all_founded?: boolean | undefined;
312
311
  } | undefined;
312
+ order_required_info?: string | undefined;
313
313
  namedNewOrder?: {
314
314
  name?: string | undefined;
315
315
  replaceExistName?: boolean | undefined;
@@ -344,7 +344,6 @@ export declare const OrderNewSchema: z.ZodObject<{
344
344
  payment_remark?: string | undefined;
345
345
  payment_index?: number | undefined;
346
346
  };
347
- order_required_info: string;
348
347
  transfer?: {
349
348
  name_or_address?: string | undefined;
350
349
  local_mark_first?: boolean | undefined;
@@ -356,6 +355,7 @@ export declare const OrderNewSchema: z.ZodObject<{
356
355
  }[];
357
356
  check_all_founded?: boolean | undefined;
358
357
  } | undefined;
358
+ order_required_info?: string | undefined;
359
359
  namedNewOrder?: {
360
360
  name?: string | undefined;
361
361
  replaceExistName?: boolean | undefined;
@@ -620,7 +620,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
620
620
  }[];
621
621
  check_all_founded?: boolean | undefined;
622
622
  }>>;
623
- order_required_info: z.ZodString;
623
+ order_required_info: z.ZodOptional<z.ZodString>;
624
624
  transfer: z.ZodOptional<z.ZodObject<{
625
625
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
626
626
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
@@ -695,7 +695,6 @@ export declare const CallService_DataSchema: z.ZodObject<{
695
695
  payment_remark?: string | undefined;
696
696
  payment_index?: number | undefined;
697
697
  };
698
- order_required_info: string;
699
698
  transfer?: {
700
699
  name_or_address?: string | undefined;
701
700
  local_mark_first?: boolean | undefined;
@@ -707,6 +706,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
707
706
  }[];
708
707
  check_all_founded?: boolean | undefined;
709
708
  } | undefined;
709
+ order_required_info?: string | undefined;
710
710
  namedNewOrder?: {
711
711
  name?: string | undefined;
712
712
  replaceExistName?: boolean | undefined;
@@ -741,7 +741,6 @@ export declare const CallService_DataSchema: z.ZodObject<{
741
741
  payment_remark?: string | undefined;
742
742
  payment_index?: number | undefined;
743
743
  };
744
- order_required_info: string;
745
744
  transfer?: {
746
745
  name_or_address?: string | undefined;
747
746
  local_mark_first?: boolean | undefined;
@@ -753,6 +752,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
753
752
  }[];
754
753
  check_all_founded?: boolean | undefined;
755
754
  } | undefined;
755
+ order_required_info?: string | undefined;
756
756
  namedNewOrder?: {
757
757
  name?: string | undefined;
758
758
  replaceExistName?: boolean | undefined;
@@ -1176,6 +1176,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1176
1176
  fix?: string | number | undefined;
1177
1177
  }[];
1178
1178
  }>, z.ZodNull]>>;
1179
+ buy_guard: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNull]>>;
1179
1180
  compensation_fund_add: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1180
1181
  balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1181
1182
  }, "strip", z.ZodTypeAny, {
@@ -1360,6 +1361,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1360
1361
  } | {
1361
1362
  op: "clear";
1362
1363
  } | undefined;
1364
+ buy_guard?: string | null | undefined;
1363
1365
  customer_required?: string[] | undefined;
1364
1366
  arbitrations?: {
1365
1367
  op: "set" | "add";
@@ -1411,7 +1413,6 @@ export declare const CallService_DataSchema: z.ZodObject<{
1411
1413
  payment_remark?: string | undefined;
1412
1414
  payment_index?: number | undefined;
1413
1415
  };
1414
- order_required_info: string;
1415
1416
  transfer?: {
1416
1417
  name_or_address?: string | undefined;
1417
1418
  local_mark_first?: boolean | undefined;
@@ -1423,6 +1424,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1423
1424
  }[];
1424
1425
  check_all_founded?: boolean | undefined;
1425
1426
  } | undefined;
1427
+ order_required_info?: string | undefined;
1426
1428
  namedNewOrder?: {
1427
1429
  name?: string | undefined;
1428
1430
  replaceExistName?: boolean | undefined;
@@ -1550,6 +1552,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1550
1552
  } | {
1551
1553
  op: "clear";
1552
1554
  } | undefined;
1555
+ buy_guard?: string | null | undefined;
1553
1556
  customer_required?: string[] | undefined;
1554
1557
  arbitrations?: {
1555
1558
  op: "set" | "add";
@@ -1601,7 +1604,6 @@ export declare const CallService_DataSchema: z.ZodObject<{
1601
1604
  payment_remark?: string | undefined;
1602
1605
  payment_index?: number | undefined;
1603
1606
  };
1604
- order_required_info: string;
1605
1607
  transfer?: {
1606
1608
  name_or_address?: string | undefined;
1607
1609
  local_mark_first?: boolean | undefined;
@@ -1613,6 +1615,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1613
1615
  }[];
1614
1616
  check_all_founded?: boolean | undefined;
1615
1617
  } | undefined;
1618
+ order_required_info?: string | undefined;
1616
1619
  namedNewOrder?: {
1617
1620
  name?: string | undefined;
1618
1621
  replaceExistName?: boolean | undefined;
@@ -1791,7 +1794,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
1791
1794
  }[];
1792
1795
  check_all_founded?: boolean | undefined;
1793
1796
  }>>;
1794
- order_required_info: z.ZodString;
1797
+ order_required_info: z.ZodOptional<z.ZodString>;
1795
1798
  transfer: z.ZodOptional<z.ZodObject<{
1796
1799
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1797
1800
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
@@ -1866,7 +1869,6 @@ export declare const CallService_InputSchema: z.ZodObject<{
1866
1869
  payment_remark?: string | undefined;
1867
1870
  payment_index?: number | undefined;
1868
1871
  };
1869
- order_required_info: string;
1870
1872
  transfer?: {
1871
1873
  name_or_address?: string | undefined;
1872
1874
  local_mark_first?: boolean | undefined;
@@ -1878,6 +1880,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
1878
1880
  }[];
1879
1881
  check_all_founded?: boolean | undefined;
1880
1882
  } | undefined;
1883
+ order_required_info?: string | undefined;
1881
1884
  namedNewOrder?: {
1882
1885
  name?: string | undefined;
1883
1886
  replaceExistName?: boolean | undefined;
@@ -1912,7 +1915,6 @@ export declare const CallService_InputSchema: z.ZodObject<{
1912
1915
  payment_remark?: string | undefined;
1913
1916
  payment_index?: number | undefined;
1914
1917
  };
1915
- order_required_info: string;
1916
1918
  transfer?: {
1917
1919
  name_or_address?: string | undefined;
1918
1920
  local_mark_first?: boolean | undefined;
@@ -1924,6 +1926,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
1924
1926
  }[];
1925
1927
  check_all_founded?: boolean | undefined;
1926
1928
  } | undefined;
1929
+ order_required_info?: string | undefined;
1927
1930
  namedNewOrder?: {
1928
1931
  name?: string | undefined;
1929
1932
  replaceExistName?: boolean | undefined;
@@ -2347,6 +2350,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2347
2350
  fix?: string | number | undefined;
2348
2351
  }[];
2349
2352
  }>, z.ZodNull]>>;
2353
+ buy_guard: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNull]>>;
2350
2354
  compensation_fund_add: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
2351
2355
  balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2352
2356
  }, "strip", z.ZodTypeAny, {
@@ -2531,6 +2535,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2531
2535
  } | {
2532
2536
  op: "clear";
2533
2537
  } | undefined;
2538
+ buy_guard?: string | null | undefined;
2534
2539
  customer_required?: string[] | undefined;
2535
2540
  arbitrations?: {
2536
2541
  op: "set" | "add";
@@ -2582,7 +2587,6 @@ export declare const CallService_InputSchema: z.ZodObject<{
2582
2587
  payment_remark?: string | undefined;
2583
2588
  payment_index?: number | undefined;
2584
2589
  };
2585
- order_required_info: string;
2586
2590
  transfer?: {
2587
2591
  name_or_address?: string | undefined;
2588
2592
  local_mark_first?: boolean | undefined;
@@ -2594,6 +2598,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2594
2598
  }[];
2595
2599
  check_all_founded?: boolean | undefined;
2596
2600
  } | undefined;
2601
+ order_required_info?: string | undefined;
2597
2602
  namedNewOrder?: {
2598
2603
  name?: string | undefined;
2599
2604
  replaceExistName?: boolean | undefined;
@@ -2721,6 +2726,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2721
2726
  } | {
2722
2727
  op: "clear";
2723
2728
  } | undefined;
2729
+ buy_guard?: string | null | undefined;
2724
2730
  customer_required?: string[] | undefined;
2725
2731
  arbitrations?: {
2726
2732
  op: "set" | "add";
@@ -2772,7 +2778,6 @@ export declare const CallService_InputSchema: z.ZodObject<{
2772
2778
  payment_remark?: string | undefined;
2773
2779
  payment_index?: number | undefined;
2774
2780
  };
2775
- order_required_info: string;
2776
2781
  transfer?: {
2777
2782
  name_or_address?: string | undefined;
2778
2783
  local_mark_first?: boolean | undefined;
@@ -2784,6 +2789,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2784
2789
  }[];
2785
2790
  check_all_founded?: boolean | undefined;
2786
2791
  } | undefined;
2792
+ order_required_info?: string | undefined;
2787
2793
  namedNewOrder?: {
2788
2794
  name?: string | undefined;
2789
2795
  replaceExistName?: boolean | undefined;
@@ -3112,6 +3118,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
3112
3118
  } | {
3113
3119
  op: "clear";
3114
3120
  } | undefined;
3121
+ buy_guard?: string | null | undefined;
3115
3122
  customer_required?: string[] | undefined;
3116
3123
  arbitrations?: {
3117
3124
  op: "set" | "add";
@@ -3163,7 +3170,6 @@ export declare const CallService_InputSchema: z.ZodObject<{
3163
3170
  payment_remark?: string | undefined;
3164
3171
  payment_index?: number | undefined;
3165
3172
  };
3166
- order_required_info: string;
3167
3173
  transfer?: {
3168
3174
  name_or_address?: string | undefined;
3169
3175
  local_mark_first?: boolean | undefined;
@@ -3175,6 +3181,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
3175
3181
  }[];
3176
3182
  check_all_founded?: boolean | undefined;
3177
3183
  } | undefined;
3184
+ order_required_info?: string | undefined;
3178
3185
  namedNewOrder?: {
3179
3186
  name?: string | undefined;
3180
3187
  replaceExistName?: boolean | undefined;
@@ -3338,6 +3345,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
3338
3345
  } | {
3339
3346
  op: "clear";
3340
3347
  } | undefined;
3348
+ buy_guard?: string | null | undefined;
3341
3349
  customer_required?: string[] | undefined;
3342
3350
  arbitrations?: {
3343
3351
  op: "set" | "add";
@@ -3389,7 +3397,6 @@ export declare const CallService_InputSchema: z.ZodObject<{
3389
3397
  payment_remark?: string | undefined;
3390
3398
  payment_index?: number | undefined;
3391
3399
  };
3392
- order_required_info: string;
3393
3400
  transfer?: {
3394
3401
  name_or_address?: string | undefined;
3395
3402
  local_mark_first?: boolean | undefined;
@@ -3401,6 +3408,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
3401
3408
  }[];
3402
3409
  check_all_founded?: boolean | undefined;
3403
3410
  } | undefined;
3411
+ order_required_info?: string | undefined;
3404
3412
  namedNewOrder?: {
3405
3413
  name?: string | undefined;
3406
3414
  replaceExistName?: boolean | undefined;
@@ -33,7 +33,7 @@ export const DiscountSchema = z.object({
33
33
  export const OrderNewSchema = z.object({
34
34
  buy: BuySchema,
35
35
  agents: ManyAccountOrMark_AddressSchema.optional().describe("Order agents. Agents can operate the order, such as canceling the order, modifying the order status, etc.; but cannot receive the funds received by the order."),
36
- order_required_info: z.string().describe("Contact object ID or WTS Proof object"),
36
+ order_required_info: z.string().optional().describe("Contact object ID or WTS Proof object"),
37
37
  transfer: AccountOrMark_AddressSchema.optional().describe("Set the new owner of the order. Requires order owner permission to set."),
38
38
  namedNewOrder: NamedObjectSchema.optional().describe("Set the local name of the order object."),
39
39
  namedNewAllocation: NamedObjectSchema.optional().describe("Set the local name of the order's Allocation object."),
@@ -72,6 +72,7 @@ export const CallService_DataSchema = z.object({
72
72
  discount_destroy: z.array(NameOrAddressSchema).optional().describe("Destroy existing discount object ID list."),
73
73
  customer_required: z.array(NotEmptyNameSchema).optional().describe("Customer required information. Such as phone, email, etc."),
74
74
  order_allocators: z.union([AllocatorsSchema, z.null()]).optional().describe("Order fund allocator."),
75
+ buy_guard: z.union([NameOrAddressSchema, z.null()]).optional().describe("Buy guard object ID or name."),
75
76
  compensation_fund_add: CoinParamSchema.optional().describe("Compensation fund. Used to claim compensation based on the arbitration result of the Arb object when resolving order disputes."),
76
77
  compensation_locked_time_add: z.number().optional().describe("Lock time for compensation funds added to orders (milliseconds)."),
77
78
  compensation_fund_receive: ReceivedBalanceOrRecentlySchema.optional().describe("Receive order compensation funds."),
@@ -586,12 +586,15 @@ export declare const GenerateWip_InputSchema: z.ZodObject<{
586
586
  export declare const VerifyWip_InputSchema: z.ZodObject<{
587
587
  wipFilePath: z.ZodString;
588
588
  hash_equal: z.ZodOptional<z.ZodString>;
589
+ requireSignature: z.ZodOptional<z.ZodBoolean>;
589
590
  }, "strip", z.ZodTypeAny, {
590
591
  wipFilePath: string;
591
592
  hash_equal?: string | undefined;
593
+ requireSignature?: boolean | undefined;
592
594
  }, {
593
595
  wipFilePath: string;
594
596
  hash_equal?: string | undefined;
597
+ requireSignature?: boolean | undefined;
595
598
  }>;
596
599
  export declare const SignWip_InputSchema: z.ZodObject<{
597
600
  wipFilePath: z.ZodString;
@@ -166,6 +166,7 @@ export const VerifyWip_InputSchema = z
166
166
  .object({
167
167
  wipFilePath: z.string().describe("WIP file path to verify. Supports: 1) Local file path (e.g., '/path/to/file.wip', 'C:\\Users\\name\\doc.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip', 'http://site.com/file.wip'), 3) Data URL (e.g., 'data:application/json;base64,eyJ3aXAiOi...')"),
168
168
  hash_equal: z.string().optional().describe("Optional expected hash value. If provided, the function will first verify if the file's hash matches this value. If not matched, returns hash mismatch error."),
169
+ requireSignature: z.boolean().optional().describe("Optional flag to require digital signature. If true, verification will fail if WIP file has no signature"),
169
170
  })
170
171
  .describe("Verify WIP file tool input parameters");
171
172
  export const SignWip_InputSchema = z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wowok_agent",
3
- "version": "2.1.34",
3
+ "version": "2.1.36",
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.33",
33
+ "wowok": "2.1.35",
34
34
  "zod": "^3.25.76"
35
35
  },
36
36
  "devDependencies": {