@wowok/agent-mcp 2.3.13 → 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 (194) 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/harness/checkpoint.d.ts +8 -0
  36. package/dist/harness/checkpoint.js +129 -0
  37. package/dist/harness/index.d.ts +33 -0
  38. package/dist/harness/index.js +75 -0
  39. package/dist/harness/plan.d.ts +18 -0
  40. package/dist/harness/plan.js +252 -0
  41. package/dist/harness/recover.d.ts +17 -0
  42. package/dist/harness/recover.js +139 -0
  43. package/dist/harness/types.d.ts +137 -0
  44. package/dist/harness/types.js +1 -0
  45. package/dist/harness/verify.d.ts +42 -0
  46. package/dist/harness/verify.js +237 -0
  47. package/dist/index.js +667 -201
  48. package/dist/knowledge/acquisition-flywheel.d.ts +50 -0
  49. package/dist/knowledge/acquisition-flywheel.js +183 -0
  50. package/dist/knowledge/arbitration-trust.d.ts +24 -0
  51. package/dist/knowledge/arbitration-trust.js +117 -0
  52. package/dist/knowledge/audit-rules.d.ts +28 -0
  53. package/dist/knowledge/audit-rules.js +141 -0
  54. package/dist/knowledge/demand-matching.d.ts +29 -0
  55. package/dist/knowledge/demand-matching.js +132 -0
  56. package/dist/knowledge/dynamic-pricing.d.ts +31 -0
  57. package/dist/knowledge/dynamic-pricing.js +87 -0
  58. package/dist/knowledge/flywheel-loop.d.ts +87 -0
  59. package/dist/knowledge/flywheel-loop.js +378 -0
  60. package/dist/knowledge/glossary.d.ts +18 -0
  61. package/dist/knowledge/glossary.js +209 -0
  62. package/dist/knowledge/index.d.ts +64 -0
  63. package/dist/knowledge/index.js +66 -0
  64. package/dist/knowledge/industry-evolution.d.ts +82 -0
  65. package/dist/knowledge/industry-evolution.js +323 -0
  66. package/dist/knowledge/industry-generalizer.d.ts +17 -0
  67. package/dist/knowledge/industry-generalizer.js +381 -0
  68. package/dist/knowledge/industry-registry.d.ts +49 -0
  69. package/dist/knowledge/industry-registry.js +167 -0
  70. package/dist/knowledge/intent-metrics.d.ts +42 -0
  71. package/dist/knowledge/intent-metrics.js +566 -0
  72. package/dist/knowledge/process-model.d.ts +24 -0
  73. package/dist/knowledge/process-model.js +160 -0
  74. package/dist/knowledge/reputation-rules.d.ts +42 -0
  75. package/dist/knowledge/reputation-rules.js +99 -0
  76. package/dist/knowledge/reward-templates.d.ts +25 -0
  77. package/dist/knowledge/reward-templates.js +125 -0
  78. package/dist/knowledge/safety-rules.d.ts +36 -0
  79. package/dist/knowledge/safety-rules.js +171 -0
  80. package/dist/knowledge/tool-constraints.d.ts +30 -0
  81. package/dist/knowledge/tool-constraints.js +185 -0
  82. package/dist/knowledge/trust-metrics.d.ts +37 -0
  83. package/dist/knowledge/trust-metrics.js +138 -0
  84. package/dist/loop-engineering/aggregate.d.ts +50 -0
  85. package/dist/loop-engineering/aggregate.js +132 -0
  86. package/dist/loop-engineering/diagnose.d.ts +22 -0
  87. package/dist/loop-engineering/diagnose.js +273 -0
  88. package/dist/loop-engineering/improve.d.ts +26 -0
  89. package/dist/loop-engineering/improve.js +229 -0
  90. package/dist/loop-engineering/index.d.ts +4 -0
  91. package/dist/loop-engineering/index.js +4 -0
  92. package/dist/loop-engineering/pipeline.d.ts +17 -0
  93. package/dist/loop-engineering/pipeline.js +56 -0
  94. package/dist/mode-market/index.d.ts +3 -0
  95. package/dist/mode-market/index.js +3 -0
  96. package/dist/mode-market/registry.d.ts +53 -0
  97. package/dist/mode-market/registry.js +124 -0
  98. package/dist/mode-market/review.d.ts +27 -0
  99. package/dist/mode-market/review.js +214 -0
  100. package/dist/mode-market/submission.d.ts +25 -0
  101. package/dist/mode-market/submission.js +85 -0
  102. package/dist/project/graph.d.ts +71 -0
  103. package/dist/project/graph.js +314 -0
  104. package/dist/project/index.d.ts +62 -0
  105. package/dist/project/index.js +167 -0
  106. package/dist/project/namespace.d.ts +62 -0
  107. package/dist/project/namespace.js +181 -0
  108. package/dist/project/query.d.ts +40 -0
  109. package/dist/project/query.js +110 -0
  110. package/dist/safety/confirm-gate.d.ts +15 -0
  111. package/dist/safety/confirm-gate.js +44 -0
  112. package/dist/safety/index.d.ts +3 -0
  113. package/dist/safety/index.js +3 -0
  114. package/dist/safety/preview.d.ts +2 -0
  115. package/dist/safety/preview.js +36 -0
  116. package/dist/schema/call/allocation.d.ts +55 -40
  117. package/dist/schema/call/arbitration.d.ts +201 -186
  118. package/dist/schema/call/base.d.ts +2104 -24
  119. package/dist/schema/call/base.js +168 -22
  120. package/dist/schema/call/bridge-handler.js +36 -18
  121. package/dist/schema/call/bridge.d.ts +777 -120
  122. package/dist/schema/call/bridge.js +13 -2
  123. package/dist/schema/call/contact.d.ts +15 -0
  124. package/dist/schema/call/demand.d.ts +69 -54
  125. package/dist/schema/call/guard.d.ts +125 -80
  126. package/dist/schema/call/handler.d.ts +5 -1
  127. package/dist/schema/call/handler.js +108 -3
  128. package/dist/schema/call/index.d.ts +1 -0
  129. package/dist/schema/call/index.js +1 -0
  130. package/dist/schema/call/machine.d.ts +830 -800
  131. package/dist/schema/call/order.d.ts +27 -12
  132. package/dist/schema/call/payment.d.ts +15 -0
  133. package/dist/schema/call/permission.d.ts +15 -0
  134. package/dist/schema/call/personal.d.ts +15 -0
  135. package/dist/schema/call/progress.d.ts +21 -6
  136. package/dist/schema/call/proof.d.ts +42 -12
  137. package/dist/schema/call/proof.js +3 -3
  138. package/dist/schema/call/repository.d.ts +91 -76
  139. package/dist/schema/call/reward.d.ts +51 -36
  140. package/dist/schema/call/semantic.d.ts +24 -0
  141. package/dist/schema/call/semantic.js +981 -0
  142. package/dist/schema/call/service.d.ts +444 -429
  143. package/dist/schema/call/treasury.d.ts +219 -204
  144. package/dist/schema/common/index.js +3 -3
  145. package/dist/schema/local/index.d.ts +341 -74
  146. package/dist/schema/local/index.js +44 -7
  147. package/dist/schema/messenger/index.d.ts +1034 -92
  148. package/dist/schema/messenger/index.js +18 -0
  149. package/dist/schema/operations.d.ts +2634 -1817
  150. package/dist/schema/operations.js +16 -5
  151. package/dist/schema/query/index.d.ts +2293 -2289
  152. package/dist/schema/query/index.js +34 -28
  153. package/dist/schemas/account_operation.output.json +28 -16
  154. package/dist/schemas/account_operation.schema.json +2 -2
  155. package/dist/schemas/bridge_operation.output.json +520 -0
  156. package/dist/schemas/bridge_operation.schema.json +15 -0
  157. package/dist/schemas/guard2file.schema.json +15 -0
  158. package/dist/schemas/index.json +1 -1
  159. package/dist/schemas/local_info_operation.output.json +26 -0
  160. package/dist/schemas/local_info_operation.schema.json +1 -1
  161. package/dist/schemas/local_mark_operation.output.json +27 -1
  162. package/dist/schemas/local_mark_operation.schema.json +4 -4
  163. package/dist/schemas/machineNode2file.schema.json +15 -0
  164. package/dist/schemas/messenger_operation.output.json +549 -0
  165. package/dist/schemas/messenger_operation.schema.json +21 -0
  166. package/dist/schemas/onchain_events.output.json +3 -0
  167. package/dist/schemas/onchain_operations.output.json +814 -37
  168. package/dist/schemas/onchain_operations.schema.json +117 -40
  169. package/dist/schemas/onchain_operations_allocation.schema.json +26 -9
  170. package/dist/schemas/onchain_operations_arbitration.schema.json +26 -9
  171. package/dist/schemas/onchain_operations_contact.schema.json +26 -9
  172. package/dist/schemas/onchain_operations_demand.schema.json +26 -9
  173. package/dist/schemas/onchain_operations_gen_passport.schema.json +51 -17
  174. package/dist/schemas/onchain_operations_guard.schema.json +26 -9
  175. package/dist/schemas/onchain_operations_machine.schema.json +92 -32
  176. package/dist/schemas/onchain_operations_order.schema.json +26 -9
  177. package/dist/schemas/onchain_operations_payment.schema.json +26 -9
  178. package/dist/schemas/onchain_operations_permission.schema.json +26 -9
  179. package/dist/schemas/onchain_operations_personal.schema.json +26 -9
  180. package/dist/schemas/onchain_operations_progress.schema.json +26 -9
  181. package/dist/schemas/onchain_operations_repository.schema.json +26 -9
  182. package/dist/schemas/onchain_operations_reward.schema.json +26 -9
  183. package/dist/schemas/onchain_operations_service.schema.json +26 -9
  184. package/dist/schemas/onchain_operations_treasury.schema.json +26 -9
  185. package/dist/schemas/onchain_table_data.output.json +224 -69
  186. package/dist/schemas/onchain_table_data.schema.json +2 -2
  187. package/dist/schemas/query_toolkit.schema.json +5 -1
  188. package/dist/telemetry/index.d.ts +19 -0
  189. package/dist/telemetry/index.js +112 -0
  190. package/dist/telemetry/redact.d.ts +2 -0
  191. package/dist/telemetry/redact.js +23 -0
  192. package/dist/telemetry/storage.d.ts +8 -0
  193. package/dist/telemetry/storage.js +80 -0
  194. package/package.json +6 -3
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { TokenTypeInfoSchema, QueryLocalMarkListResultSchema, QueryAccountListResultSchema, QueryLocalInfoListResultSchema, QueryLocalTokenListResultSchema, QueryAccountResultSchema } from "../local/index.js";
3
3
  import { AccountOrMark_AddressSchema, BalanceTypeSchema, CacheExpireTypeSchema, EntrypointSchema, GuardIdentifierSchema, GuardTableItemSchema, NameOrAddressSchema, ObjectBaseSchema, ObjectTypeSchema, QueryIdSchema, SupportedValueSchema, ValueTypeSchema, QueryReceivedResultSchema, LongNameSchema, DescriptionSchema } from "../common/index.js";
4
+ const SemanticSummarySchema = z.any();
4
5
  import { isValidPermissionIndex } from '../utils/permission-index-utils.js';
5
6
  import { isValidGuardQueryId, isValidGuardQueryIdOrName } from '../utils/guard-query-utils.js';
6
7
  import { ENTITY_LINKER_ADDRESS, ENTITY_REGISTRAR_ADDRESS, isWitnessType, } from "@wowok/wowok";
@@ -8,6 +9,9 @@ import { DiscountType as WDiscountType } from "@wowok/wowok";
8
9
  import { QueryEnvSchema } from "../common/index.js";
9
10
  const MAX_MULTI_OPERANDS = 8;
10
11
  const VALUE_TYPE_DESCRIPTION = "Value type: can be specified as a string name (e.g., 'U64', 'Address', 'String') or a number (0-18). Supported types: Bool=0/'Bool', Address=1/'Address', String=2/'String', U8=3/'U8', U16=4/'U16', U32=5/'U32', U64=6/'U64', U128=7/'U128', U256=8/'U256', VecBool=9/'VecBool', VecAddress=10/'VecAddress', VecString=11/'VecString', VecU8=12/'VecU8', VecU16=13/'VecU16', VecU32=14/'VecU32', VecU64=15/'VecU64', VecU128=16/'VecU128', VecU256=17/'VecU256', VecVecU8=18/'VecVecU8'. Note: Value=19 is an INTERNAL type for wowok system use only and should NOT be used directly by users. String format is recommended for better readability.";
12
+ const tolerantNumber = z.union([z.number(), z.string()]);
13
+ const tolerantStringNullable = z.union([z.string(), z.null(), z.undefined()]);
14
+ const tolerantNumberNullable = z.union([z.number(), z.string(), z.null(), z.undefined()]);
11
15
  export const AmountTypeSchema = z.enum(["GuardU64Identifier", "Fixed"]).describe("Amount type. GuardU64Identifier indicates the amount comes from U64 type data defined in Guard table (Identifier index), Fixed indicates using a fixed amount.");
12
16
  export const GuardQuerySchema = z.object({
13
17
  id: QueryIdSchema,
@@ -43,7 +47,7 @@ export const VoteInEntityLinkerSchema = z.object({
43
47
  like: z.boolean().optional().describe("Whether liked"),
44
48
  dislike: z.boolean().optional().describe("Whether disliked"),
45
49
  affiliation: z.boolean().optional().describe("Whether affiliated"),
46
- time: z.number().describe("Time"),
50
+ time: tolerantNumber.describe("Time"),
47
51
  }).describe("Follow record");
48
52
  export const ObjectEntityRegistrarSchema = ObjectBaseSchema.extend({
49
53
  entity_count: z.number().describe("Entity count. Number of entities registered in the entity registrar table. Use 'query_table' or 'query_table_item' to get 'EntityRegistrar' table items."),
@@ -56,16 +60,16 @@ export const ObjectResourceSchema = ObjectBaseSchema.extend({
56
60
  }).describe("On-chain address tag manager");
57
61
  export const TableItem_EntityLinkerSchema = ObjectBaseSchema.extend({
58
62
  address: z.string().describe("Followed ID"),
59
- pos: z.number().describe("Current follow information position"),
60
- count: z.number().describe("Follower count. Number of entities who have been followed others. Use 'query_table' or 'query_table_item' to get 'EntityLinker' table items."),
63
+ pos: tolerantNumber.describe("Current follow information position"),
64
+ count: tolerantNumber.describe("Follower count. Number of entities who have been followed others. Use 'query_table' or 'query_table_item' to get 'EntityLinker' table items."),
61
65
  votes: z.array(VoteInEntityLinkerSchema).describe("Follow records"),
62
66
  }).describe("On-chain followed object data");
63
67
  export const TableItem_EntityRegistrarSchema = ObjectBaseSchema.extend({
64
68
  address: z.string().describe("Entity ID"),
65
69
  description: z.string().describe("Entity description"),
66
- time: z.number().describe("On-chain registration time"),
67
- referrer: z.union([z.string(), z.null()]).describe("Referrer"),
68
- mark_object: z.union([z.string(), z.null()]).describe("Your on-chain address mark object by entity ID"),
70
+ time: tolerantNumber.describe("On-chain registration time"),
71
+ referrer: tolerantStringNullable.describe("Referrer"),
72
+ mark_object: tolerantStringNullable.describe("Your on-chain address mark object by entity ID"),
69
73
  records: z.array(RecordsInEntitySchema).describe("Information records"),
70
74
  }).describe("On-chain entity data");
71
75
  export const TableItem_AddressMarkSchema = ObjectBaseSchema.extend({
@@ -134,13 +138,13 @@ export const ProgressSessionHolderSchema = z.object({
134
138
  retained_submission: z.array(GuardSubmissionSchema).describe("Used to define submitted data after Guard verification"),
135
139
  msg: z.string().describe("Information submitted to complete operation"),
136
140
  accomplished: z.boolean().describe("Whether completed"),
137
- time: z.number().describe("Session creation time"),
141
+ time: tolerantNumber.describe("Session creation time"),
138
142
  }).describe("An operation in Progress session");
139
143
  export const ProgressSessionSchema = z.object({
140
144
  next_node: z.string().describe("Next node ID"),
141
145
  forwards: z.array(ProgressSessionHolderSchema).describe("Operation list in Progress session"),
142
- weights: z.number().describe("Total operation weight"),
143
- threshold: z.number().describe("Operation threshold. When total operation weight exceeds threshold, session is considered completed and Progress moves from current node to next node."),
146
+ weights: tolerantNumber.describe("Total operation weight"),
147
+ threshold: tolerantNumber.describe("Operation threshold. When total operation weight exceeds threshold, session is considered completed and Progress moves from current node to next node."),
144
148
  }).describe("Progress session");
145
149
  export const ObjectProgressSchema = ObjectBaseSchema.extend({
146
150
  machine: z.string().describe("Machine ID that Progress object belongs to"),
@@ -335,8 +339,8 @@ export const TableItem_RewardRecordSchema = ObjectBaseSchema.extend({
335
339
  total: BalanceTypeSchema.describe("Total reward amount"),
336
340
  record: z.array(z.object({
337
341
  amount: BalanceTypeSchema.describe("Reward amount"),
338
- time: z.number().describe("Reward time"),
339
- store_from_id: z.union([z.string(), z.null()]).describe("Stored value from Guard table. This stores the value (address or number converted to address, including submitted values) from the Guard table at the specified index for Guard verification purposes."),
342
+ time: tolerantNumber.describe("Reward time"),
343
+ store_from_id: tolerantStringNullable.describe("Stored value from Guard table. This stores the value (address or number converted to address, including submitted values) from the Guard table at the specified index for Guard verification purposes."),
340
344
  })).describe("Reward record list"),
341
345
  }).describe("Reward object's reward record");
342
346
  export const ObjectRepositorySchema = ObjectBaseSchema.extend({
@@ -820,31 +824,31 @@ export const ObjectPassportSchema = ObjectBaseSchema.extend({
820
824
  }).describe("Passport object");
821
825
  export const TableItem_PermissionPermSchema = ObjectBaseSchema.extend({
822
826
  address: z.string().describe("User ID or Guard ID"),
823
- perm: z.array(PermissionIndexTypeSchema).describe("Permission list obtained after user or Guard object verification"),
827
+ perm: z.array(PermissionIndexTypeSchema.nullable().or(z.number())).describe("Permission list obtained after user or Guard object verification"),
824
828
  }).describe("Permission object's permission record");
825
829
  export const TableItem_DemandPresenterSchema = ObjectBaseSchema.extend({
826
830
  address: z.string().describe("Referrer ID"),
827
831
  recommend: z.string().describe("Recommendation letter"),
828
- service: z.union([z.string(), z.null()]).describe("Recommended service object ID"),
829
- update_time: z.number().describe("Last update time"),
830
- acceptance_score: z.union([z.number(), z.null()]).describe("Demand object feedback score"),
832
+ service: tolerantStringNullable.describe("Recommended service object ID"),
833
+ update_time: tolerantNumber.describe("Last update time"),
834
+ acceptance_score: tolerantNumberNullable.describe("Demand object feedback score"),
831
835
  feedback: z.string().describe("Demand object feedback information"),
832
- feedback_time: z.number().describe("Demand object feedback time"),
836
+ feedback_time: tolerantNumber.describe("Demand object feedback time"),
833
837
  }).describe("Demand object's Service recommendation record");
834
838
  export const MachineForwardGuardSchema = z.object({
835
839
  guard: z.string().describe("Guard object ID"),
836
- retained_submission: z.array(z.number()).optional().describe("Data submitted by user during Guard object verification"),
840
+ retained_submission: z.array(tolerantNumber).nullable().optional().describe("Data submitted by user during Guard object verification"),
837
841
  }).strict().describe("Record of Guard object in MachineForwardGuard object");
838
842
  export const MachineForwardSchema = z.object({
839
843
  name: z.string().describe("Forward name"),
840
- namedOperator: z.string().optional().describe("Forward operation permission 1: Namespace (one of the two must be specified); recommended if Progress object operators are different (e.g., different delivery personnel for different orders)."),
841
- permissionIndex: PermissionIndexTypeSchema.optional().describe("Forward operation permission 2: Permission index (one of the two must be specified); recommended if all Progress object operators are the same (e.g., same reward reviewers for all orders)."),
842
- weight: z.number().int().min(0).max(65535).describe("Forward weight"),
843
- guard: MachineForwardGuardSchema.optional().describe("Guard object ID, if defined, Guard verification must also pass to complete Forward (e.g., completed promised supply chain sub-order)."),
844
+ namedOperator: tolerantStringNullable.describe("Forward operation permission 1: Namespace (one of the two must be specified); recommended if Progress object operators are different (e.g., different delivery personnel for different orders)."),
845
+ permissionIndex: tolerantNumberNullable.describe("Forward operation permission 2: Permission index (one of the two must be specified); recommended if all Progress object operators are the same (e.g., same reward reviewers for all orders)."),
846
+ weight: tolerantNumber.describe("Forward weight"),
847
+ guard: MachineForwardGuardSchema.nullable().optional().describe("Guard object ID, if defined, Guard verification must also pass to complete Forward (e.g., completed promised supply chain sub-order)."),
844
848
  }).strict().describe("Forward in Machine object");
845
849
  export const MachineNodePairSchema = z.object({
846
850
  prev_node: z.string().describe("Previous node name"),
847
- threshold: z.number().int().min(0).max(4294967295).describe("Threshold to trigger node advancement. If total Forward weight is greater than or equal to threshold, node advancement is triggered."),
851
+ threshold: tolerantNumber.describe("Threshold to trigger node advancement. If total Forward weight is greater than or equal to threshold, node advancement is triggered."),
848
852
  forwards: z.array(MachineForwardSchema).describe("Forward list"),
849
853
  }).strict().describe("Node pair in Machine object");
850
854
  export const MachineNodeSchema = z.object({
@@ -856,20 +860,20 @@ export const TableItem_MachineNodeSchema = ObjectBaseSchema.extend({
856
860
  value: z.array(MachineNodePairSchema).describe("Node pair list"),
857
861
  }).describe("Node record in Machine object");
858
862
  export const TableItem_ProgressHistorySchema = ObjectBaseSchema.extend({
859
- index: z.number().int().describe("Progress record index (starting from 0)"),
863
+ index: tolerantNumber.describe("Progress record index (starting from 0)"),
860
864
  node: z.string().describe("Previous node name"),
861
865
  next_node: z.string().describe("Next node name"),
862
866
  session: z.array(ProgressSessionSchema).describe("Progress session list"),
863
- time: z.number().describe("Progress record completion time (Unix timestamp)"),
867
+ time: tolerantNumberNullable.describe("Progress record completion time (Unix timestamp)"),
864
868
  }).describe("Completed progress record in Progress object");
865
869
  export const TableItem_TreasuryHistorySchema = ObjectBaseSchema.extend({
866
870
  payment: NameOrAddressSchema.describe("Payment object ID"),
867
871
  op: TreasuryOpSchema.describe("Operation type"),
868
872
  signer: z.string().describe("Operator ID"),
869
- external_guard: z.union([z.string(), z.null()]).describe("Guard object ID verified during operation (none if operated through Permission)"),
873
+ external_guard: tolerantStringNullable.describe("Guard object ID verified during operation (none if operated through Permission)"),
870
874
  amount: BalanceTypeSchema.describe("Payment amount"),
871
- time: z.number().describe("Payment time (Unix timestamp)"),
872
- store_from_id: z.union([z.string(), z.null()]).describe("Stored value from Guard table. This stores the value (address or number converted to address, including submitted values) from the Guard table at the specified index for Guard verification purposes."),
875
+ time: tolerantNumber.describe("Payment time (Unix timestamp)"),
876
+ store_from_id: tolerantStringNullable.describe("Stored value from Guard table. This stores the value (address or number converted to address, including submitted values) from the Guard table at the specified index for Guard verification purposes."),
873
877
  }).describe("Payment record in Treasury object");
874
878
  export const ObjectsQuerySchema = QueryEnvSchema.extend({
875
879
  objects: z.array(NameOrAddressSchema).describe("List of object IDs to query"),
@@ -1034,6 +1038,7 @@ export const OnchainEventsInputSchema = z.object({
1034
1038
  }).describe("Input parameters for querying on-chain WOWOK events");
1035
1039
  export const OnchainEventsResultSchema = z.object({
1036
1040
  result: z.union([EventAnswerSchema, z.null()]).describe("Event query result containing list of events and pagination info, or null if no data found"),
1041
+ semantic: SemanticSummarySchema.optional().describe("Business semantic summary for the event query"),
1037
1042
  }).describe("Result of on-chain events query");
1038
1043
  export const TableItem_RepositoryDataOrUndefinedSchema = z.union([TableItem_RepositoryDataSchema, z.null()]).describe("Repository data item or null");
1039
1044
  export const TableItem_PermissionPermOrUndefinedSchema = z.union([TableItem_PermissionPermSchema, z.null()]).describe("Permission permission item or null");
@@ -1337,5 +1342,6 @@ export const AllQueryResultsSchema = z.union([
1337
1342
  OnchainQueryResultSchema_Part2,
1338
1343
  ]);
1339
1344
  export const WatchQueryOperationsResultSchema = z.object({
1340
- result: AllQueryResultsSchema
1345
+ result: AllQueryResultsSchema,
1346
+ semantic: SemanticSummarySchema.optional().describe("Business semantic summary for the query operation"),
1341
1347
  }).describe("Watch query operations result schema");
@@ -686,14 +686,7 @@
686
686
  },
687
687
  "parsedJson": {
688
688
  "type": "object",
689
- "additionalProperties": {
690
- "type": [
691
- "string",
692
- "number",
693
- "boolean",
694
- "null"
695
- ]
696
- },
689
+ "additionalProperties": {},
697
690
  "description": "Parsed JSON value of the event"
698
691
  },
699
692
  "sender": {
@@ -763,14 +756,7 @@
763
756
  },
764
757
  "parsedJson": {
765
758
  "type": "object",
766
- "additionalProperties": {
767
- "type": [
768
- "string",
769
- "number",
770
- "boolean",
771
- "null"
772
- ]
773
- },
759
+ "additionalProperties": {},
774
760
  "description": "Parsed JSON value of the event"
775
761
  },
776
762
  "sender": {
@@ -1375,6 +1361,29 @@
1375
1361
  "error": {
1376
1362
  "type": "string",
1377
1363
  "description": "Error message"
1364
+ },
1365
+ "error_code": {
1366
+ "type": "string",
1367
+ "enum": [
1368
+ "invalid_parameter",
1369
+ "guard_rejected",
1370
+ "state_conflict",
1371
+ "insufficient_balance",
1372
+ "object_not_found",
1373
+ "permission_denied",
1374
+ "immutable_violation",
1375
+ "network_error",
1376
+ "unknown"
1377
+ ],
1378
+ "description": "Error classification for programmatic recovery"
1379
+ },
1380
+ "retryable": {
1381
+ "type": "boolean",
1382
+ "description": "Whether the operation can be retried as-is"
1383
+ },
1384
+ "recovery_hint": {
1385
+ "type": "string",
1386
+ "description": "Recovery suggestion for AI or user"
1378
1387
  }
1379
1388
  },
1380
1389
  "required": [
@@ -1385,6 +1394,9 @@
1385
1394
  }
1386
1395
  ],
1387
1396
  "description": "Account operation output schema with discriminator"
1397
+ },
1398
+ "semantic": {
1399
+ "description": "Business semantic summary for account operation"
1388
1400
  }
1389
1401
  },
1390
1402
  "required": [
@@ -72,7 +72,7 @@
72
72
  "properties": {
73
73
  "address": {
74
74
  "type": "string",
75
- "description": "Valid ID: 0x prefix + 64 hex characters, or builtin ID (0x5-0x9, @0xaaa, @0xaab, @0x403, @0xacc, @0xc)"
75
+ "description": "Valid ID: 0x prefix + 64 hex characters, or builtin ID (0x5-0x9, 0xa, 0xc, 0xd, 0x403, 0xaaa, 0xaab, 0xacc)"
76
76
  },
77
77
  "name": {
78
78
  "$ref": "#/definitions/account_operation/properties/gen/properties/name",
@@ -250,7 +250,7 @@
250
250
  }
251
251
  },
252
252
  "additionalProperties": false,
253
- "description": "Account operations"
253
+ "description": "Account operations. Parameters MUST be wrapped in the operation type property (e.g. {transfer: {...}}, NOT {amount: ...}). Unwrapped parameters are rejected."
254
254
  }
255
255
  }
256
256
  }