@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
@@ -126,6 +126,13 @@ export declare const CallGuard_DataSchema: z.ZodEffects<z.ZodObject<{
126
126
  }>>;
127
127
  }, "strict", z.ZodTypeAny, {
128
128
  description?: string | undefined;
129
+ namedNew?: {
130
+ name?: string | undefined;
131
+ replaceExistName?: boolean | undefined;
132
+ tags?: string[] | undefined;
133
+ onChain?: boolean | undefined;
134
+ } | undefined;
135
+ root?: any;
129
136
  table?: {
130
137
  identifier: number;
131
138
  b_submission: boolean;
@@ -142,19 +149,19 @@ export declare const CallGuard_DataSchema: z.ZodEffects<z.ZodObject<{
142
149
  check_all_founded?: boolean | undefined;
143
150
  } | string[] | boolean[] | number[] | number[][] | undefined;
144
151
  }[] | undefined;
145
- root?: any;
146
- namedNew?: {
147
- name?: string | undefined;
148
- replaceExistName?: boolean | undefined;
149
- tags?: string[] | undefined;
150
- onChain?: boolean | undefined;
151
- } | undefined;
152
152
  rely?: {
153
153
  guards: string[];
154
154
  logic_or?: boolean | undefined;
155
155
  } | undefined;
156
156
  }, {
157
157
  description?: string | undefined;
158
+ namedNew?: {
159
+ name?: string | undefined;
160
+ replaceExistName?: boolean | undefined;
161
+ tags?: string[] | undefined;
162
+ onChain?: boolean | undefined;
163
+ } | undefined;
164
+ root?: any;
158
165
  table?: {
159
166
  identifier: number;
160
167
  b_submission: boolean;
@@ -171,19 +178,19 @@ export declare const CallGuard_DataSchema: z.ZodEffects<z.ZodObject<{
171
178
  } | string[] | boolean[] | number[] | number[][] | undefined;
172
179
  name?: string | undefined;
173
180
  }[] | undefined;
174
- root?: any;
175
- namedNew?: {
176
- name?: string | undefined;
177
- replaceExistName?: boolean | undefined;
178
- tags?: string[] | undefined;
179
- onChain?: boolean | undefined;
180
- } | undefined;
181
181
  rely?: {
182
182
  guards: string[];
183
183
  logic_or?: boolean | undefined;
184
184
  } | undefined;
185
185
  }>, {
186
186
  description?: string | undefined;
187
+ namedNew?: {
188
+ name?: string | undefined;
189
+ replaceExistName?: boolean | undefined;
190
+ tags?: string[] | undefined;
191
+ onChain?: boolean | undefined;
192
+ } | undefined;
193
+ root?: any;
187
194
  table?: {
188
195
  identifier: number;
189
196
  b_submission: boolean;
@@ -200,19 +207,19 @@ export declare const CallGuard_DataSchema: z.ZodEffects<z.ZodObject<{
200
207
  check_all_founded?: boolean | undefined;
201
208
  } | string[] | boolean[] | number[] | number[][] | undefined;
202
209
  }[] | undefined;
203
- root?: any;
204
- namedNew?: {
205
- name?: string | undefined;
206
- replaceExistName?: boolean | undefined;
207
- tags?: string[] | undefined;
208
- onChain?: boolean | undefined;
209
- } | undefined;
210
210
  rely?: {
211
211
  guards: string[];
212
212
  logic_or?: boolean | undefined;
213
213
  } | undefined;
214
214
  }, {
215
215
  description?: string | undefined;
216
+ namedNew?: {
217
+ name?: string | undefined;
218
+ replaceExistName?: boolean | undefined;
219
+ tags?: string[] | undefined;
220
+ onChain?: boolean | undefined;
221
+ } | undefined;
222
+ root?: any;
216
223
  table?: {
217
224
  identifier: number;
218
225
  b_submission: boolean;
@@ -229,13 +236,6 @@ export declare const CallGuard_DataSchema: z.ZodEffects<z.ZodObject<{
229
236
  } | string[] | boolean[] | number[] | number[][] | undefined;
230
237
  name?: string | undefined;
231
238
  }[] | undefined;
232
- root?: any;
233
- namedNew?: {
234
- name?: string | undefined;
235
- replaceExistName?: boolean | undefined;
236
- tags?: string[] | undefined;
237
- onChain?: boolean | undefined;
238
- } | undefined;
239
239
  rely?: {
240
240
  guards: string[];
241
241
  logic_or?: boolean | undefined;
@@ -355,6 +355,13 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
355
355
  }>>;
356
356
  }, "strict", z.ZodTypeAny, {
357
357
  description?: string | undefined;
358
+ namedNew?: {
359
+ name?: string | undefined;
360
+ replaceExistName?: boolean | undefined;
361
+ tags?: string[] | undefined;
362
+ onChain?: boolean | undefined;
363
+ } | undefined;
364
+ root?: any;
358
365
  table?: {
359
366
  identifier: number;
360
367
  b_submission: boolean;
@@ -371,19 +378,19 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
371
378
  check_all_founded?: boolean | undefined;
372
379
  } | string[] | boolean[] | number[] | number[][] | undefined;
373
380
  }[] | undefined;
374
- root?: any;
375
- namedNew?: {
376
- name?: string | undefined;
377
- replaceExistName?: boolean | undefined;
378
- tags?: string[] | undefined;
379
- onChain?: boolean | undefined;
380
- } | undefined;
381
381
  rely?: {
382
382
  guards: string[];
383
383
  logic_or?: boolean | undefined;
384
384
  } | undefined;
385
385
  }, {
386
386
  description?: string | undefined;
387
+ namedNew?: {
388
+ name?: string | undefined;
389
+ replaceExistName?: boolean | undefined;
390
+ tags?: string[] | undefined;
391
+ onChain?: boolean | undefined;
392
+ } | undefined;
393
+ root?: any;
387
394
  table?: {
388
395
  identifier: number;
389
396
  b_submission: boolean;
@@ -400,19 +407,19 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
400
407
  } | string[] | boolean[] | number[] | number[][] | undefined;
401
408
  name?: string | undefined;
402
409
  }[] | undefined;
403
- root?: any;
404
- namedNew?: {
405
- name?: string | undefined;
406
- replaceExistName?: boolean | undefined;
407
- tags?: string[] | undefined;
408
- onChain?: boolean | undefined;
409
- } | undefined;
410
410
  rely?: {
411
411
  guards: string[];
412
412
  logic_or?: boolean | undefined;
413
413
  } | undefined;
414
414
  }>, {
415
415
  description?: string | undefined;
416
+ namedNew?: {
417
+ name?: string | undefined;
418
+ replaceExistName?: boolean | undefined;
419
+ tags?: string[] | undefined;
420
+ onChain?: boolean | undefined;
421
+ } | undefined;
422
+ root?: any;
416
423
  table?: {
417
424
  identifier: number;
418
425
  b_submission: boolean;
@@ -429,19 +436,19 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
429
436
  check_all_founded?: boolean | undefined;
430
437
  } | string[] | boolean[] | number[] | number[][] | undefined;
431
438
  }[] | undefined;
432
- root?: any;
433
- namedNew?: {
434
- name?: string | undefined;
435
- replaceExistName?: boolean | undefined;
436
- tags?: string[] | undefined;
437
- onChain?: boolean | undefined;
438
- } | undefined;
439
439
  rely?: {
440
440
  guards: string[];
441
441
  logic_or?: boolean | undefined;
442
442
  } | undefined;
443
443
  }, {
444
444
  description?: string | undefined;
445
+ namedNew?: {
446
+ name?: string | undefined;
447
+ replaceExistName?: boolean | undefined;
448
+ tags?: string[] | undefined;
449
+ onChain?: boolean | undefined;
450
+ } | undefined;
451
+ root?: any;
445
452
  table?: {
446
453
  identifier: number;
447
454
  b_submission: boolean;
@@ -458,13 +465,6 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
458
465
  } | string[] | boolean[] | number[] | number[][] | undefined;
459
466
  name?: string | undefined;
460
467
  }[] | undefined;
461
- root?: any;
462
- namedNew?: {
463
- name?: string | undefined;
464
- replaceExistName?: boolean | undefined;
465
- tags?: string[] | undefined;
466
- onChain?: boolean | undefined;
467
- } | undefined;
468
468
  rely?: {
469
469
  guards: string[];
470
470
  logic_or?: boolean | undefined;
@@ -476,22 +476,38 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
476
476
  no_cache: z.ZodOptional<z.ZodBoolean>;
477
477
  network: z.ZodOptional<z.ZodEnum<[import("@wowok/wowok").ENTRYPOINT.Localnet, import("@wowok/wowok").ENTRYPOINT.Testnet, import("@wowok/wowok").ENTRYPOINT.Mainnet]>>;
478
478
  referrer: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
479
+ confirmed: z.ZodOptional<z.ZodBoolean>;
480
+ user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
481
+ project: z.ZodOptional<z.ZodString>;
479
482
  }, "strict", z.ZodTypeAny, {
480
483
  account: string;
481
484
  no_cache?: boolean | undefined;
482
485
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
483
486
  permission_guard?: string[] | undefined;
484
487
  referrer?: string | undefined;
488
+ confirmed?: boolean | undefined;
489
+ user_intent_phrases?: string[] | undefined;
490
+ project?: string | undefined;
485
491
  }, {
486
492
  no_cache?: boolean | undefined;
487
493
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
488
494
  account?: string | undefined;
489
495
  permission_guard?: string[] | undefined;
490
496
  referrer?: string | undefined;
497
+ confirmed?: boolean | undefined;
498
+ user_intent_phrases?: string[] | undefined;
499
+ project?: string | undefined;
491
500
  }>>;
492
501
  }, "strict", z.ZodTypeAny, {
493
502
  data: {
494
503
  description?: string | undefined;
504
+ namedNew?: {
505
+ name?: string | undefined;
506
+ replaceExistName?: boolean | undefined;
507
+ tags?: string[] | undefined;
508
+ onChain?: boolean | undefined;
509
+ } | undefined;
510
+ root?: any;
495
511
  table?: {
496
512
  identifier: number;
497
513
  b_submission: boolean;
@@ -508,13 +524,6 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
508
524
  check_all_founded?: boolean | undefined;
509
525
  } | string[] | boolean[] | number[] | number[][] | undefined;
510
526
  }[] | undefined;
511
- root?: any;
512
- namedNew?: {
513
- name?: string | undefined;
514
- replaceExistName?: boolean | undefined;
515
- tags?: string[] | undefined;
516
- onChain?: boolean | undefined;
517
- } | undefined;
518
527
  rely?: {
519
528
  guards: string[];
520
529
  logic_or?: boolean | undefined;
@@ -526,10 +535,20 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
526
535
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
527
536
  permission_guard?: string[] | undefined;
528
537
  referrer?: string | undefined;
538
+ confirmed?: boolean | undefined;
539
+ user_intent_phrases?: string[] | undefined;
540
+ project?: string | undefined;
529
541
  } | undefined;
530
542
  }, {
531
543
  data: {
532
544
  description?: string | undefined;
545
+ namedNew?: {
546
+ name?: string | undefined;
547
+ replaceExistName?: boolean | undefined;
548
+ tags?: string[] | undefined;
549
+ onChain?: boolean | undefined;
550
+ } | undefined;
551
+ root?: any;
533
552
  table?: {
534
553
  identifier: number;
535
554
  b_submission: boolean;
@@ -546,13 +565,6 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
546
565
  } | string[] | boolean[] | number[] | number[][] | undefined;
547
566
  name?: string | undefined;
548
567
  }[] | undefined;
549
- root?: any;
550
- namedNew?: {
551
- name?: string | undefined;
552
- replaceExistName?: boolean | undefined;
553
- tags?: string[] | undefined;
554
- onChain?: boolean | undefined;
555
- } | undefined;
556
568
  rely?: {
557
569
  guards: string[];
558
570
  logic_or?: boolean | undefined;
@@ -564,6 +576,9 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
564
576
  account?: string | undefined;
565
577
  permission_guard?: string[] | undefined;
566
578
  referrer?: string | undefined;
579
+ confirmed?: boolean | undefined;
580
+ user_intent_phrases?: string[] | undefined;
581
+ project?: string | undefined;
567
582
  } | undefined;
568
583
  }>;
569
584
  export declare const CallGenPassport_InputSchema: z.ZodObject<{
@@ -754,28 +769,30 @@ export declare const CallGenPassport_InputSchema: z.ZodObject<{
754
769
  no_cache: z.ZodOptional<z.ZodBoolean>;
755
770
  network: z.ZodOptional<z.ZodEnum<[import("@wowok/wowok").ENTRYPOINT.Localnet, import("@wowok/wowok").ENTRYPOINT.Testnet, import("@wowok/wowok").ENTRYPOINT.Mainnet]>>;
756
771
  referrer: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
772
+ confirmed: z.ZodOptional<z.ZodBoolean>;
773
+ user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
774
+ project: z.ZodOptional<z.ZodString>;
757
775
  }, "strict", z.ZodTypeAny, {
758
776
  account: string;
759
777
  no_cache?: boolean | undefined;
760
778
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
761
779
  permission_guard?: string[] | undefined;
762
780
  referrer?: string | undefined;
781
+ confirmed?: boolean | undefined;
782
+ user_intent_phrases?: string[] | undefined;
783
+ project?: string | undefined;
763
784
  }, {
764
785
  no_cache?: boolean | undefined;
765
786
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
766
787
  account?: string | undefined;
767
788
  permission_guard?: string[] | undefined;
768
789
  referrer?: string | undefined;
790
+ confirmed?: boolean | undefined;
791
+ user_intent_phrases?: string[] | undefined;
792
+ project?: string | undefined;
769
793
  }>>;
770
794
  }, "strict", z.ZodTypeAny, {
771
795
  guard: string | string[];
772
- env?: {
773
- account: string;
774
- no_cache?: boolean | undefined;
775
- network?: import("@wowok/wowok").ENTRYPOINT | undefined;
776
- permission_guard?: string[] | undefined;
777
- referrer?: string | undefined;
778
- } | undefined;
779
796
  info?: {
780
797
  type: "submission";
781
798
  guard: {
@@ -803,15 +820,18 @@ export declare const CallGenPassport_InputSchema: z.ZodObject<{
803
820
  }[];
804
821
  }[];
805
822
  } | undefined;
806
- }, {
807
- guard: string | string[];
808
823
  env?: {
824
+ account: string;
809
825
  no_cache?: boolean | undefined;
810
826
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
811
- account?: string | undefined;
812
827
  permission_guard?: string[] | undefined;
813
828
  referrer?: string | undefined;
829
+ confirmed?: boolean | undefined;
830
+ user_intent_phrases?: string[] | undefined;
831
+ project?: string | undefined;
814
832
  } | undefined;
833
+ }, {
834
+ guard: string | string[];
815
835
  info?: {
816
836
  type: "submission";
817
837
  guard: {
@@ -839,6 +859,16 @@ export declare const CallGenPassport_InputSchema: z.ZodObject<{
839
859
  }[];
840
860
  }[];
841
861
  } | undefined;
862
+ env?: {
863
+ no_cache?: boolean | undefined;
864
+ network?: import("@wowok/wowok").ENTRYPOINT | undefined;
865
+ account?: string | undefined;
866
+ permission_guard?: string[] | undefined;
867
+ referrer?: string | undefined;
868
+ confirmed?: boolean | undefined;
869
+ user_intent_phrases?: string[] | undefined;
870
+ project?: string | undefined;
871
+ } | undefined;
842
872
  }>;
843
873
  export declare const Guard2File_InputSchema: z.ZodObject<{
844
874
  guard: z.ZodEffects<z.ZodString, string, string>;
@@ -850,18 +880,27 @@ export declare const Guard2File_InputSchema: z.ZodObject<{
850
880
  no_cache: z.ZodOptional<z.ZodBoolean>;
851
881
  network: z.ZodOptional<z.ZodEnum<[import("@wowok/wowok").ENTRYPOINT.Localnet, import("@wowok/wowok").ENTRYPOINT.Testnet, import("@wowok/wowok").ENTRYPOINT.Mainnet]>>;
852
882
  referrer: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
883
+ confirmed: z.ZodOptional<z.ZodBoolean>;
884
+ user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
885
+ project: z.ZodOptional<z.ZodString>;
853
886
  }, "strict", z.ZodTypeAny, {
854
887
  account: string;
855
888
  no_cache?: boolean | undefined;
856
889
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
857
890
  permission_guard?: string[] | undefined;
858
891
  referrer?: string | undefined;
892
+ confirmed?: boolean | undefined;
893
+ user_intent_phrases?: string[] | undefined;
894
+ project?: string | undefined;
859
895
  }, {
860
896
  no_cache?: boolean | undefined;
861
897
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
862
898
  account?: string | undefined;
863
899
  permission_guard?: string[] | undefined;
864
900
  referrer?: string | undefined;
901
+ confirmed?: boolean | undefined;
902
+ user_intent_phrases?: string[] | undefined;
903
+ project?: string | undefined;
865
904
  }>>;
866
905
  }, "strict", z.ZodTypeAny, {
867
906
  guard: string;
@@ -873,6 +912,9 @@ export declare const Guard2File_InputSchema: z.ZodObject<{
873
912
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
874
913
  permission_guard?: string[] | undefined;
875
914
  referrer?: string | undefined;
915
+ confirmed?: boolean | undefined;
916
+ user_intent_phrases?: string[] | undefined;
917
+ project?: string | undefined;
876
918
  } | undefined;
877
919
  }, {
878
920
  guard: string;
@@ -884,6 +926,9 @@ export declare const Guard2File_InputSchema: z.ZodObject<{
884
926
  account?: string | undefined;
885
927
  permission_guard?: string[] | undefined;
886
928
  referrer?: string | undefined;
929
+ confirmed?: boolean | undefined;
930
+ user_intent_phrases?: string[] | undefined;
931
+ project?: string | undefined;
887
932
  } | undefined;
888
933
  }>;
889
934
  export declare const Guard2File_OutputSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
@@ -1,6 +1,9 @@
1
1
  import type { CallEnv } from "@wowok/wowok";
2
2
  import type { CallOutput } from "./base.js";
3
- export declare function handleCallResult(result: any): {
3
+ import { type SemanticContext } from "./semantic.js";
4
+ type SuccessHook = (result: any, context: SemanticContext | undefined) => void;
5
+ export declare function registerSuccessHook(hook: SuccessHook | null): void;
6
+ export declare function handleCallResult(result: any, context?: SemanticContext): {
4
7
  content: any[];
5
8
  structuredContent: CallOutput;
6
9
  };
@@ -36,3 +39,4 @@ export declare function createToolAnnotations(readOnlyHint?: boolean, destructiv
36
39
  export declare function transformSubmission(submission: any): Promise<any>;
37
40
  export declare function validateInput<T>(data: any, schema: any): T;
38
41
  export declare function getEnvConfig(env?: any): CallEnv;
42
+ export {};
@@ -1,4 +1,17 @@
1
1
  import { ResponseData, LocalMark, enrichMoveError } from "@wowok/wowok";
2
+ import { classifyError, buildSemantic } from "./semantic.js";
3
+ let successHook = null;
4
+ export function registerSuccessHook(hook) {
5
+ successHook = hook;
6
+ }
7
+ function fireSuccessHook(result, context) {
8
+ if (successHook) {
9
+ try {
10
+ successHook(result, context);
11
+ }
12
+ catch { }
13
+ }
14
+ }
2
15
  function convertBigInts(obj) {
3
16
  if (typeof obj === "bigint")
4
17
  return obj.toString();
@@ -12,14 +25,67 @@ function convertBigInts(obj) {
12
25
  }
13
26
  return obj;
14
27
  }
15
- export function handleCallResult(result) {
28
+ function runHarnessLoops(context, output, errorCode) {
29
+ if (!context?.harness || !context?.expected)
30
+ return undefined;
31
+ const harness = context.harness;
32
+ const expected = context.expected;
33
+ const actualSemantic = output.semantic;
34
+ const verifyReport = harness.verify({
35
+ expected,
36
+ actual: {
37
+ result_type: output.result.type,
38
+ semantic: actualSemantic,
39
+ error_code: output.result.type === "error" ? output.result.error_code : undefined,
40
+ },
41
+ });
42
+ let recovery;
43
+ const needRecovery = verifyReport.status !== "pass" || output.result.type === "error" || errorCode;
44
+ if (needRecovery) {
45
+ const ec = errorCode
46
+ || (output.result.type === "error" ? output.result.error_code : undefined)
47
+ || "unknown";
48
+ recovery = harness.recover(ec, context.operation_id || expected.operation, {
49
+ operation_type: context.operation_type,
50
+ data: context.data,
51
+ });
52
+ }
53
+ return {
54
+ verify: {
55
+ status: verifyReport.status,
56
+ mismatches: verifyReport.mismatches.map(m => convertBigInts(m)),
57
+ summary: verifyReport.summary,
58
+ timestamp: verifyReport.timestamp,
59
+ },
60
+ recovery: recovery ? {
61
+ strategy: recovery.strategy,
62
+ should_retry: recovery.should_retry,
63
+ adjusted_params: recovery.adjusted_params,
64
+ user_prompt: recovery.user_prompt,
65
+ max_attempts: recovery.max_attempts,
66
+ current_attempt: recovery.current_attempt,
67
+ detail: recovery.detail,
68
+ } : undefined,
69
+ };
70
+ }
71
+ export function handleCallResult(result, context) {
16
72
  const safeResult = convertBigInts(result);
17
73
  if (safeResult && "error" in safeResult) {
18
74
  const enrichedError = enrichMoveError(safeResult.error);
75
+ const classified = classifyError(enrichedError);
19
76
  const output = {
20
77
  message: `Error: ${enrichedError}`,
21
- result: { type: "error", error: enrichedError },
78
+ result: {
79
+ type: "error",
80
+ error: enrichedError,
81
+ error_code: classified.error_code,
82
+ retryable: classified.retryable,
83
+ recovery_hint: classified.recovery_hint,
84
+ },
22
85
  };
86
+ const harnessReport = runHarnessLoops(context, output, classified.error_code);
87
+ if (harnessReport)
88
+ output.harness_report = harnessReport;
23
89
  return {
24
90
  content: [{ type: "text", text: output.message }],
25
91
  structuredContent: output,
@@ -32,10 +98,20 @@ export function handleCallResult(result) {
32
98
  const isSuccess = txStatus === "success";
33
99
  if (!isSuccess) {
34
100
  const enrichedError = enrichMoveError(txError || txStatus || "unknown error");
101
+ const classified = classifyError(enrichedError);
35
102
  const output = {
36
103
  message: `Transaction failed: ${enrichedError}`,
37
- result: { type: "error", error: enrichedError },
104
+ result: {
105
+ type: "error",
106
+ error: enrichedError,
107
+ error_code: classified.error_code,
108
+ retryable: classified.retryable,
109
+ recovery_hint: classified.recovery_hint,
110
+ },
38
111
  };
112
+ const harnessReport = runHarnessLoops(context, output, classified.error_code);
113
+ if (harnessReport)
114
+ output.harness_report = harnessReport;
39
115
  return {
40
116
  content: [
41
117
  { type: "text", text: output.message },
@@ -47,7 +123,12 @@ export function handleCallResult(result) {
47
123
  const output = {
48
124
  message: "Transaction completed successfully",
49
125
  result: { type: "transaction", ...safeResult },
126
+ semantic: buildSemantic(safeResult, context),
50
127
  };
128
+ const harnessReport = runHarnessLoops(context, output);
129
+ if (harnessReport)
130
+ output.harness_report = harnessReport;
131
+ fireSuccessHook(result, context);
51
132
  return {
52
133
  content: [
53
134
  { type: "text", text: output.message },
@@ -60,7 +141,21 @@ export function handleCallResult(result) {
60
141
  const output = {
61
142
  message: "Submission required for Guard verification",
62
143
  result: { type: "submission", ...safeResult },
144
+ semantic: context ? {
145
+ intent: "guard_submission_required",
146
+ status: "pending_input",
147
+ summary: "Guard verification required — fill the submission data and resubmit",
148
+ next_actions: [{
149
+ action: "fill guard submission data and resubmit via call_with_submission",
150
+ reason: "Guard rejected the call; submission must satisfy the Guard table requirements",
151
+ tool: "onchain_operations (with submission field)",
152
+ priority: "required",
153
+ }],
154
+ } : undefined,
63
155
  };
156
+ const harnessReport = runHarnessLoops(context, output);
157
+ if (harnessReport)
158
+ output.harness_report = harnessReport;
64
159
  return {
65
160
  content: [
66
161
  { type: "text", text: output.message },
@@ -74,6 +169,9 @@ export function handleCallResult(result) {
74
169
  message: "Operation completed",
75
170
  result: { type: "data", data: safeResult },
76
171
  };
172
+ const harnessReport = runHarnessLoops(context, output);
173
+ if (harnessReport)
174
+ output.harness_report = harnessReport;
77
175
  return {
78
176
  content: [
79
177
  { type: "text", text: output.message },
@@ -87,6 +185,9 @@ export function handleCallResult(result) {
87
185
  message: "Operation completed",
88
186
  result: { type: "null" },
89
187
  };
188
+ const harnessReport = runHarnessLoops(context, output);
189
+ if (harnessReport)
190
+ output.harness_report = harnessReport;
90
191
  return {
91
192
  content: [{ type: "text", text: output.message }],
92
193
  structuredContent: output,
@@ -95,7 +196,11 @@ export function handleCallResult(result) {
95
196
  const output = {
96
197
  message: "Operation completed",
97
198
  result: { type: "transaction", ...safeResult },
199
+ semantic: buildSemantic(safeResult, context),
98
200
  };
201
+ const harnessReport = runHarnessLoops(context, output);
202
+ if (harnessReport)
203
+ output.harness_report = harnessReport;
99
204
  return {
100
205
  content: [{ type: "text", text: output.message }],
101
206
  structuredContent: output,
@@ -1,5 +1,6 @@
1
1
  export * from './base.js';
2
2
  export * from './handler.js';
3
+ export * from './semantic.js';
3
4
  export * from './contact.js';
4
5
  export * from './demand.js';
5
6
  export * from './guard.js';
@@ -1,5 +1,6 @@
1
1
  export * from './base.js';
2
2
  export * from './handler.js';
3
+ export * from './semantic.js';
3
4
  export * from './contact.js';
4
5
  export * from './demand.js';
5
6
  export * from './guard.js';