@wowok/agent-mcp 2.3.14 → 2.3.16

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.
Files changed (156) hide show
  1. package/dist/config/index.d.ts +1 -0
  2. package/dist/config/index.js +1 -0
  3. package/dist/config/runtime.d.ts +26 -0
  4. package/dist/config/runtime.js +217 -0
  5. package/dist/customer/industry-risks.d.ts +36 -0
  6. package/dist/customer/industry-risks.js +424 -0
  7. package/dist/customer/info-puzzle.d.ts +102 -0
  8. package/dist/customer/info-puzzle.js +312 -0
  9. package/dist/customer/order-monitor.d.ts +75 -0
  10. package/dist/customer/order-monitor.js +327 -0
  11. package/dist/customer/order-strategy.d.ts +36 -0
  12. package/dist/customer/order-strategy.js +373 -0
  13. package/dist/customer/post-purchase.d.ts +42 -0
  14. package/dist/customer/post-purchase.js +350 -0
  15. package/dist/customer/reminder-system.d.ts +42 -0
  16. package/dist/customer/reminder-system.js +295 -0
  17. package/dist/customer/risk-assessment.d.ts +8 -0
  18. package/dist/customer/risk-assessment.js +337 -0
  19. package/dist/customer/types.d.ts +193 -0
  20. package/dist/customer/types.js +13 -0
  21. package/dist/customer/user-preferences.d.ts +67 -0
  22. package/dist/customer/user-preferences.js +451 -0
  23. package/dist/experience/experience-reuse.d.ts +10 -0
  24. package/dist/experience/experience-reuse.js +103 -0
  25. package/dist/experience/index.d.ts +6 -0
  26. package/dist/experience/index.js +5 -0
  27. package/dist/experience/intent-distill.d.ts +3 -0
  28. package/dist/experience/intent-distill.js +83 -0
  29. package/dist/experience/realtime-feedback.d.ts +5 -0
  30. package/dist/experience/realtime-feedback.js +77 -0
  31. package/dist/experience/types.d.ts +50 -0
  32. package/dist/experience/types.js +1 -0
  33. package/dist/experience/user-profile.d.ts +25 -0
  34. package/dist/experience/user-profile.js +171 -0
  35. package/dist/index.js +570 -186
  36. package/dist/knowledge/acquisition-flywheel.d.ts +50 -0
  37. package/dist/knowledge/acquisition-flywheel.js +183 -0
  38. package/dist/knowledge/arbitration-trust.d.ts +24 -0
  39. package/dist/knowledge/arbitration-trust.js +117 -0
  40. package/dist/knowledge/audit-rules.d.ts +28 -0
  41. package/dist/knowledge/audit-rules.js +141 -0
  42. package/dist/knowledge/demand-matching.d.ts +29 -0
  43. package/dist/knowledge/demand-matching.js +132 -0
  44. package/dist/knowledge/dynamic-pricing.d.ts +31 -0
  45. package/dist/knowledge/dynamic-pricing.js +87 -0
  46. package/dist/knowledge/flywheel-loop.d.ts +87 -0
  47. package/dist/knowledge/flywheel-loop.js +378 -0
  48. package/dist/knowledge/glossary.d.ts +18 -0
  49. package/dist/knowledge/glossary.js +209 -0
  50. package/dist/knowledge/index.d.ts +64 -0
  51. package/dist/knowledge/index.js +66 -0
  52. package/dist/knowledge/industry-evolution.d.ts +82 -0
  53. package/dist/knowledge/industry-evolution.js +323 -0
  54. package/dist/knowledge/industry-generalizer.d.ts +17 -0
  55. package/dist/knowledge/industry-generalizer.js +381 -0
  56. package/dist/knowledge/industry-registry.d.ts +49 -0
  57. package/dist/knowledge/industry-registry.js +167 -0
  58. package/dist/knowledge/intent-metrics.d.ts +42 -0
  59. package/dist/knowledge/intent-metrics.js +566 -0
  60. package/dist/knowledge/process-model.d.ts +24 -0
  61. package/dist/knowledge/process-model.js +160 -0
  62. package/dist/knowledge/reputation-rules.d.ts +42 -0
  63. package/dist/knowledge/reputation-rules.js +99 -0
  64. package/dist/knowledge/reward-templates.d.ts +25 -0
  65. package/dist/knowledge/reward-templates.js +125 -0
  66. package/dist/knowledge/safety-rules.d.ts +36 -0
  67. package/dist/knowledge/safety-rules.js +171 -0
  68. package/dist/knowledge/tool-constraints.d.ts +30 -0
  69. package/dist/knowledge/tool-constraints.js +185 -0
  70. package/dist/knowledge/trust-metrics.d.ts +37 -0
  71. package/dist/knowledge/trust-metrics.js +138 -0
  72. package/dist/loop-engineering/diagnose.d.ts +3 -2
  73. package/dist/loop-engineering/diagnose.js +94 -0
  74. package/dist/loop-engineering/improve.d.ts +1 -1
  75. package/dist/loop-engineering/improve.js +52 -1
  76. package/dist/project/graph.d.ts +71 -0
  77. package/dist/project/graph.js +314 -0
  78. package/dist/project/index.d.ts +62 -0
  79. package/dist/project/index.js +167 -0
  80. package/dist/project/namespace.d.ts +62 -0
  81. package/dist/project/namespace.js +181 -0
  82. package/dist/project/query.d.ts +40 -0
  83. package/dist/project/query.js +110 -0
  84. package/dist/safety/confirm-gate.d.ts +15 -0
  85. package/dist/safety/confirm-gate.js +44 -0
  86. package/dist/safety/index.d.ts +3 -0
  87. package/dist/safety/index.js +3 -0
  88. package/dist/safety/preview.d.ts +2 -0
  89. package/dist/safety/preview.js +36 -0
  90. package/dist/schema/call/allocation.d.ts +15 -0
  91. package/dist/schema/call/arbitration.d.ts +111 -96
  92. package/dist/schema/call/base.d.ts +1070 -44
  93. package/dist/schema/call/base.js +69 -1
  94. package/dist/schema/call/bridge.d.ts +709 -52
  95. package/dist/schema/call/bridge.js +13 -2
  96. package/dist/schema/call/contact.d.ts +15 -0
  97. package/dist/schema/call/demand.d.ts +69 -54
  98. package/dist/schema/call/guard.d.ts +125 -80
  99. package/dist/schema/call/handler.d.ts +3 -0
  100. package/dist/schema/call/handler.js +14 -0
  101. package/dist/schema/call/machine.d.ts +830 -800
  102. package/dist/schema/call/order.d.ts +15 -0
  103. package/dist/schema/call/payment.d.ts +15 -0
  104. package/dist/schema/call/permission.d.ts +15 -0
  105. package/dist/schema/call/personal.d.ts +15 -0
  106. package/dist/schema/call/progress.d.ts +15 -0
  107. package/dist/schema/call/proof.d.ts +42 -12
  108. package/dist/schema/call/proof.js +3 -3
  109. package/dist/schema/call/repository.d.ts +91 -76
  110. package/dist/schema/call/reward.d.ts +45 -30
  111. package/dist/schema/call/semantic.d.ts +1 -0
  112. package/dist/schema/call/semantic.js +217 -0
  113. package/dist/schema/call/service.d.ts +407 -392
  114. package/dist/schema/call/treasury.d.ts +15 -0
  115. package/dist/schema/common/index.js +3 -3
  116. package/dist/schema/local/index.d.ts +228 -72
  117. package/dist/schema/local/index.js +33 -6
  118. package/dist/schema/messenger/index.d.ts +668 -50
  119. package/dist/schema/messenger/index.js +9 -0
  120. package/dist/schema/operations.d.ts +1693 -1369
  121. package/dist/schema/operations.js +2 -2
  122. package/dist/schema/query/index.d.ts +1614 -1614
  123. package/dist/schema/query/index.js +30 -27
  124. package/dist/schemas/account_operation.output.json +25 -16
  125. package/dist/schemas/account_operation.schema.json +1 -1
  126. package/dist/schemas/bridge_operation.output.json +520 -0
  127. package/dist/schemas/bridge_operation.schema.json +15 -0
  128. package/dist/schemas/guard2file.schema.json +15 -0
  129. package/dist/schemas/index.json +1 -1
  130. package/dist/schemas/local_info_operation.output.json +23 -0
  131. package/dist/schemas/local_info_operation.schema.json +1 -1
  132. package/dist/schemas/local_mark_operation.output.json +24 -1
  133. package/dist/schemas/local_mark_operation.schema.json +4 -4
  134. package/dist/schemas/machineNode2file.schema.json +15 -0
  135. package/dist/schemas/messenger_operation.output.json +528 -0
  136. package/dist/schemas/onchain_operations.output.json +350 -16
  137. package/dist/schemas/onchain_operations.schema.json +96 -23
  138. package/dist/schemas/onchain_operations_allocation.schema.json +15 -0
  139. package/dist/schemas/onchain_operations_arbitration.schema.json +15 -0
  140. package/dist/schemas/onchain_operations_contact.schema.json +15 -0
  141. package/dist/schemas/onchain_operations_demand.schema.json +15 -0
  142. package/dist/schemas/onchain_operations_gen_passport.schema.json +30 -0
  143. package/dist/schemas/onchain_operations_guard.schema.json +15 -0
  144. package/dist/schemas/onchain_operations_machine.schema.json +81 -23
  145. package/dist/schemas/onchain_operations_order.schema.json +15 -0
  146. package/dist/schemas/onchain_operations_payment.schema.json +15 -0
  147. package/dist/schemas/onchain_operations_permission.schema.json +15 -0
  148. package/dist/schemas/onchain_operations_personal.schema.json +15 -0
  149. package/dist/schemas/onchain_operations_progress.schema.json +15 -0
  150. package/dist/schemas/onchain_operations_repository.schema.json +15 -0
  151. package/dist/schemas/onchain_operations_reward.schema.json +15 -0
  152. package/dist/schemas/onchain_operations_service.schema.json +15 -0
  153. package/dist/schemas/onchain_operations_treasury.schema.json +15 -0
  154. package/dist/schemas/onchain_table_data.output.json +221 -69
  155. package/dist/schemas/onchain_table_data.schema.json +2 -2
  156. package/package.json +2 -2
@@ -1,6 +1,18 @@
1
1
  import { EntrypointSchema, ObjectOwnerSchema, NameOrAddressSchema, NameSchema, WowAddressSchema, TokenTypeSchema, FaucetNetworkSchema } from "../common/index.js";
2
2
  import { z } from "zod";
3
3
  const SemanticSummarySchema = z.any();
4
+ const LocalOperationErrorFields = {
5
+ error_code: z
6
+ .enum([
7
+ "invalid_parameter", "guard_rejected", "state_conflict",
8
+ "insufficient_balance", "object_not_found", "permission_denied",
9
+ "immutable_violation", "network_error", "unknown",
10
+ ])
11
+ .optional()
12
+ .describe("Error classification for programmatic recovery"),
13
+ retryable: z.boolean().optional().describe("Whether the operation can be retried as-is"),
14
+ recovery_hint: z.string().optional().describe("Recovery suggestion for AI or user"),
15
+ };
4
16
  export const LocalMarkConstraints = {
5
17
  nameMaxLength: 64,
6
18
  tagMaxLength: 64,
@@ -59,7 +71,7 @@ export const WowEventSchema = z.discriminatedUnion("bcsEncoding", [
59
71
  z.object({
60
72
  id: EventIdSchema.describe("Event ID"),
61
73
  packageId: z.string().describe("Package ID where event originated"),
62
- parsedJson: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), z.null()])).describe("Parsed JSON value of the event"),
74
+ parsedJson: z.record(z.string(), z.unknown()).describe("Parsed JSON value of the event"),
63
75
  sender: z.string().describe("Sender's address"),
64
76
  timestampMs: z.union([z.string(), z.null()]).optional().describe("UTC timestamp in milliseconds since epoch"),
65
77
  transactionModule: z.string().describe("Module where event originated"),
@@ -70,7 +82,7 @@ export const WowEventSchema = z.discriminatedUnion("bcsEncoding", [
70
82
  z.object({
71
83
  id: EventIdSchema.describe("Event ID"),
72
84
  packageId: z.string().describe("Package ID where event originated"),
73
- parsedJson: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), z.null()])).describe("Parsed JSON value of the event"),
85
+ parsedJson: z.record(z.string(), z.unknown()).describe("Parsed JSON value of the event"),
74
86
  sender: z.string().describe("Sender's ID"),
75
87
  timestampMs: z.union([z.string(), z.null()]).optional().describe("UTC timestamp in milliseconds since epoch"),
76
88
  transactionModule: z.string().describe("Module where event originated"),
@@ -231,7 +243,7 @@ export const MarkParamSchema = z
231
243
  .describe("If true, replace existing mark with same name; if false (default), throw error when name exists"),
232
244
  })
233
245
  .optional()
234
- .describe("Mark naming configuration"),
246
+ .describe("Mark naming configuration. MUST be an object {value: string, replaceExistName?: boolean}, NOT a plain string. Example: {name: {value: 'my-account', replaceExistName: true}}"),
235
247
  address: WowAddressSchema,
236
248
  tags: z
237
249
  .array(z
@@ -241,7 +253,7 @@ export const MarkParamSchema = z
241
253
  .optional()
242
254
  .describe(`Tags for categorization (max ${LocalMarkConstraints.tagMaxCount} tags, each max ${LocalMarkConstraints.tagMaxLength} bcs characters)`),
243
255
  })
244
- .describe("LOCAL ONLY: Parameters for creating or updating a LOCAL mark. This data is stored privately on your device and will NEVER be published to the blockchain. For public on-chain marks, use the 'personal' tool instead.");
256
+ .describe("LOCAL ONLY: Parameters for creating or updating a LOCAL mark. This data is stored privately on your device and will NEVER be published to the blockchain. For public on-chain marks, use the 'personal' tool instead. IMPORTANT: 'name' field is an OBJECT {value, replaceExistName?}, not a string.");
245
257
  export const MarkDataSchema = z
246
258
  .object({
247
259
  name: z
@@ -672,7 +684,13 @@ export const LocalMarkOperationSchema = z
672
684
  .optional()
673
685
  .describe("Remove all marks"),
674
686
  })
675
- .describe("Local mark operations. Exactly one operation type (add/remove/clear) must be specified.");
687
+ .refine((data) => data.add !== undefined || data.remove !== undefined || data.clear !== undefined, {
688
+ message: "Exactly one operation field (add/remove/clear) must be specified. " +
689
+ "CORRECT format: {add: {op:'add', data:[...]}} or {remove: {op:'remove', names:[...]}} or {clear: {op:'clear'}}. " +
690
+ "INCORRECT flat format {op:'add', data:[...]} will silently do nothing.",
691
+ })
692
+ .describe("Local mark operations. Exactly one operation type (add/remove/clear) must be specified as a NESTED field. " +
693
+ "Example: {add: {op:'add', data:[...]}} — NOT flat {op:'add', data:[...]}.");
676
694
  export const LocalMarkOperationResultSchema = z.object({
677
695
  clear: z.boolean().optional().describe("Whether all marks were successfully removed"),
678
696
  add: z.array(MarkDataSchema).optional().describe("List of added mark data"),
@@ -717,7 +735,13 @@ export const LocalInfoOperationSchema = z
717
735
  .optional()
718
736
  .describe("Remove all info entries"),
719
737
  })
720
- .describe("Local info operations. Exactly one operation type (add/remove/reset/clear) must be specified.");
738
+ .refine((data) => data.add !== undefined || data.remove !== undefined || data.reset !== undefined || data.clear !== undefined, {
739
+ message: "Exactly one operation field (add/remove/reset/clear) must be specified. " +
740
+ "CORRECT format: {add: {op:'add', data:[...]}} or {remove: {op:'remove', data:[...]}} etc. " +
741
+ "INCORRECT flat format {op:'add', data:[...]} will silently do nothing.",
742
+ })
743
+ .describe("Local info operations. Exactly one operation type (add/remove/reset/clear) must be specified as a NESTED field. " +
744
+ "Example: {add: {op:'add', data:[...]}} — NOT flat {op:'add', data:[...]}.");
721
745
  export const LocalInfoOperationResultSchema = z.object({
722
746
  success: z.boolean().describe("Whether successful"),
723
747
  }).describe("Results of local info operations");
@@ -828,6 +852,7 @@ export const AccountOperationOutputSchema = z.discriminatedUnion("status", [
828
852
  z.object({
829
853
  status: z.literal("error"),
830
854
  error: z.string().describe("Error message"),
855
+ ...LocalOperationErrorFields,
831
856
  }),
832
857
  ]).describe("Account operation output schema with discriminator");
833
858
  export const AccountOperationOutputWrappedSchema = z.object({
@@ -842,6 +867,7 @@ export const LocalMarkOperationOutputSchema = z.discriminatedUnion("status", [
842
867
  z.object({
843
868
  status: z.literal("error"),
844
869
  error: z.string().describe("Error message"),
870
+ ...LocalOperationErrorFields,
845
871
  }),
846
872
  ]).describe("Local mark operation output schema with discriminator");
847
873
  export const LocalMarkOperationOutputWrappedSchema = z.object({
@@ -856,6 +882,7 @@ export const LocalInfoOperationOutputSchema = z.discriminatedUnion("status", [
856
882
  z.object({
857
883
  status: z.literal("error"),
858
884
  error: z.string().describe("Error message"),
885
+ ...LocalOperationErrorFields,
859
886
  }),
860
887
  ]).describe("Local info operation output schema with discriminator");
861
888
  export const LocalInfoOperationOutputWrappedSchema = z.object({