@wowok/agent-mcp 2.6.0 → 2.6.3

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 (186) hide show
  1. package/README.md +5 -3
  2. package/dist/customer/info-puzzle.d.ts +1 -1
  3. package/dist/customer/info-puzzle.js +4 -2
  4. package/dist/customer/risk-assessment.js +26 -4
  5. package/dist/customer/types.d.ts +2 -0
  6. package/dist/examples/guard-template-balance-check.json +38 -0
  7. package/dist/examples/guard-template-time-lock.json +39 -0
  8. package/dist/examples/machine-template-7node-rental.json +114 -0
  9. package/dist/examples/rental-ziroom-machine-create.json +137 -0
  10. package/dist/examples/rental-ziroom-permission-create.json +35 -0
  11. package/dist/examples/rental-ziroom-service-create.json +80 -0
  12. package/dist/examples/retail-myshop-service-create.json +88 -0
  13. package/dist/extensions/capability-manifest.d.ts +125 -0
  14. package/dist/extensions/capability-manifest.js +594 -0
  15. package/dist/extensions/constraint-registry.d.ts +24 -0
  16. package/dist/extensions/constraint-registry.js +196 -0
  17. package/dist/extensions/index.d.ts +12 -0
  18. package/dist/extensions/index.js +6 -0
  19. package/dist/extensions/metric-registry.d.ts +26 -0
  20. package/dist/extensions/metric-registry.js +257 -0
  21. package/dist/extensions/mode-evaluator.d.ts +15 -0
  22. package/dist/extensions/mode-evaluator.js +170 -0
  23. package/dist/extensions/modes.d.ts +2 -0
  24. package/dist/extensions/modes.js +493 -0
  25. package/dist/extensions/registry.d.ts +50 -0
  26. package/dist/extensions/registry.js +662 -0
  27. package/dist/extensions/types.d.ts +219 -0
  28. package/dist/extensions/types.js +1 -0
  29. package/dist/index.js +50 -0
  30. package/dist/knowledge/deployment-scanner.d.ts +3 -0
  31. package/dist/knowledge/deployment-scanner.js +64 -3
  32. package/dist/knowledge/fund-layer.d.ts +72 -0
  33. package/dist/knowledge/fund-layer.js +420 -0
  34. package/dist/knowledge/guard-render.d.ts +57 -0
  35. package/dist/knowledge/guard-render.js +700 -0
  36. package/dist/knowledge/guard-risk.d.ts +13 -0
  37. package/dist/knowledge/guard-risk.js +57 -0
  38. package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
  39. package/dist/knowledge/guard-submission-prompt.js +171 -0
  40. package/dist/knowledge/guard-templates.js +278 -0
  41. package/dist/knowledge/machine-ledger.js +1 -1
  42. package/dist/knowledge/machine-render.d.ts +41 -0
  43. package/dist/knowledge/machine-render.js +565 -0
  44. package/dist/knowledge/machine-templates.js +24 -5
  45. package/dist/knowledge/reward-confirm.js +2 -2
  46. package/dist/knowledge/reward-puzzle.js +1 -1
  47. package/dist/knowledge/reward-risk.js +9 -9
  48. package/dist/knowledge/reward-templates.js +2 -2
  49. package/dist/knowledge/service-confirm.d.ts +15 -6
  50. package/dist/knowledge/service-confirm.js +119 -11
  51. package/dist/knowledge/service-context.js +1 -1
  52. package/dist/knowledge/service-ledger.js +1 -1
  53. package/dist/knowledge/service-risk.d.ts +1 -1
  54. package/dist/knowledge/service-risk.js +3 -3
  55. package/dist/knowledge/service-templates.js +2 -2
  56. package/dist/knowledge/service-translation.d.ts +1 -1
  57. package/dist/knowledge/service-translation.js +7 -7
  58. package/dist/knowledge/tool-constraints.js +6 -2
  59. package/dist/project/deployment-bridge.d.ts +1 -1
  60. package/dist/project/deployment-bridge.js +31 -7
  61. package/dist/project/deployment-doc.d.ts +3 -0
  62. package/dist/project/deployment-doc.js +76 -14
  63. package/dist/project/edit-planner.d.ts +123 -0
  64. package/dist/project/edit-planner.js +1371 -0
  65. package/dist/project/evaluation.d.ts +2 -0
  66. package/dist/project/evaluation.js +873 -88
  67. package/dist/project/graph-builder.d.ts +4 -1
  68. package/dist/project/graph-builder.js +132 -62
  69. package/dist/project/graph.d.ts +1 -0
  70. package/dist/project/handlers.d.ts +317 -6
  71. package/dist/project/handlers.js +1171 -19
  72. package/dist/project/stage-gate.d.ts +4 -0
  73. package/dist/project/stage-gate.js +64 -5
  74. package/dist/project/task-tracker.d.ts +26 -0
  75. package/dist/project/task-tracker.js +78 -0
  76. package/dist/safety/preview.js +16 -0
  77. package/dist/schema/call/allocation.d.ts +16 -16
  78. package/dist/schema/call/allocation.js +2 -2
  79. package/dist/schema/call/arbitration.js +19 -6
  80. package/dist/schema/call/base.d.ts +21 -13
  81. package/dist/schema/call/base.js +27 -6
  82. package/dist/schema/call/bridge.d.ts +5 -5
  83. package/dist/schema/call/bridge.js +3 -1
  84. package/dist/schema/call/contact.js +2 -2
  85. package/dist/schema/call/demand.d.ts +23 -31
  86. package/dist/schema/call/demand.js +2 -2
  87. package/dist/schema/call/guard.js +2 -2
  88. package/dist/schema/call/machine.d.ts +1976 -752
  89. package/dist/schema/call/machine.js +50 -4
  90. package/dist/schema/call/order.d.ts +149 -228
  91. package/dist/schema/call/order.js +4 -3
  92. package/dist/schema/call/payment.d.ts +183 -3
  93. package/dist/schema/call/payment.js +21 -3
  94. package/dist/schema/call/permission.js +2 -2
  95. package/dist/schema/call/personal.d.ts +241 -52
  96. package/dist/schema/call/progress.d.ts +53 -61
  97. package/dist/schema/call/progress.js +18 -4
  98. package/dist/schema/call/repository.d.ts +23 -31
  99. package/dist/schema/call/repository.js +2 -2
  100. package/dist/schema/call/reward.js +3 -3
  101. package/dist/schema/call/semantic.d.ts +1 -1
  102. package/dist/schema/call/semantic.js +37 -2
  103. package/dist/schema/call/service.d.ts +275 -127
  104. package/dist/schema/call/service.js +89 -13
  105. package/dist/schema/call/treasury.js +3 -3
  106. package/dist/schema/common/index.d.ts +13 -2
  107. package/dist/schema/common/index.js +80 -15
  108. package/dist/schema/local/index.d.ts +32 -35
  109. package/dist/schema/local/index.js +28 -6
  110. package/dist/schema/messenger/index.d.ts +274 -46
  111. package/dist/schema/operations.d.ts +1264 -544
  112. package/dist/schema/operations.js +65 -7
  113. package/dist/schema/project/index.d.ts +2846 -167
  114. package/dist/schema/project/index.js +570 -16
  115. package/dist/schema/query/index.d.ts +922 -349
  116. package/dist/schema/query/index.js +205 -42
  117. package/dist/schema/schema-query/index.d.ts +65 -3
  118. package/dist/schema/schema-query/index.js +38 -5
  119. package/dist/schema/utils/node-parser.js +20 -4
  120. package/dist/schema/utils/object-type-utils.d.ts +12 -0
  121. package/dist/schema/utils/object-type-utils.js +35 -0
  122. package/dist/schema/utils/permission-machine-check.d.ts +49 -0
  123. package/dist/schema/utils/permission-machine-check.js +121 -0
  124. package/dist/schema/utils/skills-recommendation.d.ts +2 -0
  125. package/dist/schema/utils/skills-recommendation.js +76 -0
  126. package/dist/schema-query/index.d.ts +20 -1
  127. package/dist/schema-query/index.js +306 -4
  128. package/dist/schemas/account_operation.output.json +7 -1
  129. package/dist/schemas/account_operation.schema.json +3 -3
  130. package/dist/schemas/bridge_operation.output.json +6 -0
  131. package/dist/schemas/bridge_operation.schema.json +1 -1
  132. package/dist/schemas/guard-templates.json +379 -0
  133. package/dist/schemas/guard2file.schema.json +1 -1
  134. package/dist/schemas/index.json +1 -1
  135. package/dist/schemas/local_info_operation.output.json +6 -0
  136. package/dist/schemas/local_mark_operation.output.json +7 -1
  137. package/dist/schemas/local_mark_operation.schema.json +1 -1
  138. package/dist/schemas/machineNode2file.schema.json +1 -1
  139. package/dist/schemas/messenger_operation.schema.json +4 -4
  140. package/dist/schemas/onchain_events.output.json +1 -1
  141. package/dist/schemas/onchain_operations.output.json +2820 -0
  142. package/dist/schemas/onchain_operations.schema.json +444 -330
  143. package/dist/schemas/onchain_operations_allocation.schema.json +37 -28
  144. package/dist/schemas/onchain_operations_arbitration.schema.json +16 -14
  145. package/dist/schemas/onchain_operations_contact.schema.json +10 -10
  146. package/dist/schemas/onchain_operations_demand.schema.json +10 -10
  147. package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -16
  148. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
  149. package/dist/schemas/onchain_operations_guard.schema.json +2 -2
  150. package/dist/schemas/onchain_operations_machine.schema.json +43 -35
  151. package/dist/schemas/onchain_operations_order.schema.json +72 -78
  152. package/dist/schemas/onchain_operations_payment.schema.json +141 -111
  153. package/dist/schemas/onchain_operations_permission.schema.json +3 -3
  154. package/dist/schemas/onchain_operations_personal.schema.json +7 -7
  155. package/dist/schemas/onchain_operations_progress.schema.json +9 -9
  156. package/dist/schemas/onchain_operations_proof.schema.json +8 -8
  157. package/dist/schemas/onchain_operations_repository.schema.json +10 -10
  158. package/dist/schemas/onchain_operations_reward.schema.json +14 -14
  159. package/dist/schemas/onchain_operations_service.schema.json +119 -48
  160. package/dist/schemas/onchain_operations_treasury.schema.json +11 -11
  161. package/dist/schemas/onchain_table_data.output.json +33 -25
  162. package/dist/schemas/onchain_table_data.schema.json +22 -21
  163. package/dist/schemas/project_operation.output.json +2194 -23
  164. package/dist/schemas/project_operation.schema.json +84 -6
  165. package/dist/schemas/query_toolkit.output.json +108 -80
  166. package/dist/schemas/query_toolkit.schema.json +12 -12
  167. package/dist/schemas/schema_query.output.json +70 -3
  168. package/dist/schemas/schema_query.schema.json +18 -3
  169. package/dist/schemas/wowok_buildin_info.output.json +81 -8
  170. package/dist/schemas/wowok_buildin_info.schema.json +46 -2
  171. package/dist/tools/handlers/local.js +20 -5
  172. package/dist/tools/handlers/onchain.js +594 -6
  173. package/dist/tools/handlers/project.js +76 -4
  174. package/dist/tools/handlers/query.js +27 -0
  175. package/dist/tools/handlers/schema-query.js +43 -1
  176. package/dist/tools/handlers/task-status.d.ts +170 -0
  177. package/dist/tools/handlers/task-status.js +55 -0
  178. package/dist/tools/handlers/wip.js +47 -1
  179. package/dist/tools/index.d.ts +8 -0
  180. package/dist/tools/index.js +387 -12
  181. package/dist/tools/retry.d.ts +8 -0
  182. package/dist/tools/retry.js +85 -0
  183. package/dist/tools/wip-deploy-assist.d.ts +28 -0
  184. package/dist/tools/wip-deploy-assist.js +278 -0
  185. package/package.json +2 -2
  186. package/dist/schemas/guard-node-examples.md +0 -199
@@ -1,7 +1,23 @@
1
1
  import { z } from 'zod';
2
2
  import { WithPermissionObjectSchema, NamedObjectSchema, ObjectsSchema, CallEnvSchema, SubmissionCallSchema, } from './base.js';
3
3
  import { MachineNodeSchema, MachineForwardSchema } from '../query/index.js';
4
- import { ManyAccountOrMark_AddressSchema, NameOrAddressSchema, NameSchema, NotEmptyNameSchema, ReceivedObjectsOrRecentlySchema } from '../common/index.js';
4
+ import { ManyAccountOrMark_AddressSchema, NameOrAddressSchema, NameSchema, NotEmptyNameSchema, ReceivedObjectsOrRecentlySchema, RECEIVE_FORMAT_BLOCK_OBJECTS } from '../common/index.js';
5
+ function validateEntryForward(nodes) {
6
+ for (const node of nodes) {
7
+ if (!node.pairs)
8
+ continue;
9
+ for (const pair of node.pairs) {
10
+ if (pair.prev_node === "") {
11
+ return true;
12
+ }
13
+ }
14
+ }
15
+ return false;
16
+ }
17
+ const ENTRY_FORWARD_ERROR_MESSAGE = "Machine has no entry forward. At least one node must have a pair with prev_node=\"\" (empty string), " +
18
+ "which defines how Progress advances from the initial state (current=\"\") to the first node. " +
19
+ "Without an entry forward, the workflow will be permanently stuck. " +
20
+ "Example: {name: 'Subscribed', pairs: [{prev_node: '', forwards: [{name: 'Subscribe', weight: 1}]}]}";
5
21
  export const ProgressNamedOperatorSchema = z.object({
6
22
  op: z.union([z.literal('add'), z.literal('set'), z.literal('remove')]),
7
23
  name: NotEmptyNameSchema,
@@ -68,7 +84,17 @@ export const NodeSchema = z.discriminatedUnion('op', [
68
84
  op: z.literal('remove forward'),
69
85
  data: z.array(NodeRemoveForwardDataSchema).describe('List of operations to delete.'),
70
86
  }).strict().describe('Delete operations.'),
71
- ]);
87
+ ])
88
+ .superRefine((data, ctx) => {
89
+ if ((data.op === 'add' || data.op === 'set') && data.bReplace === true) {
90
+ if (!validateEntryForward(data.nodes)) {
91
+ ctx.addIssue({
92
+ code: z.ZodIssueCode.custom,
93
+ message: ENTRY_FORWARD_ERROR_MESSAGE,
94
+ });
95
+ }
96
+ }
97
+ });
72
98
  export const NodeJsonOrMarkdownFileSchema = z.object({
73
99
  json_or_markdown_file: z.string().describe(`Path to a JSON or Markdown file containing node array for COMPLETE REPLACEMENT of all nodes.
74
100
 
@@ -113,9 +139,29 @@ Supported formats: JSON array or Markdown with code blocks.
113
139
  If parsing fails, error includes line number and column information.`),
114
140
  pause: z.boolean().optional().describe('Whether to pause generating new Progress objects.'),
115
141
  publish: z.boolean().optional().describe('Whether to publish the object. After the object is published, new Progress objects can be generated; and node settings will no longer be changeable.'),
116
- owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe('Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object.'),
142
+ owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe('Unwrap CoinWrapper objects and other objects received by this Machine object and send them to the owner of its Permission object.' + RECEIVE_FORMAT_BLOCK_OBJECTS),
117
143
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe('Contact object ID or name.'),
118
- }).strict().describe("On-chain Machine operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, permission, ...} to create a Machine. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. 'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. STRING for existing, OBJECT for new creation.");
144
+ }).strict()
145
+ .refine((data) => {
146
+ if (data.publish !== true)
147
+ return true;
148
+ if (!data.node)
149
+ return true;
150
+ if ('json_or_markdown_file' in data.node)
151
+ return true;
152
+ if ('nodes' in data.node && Array.isArray(data.node.nodes)) {
153
+ const isCreatingNew = typeof data.object === 'object' && data.object !== null;
154
+ const isReplace = data.node.bReplace === true;
155
+ if (isCreatingNew || isReplace) {
156
+ const nodes = data.node.nodes;
157
+ if (Array.isArray(nodes) && nodes.length > 0 && typeof nodes[0] === 'object') {
158
+ return validateEntryForward(nodes);
159
+ }
160
+ }
161
+ }
162
+ return true;
163
+ }, { message: ENTRY_FORWARD_ERROR_MESSAGE })
164
+ .describe("On-chain Machine operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, permission, ...} to create a Machine. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. 'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. STRING for existing, OBJECT for new creation.");
119
165
  export const CallMachine_InputSchema = z.object({
120
166
  data: CallMachine_DataSchema,
121
167
  env: CallEnvSchema.optional(),
@@ -60,7 +60,7 @@ export declare const CallOrder_DataSchema: z.ZodObject<{
60
60
  check_all_founded?: boolean | undefined;
61
61
  }>>;
62
62
  required_info: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNull]>>;
63
- progress: z.ZodOptional<z.ZodObject<{
63
+ progress: z.ZodOptional<z.ZodEffects<z.ZodObject<{
64
64
  operation: z.ZodObject<{
65
65
  next_node_name: z.ZodEffects<z.ZodString, string, string>;
66
66
  forward: z.ZodEffects<z.ZodString, string, string>;
@@ -87,7 +87,14 @@ export declare const CallOrder_DataSchema: z.ZodObject<{
87
87
  next_node_name: string;
88
88
  };
89
89
  message?: string | undefined;
90
- }>>;
90
+ }>, {
91
+ op: "next" | "hold" | "unhold" | "adminUnhold";
92
+ operation: {
93
+ forward: string;
94
+ next_node_name: string;
95
+ };
96
+ message?: string | undefined;
97
+ }, unknown>>;
91
98
  arb_confirm: z.ZodOptional<z.ZodObject<{
92
99
  arb: z.ZodEffects<z.ZodString, string, string>;
93
100
  confirm: z.ZodBoolean;
@@ -121,81 +128,51 @@ export declare const CallOrder_DataSchema: z.ZodObject<{
121
128
  }, {
122
129
  arb: string;
123
130
  }>>;
124
- receive: z.ZodOptional<z.ZodObject<{
125
- result: z.ZodUnion<[z.ZodObject<{
126
- balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
127
- token_type: z.ZodEffects<z.ZodString, string, string>;
128
- received: z.ZodArray<z.ZodObject<{
129
- id: z.ZodString;
130
- balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
131
- payment: z.ZodString;
132
- }, "strict", z.ZodTypeAny, {
133
- id: string;
134
- balance: string | number;
135
- payment: string;
136
- }, {
137
- id: string;
138
- balance: string | number;
139
- payment: string;
140
- }>, "many">;
141
- }, "strict", z.ZodTypeAny, {
142
- received: {
143
- id: string;
144
- balance: string | number;
145
- payment: string;
146
- }[];
147
- balance: string | number;
148
- token_type: string;
149
- }, {
150
- received: {
151
- id: string;
152
- balance: string | number;
153
- payment: string;
154
- }[];
155
- balance: string | number;
156
- token_type: string;
157
- }>, z.ZodArray<z.ZodObject<{
131
+ receive: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
132
+ id: z.ZodString;
133
+ type: z.ZodString;
134
+ content_raw: z.ZodOptional<z.ZodAny>;
135
+ }, "strict", z.ZodTypeAny, {
136
+ type: string;
137
+ id: string;
138
+ content_raw?: any;
139
+ }, {
140
+ type: string;
141
+ id: string;
142
+ content_raw?: any;
143
+ }>, "many">, z.ZodObject<{
144
+ balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
145
+ token_type: z.ZodEffects<z.ZodString, string, string>;
146
+ received: z.ZodArray<z.ZodObject<{
158
147
  id: z.ZodString;
159
- type: z.ZodString;
160
- content_raw: z.ZodOptional<z.ZodAny>;
148
+ balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
149
+ payment: z.ZodString;
161
150
  }, "strict", z.ZodTypeAny, {
162
- type: string;
163
151
  id: string;
164
- content_raw?: any;
152
+ balance: string | number;
153
+ payment: string;
165
154
  }, {
166
- type: string;
167
155
  id: string;
168
- content_raw?: any;
169
- }>, "many">]>;
170
- }, "strict", z.ZodTypeAny, {
171
- result: {
172
- received: {
173
- id: string;
174
- balance: string | number;
175
- payment: string;
176
- }[];
177
156
  balance: string | number;
178
- token_type: string;
179
- } | {
180
- type: string;
157
+ payment: string;
158
+ }>, "many">;
159
+ }, "strict", z.ZodTypeAny, {
160
+ received: {
181
161
  id: string;
182
- content_raw?: any;
162
+ balance: string | number;
163
+ payment: string;
183
164
  }[];
165
+ balance: string | number;
166
+ token_type: string;
184
167
  }, {
185
- result: {
186
- received: {
187
- id: string;
188
- balance: string | number;
189
- payment: string;
190
- }[];
191
- balance: string | number;
192
- token_type: string;
193
- } | {
194
- type: string;
168
+ received: {
195
169
  id: string;
196
- content_raw?: any;
170
+ balance: string | number;
171
+ payment: string;
197
172
  }[];
198
- }>>;
173
+ balance: string | number;
174
+ token_type: string;
175
+ }>, z.ZodLiteral<"recently">]>>;
199
176
  transfer_to: z.ZodOptional<z.ZodObject<{
200
177
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
201
178
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
@@ -217,20 +194,18 @@ export declare const CallOrder_DataSchema: z.ZodObject<{
217
194
  message?: string | undefined;
218
195
  } | undefined;
219
196
  receive?: {
220
- result: {
221
- received: {
222
- id: string;
223
- balance: string | number;
224
- payment: string;
225
- }[];
226
- balance: string | number;
227
- token_type: string;
228
- } | {
229
- type: string;
197
+ received: {
230
198
  id: string;
231
- content_raw?: any;
199
+ balance: string | number;
200
+ payment: string;
232
201
  }[];
233
- } | undefined;
202
+ balance: string | number;
203
+ token_type: string;
204
+ } | "recently" | {
205
+ type: string;
206
+ id: string;
207
+ content_raw?: any;
208
+ }[] | undefined;
234
209
  agent?: {
235
210
  entities: {
236
211
  name_or_address?: string | undefined;
@@ -258,29 +233,20 @@ export declare const CallOrder_DataSchema: z.ZodObject<{
258
233
  } | undefined;
259
234
  }, {
260
235
  object: string;
261
- progress?: {
262
- op: "next" | "hold" | "unhold" | "adminUnhold";
263
- operation: {
264
- forward: string;
265
- next_node_name: string;
266
- };
267
- message?: string | undefined;
268
- } | undefined;
236
+ progress?: unknown;
269
237
  receive?: {
270
- result: {
271
- received: {
272
- id: string;
273
- balance: string | number;
274
- payment: string;
275
- }[];
276
- balance: string | number;
277
- token_type: string;
278
- } | {
279
- type: string;
238
+ received: {
280
239
  id: string;
281
- content_raw?: any;
240
+ balance: string | number;
241
+ payment: string;
282
242
  }[];
283
- } | undefined;
243
+ balance: string | number;
244
+ token_type: string;
245
+ } | "recently" | {
246
+ type: string;
247
+ id: string;
248
+ content_raw?: any;
249
+ }[] | undefined;
284
250
  agent?: {
285
251
  entities: {
286
252
  name_or_address?: string | undefined;
@@ -336,7 +302,7 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
336
302
  check_all_founded?: boolean | undefined;
337
303
  }>>;
338
304
  required_info: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNull]>>;
339
- progress: z.ZodOptional<z.ZodObject<{
305
+ progress: z.ZodOptional<z.ZodEffects<z.ZodObject<{
340
306
  operation: z.ZodObject<{
341
307
  next_node_name: z.ZodEffects<z.ZodString, string, string>;
342
308
  forward: z.ZodEffects<z.ZodString, string, string>;
@@ -363,7 +329,14 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
363
329
  next_node_name: string;
364
330
  };
365
331
  message?: string | undefined;
366
- }>>;
332
+ }>, {
333
+ op: "next" | "hold" | "unhold" | "adminUnhold";
334
+ operation: {
335
+ forward: string;
336
+ next_node_name: string;
337
+ };
338
+ message?: string | undefined;
339
+ }, unknown>>;
367
340
  arb_confirm: z.ZodOptional<z.ZodObject<{
368
341
  arb: z.ZodEffects<z.ZodString, string, string>;
369
342
  confirm: z.ZodBoolean;
@@ -397,81 +370,51 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
397
370
  }, {
398
371
  arb: string;
399
372
  }>>;
400
- receive: z.ZodOptional<z.ZodObject<{
401
- result: z.ZodUnion<[z.ZodObject<{
402
- balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
403
- token_type: z.ZodEffects<z.ZodString, string, string>;
404
- received: z.ZodArray<z.ZodObject<{
405
- id: z.ZodString;
406
- balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
407
- payment: z.ZodString;
408
- }, "strict", z.ZodTypeAny, {
409
- id: string;
410
- balance: string | number;
411
- payment: string;
412
- }, {
413
- id: string;
414
- balance: string | number;
415
- payment: string;
416
- }>, "many">;
417
- }, "strict", z.ZodTypeAny, {
418
- received: {
419
- id: string;
420
- balance: string | number;
421
- payment: string;
422
- }[];
423
- balance: string | number;
424
- token_type: string;
425
- }, {
426
- received: {
427
- id: string;
428
- balance: string | number;
429
- payment: string;
430
- }[];
431
- balance: string | number;
432
- token_type: string;
433
- }>, z.ZodArray<z.ZodObject<{
373
+ receive: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
374
+ id: z.ZodString;
375
+ type: z.ZodString;
376
+ content_raw: z.ZodOptional<z.ZodAny>;
377
+ }, "strict", z.ZodTypeAny, {
378
+ type: string;
379
+ id: string;
380
+ content_raw?: any;
381
+ }, {
382
+ type: string;
383
+ id: string;
384
+ content_raw?: any;
385
+ }>, "many">, z.ZodObject<{
386
+ balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
387
+ token_type: z.ZodEffects<z.ZodString, string, string>;
388
+ received: z.ZodArray<z.ZodObject<{
434
389
  id: z.ZodString;
435
- type: z.ZodString;
436
- content_raw: z.ZodOptional<z.ZodAny>;
390
+ balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
391
+ payment: z.ZodString;
437
392
  }, "strict", z.ZodTypeAny, {
438
- type: string;
439
393
  id: string;
440
- content_raw?: any;
394
+ balance: string | number;
395
+ payment: string;
441
396
  }, {
442
- type: string;
443
397
  id: string;
444
- content_raw?: any;
445
- }>, "many">]>;
446
- }, "strict", z.ZodTypeAny, {
447
- result: {
448
- received: {
449
- id: string;
450
- balance: string | number;
451
- payment: string;
452
- }[];
453
398
  balance: string | number;
454
- token_type: string;
455
- } | {
456
- type: string;
399
+ payment: string;
400
+ }>, "many">;
401
+ }, "strict", z.ZodTypeAny, {
402
+ received: {
457
403
  id: string;
458
- content_raw?: any;
404
+ balance: string | number;
405
+ payment: string;
459
406
  }[];
407
+ balance: string | number;
408
+ token_type: string;
460
409
  }, {
461
- result: {
462
- received: {
463
- id: string;
464
- balance: string | number;
465
- payment: string;
466
- }[];
467
- balance: string | number;
468
- token_type: string;
469
- } | {
470
- type: string;
410
+ received: {
471
411
  id: string;
472
- content_raw?: any;
412
+ balance: string | number;
413
+ payment: string;
473
414
  }[];
474
- }>>;
415
+ balance: string | number;
416
+ token_type: string;
417
+ }>, z.ZodLiteral<"recently">]>>;
475
418
  transfer_to: z.ZodOptional<z.ZodObject<{
476
419
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
477
420
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
@@ -493,20 +436,18 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
493
436
  message?: string | undefined;
494
437
  } | undefined;
495
438
  receive?: {
496
- result: {
497
- received: {
498
- id: string;
499
- balance: string | number;
500
- payment: string;
501
- }[];
502
- balance: string | number;
503
- token_type: string;
504
- } | {
505
- type: string;
439
+ received: {
506
440
  id: string;
507
- content_raw?: any;
441
+ balance: string | number;
442
+ payment: string;
508
443
  }[];
509
- } | undefined;
444
+ balance: string | number;
445
+ token_type: string;
446
+ } | "recently" | {
447
+ type: string;
448
+ id: string;
449
+ content_raw?: any;
450
+ }[] | undefined;
510
451
  agent?: {
511
452
  entities: {
512
453
  name_or_address?: string | undefined;
@@ -534,29 +475,20 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
534
475
  } | undefined;
535
476
  }, {
536
477
  object: string;
537
- progress?: {
538
- op: "next" | "hold" | "unhold" | "adminUnhold";
539
- operation: {
540
- forward: string;
541
- next_node_name: string;
542
- };
543
- message?: string | undefined;
544
- } | undefined;
478
+ progress?: unknown;
545
479
  receive?: {
546
- result: {
547
- received: {
548
- id: string;
549
- balance: string | number;
550
- payment: string;
551
- }[];
552
- balance: string | number;
553
- token_type: string;
554
- } | {
555
- type: string;
480
+ received: {
556
481
  id: string;
557
- content_raw?: any;
482
+ balance: string | number;
483
+ payment: string;
558
484
  }[];
559
- } | undefined;
485
+ balance: string | number;
486
+ token_type: string;
487
+ } | "recently" | {
488
+ type: string;
489
+ id: string;
490
+ content_raw?: any;
491
+ }[] | undefined;
560
492
  agent?: {
561
493
  entities: {
562
494
  name_or_address?: string | undefined;
@@ -812,20 +744,18 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
812
744
  message?: string | undefined;
813
745
  } | undefined;
814
746
  receive?: {
815
- result: {
816
- received: {
817
- id: string;
818
- balance: string | number;
819
- payment: string;
820
- }[];
821
- balance: string | number;
822
- token_type: string;
823
- } | {
824
- type: string;
747
+ received: {
825
748
  id: string;
826
- content_raw?: any;
749
+ balance: string | number;
750
+ payment: string;
827
751
  }[];
828
- } | undefined;
752
+ balance: string | number;
753
+ token_type: string;
754
+ } | "recently" | {
755
+ type: string;
756
+ id: string;
757
+ content_raw?: any;
758
+ }[] | undefined;
829
759
  agent?: {
830
760
  entities: {
831
761
  name_or_address?: string | undefined;
@@ -895,29 +825,20 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
895
825
  }, {
896
826
  data: {
897
827
  object: string;
898
- progress?: {
899
- op: "next" | "hold" | "unhold" | "adminUnhold";
900
- operation: {
901
- forward: string;
902
- next_node_name: string;
903
- };
904
- message?: string | undefined;
905
- } | undefined;
828
+ progress?: unknown;
906
829
  receive?: {
907
- result: {
908
- received: {
909
- id: string;
910
- balance: string | number;
911
- payment: string;
912
- }[];
913
- balance: string | number;
914
- token_type: string;
915
- } | {
916
- type: string;
830
+ received: {
917
831
  id: string;
918
- content_raw?: any;
832
+ balance: string | number;
833
+ payment: string;
919
834
  }[];
920
- } | undefined;
835
+ balance: string | number;
836
+ token_type: string;
837
+ } | "recently" | {
838
+ type: string;
839
+ id: string;
840
+ content_raw?: any;
841
+ }[] | undefined;
921
842
  agent?: {
922
843
  entities: {
923
844
  name_or_address?: string | undefined;
@@ -1,8 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { CallEnvSchema, SubmissionCallSchema } from "./base.js";
3
3
  import { OperateSchema } from "./progress.js";
4
- import { AccountOrMark_AddressSchema, DescriptionSchema, LongNameSchema, ManyAccountOrMark_AddressSchema, NameOrAddressSchema } from "../common/index.js";
5
- import { QueryReceivedResultSchema } from "../common/index.js";
4
+ import { AccountOrMark_AddressSchema, DescriptionSchema, LongNameSchema, ManyAccountOrMark_AddressSchema, NameOrAddressSchema, ReceivedObjectsOrRecentlySchema, RECEIVE_FORMAT_BLOCK_OBJECTS } from "../common/index.js";
6
5
  export const ArbConfirmSchema = z.object({
7
6
  arb: NameOrAddressSchema.describe("Arb object ID or name."),
8
7
  confirm: z.boolean().describe("Whether to confirm that the submitted arbitration materials are valid for arbitration."),
@@ -24,7 +23,9 @@ export const CallOrder_DataSchema = z.object({
24
23
  arb_confirm: ArbConfirmSchema.optional().describe("Submit compensation request and apply for arbitration"),
25
24
  arb_objection: ArbObjectionSchema.optional().describe("Oppose and appeal the arbitration result, request re-arbitration."),
26
25
  arb_claim_compensation: ArbClaimCompensationSchema.optional().describe("Specify the adjudicated Arb object to obtain order compensation."),
27
- receive: QueryReceivedResultSchema.optional().describe("Unwrap CoinWrapper objects or other objects received by the order and transfer them to the order owner"),
26
+ receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects or other objects received by the order and transfer them to the order owner. " +
27
+ "Consistent with `owner_receive` on other objects (arbitration/contact/demand/machine/permission/repository/reward/service/treasury)." +
28
+ RECEIVE_FORMAT_BLOCK_OBJECTS),
28
29
  transfer_to: AccountOrMark_AddressSchema.optional().describe("Set new owner of the order. Requires order owner permission to set."),
29
30
  }).strict().describe("On-chain, operate on an Order object.");
30
31
  export const CallOrder_InputSchema = z.object({