@wowok/agent-mcp 2.7.1 β†’ 2.7.2

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 (375) hide show
  1. package/dist/config/index.js +1 -1
  2. package/dist/config/runtime.js +1 -238
  3. package/dist/customer/customer-advice.js +1 -130
  4. package/dist/customer/index.js +1 -11
  5. package/dist/customer/industry-risks.js +1 -438
  6. package/dist/customer/info-puzzle.js +1 -681
  7. package/dist/customer/order-monitor.js +1 -328
  8. package/dist/customer/order-strategy.js +1 -373
  9. package/dist/customer/post-purchase.js +1 -351
  10. package/dist/customer/preorder-compare.js +1 -34
  11. package/dist/customer/reminder-system.js +1 -316
  12. package/dist/customer/risk-assessment.js +1 -397
  13. package/dist/customer/types.js +1 -13
  14. package/dist/customer/user-preferences.js +1 -460
  15. package/dist/evaluation/arbitration-game.d.ts +9 -2
  16. package/dist/evaluation/arbitration-game.js +1 -48
  17. package/dist/evaluation/builtins/demand-match.js +1 -153
  18. package/dist/evaluation/builtins/index.js +1 -10
  19. package/dist/evaluation/builtins/service-risk.js +1 -55
  20. package/dist/evaluation/capability.js +1 -13
  21. package/dist/evaluation/composer.js +1 -40
  22. package/dist/evaluation/engine.js +1 -175
  23. package/dist/evaluation/extract.js +1 -115
  24. package/dist/evaluation/game-strategy.d.ts +27 -0
  25. package/dist/evaluation/game-strategy.js +1 -0
  26. package/dist/evaluation/gap.js +1 -100
  27. package/dist/evaluation/index.d.ts +1 -0
  28. package/dist/evaluation/index.js +1 -11
  29. package/dist/evaluation/node-game.d.ts +31 -3
  30. package/dist/evaluation/node-game.js +1 -57
  31. package/dist/evaluation/region.js +1 -36
  32. package/dist/evaluation/types.d.ts +1 -0
  33. package/dist/evaluation/types.js +1 -1
  34. package/dist/evaluation/user-injection.js +1 -27
  35. package/dist/experience/experience-reuse.js +1 -103
  36. package/dist/experience/index.js +1 -5
  37. package/dist/experience/intent-distill.js +1 -83
  38. package/dist/experience/realtime-feedback.js +1 -94
  39. package/dist/experience/types.js +1 -1
  40. package/dist/experience/user-profile.js +1 -171
  41. package/dist/extensions/business-modules.js +1 -287
  42. package/dist/extensions/capability-manifest.js +1 -781
  43. package/dist/extensions/constraint-registry.js +1 -198
  44. package/dist/extensions/index.js +1 -6
  45. package/dist/extensions/metric-registry.js +1 -257
  46. package/dist/extensions/mode-evaluator.js +1 -170
  47. package/dist/extensions/modes.js +1 -499
  48. package/dist/extensions/registry.js +1 -717
  49. package/dist/extensions/types.js +1 -1
  50. package/dist/harness/auto-escalation.js +1 -68
  51. package/dist/harness/checkpoint.js +1 -129
  52. package/dist/harness/index.js +1 -78
  53. package/dist/harness/plan.js +1 -315
  54. package/dist/harness/recover.js +1 -139
  55. package/dist/harness/types.js +1 -1
  56. package/dist/harness/verify.js +1 -237
  57. package/dist/index.js +1 -273
  58. package/dist/intent/enrich.js +1 -67
  59. package/dist/intent/index.js +1 -60
  60. package/dist/intent/matcher.js +1 -81
  61. package/dist/intent/store.js +1 -55
  62. package/dist/intent/types.js +1 -10
  63. package/dist/knowledge/acquisition-flywheel.js +1 -192
  64. package/dist/knowledge/allocation-confirm.js +1 -534
  65. package/dist/knowledge/allocation-context.js +1 -249
  66. package/dist/knowledge/allocation-ledger.js +1 -463
  67. package/dist/knowledge/allocation-puzzle.js +1 -298
  68. package/dist/knowledge/allocation-risk.js +1 -568
  69. package/dist/knowledge/allocation-templates.js +1 -970
  70. package/dist/knowledge/allocation-translation.js +1 -585
  71. package/dist/knowledge/arb-risk.js +1 -210
  72. package/dist/knowledge/arbitration-confirm.js +1 -559
  73. package/dist/knowledge/arbitration-context.js +1 -505
  74. package/dist/knowledge/arbitration-ledger.js +1 -521
  75. package/dist/knowledge/arbitration-puzzle.js +1 -304
  76. package/dist/knowledge/arbitration-risk.js +1 -423
  77. package/dist/knowledge/arbitration-templates.js +1 -276
  78. package/dist/knowledge/arbitration-translation.js +1 -487
  79. package/dist/knowledge/arbitration-trust.js +1 -117
  80. package/dist/knowledge/audit-rules.js +1 -141
  81. package/dist/knowledge/bridge-risk.js +1 -263
  82. package/dist/knowledge/contact-risk.js +1 -200
  83. package/dist/knowledge/contact-templates.js +1 -60
  84. package/dist/knowledge/demand-confirm.js +1 -206
  85. package/dist/knowledge/demand-matching.js +1 -132
  86. package/dist/knowledge/demand-risk.js +1 -240
  87. package/dist/knowledge/demand-translation.js +1 -354
  88. package/dist/knowledge/deployment-scanner.js +1 -823
  89. package/dist/knowledge/dynamic-pricing.js +1 -87
  90. package/dist/knowledge/examples-scanner-cli.js +1 -26
  91. package/dist/knowledge/examples-scanner.js +1 -843
  92. package/dist/knowledge/flywheel-loop.js +1 -404
  93. package/dist/knowledge/fund-layer.js +1 -973
  94. package/dist/knowledge/glossary.js +1 -211
  95. package/dist/knowledge/guard-confirm.js +1 -406
  96. package/dist/knowledge/guard-context.js +1 -287
  97. package/dist/knowledge/guard-design-patterns.js +1 -360
  98. package/dist/knowledge/guard-ledger.js +1 -260
  99. package/dist/knowledge/guard-lint.js +1 -670
  100. package/dist/knowledge/guard-migration.js +1 -228
  101. package/dist/knowledge/guard-puzzle.js +1 -805
  102. package/dist/knowledge/guard-render.js +1 -700
  103. package/dist/knowledge/guard-risk.js +1 -1879
  104. package/dist/knowledge/guard-submission-prompt.js +1 -171
  105. package/dist/knowledge/guard-templates.js +1 -1105
  106. package/dist/knowledge/guard-translation.js +1 -1119
  107. package/dist/knowledge/index.js +1 -436
  108. package/dist/knowledge/industry-evolution.js +1 -323
  109. package/dist/knowledge/industry-generalizer.js +1 -381
  110. package/dist/knowledge/industry-registry.js +1 -174
  111. package/dist/knowledge/intent-metrics.d.ts +4 -3
  112. package/dist/knowledge/intent-metrics.js +1 -566
  113. package/dist/knowledge/machine-confirm.js +1 -559
  114. package/dist/knowledge/machine-context.js +1 -833
  115. package/dist/knowledge/machine-ledger.js +1 -338
  116. package/dist/knowledge/machine-puzzle.js +1 -494
  117. package/dist/knowledge/machine-render.js +1 -565
  118. package/dist/knowledge/machine-risk.js +1 -669
  119. package/dist/knowledge/machine-templates.js +1 -1597
  120. package/dist/knowledge/machine-topology.js +1 -234
  121. package/dist/knowledge/machine-translation.js +1 -513
  122. package/dist/knowledge/mcp-schema-audit-cli.js +1 -45
  123. package/dist/knowledge/mcp-schema-audit.js +1 -777
  124. package/dist/knowledge/onchain-constants.js +1 -35
  125. package/dist/knowledge/order-confirm.js +1 -573
  126. package/dist/knowledge/order-context.js +1 -390
  127. package/dist/knowledge/order-ledger.js +1 -341
  128. package/dist/knowledge/order-puzzle.js +1 -255
  129. package/dist/knowledge/order-risk.js +1 -653
  130. package/dist/knowledge/order-templates.js +1 -368
  131. package/dist/knowledge/order-translation.js +1 -550
  132. package/dist/knowledge/overrides-loader.js +1 -65
  133. package/dist/knowledge/passport-confirm.js +1 -531
  134. package/dist/knowledge/passport-context.js +1 -306
  135. package/dist/knowledge/passport-ledger.js +1 -282
  136. package/dist/knowledge/passport-puzzle.js +1 -333
  137. package/dist/knowledge/passport-risk.js +1 -450
  138. package/dist/knowledge/passport-templates.js +1 -568
  139. package/dist/knowledge/passport-translation.js +1 -516
  140. package/dist/knowledge/payment-risk.js +1 -249
  141. package/dist/knowledge/permission-confirm.js +1 -426
  142. package/dist/knowledge/permission-context.js +1 -224
  143. package/dist/knowledge/permission-ledger.js +1 -403
  144. package/dist/knowledge/permission-puzzle.js +1 -173
  145. package/dist/knowledge/permission-risk.js +1 -411
  146. package/dist/knowledge/permission-templates.js +1 -234
  147. package/dist/knowledge/permission-translation.js +1 -350
  148. package/dist/knowledge/personal-risk.js +1 -212
  149. package/dist/knowledge/process-model.js +1 -160
  150. package/dist/knowledge/progress-confirm.js +1 -456
  151. package/dist/knowledge/progress-context.js +1 -452
  152. package/dist/knowledge/progress-ledger.js +1 -330
  153. package/dist/knowledge/progress-puzzle.js +1 -219
  154. package/dist/knowledge/progress-risk.js +1 -461
  155. package/dist/knowledge/progress-templates.js +1 -228
  156. package/dist/knowledge/progress-translation.js +1 -405
  157. package/dist/knowledge/proof-confirm.js +1 -187
  158. package/dist/knowledge/proof-risk.js +1 -207
  159. package/dist/knowledge/proof-translation.js +1 -283
  160. package/dist/knowledge/registrar-risk.js +1 -217
  161. package/dist/knowledge/repository-confirm.js +1 -286
  162. package/dist/knowledge/repository-risk.js +1 -373
  163. package/dist/knowledge/repository-translation.js +1 -445
  164. package/dist/knowledge/reputation-rules.js +1 -99
  165. package/dist/knowledge/resource-risk.js +1 -157
  166. package/dist/knowledge/reward-confirm.js +1 -526
  167. package/dist/knowledge/reward-context.js +1 -504
  168. package/dist/knowledge/reward-ledger.js +1 -502
  169. package/dist/knowledge/reward-puzzle.js +1 -300
  170. package/dist/knowledge/reward-risk.js +1 -627
  171. package/dist/knowledge/reward-templates.js +1 -197
  172. package/dist/knowledge/reward-translation.js +1 -501
  173. package/dist/knowledge/safety-rules.js +1 -404
  174. package/dist/knowledge/scenario-modes.js +1 -321
  175. package/dist/knowledge/service-confirm.js +1 -807
  176. package/dist/knowledge/service-context.js +1 -403
  177. package/dist/knowledge/service-ledger.js +1 -609
  178. package/dist/knowledge/service-puzzle.js +1 -236
  179. package/dist/knowledge/service-risk.js +1 -651
  180. package/dist/knowledge/service-templates.js +1 -456
  181. package/dist/knowledge/service-translation.js +1 -622
  182. package/dist/knowledge/template-registry.js +1 -353
  183. package/dist/knowledge/tool-constraints.js +1 -195
  184. package/dist/knowledge/tools-reference.js +1 -178
  185. package/dist/knowledge/treasury-confirm.js +1 -512
  186. package/dist/knowledge/treasury-context.js +1 -363
  187. package/dist/knowledge/treasury-ledger.js +1 -300
  188. package/dist/knowledge/treasury-puzzle.js +1 -216
  189. package/dist/knowledge/treasury-risk.js +1 -440
  190. package/dist/knowledge/treasury-templates.js +1 -358
  191. package/dist/knowledge/treasury-translation.js +1 -498
  192. package/dist/knowledge/trust-metrics.js +1 -198
  193. package/dist/knowledge/util-risk.js +1 -135
  194. package/dist/loop-engineering/aggregate.js +1 -132
  195. package/dist/loop-engineering/context-collect.js +1 -83
  196. package/dist/loop-engineering/diagnose.js +1 -273
  197. package/dist/loop-engineering/improve.js +1 -405
  198. package/dist/loop-engineering/index.js +1 -4
  199. package/dist/loop-engineering/pipeline.js +1 -56
  200. package/dist/mode-market/index.js +1 -3
  201. package/dist/mode-market/registry.js +1 -124
  202. package/dist/mode-market/review.js +1 -214
  203. package/dist/mode-market/submission.js +1 -85
  204. package/dist/participation/collaborator-interest.d.ts +23 -0
  205. package/dist/participation/collaborator-interest.js +1 -0
  206. package/dist/participation/customer-interest.d.ts +25 -0
  207. package/dist/participation/customer-interest.js +1 -0
  208. package/dist/participation/merchant-interest.js +1 -100
  209. package/dist/participation/radar-core.d.ts +13 -3
  210. package/dist/participation/radar-core.js +1 -269
  211. package/dist/participation/supplier-interest.d.ts +25 -0
  212. package/dist/participation/supplier-interest.js +1 -0
  213. package/dist/persona/analyzer.js +1 -66
  214. package/dist/persona/bridge.js +1 -86
  215. package/dist/persona/defaults.js +1 -195
  216. package/dist/persona/experience-bridge.js +1 -23
  217. package/dist/persona/index.js +1 -71
  218. package/dist/persona/model.js +1 -111
  219. package/dist/persona/store.js +1 -62
  220. package/dist/persona/types.d.ts +3 -1
  221. package/dist/persona/types.js +1 -5
  222. package/dist/project/business-puzzle.js +1 -383
  223. package/dist/project/context-assembly.js +1 -254
  224. package/dist/project/deployment-bridge.js +1 -120
  225. package/dist/project/deployment-doc.js +1 -1126
  226. package/dist/project/edit-planner.js +1 -1342
  227. package/dist/project/evaluation.js +1 -2011
  228. package/dist/project/game-theory.js +1 -177
  229. package/dist/project/graph-builder.js +1 -656
  230. package/dist/project/graph.js +1 -340
  231. package/dist/project/handlers.js +1 -1784
  232. package/dist/project/index.d.ts +1 -0
  233. package/dist/project/index.js +1 -301
  234. package/dist/project/intent-analyzer.js +1 -149
  235. package/dist/project/machine-nodes.js +1 -36
  236. package/dist/project/merchant-guide.js +1 -264
  237. package/dist/project/migration.js +1 -125
  238. package/dist/project/mode-actions.js +1 -309
  239. package/dist/project/namespace.js +1 -206
  240. package/dist/project/participation-radar.js +1 -428
  241. package/dist/project/pipeline-actions.js +1 -109
  242. package/dist/project/project-store.js +1 -422
  243. package/dist/project/query.js +1 -153
  244. package/dist/project/reverse-mapping.d.ts +34 -0
  245. package/dist/project/reverse-mapping.js +1 -0
  246. package/dist/project/risk-aggregator.js +1 -295
  247. package/dist/project/rollback-policy.js +1 -290
  248. package/dist/project/semantic-assembler.js +1 -345
  249. package/dist/project/semantic-graph.js +1 -292
  250. package/dist/project/stage-gate.js +1 -369
  251. package/dist/project/substep-trace.js +1 -332
  252. package/dist/project/task-tracker.js +1 -78
  253. package/dist/role/derivation.d.ts +18 -0
  254. package/dist/role/derivation.js +1 -0
  255. package/dist/role/index.d.ts +5 -0
  256. package/dist/role/index.js +1 -0
  257. package/dist/role/model.d.ts +8 -0
  258. package/dist/role/model.js +1 -0
  259. package/dist/role/resolution.d.ts +11 -0
  260. package/dist/role/resolution.js +1 -0
  261. package/dist/role/types.d.ts +11 -0
  262. package/dist/role/types.js +1 -0
  263. package/dist/rules.js +1 -52
  264. package/dist/safety/confirm-gate.js +1 -88
  265. package/dist/safety/index.js +1 -3
  266. package/dist/safety/preview.js +1 -52
  267. package/dist/schema/call/allocation.js +1 -34
  268. package/dist/schema/call/arbitration.js +1 -113
  269. package/dist/schema/call/base.d.ts +15 -15
  270. package/dist/schema/call/base.js +1 -370
  271. package/dist/schema/call/bridge-handler.js +1 -265
  272. package/dist/schema/call/bridge.d.ts +7 -7
  273. package/dist/schema/call/bridge.js +1 -458
  274. package/dist/schema/call/contact.js +1 -37
  275. package/dist/schema/call/demand.js +1 -47
  276. package/dist/schema/call/guard.js +1 -161
  277. package/dist/schema/call/handler.js +1 -322
  278. package/dist/schema/call/index.js +1 -20
  279. package/dist/schema/call/machine.js +1 -193
  280. package/dist/schema/call/order.js +1 -35
  281. package/dist/schema/call/payment.js +1 -37
  282. package/dist/schema/call/permission-handler.js +1 -54
  283. package/dist/schema/call/permission.js +1 -105
  284. package/dist/schema/call/personal.js +1 -78
  285. package/dist/schema/call/progress.js +1 -47
  286. package/dist/schema/call/proof.js +1 -33
  287. package/dist/schema/call/repository.js +1 -77
  288. package/dist/schema/call/reward.js +1 -30
  289. package/dist/schema/call/semantic.js +1 -1679
  290. package/dist/schema/call/service.js +1 -184
  291. package/dist/schema/call/treasury.js +1 -71
  292. package/dist/schema/common/index.js +1 -407
  293. package/dist/schema/config/index.js +1 -68
  294. package/dist/schema/evaluation/index.d.ts +213 -16
  295. package/dist/schema/evaluation/index.js +1 -356
  296. package/dist/schema/index.js +1 -17
  297. package/dist/schema/intent-radar/index.d.ts +13 -13
  298. package/dist/schema/intent-radar/index.js +1 -89
  299. package/dist/schema/local/index.d.ts +21 -21
  300. package/dist/schema/local/index.js +1 -927
  301. package/dist/schema/local/wip.js +1 -187
  302. package/dist/schema/messenger/index.d.ts +7 -7
  303. package/dist/schema/messenger/index.js +1 -475
  304. package/dist/schema/operations.d.ts +7 -7
  305. package/dist/schema/operations.js +1 -520
  306. package/dist/schema/persona/index.d.ts +54 -54
  307. package/dist/schema/persona/index.js +1 -148
  308. package/dist/schema/project/index.d.ts +94 -48
  309. package/dist/schema/project/index.js +1 -2057
  310. package/dist/schema/query/index.d.ts +423 -7
  311. package/dist/schema/query/index.js +1 -1646
  312. package/dist/schema/schema-query/index.js +1 -104
  313. package/dist/schema/schema-version.js +1 -76
  314. package/dist/schema/sync-layer4.js +1 -286
  315. package/dist/schema/task-status.js +1 -36
  316. package/dist/schema/trust/index.js +1 -314
  317. package/dist/schema/utils/guard-parser.js +1 -419
  318. package/dist/schema/utils/guard-query-utils.js +1 -46
  319. package/dist/schema/utils/node-parser.js +1 -369
  320. package/dist/schema/utils/object-type-utils.js +1 -35
  321. package/dist/schema/utils/permission-index-utils.js +1 -7
  322. package/dist/schema/utils/permission-machine-check.js +1 -121
  323. package/dist/schema/utils/skills-recommendation.js +1 -77
  324. package/dist/schema-query/index.js +1 -810
  325. package/dist/schemas/account_operation.output.json +5 -2
  326. package/dist/schemas/bridge_operation.output.json +5 -2
  327. package/dist/schemas/evaluation_operation.output.json +112 -7
  328. package/dist/schemas/evaluation_operation.schema.json +93 -6
  329. package/dist/schemas/index.json +1 -1
  330. package/dist/schemas/intent_radar.output.json +4 -1
  331. package/dist/schemas/intent_radar.schema.json +4 -1
  332. package/dist/schemas/local_info_operation.output.json +5 -2
  333. package/dist/schemas/local_mark_operation.output.json +5 -2
  334. package/dist/schemas/messenger_operation.output.json +5 -2
  335. package/dist/schemas/onchain_events.output.json +5 -2
  336. package/dist/schemas/onchain_operations.output.json +5 -2
  337. package/dist/schemas/onchain_operations.schema.json +4 -4
  338. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
  339. package/dist/schemas/onchain_operations_machine.schema.json +2 -2
  340. package/dist/schemas/onchain_operations_service.schema.json +1 -1
  341. package/dist/schemas/onchain_table_data.output.json +6 -3
  342. package/dist/schemas/persona_operation.output.json +4 -1
  343. package/dist/schemas/persona_operation.schema.json +4 -1
  344. package/dist/schemas/project_operation.output.json +28 -8
  345. package/dist/schemas/query_toolkit.output.json +8 -5
  346. package/dist/schemas/wowok_buildin_info.output.json +132 -0
  347. package/dist/schemas/wowok_buildin_info.schema.json +14 -0
  348. package/dist/telemetry/index.js +1 -112
  349. package/dist/telemetry/redact.js +1 -23
  350. package/dist/telemetry/storage.js +1 -80
  351. package/dist/tools/handlers/bridge.js +1 -1
  352. package/dist/tools/handlers/config.js +1 -74
  353. package/dist/tools/handlers/evaluation.js +1 -123
  354. package/dist/tools/handlers/file-export.js +1 -90
  355. package/dist/tools/handlers/intent-radar.js +1 -76
  356. package/dist/tools/handlers/local.js +1 -53
  357. package/dist/tools/handlers/messenger.js +1 -188
  358. package/dist/tools/handlers/onchain.js +1 -1180
  359. package/dist/tools/handlers/persona.js +1 -89
  360. package/dist/tools/handlers/project.js +1 -211
  361. package/dist/tools/handlers/query.js +1 -434
  362. package/dist/tools/handlers/schema-query.js +1 -176
  363. package/dist/tools/handlers/task-status.js +1 -26
  364. package/dist/tools/handlers/trust.js +1 -380
  365. package/dist/tools/handlers/wip.js +1 -90
  366. package/dist/tools/index.js +1 -1382
  367. package/dist/tools/retry.js +1 -85
  368. package/dist/tools/rules-hook.js +1 -23
  369. package/dist/tools/shared.js +1 -130
  370. package/dist/tools/types.js +1 -1
  371. package/dist/tools/upgrade-check.d.ts +19 -0
  372. package/dist/tools/upgrade-check.js +1 -0
  373. package/dist/tools/wip-deploy-assist.js +1 -306
  374. package/dist/tools/wrap.js +1 -500
  375. package/package.json +4 -2
@@ -1,520 +1 @@
1
- import { z } from 'zod';
2
- import { CallService_DataSchema, CallMachine_DataSchema, CallProgress_DataSchema, CallRepository_DataSchema, CallArbitration_DataSchema, CallContact_DataSchema, CallTreasury_DataSchema, CallReward_DataSchema, CallAllocation_DataSchema, CallPermission_DataSchema, CallGuard_DataSchema, CallPersonal_DataSchema, CallPayment_DataSchema, CallDemand_DataSchema, CallOrder_DataSchema, CallProof_DataSchema, CallGenProof_InputSchema, CallEnvSchema, SubmissionCallSchema, SemanticSummarySchema, } from './call/index.js';
3
- import { WipGenerationOptionsSchema, WipToHtmlOptionsSchema, LocalMarkFilterSchema, AccountFilterSchema, LocalInfoFilterSchema, TokenDataFilterSchema, } from './local/index.js';
4
- import { NameOrAddressSchema, AccountOrMark_AddressSchema, AccountOrMark_AddressAISchema, EntrypointSchema, TokenTypeSchema, ObjectBaseSchema, } from './common/index.js';
5
- import { TableAnswerSchema, TableItem_RepositoryDataSchema, TableItem_PermissionPermSchema, TableItem_EntityRegistrarSchema, TableItem_EntityLinkerSchema, TableItem_RewardRecordSchema, TableItem_DemandPresenterSchema, TableItem_TreasuryHistorySchema, TableItem_MachineNodeSchema, TableItem_ProgressHistorySchema, TableItem_AddressMarkSchema, } from './query/index.js';
6
- export const OnchainOperationsSchema = z.preprocess((input) => {
7
- if (typeof input === 'object' && input !== null) {
8
- const obj = { ...input };
9
- if (typeof obj.description === 'string' && !obj.operation_type) {
10
- try {
11
- const parsed = JSON.parse(obj.description);
12
- if (parsed && typeof parsed === 'object' && parsed.operation_type) {
13
- return parsed;
14
- }
15
- }
16
- catch { }
17
- }
18
- if (typeof obj.data === 'string') {
19
- try {
20
- obj.data = JSON.parse(obj.data);
21
- }
22
- catch { }
23
- }
24
- if (typeof obj.env === 'string') {
25
- try {
26
- obj.env = JSON.parse(obj.env);
27
- }
28
- catch { }
29
- }
30
- if (typeof obj.submission === 'string') {
31
- try {
32
- obj.submission = JSON.parse(obj.submission);
33
- }
34
- catch { }
35
- }
36
- if (typeof obj.info === 'string') {
37
- try {
38
- obj.info = JSON.parse(obj.info);
39
- }
40
- catch { }
41
- }
42
- if (obj.data && typeof obj.data === 'object' && !Array.isArray(obj.data)) {
43
- const innerData = obj.data;
44
- if (innerData.data && typeof innerData.data === 'object'
45
- && !innerData.operation_type) {
46
- if (innerData.env !== undefined && obj.env === undefined) {
47
- obj.env = innerData.env;
48
- }
49
- if (innerData.submission !== undefined && obj.submission === undefined) {
50
- obj.submission = innerData.submission;
51
- }
52
- obj.data = innerData.data;
53
- }
54
- if (typeof innerData.description === 'string' && !innerData.operation_type) {
55
- try {
56
- const parsed = JSON.parse(innerData.description);
57
- if (parsed && typeof parsed === 'object') {
58
- obj.data = parsed;
59
- }
60
- }
61
- catch { }
62
- }
63
- }
64
- if (obj.operation_type === 'guard' && obj.data && typeof obj.data === 'object'
65
- && !Array.isArray(obj.data)) {
66
- const guardData = obj.data;
67
- if (guardData.object && !guardData.namedNew) {
68
- guardData.namedNew = guardData.object;
69
- delete guardData.object;
70
- }
71
- if (Array.isArray(guardData.table)) {
72
- for (const item of guardData.table) {
73
- if (item && typeof item === 'object' && !Array.isArray(item)
74
- && 'object_type' in item) {
75
- delete item.object_type;
76
- }
77
- }
78
- }
79
- }
80
- if (obj.data && typeof obj.data === 'object' && !Array.isArray(obj.data)) {
81
- const d = obj.data;
82
- if (d.submission !== undefined && obj.submission === undefined) {
83
- obj.submission = d.submission;
84
- delete d.submission;
85
- }
86
- }
87
- return obj;
88
- }
89
- return input;
90
- }, z.discriminatedUnion("operation_type", [
91
- z.object({
92
- operation_type: z.literal("service"),
93
- data: CallService_DataSchema,
94
- env: CallEnvSchema.optional(),
95
- submission: SubmissionCallSchema.optional(),
96
- }).strict().describe("πŸͺ Service Object: Create and manage product/service listings with transparent promises, bind workflow templates to order processing, set pricing, issue discount coupons to customers, and establish quality standards, etc.."),
97
- z.object({
98
- operation_type: z.literal("machine"),
99
- data: CallMachine_DataSchema,
100
- env: CallEnvSchema.optional(),
101
- submission: SubmissionCallSchema.optional(),
102
- }).strict().describe("βš™οΈ Machine Object: Design and deploy automated workflow templates (Machines) that define how services are delivered, etc.."),
103
- z.object({
104
- operation_type: z.literal("progress"),
105
- data: CallProgress_DataSchema,
106
- env: CallEnvSchema.optional(),
107
- submission: SubmissionCallSchema.optional(),
108
- }).strict().describe("πŸ“Š Progress Object: Track and manage active workflows in real-time."),
109
- z.object({
110
- operation_type: z.literal("repository"),
111
- data: CallRepository_DataSchema,
112
- env: CallEnvSchema.optional(),
113
- submission: SubmissionCallSchema.optional(),
114
- }).strict().describe("πŸ“¦ Repository Object: Read/write database with consensus field + address as key, strongly-typed data as value."),
115
- z.object({
116
- operation_type: z.literal("arbitration"),
117
- data: CallArbitration_DataSchema,
118
- env: CallEnvSchema.optional(),
119
- submission: SubmissionCallSchema.optional(),
120
- }).strict().describe("βš–οΈ Arbitration Object: Access a transparent on-chain arbitration system for resolving order conflicts."),
121
- z.object({
122
- operation_type: z.literal("contact"),
123
- data: CallContact_DataSchema,
124
- env: CallEnvSchema.optional(),
125
- submission: SubmissionCallSchema.optional(),
126
- }).strict().describe("πŸ’¬ Contact Object: Manage on-chain instant messaging contact profiles."),
127
- z.object({
128
- operation_type: z.literal("treasury"),
129
- data: CallTreasury_DataSchema,
130
- env: CallEnvSchema.optional(),
131
- submission: SubmissionCallSchema.optional(),
132
- }).strict().describe("πŸ’° Treasury Object: Create and manage treasury for team funds with deposit/withdrawal rules, etc.."),
133
- z.object({
134
- operation_type: z.literal("reward"),
135
- data: CallReward_DataSchema,
136
- env: CallEnvSchema.optional(),
137
- submission: SubmissionCallSchema.optional(),
138
- }).strict().describe("🎁 Reward Object: Create reward pools and set claim conditions by Guard verification."),
139
- z.object({
140
- operation_type: z.literal("allocation"),
141
- data: CallAllocation_DataSchema,
142
- env: CallEnvSchema.optional(),
143
- submission: SubmissionCallSchema.optional(),
144
- }).strict().describe("πŸ“€ Allocation Object: Create distribution plans to auto-distribute funds to multiple recipients."),
145
- z.object({
146
- operation_type: z.literal("permission"),
147
- data: CallPermission_DataSchema,
148
- env: CallEnvSchema.optional(),
149
- }).strict().describe("πŸ” Permission Object: Define who can perform which operations on WoWok objects. Important Note: If needed, you should first query 'guard instructions' through the 'wowok_buildin_info' tool."),
150
- z.object({
151
- operation_type: z.literal("guard"),
152
- data: CallGuard_DataSchema,
153
- env: CallEnvSchema.optional(),
154
- }).strict().describe("πŸ›‘οΈ Guard Object: Create immutable programmable validation rules that return boolean results. Set 'namedNew' to name the new Guard (you may also use 'object' as an alias β€” both work). Use root.type='node' for direct node tree or root.type='file' to load from file. Use 'wowok_buildin_info' tool with query='guard instructions' for all available operations. NOTE for EntityLinker/EntityRegistrar queries: Add system addresses to the Guard table - ENTITY_LINKER_ADDRESS (0xaaa) for EntityLinker, ENTITY_REGISTRAR_ADDRESS (0xaab) for EntityRegistrar."),
155
- z.object({
156
- operation_type: z.literal("personal"),
157
- data: CallPersonal_DataSchema,
158
- env: CallEnvSchema.optional(),
159
- }).strict().describe("πŸ†” Public Identity Profile: Establish and manage your on-chain public identity. ⚠️ CRITICAL: Everything here is PERMANENTLY PUBLIC on the blockchain!"),
160
- z.object({
161
- operation_type: z.literal("payment"),
162
- data: CallPayment_DataSchema,
163
- env: CallEnvSchema.optional(),
164
- }).strict().describe("πŸ’° Payment Object: Send instant, irreversible coin transfers to any wallet address."),
165
- z.object({
166
- operation_type: z.literal("demand"),
167
- data: CallDemand_DataSchema,
168
- env: CallEnvSchema.optional(),
169
- submission: SubmissionCallSchema.optional(),
170
- }).strict().describe("🎯 Demand Object: Post service requests with reward pools on-chain."),
171
- z.object({
172
- operation_type: z.literal("order"),
173
- data: CallOrder_DataSchema,
174
- env: CallEnvSchema.optional(),
175
- submission: SubmissionCallSchema.optional(),
176
- }).strict().describe("πŸ“¦ Order Object: Manage the order lifecycle, Including operating order arbitration (Arb Object associated with the order), advancing progress (Progress Object associated with the order), extracting order refunds/payments, setting agents, etc."),
177
- z.object({
178
- operation_type: z.literal("gen_passport"),
179
- guard: z.union([z.string(), z.array(z.string())]).describe("Guard object ID(s) to verify and generate passport from. Can be a single guard (string) or multiple guards (array of strings). Supports guard names or addresses."),
180
- info: SubmissionCallSchema.optional().describe("Optional submission data. If not provided, will attempt to get existing submissions from the guard."),
181
- env: CallEnvSchema.optional(),
182
- }).strict().describe("πŸ›‚ Generate Verified Passport Object: Create immutable verified credentials after Guard validation passes. Supports verifying multiple guards at once."),
183
- z.object({
184
- operation_type: z.literal("proof"),
185
- data: CallProof_DataSchema,
186
- env: CallEnvSchema.optional(),
187
- submission: SubmissionCallSchema.optional(),
188
- }).strict().describe("πŸ“œ Proof Object: Create immutable on-chain proof objects with server signatures. Used for timestamped message proofs, Merkle tree root proofs, etc. Set 'namedNew' in data to name the new Proof."),
189
- CallGenProof_InputSchema.extend({
190
- operation_type: z.literal("gen_proof"),
191
- }).strict().describe("⚑ Generate Proof (shortcut): Create a new on-chain Proof object WITHOUT the namedNew wrapper (no custom name). Prefer `proof` (operation_type='proof') when you need a NAMED Proof that other objects can reference by name; use gen_proof only for a quick unnamed Proof."),
192
- ]));
193
- export const WipOperationsSchema = z.preprocess((input) => {
194
- if (typeof input === 'object' && input !== null) {
195
- const obj = { ...input };
196
- if (typeof obj.description === 'string' && !obj.type) {
197
- try {
198
- const parsed = JSON.parse(obj.description);
199
- if (parsed && typeof parsed === 'object' && parsed.type) {
200
- return parsed;
201
- }
202
- }
203
- catch { }
204
- }
205
- if (typeof obj.options === 'string') {
206
- try {
207
- obj.options = JSON.parse(obj.options);
208
- }
209
- catch { }
210
- }
211
- return obj;
212
- }
213
- return input;
214
- }, z.discriminatedUnion("type", [
215
- z.object({
216
- type: z.literal("generate"),
217
- options: WipGenerationOptionsSchema.describe("WIP generation options"),
218
- outputPath: z.string().describe("Output file path (.wip file). If file exists, it will be overwritten"),
219
- }).strict().describe("Generate WIP file from markdown text and optional images"),
220
- z.object({
221
- type: z.literal("verify"),
222
- wipFilePath: z.string().describe("WIP file path to verify. Supports: 1) Local file path (e.g., '/path/to/file.wip', 'C:\\Users\\name\\doc.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip', 'http://site.com/file.wip'), 3) Data URL (e.g., 'data:application/json;base64,eyJ3aXAiOi...')"),
223
- hash_equal: z.string().optional().describe("Optional expected hash value. If provided, the function will first verify if the file's hash matches this value. If not matched, returns hash mismatch error."),
224
- requireSignature: z.boolean().optional().describe("Optional flag to require digital signature. If true, verification will fail if WIP file has no signature"),
225
- }).strict().describe("Verify WIP file integrity and signatures"),
226
- z.object({
227
- type: z.literal("sign"),
228
- wipFilePath: z.string().describe("WIP file path to sign. Supports: 1) Local file path (e.g., '/path/to/file.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip'). The file will be loaded, validated, and signed"),
229
- account: z.string().optional().describe("Signing account (account name or address). If not specified, uses default account"),
230
- outputPath: z.string().optional().describe("Output file path. If not specified, adds 'signed_' prefix to original file name (e.g., 'doc.wip' becomes 'signed_doc.wip')"),
231
- }).strict().describe("Sign WIP file with account"),
232
- z.object({
233
- type: z.literal("wip2html"),
234
- wipPath: z.string().describe("WIP file path or directory path. Supports: 1) Single WIP file (e.g., '/path/to/file.wip'), 2) Directory containing .wip files (e.g., '/path/to/wips/'), 3) Network URL (e.g., 'https://example.com/doc.wip'). When directory is provided, all .wip files in the directory will be converted to HTML"),
235
- options: WipToHtmlOptionsSchema.optional().describe("Conversion options"),
236
- }).strict().describe("Convert WIP file to HTML format"),
237
- ]));
238
- export const OnchainTableDataSchema = z.preprocess((input) => {
239
- if (typeof input === 'object' && input !== null && !Array.isArray(input)) {
240
- const obj = { ...input };
241
- if (typeof obj.description === 'string' && !obj.query_type) {
242
- try {
243
- const parsed = JSON.parse(obj.description);
244
- if (parsed && typeof parsed === 'object' && parsed.query_type) {
245
- return parsed;
246
- }
247
- }
248
- catch { }
249
- }
250
- if (obj.cursor === '')
251
- obj.cursor = null;
252
- if (obj.limit === '')
253
- obj.limit = null;
254
- return obj;
255
- }
256
- return input;
257
- }, z.union([
258
- z.discriminatedUnion("query_type", [
259
- z.object({
260
- query_type: z.literal("onchain_table"),
261
- parent: NameOrAddressSchema.describe("Parent object ID whose dynamic fields table to query"),
262
- cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor from previous page's nextCursor"),
263
- limit: z.union([z.number(), z.null()]).optional().describe("Max items per page"),
264
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
265
- network: EntrypointSchema.optional(),
266
- }).strict().describe("Paginated query of an on-chain object's dynamic fields table β€” returns items with keys, types, and object IDs. Use to explore all entries (e.g., all orders in a Service, all records in a Repository). Returns: TableAnswer | undefined (items[], nextCursor, hasNextPage)"),
267
- z.object({
268
- query_type: z.literal("onchain_table_item_repository_data"),
269
- parent: NameOrAddressSchema.describe("Parent Repository object ID"),
270
- name: z.string().describe("Name/key of the record to retrieve from the repository"),
271
- entity: z.union([AccountOrMark_AddressSchema, z.number()]).describe("Entity ID or address that owns/identifies the record"),
272
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
273
- network: EntrypointSchema.optional(),
274
- }).strict().describe("Query a specific record from a Repository's on-chain key-value database by name and entity. Use to read stored data records. Returns: TableItem_RepositoryData | undefined"),
275
- z.object({
276
- query_type: z.literal("onchain_table_item_permission_perm"),
277
- parent: NameOrAddressSchema.describe("Parent Permission object ID"),
278
- address: AccountOrMark_AddressAISchema.describe("User address or Guard ID whose permissions to check. Supports string (name/address) or object form. LocalMark names are resolved automatically."),
279
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
280
- network: EntrypointSchema.optional(),
281
- }).strict().describe("Query a permission entry from a Permission object's perm table β€” checks what operations a user/guard is allowed to perform. Use to verify access rights. Returns: TableItem_PermissionPerm | undefined"),
282
- z.object({
283
- query_type: z.literal("onchain_table_item_entity_registrar"),
284
- address: AccountOrMark_AddressAISchema.describe("User address to look up in the global EntityRegistrar. Supports string (name/address) or object form. LocalMark names are resolved automatically."),
285
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
286
- network: EntrypointSchema.optional(),
287
- }).strict().describe("Query an entity's registration record from the global EntityRegistrar β€” verifies if an address is registered on the blockchain. Use to check registration status and details. Returns: TableItem_EntityRegistrar | undefined"),
288
- z.object({
289
- query_type: z.literal("onchain_table_item_entity_linker"),
290
- address: AccountOrMark_AddressAISchema.describe("Entity address whose community votes/endorsements to query. Supports string (name/address) or object form. LocalMark names are resolved automatically."),
291
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
292
- network: EntrypointSchema.optional(),
293
- }).strict().describe("Query community votes/endorsements for an entity from the global EntityLinker β€” shows how others have voted on this entity. Use to check reputation and community trust. Returns: TableItem_EntityLinker | undefined"),
294
- z.object({
295
- query_type: z.literal("onchain_table_item_reward_record"),
296
- parent: NameOrAddressSchema.describe("Parent Reward object ID"),
297
- address: AccountOrMark_AddressSchema.describe("User address that claimed the reward"),
298
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
299
- network: EntrypointSchema.optional(),
300
- }).strict().describe("Query a reward claim record from a Reward object's table β€” checks if a user has claimed a specific incentive. Use to verify reward distribution status. Returns: TableItem_RewardRecord | undefined"),
301
- ]),
302
- z.discriminatedUnion("query_type", [
303
- z.object({
304
- query_type: z.literal("onchain_table_item_demand_presenter"),
305
- parent: NameOrAddressSchema.describe("Parent Demand object ID"),
306
- address: AccountOrMark_AddressSchema.describe("Presenter address that submitted the demand"),
307
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
308
- network: EntrypointSchema.optional(),
309
- }).strict().describe("Query a demand submission from a Demand object's table β€” Demands are service requests submitted by users. Use to check a specific demand's details. Returns: TableItem_DemandPresenter | undefined"),
310
- z.object({
311
- query_type: z.literal("onchain_table_item_treasury_history"),
312
- parent: NameOrAddressSchema.describe("Parent Treasury object ID"),
313
- address: AccountOrMark_AddressSchema.describe("Payment ID whose treasury record to look up"),
314
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
315
- network: EntrypointSchema.optional(),
316
- }).strict().describe("Query a payment record from a Treasury's history table by payment ID β€” Treasury manages funds and payment tracking. Use to look up payment details and status. Returns: TableItem_TreasuryHistory | undefined"),
317
- z.object({
318
- query_type: z.literal("onchain_table_item_machine_node"),
319
- parent: NameOrAddressSchema.describe("Parent Machine object ID"),
320
- key: z.string().describe("Node name (string key) to query in the Machine's workflow definition"),
321
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
322
- network: EntrypointSchema.optional(),
323
- }).strict().describe("Query a workflow node definition from a Machine object's table by node name β€” Machines define workflow templates. Use to inspect a specific node's configuration and logic. Returns: TableItem_MachineNode | undefined"),
324
- z.object({
325
- query_type: z.literal("onchain_table_item_progress_history"),
326
- parent: NameOrAddressSchema.describe("Parent Progress object ID"),
327
- u64: z.union([z.number(), z.string()]).describe("Sequence number (u64) of the progress step to query"),
328
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
329
- network: EntrypointSchema.optional(),
330
- }).strict().describe("Query a progress step record from a Progress object's table by sequence number β€” Progress tracks order/workflow execution. Use to check the status of a specific execution step. Returns: TableItem_ProgressHistory | undefined"),
331
- z.object({
332
- query_type: z.literal("onchain_table_item_address_mark"),
333
- parent: NameOrAddressSchema.describe("Parent AddressMark object ID"),
334
- address: AccountOrMark_AddressSchema.describe("Address whose PUBLIC on-chain name/tags to look up"),
335
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
336
- network: EntrypointSchema.optional(),
337
- }).strict().describe("Query a PUBLIC on-chain name/tag mark for an address β€” unlike local marks, these are published on-chain. Use to look up public labels attached to any address. Returns: TableItem_AddressMark | undefined"),
338
- z.object({
339
- query_type: z.literal("onchain_table_item_generic"),
340
- parent: NameOrAddressSchema.describe("Parent object ID whose dynamic field to query"),
341
- key_type: z.string().describe("FULL Move type of the key (e.g., '0x1::string::String', '0x2::object::ID', '0x1::address::Address', '0x1::u64::U64'). MUST be the complete type string with address::module::struct format."),
342
- key_value: z.union([
343
- z.string().describe("String key (for 0x1::string::String)"),
344
- z.number().describe("Numeric key (for 0x1::u64::U64, 0x1::u32::U32, etc.)"),
345
- z.boolean().describe("Boolean key (for 0x1::bool::Bool)"),
346
- z.array(z.union([z.string(), z.number(), z.boolean()])).describe("Vector key (for 0x1::vector::* types)"),
347
- z.record(z.unknown()).describe("Struct/object key (for complex Move struct types)"),
348
- ]).describe("Value of the key. Must match the key_type format (e.g., string for '0x1::string::String', address for '0x1::address::Address', number for '0x1::u64::U64')"),
349
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
350
- network: EntrypointSchema.optional(),
351
- }).strict().describe("Query a generic table item from ANY object's dynamic fields β€” supports arbitrary key types and values for non-WoWok objects. Use for custom objects and general-purpose table lookups. Returns: ObjectBase | undefined"),
352
- ]),
353
- ]));
354
- export const WatchQueryOperationsSchema = z.preprocess((input) => {
355
- if (typeof input === 'object' && input !== null) {
356
- const obj = { ...input };
357
- if (typeof obj.description === 'string' && !obj.query_type) {
358
- try {
359
- const parsed = JSON.parse(obj.description);
360
- if (parsed && typeof parsed === 'object' && parsed.query_type) {
361
- return parsed;
362
- }
363
- }
364
- catch { }
365
- }
366
- for (const key of ['filter', 'objects', 'env', 'token_type']) {
367
- if (typeof obj[key] === 'string') {
368
- try {
369
- obj[key] = JSON.parse(obj[key]);
370
- }
371
- catch { }
372
- }
373
- }
374
- if (obj.query_type === 'account_balance' && obj.filter && typeof obj.filter === 'object') {
375
- const f = obj.filter;
376
- if (!obj.name_or_address) {
377
- if (typeof f.name_or_address === 'string') {
378
- obj.name_or_address = f.name_or_address;
379
- }
380
- else if (typeof f.name === 'string') {
381
- obj.name_or_address = f.name;
382
- }
383
- else if (typeof f.address === 'string') {
384
- obj.name_or_address = f.address;
385
- }
386
- }
387
- if (!obj.token_type && typeof f.token_type === 'string') {
388
- obj.token_type = f.token_type;
389
- }
390
- delete obj.filter;
391
- }
392
- return obj;
393
- }
394
- return input;
395
- }, z.discriminatedUnion("query_type", [
396
- z.object({
397
- query_type: z.literal("local_mark_list"),
398
- filter: LocalMarkFilterSchema.optional().describe("Local mark filter"),
399
- }).strict().describe("Query your LOCAL address book — maps human-readable names to blockchain addresses with optional tags. Use to resolve names→addresses or find addresses by tag. Returns: MarkData[] (name, address, tags, timestamps)"),
400
- z.object({
401
- query_type: z.literal("account_list"),
402
- filter: AccountFilterSchema.optional().describe("Account filter"),
403
- }).strict().describe("Query your LOCAL accounts β€” view all accounts stored on this device (addresses, messenger status, suspension state). Use filter.includePubkey=true to also include public keys (~900 bytes each, omitted by default). Returns: AccountData[] (name, address, pubkey?, suspended, messenger, timestamps)"),
404
- z.object({
405
- query_type: z.literal("local_info_list"),
406
- filter: LocalInfoFilterSchema.optional().describe("Local info filter"),
407
- }).strict().describe("Query your LOCAL private info β€” sensitive data like delivery addresses, phone numbers, contacts stored ONLY on this device. Use to retrieve saved contact/delivery details. Returns: InfoData[] (name, default value, contents, timestamps)"),
408
- z.object({
409
- query_type: z.literal("token_list"),
410
- filter: TokenDataFilterSchema.optional(),
411
- }).strict().describe("Query cached token metadata β€” symbol, decimals, icon URL, description for tokens previously fetched from chain. Use to look up token info without an on-chain query. Returns: TokenTypeInfo[] (type, alias, name, symbol, decimals, iconUrl)"),
412
- z.object({
413
- query_type: z.literal("account_balance"),
414
- name_or_address: NameOrAddressSchema.optional().describe("Account name or address to query. " +
415
- "Examples: \"my_account\", \"0xabc123...\", or \"\" for the default account. " +
416
- "NOTE: This field is NOT named 'filter' β€” use 'name_or_address' directly. " +
417
- "Defaults to '' (default account) if omitted."),
418
- balance: z.boolean().optional().describe("Set to true to query total balance amount for the token type"),
419
- coin: z.object({
420
- cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor for listing coin objects"),
421
- limit: z.union([z.number(), z.null()]).optional().describe("Max coin objects per page"),
422
- }).strict().optional().describe("Set to query paginated coin objects instead of balance. Use cursor/limit for pagination."),
423
- token_type: TokenTypeSchema.optional().describe("Token type in Move format: 0x<package>::<module>::<struct>. " +
424
- "Examples: \"0x2::wow::WOW\" (default, 9 decimals), \"0x2::sui::SUI\" (9 decimals). " +
425
- "For custom tokens, use the full type string from the token's coin metadata. " +
426
- "The Fund Processing Layer resolves precision from the official registry β†’ cache β†’ on-chain."),
427
- network: EntrypointSchema.optional(),
428
- }).strict().describe("Query an account's coin balance OR paginated coin objects. " +
429
- "PARAMETERS: Use 'name_or_address' to specify the account (NOT 'filter'). " +
430
- "Use balance=true for total amount, or coin={cursor,limit} to list individual coin objects. " +
431
- "Use token_type to query non-default tokens (format: 0x<package>::<module>::<struct>). " +
432
- "Returns: { address, balance? | coin? }"),
433
- z.object({
434
- query_type: z.literal("local_names"),
435
- addresses: z.array(z.string()).describe("Array of addresses to look up local names for"),
436
- }).strict().describe("Query local names (account name and local mark name) for a list of addresses. Returns array of: { account?: string, local_mark?: string, address: string }"),
437
- z.object({
438
- query_type: z.literal("onchain_personal_profile"),
439
- account: NameOrAddressSchema.optional().describe("Account name or ID to query. Use empty string '' for the default account."),
440
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
441
- network: EntrypointSchema.optional(),
442
- }).strict().describe("Query any user's PUBLIC on-chain profile β€” social links, reputation (likes/dislikes), personal info records, voting history, referrer. Use to look up a user's public identity and reputation. Returns: ObjectPersonal | undefined"),
443
- z.object({
444
- query_type: z.literal("onchain_objects"),
445
- objects: z.array(NameOrAddressSchema).describe("List of object IDs (names or addresses) to query in batch"),
446
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
447
- network: EntrypointSchema.optional(),
448
- }).strict().describe("Batch query on-chain WOWOK objects by ID or name β€” supports Service, Machine, Order, Treasury, Reward, Arb, Personal, Contact, and more. Use to inspect one or more objects in a single call. Returns: { objects: ObjectBase[] }"),
449
- z.object({
450
- query_type: z.literal("onchain_received"),
451
- name_or_address: AccountOrMark_AddressAISchema.describe("Name or address of the object that received payments/items - can be a string (name/address) or full object"),
452
- type: z.union([z.string(), z.literal("CoinWrapper"), z.null()]).optional().describe("Type filter for querying received objects. " +
453
- "- If undefined or null: query all types (equivalent to the old all_type=true). " +
454
- "- If 'CoinWrapper': query CoinWrapper type for the object's token (equivalent to the old all_type=false). " +
455
- "- If string: query specific StructType (e.g., '0x2::payment::CoinWrapper<0x2::wow::WOW>')."),
456
- cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor from previous page"),
457
- limit: z.union([z.number(), z.null()]).optional().describe("Max records per page"),
458
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
459
- network: EntrypointSchema.optional(),
460
- }).strict().describe("Query objects (Payments, Tokens, NFTs) received by a specific object. Use to track incoming payments or items sent to an on-chain object. Supports pagination and type filter. Returns: ReceivedBalance | ReceivedNormal[]"),
461
- z.object({
462
- query_type: z.literal("onchain_transaction"),
463
- digest: z.string().describe("Transaction digest (0x...) to verify. Use after any on-chain operation to confirm what actually happened on-chain β€” object changes, balance changes, gas used, success/failure status. This is the 'OperationProof' primitive for the Verify step."),
464
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
465
- network: EntrypointSchema.optional(),
466
- }).strict().describe("Verify what a specific transaction did on-chain β€” the 'OperationProof' primitive. After executing any operation, call this with the returned digest to confirm: status (success/failed), object changes (created/mutated/deleted), balance changes, gas used, and events. Essential for the 5-step loop's Verify step. Returns: TransactionDetail | undefined"),
467
- z.object({
468
- query_type: z.literal("onchain_object_history"),
469
- object: NameOrAddressSchema.describe("Object ID (0x...) or LocalMark name. Query the provenance chain β€” every transaction that created, mutated, or deleted this object. Use to trace how an object reached its current state."),
470
- cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor from previous page's next_cursor"),
471
- limit: z.union([z.number(), z.null()]).optional().describe("Max results per page (default 20, max 50)"),
472
- order: z.union([z.literal("ascending"), z.literal("descending")]).optional().describe("Sort order: ascending=oldest first, descending=newest first (default)"),
473
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
474
- network: EntrypointSchema.optional(),
475
- }).strict().describe("FORENSICS TOOL β€” query all transactions that touched an object. WARNING: this can lead to non-convergent queries (each tx touches more objects with their own history). For AI context building, use assemble_context instead β€” it extracts embedded history from object states (ProgressSession.forwards, etc.) without infinite recursion. This tool is for auditing/forensics only. Returns: TransactionHistoryAnswer | undefined"),
476
- z.object({
477
- query_type: z.literal("onchain_address_activity"),
478
- name_or_address: AccountOrMark_AddressAISchema.describe("Address (0x...) or account name. Query all on-chain activity by this actor β€” every transaction they sent. Use to build a user's on-chain activity profile or verify an actor's history."),
479
- cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor from previous page's next_cursor"),
480
- limit: z.union([z.number(), z.null()]).optional().describe("Max results per page (default 20, max 50)"),
481
- order: z.union([z.literal("ascending"), z.literal("descending")]).optional().describe("Sort order: ascending=oldest first, descending=newest first (default)"),
482
- no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
483
- network: EntrypointSchema.optional(),
484
- }).strict().describe("FORENSICS TOOL β€” query all transactions sent by an address. WARNING: like onchain_object_history, this can lead to non-convergent queries. For AI context building, use assemble_context (extracts embedded history) or query_events (real-time transitions) instead. This tool is for auditing/user-activity profiling only. Returns: TransactionHistoryAnswer | undefined"),
485
- z.object({
486
- query_type: z.literal("token_value_convert"),
487
- token_type: TokenTypeSchema.describe("Full token type in Move format: 0x<package>::<module>::<struct>. " +
488
- "Examples: \"0x2::wow::WOW\" (9 decimals). The token's decimals drive the conversion β€” " +
489
- "resolved from official registry β†’ local cache β†’ on-chain coin metadata."),
490
- raw: z.union([z.string(), z.number()]).optional().describe("Raw smallest-unit value (u64, e.g. \"2200000000\") to convert TO a human unit value. " +
491
- "Provide EXACTLY ONE of raw / unit."),
492
- unit: z.union([z.string(), z.number()]).optional().describe("Human unit value (e.g. \"2.2\") to convert TO raw smallest units (u64). " +
493
- "Provide EXACTLY ONE of raw / unit. Conversion is REFUSED when the token's " +
494
- "decimals cannot be resolved (guessing would forge wrong on-chain values)."),
495
- network: EntrypointSchema.optional(),
496
- }).strict()
497
- .describe("Convert between raw on-chain smallest units (u64) and human unit values, in EITHER direction. " +
498
- "Provide EXACTLY ONE of raw / unit (handler-validated). " +
499
- "raw β†’ unit: \"2200000000\" β†’ \"2.2\" (pass-through when precision unknown). " +
500
- "unit β†’ raw: \"2.2\" β†’ \"2200000000\" (REFUSED when precision unknown β€” never guesses decimals). " +
501
- "Use this before displaying chain values to users, and before entering amounts for on-chain operations. " +
502
- "Returns: { token_type, symbol?, decimals?, precision_known, direction, input, output, error?, text }"),
503
- ]));
504
- export const OnchainTableDataResultSchema = z.object({
505
- result: z.union([
506
- z.object({ query_type: z.literal("onchain_table"), result: z.union([TableAnswerSchema, z.undefined()]) }),
507
- z.object({ query_type: z.literal("onchain_table_item_repository_data"), result: z.union([TableItem_RepositoryDataSchema, z.undefined()]) }),
508
- z.object({ query_type: z.literal("onchain_table_item_permission_perm"), result: z.union([TableItem_PermissionPermSchema, z.undefined()]) }),
509
- z.object({ query_type: z.literal("onchain_table_item_entity_registrar"), result: z.union([TableItem_EntityRegistrarSchema, z.undefined()]) }),
510
- z.object({ query_type: z.literal("onchain_table_item_entity_linker"), result: z.union([TableItem_EntityLinkerSchema, z.undefined()]) }),
511
- z.object({ query_type: z.literal("onchain_table_item_reward_record"), result: z.union([TableItem_RewardRecordSchema, z.undefined()]) }),
512
- z.object({ query_type: z.literal("onchain_table_item_demand_presenter"), result: z.union([TableItem_DemandPresenterSchema, z.undefined()]) }),
513
- z.object({ query_type: z.literal("onchain_table_item_treasury_history"), result: z.union([TableItem_TreasuryHistorySchema, z.undefined()]) }),
514
- z.object({ query_type: z.literal("onchain_table_item_machine_node"), result: z.union([TableItem_MachineNodeSchema, z.undefined()]) }),
515
- z.object({ query_type: z.literal("onchain_table_item_progress_history"), result: z.union([TableItem_ProgressHistorySchema, z.undefined()]) }),
516
- z.object({ query_type: z.literal("onchain_table_item_address_mark"), result: z.union([TableItem_AddressMarkSchema, z.undefined()]) }),
517
- z.object({ query_type: z.literal("onchain_table_item_generic"), result: z.union([ObjectBaseSchema, z.undefined()]) }),
518
- ]),
519
- semantic: SemanticSummarySchema.optional().describe("Business semantic summary for the table data query"),
520
- });
1
+ import{z}from'zod';import{CallService_DataSchema,CallMachine_DataSchema,CallProgress_DataSchema,CallRepository_DataSchema,CallArbitration_DataSchema,CallContact_DataSchema,CallTreasury_DataSchema,CallReward_DataSchema,CallAllocation_DataSchema,CallPermission_DataSchema,CallGuard_DataSchema,CallPersonal_DataSchema,CallPayment_DataSchema,CallDemand_DataSchema,CallOrder_DataSchema,CallProof_DataSchema,CallGenProof_InputSchema,CallEnvSchema,SubmissionCallSchema,SemanticSummarySchema}from'./call/index.js';import{WipGenerationOptionsSchema,WipToHtmlOptionsSchema,LocalMarkFilterSchema,AccountFilterSchema,LocalInfoFilterSchema,TokenDataFilterSchema}from'./local/index.js';import{NameOrAddressSchema,AccountOrMark_AddressSchema,AccountOrMark_AddressAISchema,EntrypointSchema,TokenTypeSchema,ObjectBaseSchema}from'./common/index.js';import{TableAnswerSchema,TableItem_RepositoryDataSchema,TableItem_PermissionPermSchema,TableItem_EntityRegistrarSchema,TableItem_EntityLinkerSchema,TableItem_RewardRecordSchema,TableItem_DemandPresenterSchema,TableItem_TreasuryHistorySchema,TableItem_MachineNodeSchema,TableItem_ProgressHistorySchema,TableItem_AddressMarkSchema}from'./query/index.js';export const OnchainOperationsSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null){const b={...a};if(typeof b['description']==='string'&&!b['operation_type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['operation_type'])return c;}catch{}if(typeof b['data']==='string')try{b['data']=JSON['parse'](b['data']);}catch{}if(typeof b['env']==='string')try{b['env']=JSON['parse'](b['env']);}catch{}if(typeof b['submission']==='string')try{b['submission']=JSON['parse'](b['submission']);}catch{}if(typeof b['info']==='string')try{b['info']=JSON['parse'](b['info']);}catch{}if(b['data']&&typeof b['data']==='object'&&!Array['isArray'](b['data'])){const e=b['data'];e['data']&&typeof e['data']==='object'&&!e['operation_type']&&(e['env']!==undefined&&b['env']===undefined&&(b['env']=e['env']),e['submission']!==undefined&&b['submission']===undefined&&(b['submission']=e['submission']),b['data']=e['data']);if(typeof e['description']==='string'&&!e['operation_type'])try{const f=JSON['parse'](e['description']);f&&typeof f==='object'&&(b['data']=f);}catch{}}if(b['operation_type']==='guard'&&b['data']&&typeof b['data']==='object'&&!Array['isArray'](b['data'])){const g=b['data'];g['object']&&!g['namedNew']&&(g['namedNew']=g['object'],delete g['object']);if(Array['isArray'](g['table']))for(const h of g['table']){h&&typeof h==='object'&&!Array['isArray'](h)&&'object_type'in h&&delete h['object_type'];}}if(b['data']&&typeof b['data']==='object'&&!Array['isArray'](b['data'])){const i=b['data'];i['submission']!==undefined&&b['submission']===undefined&&(b['submission']=i['submission'],delete i['submission']);}return b;}return a;},z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('service'),'data':CallService_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸͺ\x20Service\x20Object:\x20Create\x20and\x20manage\x20product/service\x20listings\x20with\x20transparent\x20promises,\x20bind\x20workflow\x20templates\x20to\x20order\x20processing,\x20set\x20pricing,\x20issue\x20discount\x20coupons\x20to\x20customers,\x20and\x20establish\x20quality\x20standards,\x20etc..'),z['object']({'operation_type':z['literal']('machine'),'data':CallMachine_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('βš™οΈ\x20Machine\x20Object:\x20Design\x20and\x20deploy\x20automated\x20workflow\x20templates\x20(Machines)\x20that\x20define\x20how\x20services\x20are\x20delivered,\x20etc..'),z['object']({'operation_type':z['literal']('progress'),'data':CallProgress_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸ“Š\x20Progress\x20Object:\x20Track\x20and\x20manage\x20active\x20workflows\x20in\x20real-time.'),z['object']({'operation_type':z['literal']('repository'),'data':CallRepository_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸ“¦\x20Repository\x20Object:\x20Read/write\x20database\x20with\x20consensus\x20field\x20+\x20address\x20as\x20key,\x20strongly-typed\x20data\x20as\x20value.'),z['object']({'operation_type':z['literal']('arbitration'),'data':CallArbitration_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('βš–οΈ\x20Arbitration\x20Object:\x20Access\x20a\x20transparent\x20on-chain\x20arbitration\x20system\x20for\x20resolving\x20order\x20conflicts.'),z['object']({'operation_type':z['literal']('contact'),'data':CallContact_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸ’¬\x20Contact\x20Object:\x20Manage\x20on-chain\x20instant\x20messaging\x20contact\x20profiles.'),z['object']({'operation_type':z['literal']('treasury'),'data':CallTreasury_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸ’°\x20Treasury\x20Object:\x20Create\x20and\x20manage\x20treasury\x20for\x20team\x20funds\x20with\x20deposit/withdrawal\x20rules,\x20etc..'),z['object']({'operation_type':z['literal']('reward'),'data':CallReward_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('🎁\x20Reward\x20Object:\x20Create\x20reward\x20pools\x20and\x20set\x20claim\x20conditions\x20by\x20Guard\x20verification.'),z['object']({'operation_type':z['literal']('allocation'),'data':CallAllocation_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸ“€\x20Allocation\x20Object:\x20Create\x20distribution\x20plans\x20to\x20auto-distribute\x20funds\x20to\x20multiple\x20recipients.'),z['object']({'operation_type':z['literal']('permission'),'data':CallPermission_DataSchema,'env':CallEnvSchema['optional']()})['strict']()['describe']('πŸ”\x20Permission\x20Object:\x20Define\x20who\x20can\x20perform\x20which\x20operations\x20on\x20WoWok\x20objects.\x20Important\x20Note:\x20If\x20needed,\x20you\x20should\x20first\x20query\x20\x27guard\x20instructions\x27\x20through\x20the\x20\x27wowok_buildin_info\x27\x20tool.'),z['object']({'operation_type':z['literal']('guard'),'data':CallGuard_DataSchema,'env':CallEnvSchema['optional']()})['strict']()['describe']('πŸ›‘οΈ\x20Guard\x20Object:\x20Create\x20immutable\x20programmable\x20validation\x20rules\x20that\x20return\x20boolean\x20results.\x20Set\x20\x27namedNew\x27\x20to\x20name\x20the\x20new\x20Guard\x20(you\x20may\x20also\x20use\x20\x27object\x27\x20as\x20an\x20alias\x20β€”\x20both\x20work).\x20Use\x20root.type=\x27node\x27\x20for\x20direct\x20node\x20tree\x20or\x20root.type=\x27file\x27\x20to\x20load\x20from\x20file.\x20Use\x20\x27wowok_buildin_info\x27\x20tool\x20with\x20query=\x27guard\x20instructions\x27\x20for\x20all\x20available\x20operations.\x20NOTE\x20for\x20EntityLinker/EntityRegistrar\x20queries:\x20Add\x20system\x20addresses\x20to\x20the\x20Guard\x20table\x20-\x20ENTITY_LINKER_ADDRESS\x20(0xaaa)\x20for\x20EntityLinker,\x20ENTITY_REGISTRAR_ADDRESS\x20(0xaab)\x20for\x20EntityRegistrar.'),z['object']({'operation_type':z['literal']('personal'),'data':CallPersonal_DataSchema,'env':CallEnvSchema['optional']()})['strict']()['describe']('πŸ†”\x20Public\x20Identity\x20Profile:\x20Establish\x20and\x20manage\x20your\x20on-chain\x20public\x20identity.\x20⚠️\x20CRITICAL:\x20Everything\x20here\x20is\x20PERMANENTLY\x20PUBLIC\x20on\x20the\x20blockchain!'),z['object']({'operation_type':z['literal']('payment'),'data':CallPayment_DataSchema,'env':CallEnvSchema['optional']()})['strict']()['describe']('πŸ’°\x20Payment\x20Object:\x20Send\x20instant,\x20irreversible\x20coin\x20transfers\x20to\x20any\x20wallet\x20address.'),z['object']({'operation_type':z['literal']('demand'),'data':CallDemand_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('🎯\x20Demand\x20Object:\x20Post\x20service\x20requests\x20with\x20reward\x20pools\x20on-chain.'),z['object']({'operation_type':z['literal']('order'),'data':CallOrder_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸ“¦\x20Order\x20Object:\x20Manage\x20the\x20order\x20lifecycle,\x20Including\x20operating\x20order\x20arbitration\x20(Arb\x20Object\x20associated\x20with\x20the\x20order),\x20advancing\x20progress\x20(Progress\x20Object\x20associated\x20with\x20the\x20order),\x20extracting\x20order\x20refunds/payments,\x20setting\x20agents,\x20etc.'),z['object']({'operation_type':z['literal']('gen_passport'),'guard':z['union']([z['string'](),z['array'](z['string']())])['describe']('Guard\x20object\x20ID(s)\x20to\x20verify\x20and\x20generate\x20passport\x20from.\x20Can\x20be\x20a\x20single\x20guard\x20(string)\x20or\x20multiple\x20guards\x20(array\x20of\x20strings).\x20Supports\x20guard\x20names\x20or\x20addresses.'),'info':SubmissionCallSchema['optional']()['describe']('Optional\x20submission\x20data.\x20If\x20not\x20provided,\x20will\x20attempt\x20to\x20get\x20existing\x20submissions\x20from\x20the\x20guard.'),'env':CallEnvSchema['optional']()})['strict']()['describe']('πŸ›‚\x20Generate\x20Verified\x20Passport\x20Object:\x20Create\x20immutable\x20verified\x20credentials\x20after\x20Guard\x20validation\x20passes.\x20Supports\x20verifying\x20multiple\x20guards\x20at\x20once.'),z['object']({'operation_type':z['literal']('proof'),'data':CallProof_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']()['describe']('πŸ“œ\x20Proof\x20Object:\x20Create\x20immutable\x20on-chain\x20proof\x20objects\x20with\x20server\x20signatures.\x20Used\x20for\x20timestamped\x20message\x20proofs,\x20Merkle\x20tree\x20root\x20proofs,\x20etc.\x20Set\x20\x27namedNew\x27\x20in\x20data\x20to\x20name\x20the\x20new\x20Proof.'),CallGenProof_InputSchema['extend']({'operation_type':z['literal']('gen_proof')})['strict']()['describe']('⚑\x20Generate\x20Proof\x20(shortcut):\x20Create\x20a\x20new\x20on-chain\x20Proof\x20object\x20WITHOUT\x20the\x20namedNew\x20wrapper\x20(no\x20custom\x20name).\x20Prefer\x20`proof`\x20(operation_type=\x27proof\x27)\x20when\x20you\x20need\x20a\x20NAMED\x20Proof\x20that\x20other\x20objects\x20can\x20reference\x20by\x20name;\x20use\x20gen_proof\x20only\x20for\x20a\x20quick\x20unnamed\x20Proof.')]));export const WipOperationsSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null){const b={...a};if(typeof b['description']==='string'&&!b['type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['type'])return c;}catch{}if(typeof b['options']==='string')try{b['options']=JSON['parse'](b['options']);}catch{}return b;}return a;},z['discriminatedUnion']('type',[z['object']({'type':z['literal']('generate'),'options':WipGenerationOptionsSchema['describe']('WIP\x20generation\x20options'),'outputPath':z['string']()['describe']('Output\x20file\x20path\x20(.wip\x20file).\x20If\x20file\x20exists,\x20it\x20will\x20be\x20overwritten')})['strict']()['describe']('Generate\x20WIP\x20file\x20from\x20markdown\x20text\x20and\x20optional\x20images'),z['object']({'type':z['literal']('verify'),'wipFilePath':z['string']()['describe']('WIP\x20file\x20path\x20to\x20verify.\x20Supports:\x201)\x20Local\x20file\x20path\x20(e.g.,\x20\x27/path/to/file.wip\x27,\x20\x27C:\x5cUsers\x5cname\x5cdoc.wip\x27),\x202)\x20Network\x20URL\x20(e.g.,\x20\x27https://example.com/doc.wip\x27,\x20\x27http://site.com/file.wip\x27),\x203)\x20Data\x20URL\x20(e.g.,\x20\x27data:application/json;base64,eyJ3aXAiOi...\x27)'),'hash_equal':z['string']()['optional']()['describe']('Optional\x20expected\x20hash\x20value.\x20If\x20provided,\x20the\x20function\x20will\x20first\x20verify\x20if\x20the\x20file\x27s\x20hash\x20matches\x20this\x20value.\x20If\x20not\x20matched,\x20returns\x20hash\x20mismatch\x20error.'),'requireSignature':z['boolean']()['optional']()['describe']('Optional\x20flag\x20to\x20require\x20digital\x20signature.\x20If\x20true,\x20verification\x20will\x20fail\x20if\x20WIP\x20file\x20has\x20no\x20signature')})['strict']()['describe']('Verify\x20WIP\x20file\x20integrity\x20and\x20signatures'),z['object']({'type':z['literal']('sign'),'wipFilePath':z['string']()['describe']('WIP\x20file\x20path\x20to\x20sign.\x20Supports:\x201)\x20Local\x20file\x20path\x20(e.g.,\x20\x27/path/to/file.wip\x27),\x202)\x20Network\x20URL\x20(e.g.,\x20\x27https://example.com/doc.wip\x27).\x20The\x20file\x20will\x20be\x20loaded,\x20validated,\x20and\x20signed'),'account':z['string']()['optional']()['describe']('Signing\x20account\x20(account\x20name\x20or\x20address).\x20If\x20not\x20specified,\x20uses\x20default\x20account'),'outputPath':z['string']()['optional']()['describe']('Output\x20file\x20path.\x20If\x20not\x20specified,\x20adds\x20\x27signed_\x27\x20prefix\x20to\x20original\x20file\x20name\x20(e.g.,\x20\x27doc.wip\x27\x20becomes\x20\x27signed_doc.wip\x27)')})['strict']()['describe']('Sign\x20WIP\x20file\x20with\x20account'),z['object']({'type':z['literal']('wip2html'),'wipPath':z['string']()['describe']('WIP\x20file\x20path\x20or\x20directory\x20path.\x20Supports:\x201)\x20Single\x20WIP\x20file\x20(e.g.,\x20\x27/path/to/file.wip\x27),\x202)\x20Directory\x20containing\x20.wip\x20files\x20(e.g.,\x20\x27/path/to/wips/\x27),\x203)\x20Network\x20URL\x20(e.g.,\x20\x27https://example.com/doc.wip\x27).\x20When\x20directory\x20is\x20provided,\x20all\x20.wip\x20files\x20in\x20the\x20directory\x20will\x20be\x20converted\x20to\x20HTML'),'options':WipToHtmlOptionsSchema['optional']()['describe']('Conversion\x20options')})['strict']()['describe']('Convert\x20WIP\x20file\x20to\x20HTML\x20format')]));export const OnchainTableDataSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null&&!Array['isArray'](a)){const b={...a};if(typeof b['description']==='string'&&!b['query_type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['query_type'])return c;}catch{}if(b['cursor']==='')b['cursor']=null;if(b['limit']==='')b['limit']=null;return b;}return a;},z['union']([z['discriminatedUnion']('query_type',[z['object']({'query_type':z['literal']('onchain_table'),'parent':NameOrAddressSchema['describe']('Parent\x20object\x20ID\x20whose\x20dynamic\x20fields\x20table\x20to\x20query'),'cursor':z['union']([z['string'](),z['null']()])['optional']()['describe']('Pagination\x20cursor\x20from\x20previous\x20page\x27s\x20nextCursor'),'limit':z['union']([z['number'](),z['null']()])['optional']()['describe']('Max\x20items\x20per\x20page'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Paginated\x20query\x20of\x20an\x20on-chain\x20object\x27s\x20dynamic\x20fields\x20table\x20β€”\x20returns\x20items\x20with\x20keys,\x20types,\x20and\x20object\x20IDs.\x20Use\x20to\x20explore\x20all\x20entries\x20(e.g.,\x20all\x20orders\x20in\x20a\x20Service,\x20all\x20records\x20in\x20a\x20Repository).\x20Returns:\x20TableAnswer\x20|\x20undefined\x20(items[],\x20nextCursor,\x20hasNextPage)'),z['object']({'query_type':z['literal']('onchain_table_item_repository_data'),'parent':NameOrAddressSchema['describe']('Parent\x20Repository\x20object\x20ID'),'name':z['string']()['describe']('Name/key\x20of\x20the\x20record\x20to\x20retrieve\x20from\x20the\x20repository'),'entity':z['union']([AccountOrMark_AddressSchema,z['number']()])['describe']('Entity\x20ID\x20or\x20address\x20that\x20owns/identifies\x20the\x20record'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20specific\x20record\x20from\x20a\x20Repository\x27s\x20on-chain\x20key-value\x20database\x20by\x20name\x20and\x20entity.\x20Use\x20to\x20read\x20stored\x20data\x20records.\x20Returns:\x20TableItem_RepositoryData\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_permission_perm'),'parent':NameOrAddressSchema['describe']('Parent\x20Permission\x20object\x20ID'),'address':AccountOrMark_AddressAISchema['describe']('User\x20address\x20or\x20Guard\x20ID\x20whose\x20permissions\x20to\x20check.\x20Supports\x20string\x20(name/address)\x20or\x20object\x20form.\x20LocalMark\x20names\x20are\x20resolved\x20automatically.'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20permission\x20entry\x20from\x20a\x20Permission\x20object\x27s\x20perm\x20table\x20β€”\x20checks\x20what\x20operations\x20a\x20user/guard\x20is\x20allowed\x20to\x20perform.\x20Use\x20to\x20verify\x20access\x20rights.\x20Returns:\x20TableItem_PermissionPerm\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_entity_registrar'),'address':AccountOrMark_AddressAISchema['describe']('User\x20address\x20to\x20look\x20up\x20in\x20the\x20global\x20EntityRegistrar.\x20Supports\x20string\x20(name/address)\x20or\x20object\x20form.\x20LocalMark\x20names\x20are\x20resolved\x20automatically.'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20an\x20entity\x27s\x20registration\x20record\x20from\x20the\x20global\x20EntityRegistrar\x20β€”\x20verifies\x20if\x20an\x20address\x20is\x20registered\x20on\x20the\x20blockchain.\x20Use\x20to\x20check\x20registration\x20status\x20and\x20details.\x20Returns:\x20TableItem_EntityRegistrar\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_entity_linker'),'address':AccountOrMark_AddressAISchema['describe']('Entity\x20address\x20whose\x20community\x20votes/endorsements\x20to\x20query.\x20Supports\x20string\x20(name/address)\x20or\x20object\x20form.\x20LocalMark\x20names\x20are\x20resolved\x20automatically.'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20community\x20votes/endorsements\x20for\x20an\x20entity\x20from\x20the\x20global\x20EntityLinker\x20β€”\x20shows\x20how\x20others\x20have\x20voted\x20on\x20this\x20entity.\x20Use\x20to\x20check\x20reputation\x20and\x20community\x20trust.\x20Returns:\x20TableItem_EntityLinker\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_reward_record'),'parent':NameOrAddressSchema['describe']('Parent\x20Reward\x20object\x20ID'),'address':AccountOrMark_AddressSchema['describe']('User\x20address\x20that\x20claimed\x20the\x20reward'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20reward\x20claim\x20record\x20from\x20a\x20Reward\x20object\x27s\x20table\x20β€”\x20checks\x20if\x20a\x20user\x20has\x20claimed\x20a\x20specific\x20incentive.\x20Use\x20to\x20verify\x20reward\x20distribution\x20status.\x20Returns:\x20TableItem_RewardRecord\x20|\x20undefined')]),z['discriminatedUnion']('query_type',[z['object']({'query_type':z['literal']('onchain_table_item_demand_presenter'),'parent':NameOrAddressSchema['describe']('Parent\x20Demand\x20object\x20ID'),'address':AccountOrMark_AddressSchema['describe']('Presenter\x20address\x20that\x20submitted\x20the\x20demand'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20demand\x20submission\x20from\x20a\x20Demand\x20object\x27s\x20table\x20β€”\x20Demands\x20are\x20service\x20requests\x20submitted\x20by\x20users.\x20Use\x20to\x20check\x20a\x20specific\x20demand\x27s\x20details.\x20Returns:\x20TableItem_DemandPresenter\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_treasury_history'),'parent':NameOrAddressSchema['describe']('Parent\x20Treasury\x20object\x20ID'),'address':AccountOrMark_AddressSchema['describe']('Payment\x20ID\x20whose\x20treasury\x20record\x20to\x20look\x20up'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20payment\x20record\x20from\x20a\x20Treasury\x27s\x20history\x20table\x20by\x20payment\x20ID\x20β€”\x20Treasury\x20manages\x20funds\x20and\x20payment\x20tracking.\x20Use\x20to\x20look\x20up\x20payment\x20details\x20and\x20status.\x20Returns:\x20TableItem_TreasuryHistory\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_machine_node'),'parent':NameOrAddressSchema['describe']('Parent\x20Machine\x20object\x20ID'),'key':z['string']()['describe']('Node\x20name\x20(string\x20key)\x20to\x20query\x20in\x20the\x20Machine\x27s\x20workflow\x20definition'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20workflow\x20node\x20definition\x20from\x20a\x20Machine\x20object\x27s\x20table\x20by\x20node\x20name\x20β€”\x20Machines\x20define\x20workflow\x20templates.\x20Use\x20to\x20inspect\x20a\x20specific\x20node\x27s\x20configuration\x20and\x20logic.\x20Returns:\x20TableItem_MachineNode\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_progress_history'),'parent':NameOrAddressSchema['describe']('Parent\x20Progress\x20object\x20ID'),'u64':z['union']([z['number'](),z['string']()])['describe']('Sequence\x20number\x20(u64)\x20of\x20the\x20progress\x20step\x20to\x20query'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20progress\x20step\x20record\x20from\x20a\x20Progress\x20object\x27s\x20table\x20by\x20sequence\x20number\x20β€”\x20Progress\x20tracks\x20order/workflow\x20execution.\x20Use\x20to\x20check\x20the\x20status\x20of\x20a\x20specific\x20execution\x20step.\x20Returns:\x20TableItem_ProgressHistory\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_address_mark'),'parent':NameOrAddressSchema['describe']('Parent\x20AddressMark\x20object\x20ID'),'address':AccountOrMark_AddressSchema['describe']('Address\x20whose\x20PUBLIC\x20on-chain\x20name/tags\x20to\x20look\x20up'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20PUBLIC\x20on-chain\x20name/tag\x20mark\x20for\x20an\x20address\x20β€”\x20unlike\x20local\x20marks,\x20these\x20are\x20published\x20on-chain.\x20Use\x20to\x20look\x20up\x20public\x20labels\x20attached\x20to\x20any\x20address.\x20Returns:\x20TableItem_AddressMark\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_table_item_generic'),'parent':NameOrAddressSchema['describe']('Parent\x20object\x20ID\x20whose\x20dynamic\x20field\x20to\x20query'),'key_type':z['string']()['describe']('FULL\x20Move\x20type\x20of\x20the\x20key\x20(e.g.,\x20\x270x1::string::String\x27,\x20\x270x2::object::ID\x27,\x20\x270x1::address::Address\x27,\x20\x270x1::u64::U64\x27).\x20MUST\x20be\x20the\x20complete\x20type\x20string\x20with\x20address::module::struct\x20format.'),'key_value':z['union']([z['string']()['describe']('String\x20key\x20(for\x200x1::string::String)'),z['number']()['describe']('Numeric\x20key\x20(for\x200x1::u64::U64,\x200x1::u32::U32,\x20etc.)'),z['boolean']()['describe']('Boolean\x20key\x20(for\x200x1::bool::Bool)'),z['array'](z['union']([z['string'](),z['number'](),z['boolean']()]))['describe']('Vector\x20key\x20(for\x200x1::vector::*\x20types)'),z['record'](z['unknown']())['describe']('Struct/object\x20key\x20(for\x20complex\x20Move\x20struct\x20types)')])['describe']('Value\x20of\x20the\x20key.\x20Must\x20match\x20the\x20key_type\x20format\x20(e.g.,\x20string\x20for\x20\x270x1::string::String\x27,\x20address\x20for\x20\x270x1::address::Address\x27,\x20number\x20for\x20\x270x1::u64::U64\x27)'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20a\x20generic\x20table\x20item\x20from\x20ANY\x20object\x27s\x20dynamic\x20fields\x20β€”\x20supports\x20arbitrary\x20key\x20types\x20and\x20values\x20for\x20non-WoWok\x20objects.\x20Use\x20for\x20custom\x20objects\x20and\x20general-purpose\x20table\x20lookups.\x20Returns:\x20ObjectBase\x20|\x20undefined')])]));export const WatchQueryOperationsSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null){const b={...a};if(typeof b['description']==='string'&&!b['query_type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['query_type'])return c;}catch{}for(const d of['filter','objects','env','token_type']){if(typeof b[d]==='string')try{b[d]=JSON['parse'](b[d]);}catch{}}if(b['query_type']==='account_balance'&&b['filter']&&typeof b['filter']==='object'){const e=b['filter'];if(!b['name_or_address']){if(typeof e['name_or_address']==='string')b['name_or_address']=e['name_or_address'];else{if(typeof e['name']==='string')b['name_or_address']=e['name'];else typeof e['address']==='string'&&(b['name_or_address']=e['address']);}}!b['token_type']&&typeof e['token_type']==='string'&&(b['token_type']=e['token_type']),delete b['filter'];}return b;}return a;},z['discriminatedUnion']('query_type',[z['object']({'query_type':z['literal']('local_mark_list'),'filter':LocalMarkFilterSchema['optional']()['describe']('Local\x20mark\x20filter')})['strict']()['describe']('Query\x20your\x20LOCAL\x20address\x20book\x20β€”\x20maps\x20human-readable\x20names\x20to\x20blockchain\x20addresses\x20with\x20optional\x20tags.\x20Use\x20to\x20resolve\x20namesβ†’addresses\x20or\x20find\x20addresses\x20by\x20tag.\x20Returns:\x20MarkData[]\x20(name,\x20address,\x20tags,\x20timestamps)'),z['object']({'query_type':z['literal']('account_list'),'filter':AccountFilterSchema['optional']()['describe']('Account\x20filter')})['strict']()['describe']('Query\x20your\x20LOCAL\x20accounts\x20β€”\x20view\x20all\x20accounts\x20stored\x20on\x20this\x20device\x20(addresses,\x20messenger\x20status,\x20suspension\x20state).\x20Use\x20filter.includePubkey=true\x20to\x20also\x20include\x20public\x20keys\x20(~900\x20bytes\x20each,\x20omitted\x20by\x20default).\x20Returns:\x20AccountData[]\x20(name,\x20address,\x20pubkey?,\x20suspended,\x20messenger,\x20timestamps)'),z['object']({'query_type':z['literal']('local_info_list'),'filter':LocalInfoFilterSchema['optional']()['describe']('Local\x20info\x20filter')})['strict']()['describe']('Query\x20your\x20LOCAL\x20private\x20info\x20β€”\x20sensitive\x20data\x20like\x20delivery\x20addresses,\x20phone\x20numbers,\x20contacts\x20stored\x20ONLY\x20on\x20this\x20device.\x20Use\x20to\x20retrieve\x20saved\x20contact/delivery\x20details.\x20Returns:\x20InfoData[]\x20(name,\x20default\x20value,\x20contents,\x20timestamps)'),z['object']({'query_type':z['literal']('token_list'),'filter':TokenDataFilterSchema['optional']()})['strict']()['describe']('Query\x20cached\x20token\x20metadata\x20β€”\x20symbol,\x20decimals,\x20icon\x20URL,\x20description\x20for\x20tokens\x20previously\x20fetched\x20from\x20chain.\x20Use\x20to\x20look\x20up\x20token\x20info\x20without\x20an\x20on-chain\x20query.\x20Returns:\x20TokenTypeInfo[]\x20(type,\x20alias,\x20name,\x20symbol,\x20decimals,\x20iconUrl)'),z['object']({'query_type':z['literal']('account_balance'),'name_or_address':NameOrAddressSchema['optional']()['describe']('Account\x20name\x20or\x20address\x20to\x20query.\x20'+'Examples:\x20\x22my_account\x22,\x20\x220xabc123...\x22,\x20or\x20\x22\x22\x20for\x20the\x20default\x20account.\x20'+'NOTE:\x20This\x20field\x20is\x20NOT\x20named\x20\x27filter\x27\x20β€”\x20use\x20\x27name_or_address\x27\x20directly.\x20'+'Defaults\x20to\x20\x27\x27\x20(default\x20account)\x20if\x20omitted.'),'balance':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20query\x20total\x20balance\x20amount\x20for\x20the\x20token\x20type'),'coin':z['object']({'cursor':z['union']([z['string'](),z['null']()])['optional']()['describe']('Pagination\x20cursor\x20for\x20listing\x20coin\x20objects'),'limit':z['union']([z['number'](),z['null']()])['optional']()['describe']('Max\x20coin\x20objects\x20per\x20page')})['strict']()['optional']()['describe']('Set\x20to\x20query\x20paginated\x20coin\x20objects\x20instead\x20of\x20balance.\x20Use\x20cursor/limit\x20for\x20pagination.'),'token_type':TokenTypeSchema['optional']()['describe']('Token\x20type\x20in\x20Move\x20format:\x200x<package>::<module>::<struct>.\x20'+'Examples:\x20\x220x2::wow::WOW\x22\x20(default,\x209\x20decimals),\x20\x220x2::sui::SUI\x22\x20(9\x20decimals).\x20'+'For\x20custom\x20tokens,\x20use\x20the\x20full\x20type\x20string\x20from\x20the\x20token\x27s\x20coin\x20metadata.\x20'+'The\x20Fund\x20Processing\x20Layer\x20resolves\x20precision\x20from\x20the\x20official\x20registry\x20β†’\x20cache\x20β†’\x20on-chain.'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20an\x20account\x27s\x20coin\x20balance\x20OR\x20paginated\x20coin\x20objects.\x20'+'PARAMETERS:\x20Use\x20\x27name_or_address\x27\x20to\x20specify\x20the\x20account\x20(NOT\x20\x27filter\x27).\x20'+'Use\x20balance=true\x20for\x20total\x20amount,\x20or\x20coin={cursor,limit}\x20to\x20list\x20individual\x20coin\x20objects.\x20'+'Use\x20token_type\x20to\x20query\x20non-default\x20tokens\x20(format:\x200x<package>::<module>::<struct>).\x20'+'Returns:\x20{\x20address,\x20balance?\x20|\x20coin?\x20}'),z['object']({'query_type':z['literal']('local_names'),'addresses':z['array'](z['string']())['describe']('Array\x20of\x20addresses\x20to\x20look\x20up\x20local\x20names\x20for')})['strict']()['describe']('Query\x20local\x20names\x20(account\x20name\x20and\x20local\x20mark\x20name)\x20for\x20a\x20list\x20of\x20addresses.\x20Returns\x20array\x20of:\x20{\x20account?:\x20string,\x20local_mark?:\x20string,\x20address:\x20string\x20}'),z['object']({'query_type':z['literal']('onchain_personal_profile'),'account':NameOrAddressSchema['optional']()['describe']('Account\x20name\x20or\x20ID\x20to\x20query.\x20Use\x20empty\x20string\x20\x27\x27\x20for\x20the\x20default\x20account.'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20any\x20user\x27s\x20PUBLIC\x20on-chain\x20profile\x20β€”\x20social\x20links,\x20reputation\x20(likes/dislikes),\x20personal\x20info\x20records,\x20voting\x20history,\x20referrer.\x20Use\x20to\x20look\x20up\x20a\x20user\x27s\x20public\x20identity\x20and\x20reputation.\x20Returns:\x20ObjectPersonal\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_objects'),'objects':z['array'](NameOrAddressSchema)['describe']('List\x20of\x20object\x20IDs\x20(names\x20or\x20addresses)\x20to\x20query\x20in\x20batch'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Batch\x20query\x20on-chain\x20WOWOK\x20objects\x20by\x20ID\x20or\x20name\x20β€”\x20supports\x20Service,\x20Machine,\x20Order,\x20Treasury,\x20Reward,\x20Arb,\x20Personal,\x20Contact,\x20and\x20more.\x20Use\x20to\x20inspect\x20one\x20or\x20more\x20objects\x20in\x20a\x20single\x20call.\x20Returns:\x20{\x20objects:\x20ObjectBase[]\x20}'),z['object']({'query_type':z['literal']('onchain_received'),'name_or_address':AccountOrMark_AddressAISchema['describe']('Name\x20or\x20address\x20of\x20the\x20object\x20that\x20received\x20payments/items\x20-\x20can\x20be\x20a\x20string\x20(name/address)\x20or\x20full\x20object'),'type':z['union']([z['string'](),z['literal']('CoinWrapper'),z['null']()])['optional']()['describe']('Type\x20filter\x20for\x20querying\x20received\x20objects.\x20'+'-\x20If\x20undefined\x20or\x20null:\x20query\x20all\x20types\x20(equivalent\x20to\x20the\x20old\x20all_type=true).\x20'+'-\x20If\x20\x27CoinWrapper\x27:\x20query\x20CoinWrapper\x20type\x20for\x20the\x20object\x27s\x20token\x20(equivalent\x20to\x20the\x20old\x20all_type=false).\x20'+'-\x20If\x20string:\x20query\x20specific\x20StructType\x20(e.g.,\x20\x270x2::payment::CoinWrapper<0x2::wow::WOW>\x27).'),'cursor':z['union']([z['string'](),z['null']()])['optional']()['describe']('Pagination\x20cursor\x20from\x20previous\x20page'),'limit':z['union']([z['number'](),z['null']()])['optional']()['describe']('Max\x20records\x20per\x20page'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20objects\x20(Payments,\x20Tokens,\x20NFTs)\x20received\x20by\x20a\x20specific\x20object.\x20Use\x20to\x20track\x20incoming\x20payments\x20or\x20items\x20sent\x20to\x20an\x20on-chain\x20object.\x20Supports\x20pagination\x20and\x20type\x20filter.\x20Returns:\x20ReceivedBalance\x20|\x20ReceivedNormal[]'),z['object']({'query_type':z['literal']('onchain_transaction'),'digest':z['string']()['describe']('Transaction\x20digest\x20(0x...)\x20to\x20verify.\x20Use\x20after\x20any\x20on-chain\x20operation\x20to\x20confirm\x20what\x20actually\x20happened\x20on-chain\x20β€”\x20object\x20changes,\x20balance\x20changes,\x20gas\x20used,\x20success/failure\x20status.\x20This\x20is\x20the\x20\x27OperationProof\x27\x20primitive\x20for\x20the\x20Verify\x20step.'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Verify\x20what\x20a\x20specific\x20transaction\x20did\x20on-chain\x20β€”\x20the\x20\x27OperationProof\x27\x20primitive.\x20After\x20executing\x20any\x20operation,\x20call\x20this\x20with\x20the\x20returned\x20digest\x20to\x20confirm:\x20status\x20(success/failed),\x20object\x20changes\x20(created/mutated/deleted),\x20balance\x20changes,\x20gas\x20used,\x20and\x20events.\x20Essential\x20for\x20the\x205-step\x20loop\x27s\x20Verify\x20step.\x20Returns:\x20TransactionDetail\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_object_history'),'object':NameOrAddressSchema['describe']('Object\x20ID\x20(0x...)\x20or\x20LocalMark\x20name.\x20Query\x20the\x20provenance\x20chain\x20β€”\x20every\x20transaction\x20that\x20created,\x20mutated,\x20or\x20deleted\x20this\x20object.\x20Use\x20to\x20trace\x20how\x20an\x20object\x20reached\x20its\x20current\x20state.'),'cursor':z['union']([z['string'](),z['null']()])['optional']()['describe']('Pagination\x20cursor\x20from\x20previous\x20page\x27s\x20next_cursor'),'limit':z['union']([z['number'](),z['null']()])['optional']()['describe']('Max\x20results\x20per\x20page\x20(default\x2020,\x20max\x2050)'),'order':z['union']([z['literal']('ascending'),z['literal']('descending')])['optional']()['describe']('Sort\x20order:\x20ascending=oldest\x20first,\x20descending=newest\x20first\x20(default)'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('FORENSICS\x20TOOL\x20β€”\x20query\x20all\x20transactions\x20that\x20touched\x20an\x20object.\x20WARNING:\x20this\x20can\x20lead\x20to\x20non-convergent\x20queries\x20(each\x20tx\x20touches\x20more\x20objects\x20with\x20their\x20own\x20history).\x20For\x20AI\x20context\x20building,\x20use\x20assemble_context\x20instead\x20β€”\x20it\x20extracts\x20embedded\x20history\x20from\x20object\x20states\x20(ProgressSession.forwards,\x20etc.)\x20without\x20infinite\x20recursion.\x20This\x20tool\x20is\x20for\x20auditing/forensics\x20only.\x20Returns:\x20TransactionHistoryAnswer\x20|\x20undefined'),z['object']({'query_type':z['literal']('onchain_address_activity'),'name_or_address':AccountOrMark_AddressAISchema['describe']('Address\x20(0x...)\x20or\x20account\x20name.\x20Query\x20all\x20on-chain\x20activity\x20by\x20this\x20actor\x20β€”\x20every\x20transaction\x20they\x20sent.\x20Use\x20to\x20build\x20a\x20user\x27s\x20on-chain\x20activity\x20profile\x20or\x20verify\x20an\x20actor\x27s\x20history.'),'cursor':z['union']([z['string'](),z['null']()])['optional']()['describe']('Pagination\x20cursor\x20from\x20previous\x20page\x27s\x20next_cursor'),'limit':z['union']([z['number'](),z['null']()])['optional']()['describe']('Max\x20results\x20per\x20page\x20(default\x2020,\x20max\x2050)'),'order':z['union']([z['literal']('ascending'),z['literal']('descending')])['optional']()['describe']('Sort\x20order:\x20ascending=oldest\x20first,\x20descending=newest\x20first\x20(default)'),'no_cache':z['boolean']()['optional']()['describe']('Set\x20to\x20true\x20to\x20bypass\x20cache\x20and\x20fetch\x20fresh\x20on-chain\x20data'),'network':EntrypointSchema['optional']()})['strict']()['describe']('FORENSICS\x20TOOL\x20β€”\x20query\x20all\x20transactions\x20sent\x20by\x20an\x20address.\x20WARNING:\x20like\x20onchain_object_history,\x20this\x20can\x20lead\x20to\x20non-convergent\x20queries.\x20For\x20AI\x20context\x20building,\x20use\x20assemble_context\x20(extracts\x20embedded\x20history)\x20or\x20query_events\x20(real-time\x20transitions)\x20instead.\x20This\x20tool\x20is\x20for\x20auditing/user-activity\x20profiling\x20only.\x20Returns:\x20TransactionHistoryAnswer\x20|\x20undefined'),z['object']({'query_type':z['literal']('token_value_convert'),'token_type':TokenTypeSchema['describe']('Full\x20token\x20type\x20in\x20Move\x20format:\x200x<package>::<module>::<struct>.\x20'+'Examples:\x20\x220x2::wow::WOW\x22\x20(9\x20decimals).\x20The\x20token\x27s\x20decimals\x20drive\x20the\x20conversion\x20β€”\x20'+'resolved\x20from\x20official\x20registry\x20β†’\x20local\x20cache\x20β†’\x20on-chain\x20coin\x20metadata.'),'raw':z['union']([z['string'](),z['number']()])['optional']()['describe']('Raw\x20smallest-unit\x20value\x20(u64,\x20e.g.\x20\x222200000000\x22)\x20to\x20convert\x20TO\x20a\x20human\x20unit\x20value.\x20'+'Provide\x20EXACTLY\x20ONE\x20of\x20raw\x20/\x20unit.'),'unit':z['union']([z['string'](),z['number']()])['optional']()['describe']('Human\x20unit\x20value\x20(e.g.\x20\x222.2\x22)\x20to\x20convert\x20TO\x20raw\x20smallest\x20units\x20(u64).\x20'+'Provide\x20EXACTLY\x20ONE\x20of\x20raw\x20/\x20unit.\x20Conversion\x20is\x20REFUSED\x20when\x20the\x20token\x27s\x20'+'decimals\x20cannot\x20be\x20resolved\x20(guessing\x20would\x20forge\x20wrong\x20on-chain\x20values).'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Convert\x20between\x20raw\x20on-chain\x20smallest\x20units\x20(u64)\x20and\x20human\x20unit\x20values,\x20in\x20EITHER\x20direction.\x20'+'Provide\x20EXACTLY\x20ONE\x20of\x20raw\x20/\x20unit\x20(handler-validated).\x20'+'raw\x20β†’\x20unit:\x20\x222200000000\x22\x20β†’\x20\x222.2\x22\x20(pass-through\x20when\x20precision\x20unknown).\x20'+'unit\x20β†’\x20raw:\x20\x222.2\x22\x20β†’\x20\x222200000000\x22\x20(REFUSED\x20when\x20precision\x20unknown\x20β€”\x20never\x20guesses\x20decimals).\x20'+'Use\x20this\x20before\x20displaying\x20chain\x20values\x20to\x20users,\x20and\x20before\x20entering\x20amounts\x20for\x20on-chain\x20operations.\x20'+'Returns:\x20{\x20token_type,\x20symbol?,\x20decimals?,\x20precision_known,\x20direction,\x20input,\x20output,\x20error?,\x20text\x20}')]));export const OnchainTableDataResultSchema=z['object']({'result':z['union']([z['object']({'query_type':z['literal']('onchain_table'),'result':z['union']([TableAnswerSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_repository_data'),'result':z['union']([TableItem_RepositoryDataSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_permission_perm'),'result':z['union']([TableItem_PermissionPermSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_entity_registrar'),'result':z['union']([TableItem_EntityRegistrarSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_entity_linker'),'result':z['union']([TableItem_EntityLinkerSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_reward_record'),'result':z['union']([TableItem_RewardRecordSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_demand_presenter'),'result':z['union']([TableItem_DemandPresenterSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_treasury_history'),'result':z['union']([TableItem_TreasuryHistorySchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_machine_node'),'result':z['union']([TableItem_MachineNodeSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_progress_history'),'result':z['union']([TableItem_ProgressHistorySchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_address_mark'),'result':z['union']([TableItem_AddressMarkSchema,z['undefined']()])}),z['object']({'query_type':z['literal']('onchain_table_item_generic'),'result':z['union']([ObjectBaseSchema,z['undefined']()])})]),'semantic':SemanticSummarySchema['optional']()['describe']('Business\x20semantic\x20summary\x20for\x20the\x20table\x20data\x20query')});