@wowok/agent-mcp 3.1.7 → 3.2.1

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 (294) hide show
  1. package/dist/config/exposure.d.ts +2 -2
  2. package/dist/config/judgment.d.ts +5 -5
  3. package/dist/config/rule-engine.d.ts +5 -5
  4. package/dist/customer/user-preferences.d.ts +2 -2
  5. package/dist/evaluation/arbitration-game.js +1 -1
  6. package/dist/evaluation/capability.d.ts +1 -1
  7. package/dist/evaluation/extract.js +1 -1
  8. package/dist/evaluation/match-operation.js +1 -1
  9. package/dist/extensions/industry-pack.d.ts +3 -2
  10. package/dist/extensions/industry-pack.js +1 -1
  11. package/dist/extensions/modes.js +1 -1
  12. package/dist/extensions/registry.js +1 -1
  13. package/dist/extensions/types.d.ts +1 -0
  14. package/dist/graph/onchain/analyze.js +1 -1
  15. package/dist/graph/onchain/analyze.spec.js +1 -1
  16. package/dist/graph/onchain/edge-schema.js +1 -1
  17. package/dist/graph/onchain/extract.js +1 -1
  18. package/dist/graph/onchain/facts.js +1 -1
  19. package/dist/graph/onchain/field-manifest.js +1 -1
  20. package/dist/graph/onchain/project-relationship.js +1 -1
  21. package/dist/graph/onchain/sdk-batch.d.ts +1 -0
  22. package/dist/graph/onchain/sdk-batch.js +1 -1
  23. package/dist/graph/onchain/sdk-dataplane.d.ts +1 -0
  24. package/dist/graph/onchain/sdk-dataplane.js +1 -1
  25. package/dist/graph/onchain/types.d.ts +1 -1
  26. package/dist/harness/recover.js +1 -1
  27. package/dist/keeper/KeeperScan.d.ts +2 -1
  28. package/dist/keeper/KeeperScan.js +1 -1
  29. package/dist/keeper/detectors.d.ts +9 -0
  30. package/dist/keeper/detectors.js +1 -1
  31. package/dist/keeper/keeper.spec.js +1 -1
  32. package/dist/keeper/types.d.ts +1 -1
  33. package/dist/keeper/types.js +1 -1
  34. package/dist/knowledge/allocation-ledger.d.ts +4 -1
  35. package/dist/knowledge/allocation-ledger.js +1 -1
  36. package/dist/knowledge/allocation-puzzle.d.ts +2 -0
  37. package/dist/knowledge/allocation-puzzle.js +1 -1
  38. package/dist/knowledge/allocation-risk.d.ts +1 -1
  39. package/dist/knowledge/allocation-risk.js +1 -1
  40. package/dist/knowledge/allocation-templates.d.ts +1 -1
  41. package/dist/knowledge/allocation-templates.js +1 -1
  42. package/dist/knowledge/arb-risk.d.ts +3 -1
  43. package/dist/knowledge/arb-risk.js +1 -1
  44. package/dist/knowledge/arbitration-ledger.js +1 -1
  45. package/dist/knowledge/arbitration-risk.js +1 -1
  46. package/dist/knowledge/arbitration-templates.d.ts +1 -0
  47. package/dist/knowledge/arbitration-templates.js +1 -1
  48. package/dist/knowledge/audit-rules.d.ts +13 -2
  49. package/dist/knowledge/audit-rules.js +1 -1
  50. package/dist/knowledge/baselines/rules/allocation.json +50 -1
  51. package/dist/knowledge/baselines/rules/arb.json +20 -1
  52. package/dist/knowledge/baselines/rules/arbitration.json +27 -0
  53. package/dist/knowledge/baselines/rules/guard.json +75 -2
  54. package/dist/knowledge/baselines/rules/machine.json +38 -13
  55. package/dist/knowledge/baselines/rules/order.json +2 -2
  56. package/dist/knowledge/builtin-templates.d.ts +3 -1
  57. package/dist/knowledge/builtin-templates.js +1 -1
  58. package/dist/knowledge/discount-threshold.d.ts +15 -0
  59. package/dist/knowledge/discount-threshold.js +1 -0
  60. package/dist/knowledge/event-semantics.js +1 -1
  61. package/dist/knowledge/fund-layer.js +1 -1
  62. package/dist/knowledge/getting-started.js +1 -1
  63. package/dist/knowledge/guard-anchor-reach.d.ts +19 -0
  64. package/dist/knowledge/guard-anchor-reach.js +1 -0
  65. package/dist/knowledge/guard-bindings.js +1 -1
  66. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  67. package/dist/knowledge/guard-design-patterns.js +1 -1
  68. package/dist/knowledge/guard-ledger.js +1 -1
  69. package/dist/knowledge/guard-lint.js +1 -1
  70. package/dist/knowledge/guard-render.d.ts +6 -0
  71. package/dist/knowledge/guard-render.js +1 -1
  72. package/dist/knowledge/guard-risk.js +1 -1
  73. package/dist/knowledge/guard-submission-prompt.d.ts +6 -0
  74. package/dist/knowledge/guard-submission-prompt.js +1 -1
  75. package/dist/knowledge/guard-templates.d.ts +1 -1
  76. package/dist/knowledge/guard-templates.js +1 -1
  77. package/dist/knowledge/guard-translation.js +1 -1
  78. package/dist/knowledge/index.d.ts +6 -6
  79. package/dist/knowledge/index.js +1 -1
  80. package/dist/knowledge/industry-generalizer.d.ts +38 -1
  81. package/dist/knowledge/industry-generalizer.js +1 -1
  82. package/dist/knowledge/industry-registry.d.ts +1 -1
  83. package/dist/knowledge/industry-registry.js +1 -1
  84. package/dist/knowledge/industry-strategy.js +1 -1
  85. package/dist/knowledge/jsonrpc-enum.js +1 -1
  86. package/dist/knowledge/machine-ledger.js +1 -1
  87. package/dist/knowledge/machine-risk.js +1 -1
  88. package/dist/knowledge/machine-templates.js +1 -1
  89. package/dist/knowledge/onchain-constants.d.ts +2 -2
  90. package/dist/knowledge/onchain-constants.js +1 -1
  91. package/dist/knowledge/order-ledger.js +1 -1
  92. package/dist/knowledge/order-templates.js +1 -1
  93. package/dist/knowledge/permission-ledger.js +1 -1
  94. package/dist/knowledge/release-sentinel.d.ts +12 -0
  95. package/dist/knowledge/release-sentinel.js +1 -0
  96. package/dist/knowledge/repository-write-semantics.d.ts +27 -0
  97. package/dist/knowledge/repository-write-semantics.js +1 -0
  98. package/dist/knowledge/rule-node-analyzers.d.ts +6 -0
  99. package/dist/knowledge/rule-node-analyzers.js +1 -1
  100. package/dist/knowledge/safety-rules.d.ts +5 -1
  101. package/dist/knowledge/safety-rules.js +1 -1
  102. package/dist/knowledge/scenario-modes.d.ts +20 -1
  103. package/dist/knowledge/scenario-modes.js +1 -1
  104. package/dist/knowledge/service-allocation-semantics.d.ts +36 -0
  105. package/dist/knowledge/service-allocation-semantics.js +1 -0
  106. package/dist/knowledge/strategy-manuals.d.ts +4 -6
  107. package/dist/knowledge/strategy-manuals.js +1 -1
  108. package/dist/knowledge/template-loader.d.ts +48 -12
  109. package/dist/knowledge/template-loader.js +1 -1
  110. package/dist/knowledge/template-registry.js +1 -1
  111. package/dist/knowledge/template-scanner.js +1 -1
  112. package/dist/knowledge/tools-reference.js +1 -1
  113. package/dist/knowledge/workflow-guidance.d.ts +26 -0
  114. package/dist/knowledge/workflow-guidance.js +1 -1
  115. package/dist/monitor/MonitorLoop.js +1 -1
  116. package/dist/participation/allocation-advice.d.ts +38 -0
  117. package/dist/participation/allocation-advice.js +1 -0
  118. package/dist/participation/arbitrator-interest.js +1 -1
  119. package/dist/participation/customer-interest.js +1 -1
  120. package/dist/participation/merchant-interest.js +1 -1
  121. package/dist/participation/radar-core.d.ts +2 -0
  122. package/dist/persona/types.d.ts +3 -2
  123. package/dist/persona/types.js +1 -1
  124. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  125. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  126. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  127. package/dist/playbooks/service-build/merchant-guide.d.ts +70 -63
  128. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  129. package/dist/playbooks/service-build/migration-planner.js +1 -1
  130. package/dist/playbooks/service-build/mode-actions.d.ts +17 -1
  131. package/dist/playbooks/service-build/mode-actions.js +1 -1
  132. package/dist/playbooks/service-build/object-panorama.js +1 -1
  133. package/dist/playbooks/service-build/participation-radar.js +1 -1
  134. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  135. package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.js +1 -0
  136. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  137. package/dist/playbooks/service-build/semantic-graph.d.ts +1 -0
  138. package/dist/playbooks/service-build/semantic-graph.js +1 -1
  139. package/dist/playbooks/service-build/service-panorama.js +1 -1
  140. package/dist/playbooks/service-build/service-quote.d.ts +2 -0
  141. package/dist/playbooks/service-build/service-quote.js +1 -0
  142. package/dist/relationship/derivation.d.ts +1 -1
  143. package/dist/review/index.js +1 -1
  144. package/dist/role/profiles.js +1 -1
  145. package/dist/role/types.d.ts +2 -0
  146. package/dist/role/types.js +1 -1
  147. package/dist/safety/confirm-gate.js +1 -1
  148. package/dist/schema/benchmark-migration/index.d.ts +30 -8
  149. package/dist/schema/benchmark-migration/index.js +1 -1
  150. package/dist/schema/call/allocation.d.ts +10 -7
  151. package/dist/schema/call/arbitration.d.ts +1 -1
  152. package/dist/schema/call/arbitration.js +1 -1
  153. package/dist/schema/call/base.d.ts +5 -5
  154. package/dist/schema/call/base.js +1 -1
  155. package/dist/schema/call/bridge.d.ts +5 -9
  156. package/dist/schema/call/bridge.js +1 -1
  157. package/dist/schema/call/contact.d.ts +1 -1
  158. package/dist/schema/call/demand.d.ts +1 -1
  159. package/dist/schema/call/guard.d.ts +15 -15
  160. package/dist/schema/call/handler.js +1 -1
  161. package/dist/schema/call/machine.d.ts +58 -2
  162. package/dist/schema/call/machine.js +1 -1
  163. package/dist/schema/call/order.d.ts +1 -1
  164. package/dist/schema/call/order.js +1 -1
  165. package/dist/schema/call/payment.d.ts +1 -1
  166. package/dist/schema/call/payment.js +1 -1
  167. package/dist/schema/call/permission.d.ts +1 -1
  168. package/dist/schema/call/personal.d.ts +1 -1
  169. package/dist/schema/call/progress.d.ts +1 -1
  170. package/dist/schema/call/proof.d.ts +2 -2
  171. package/dist/schema/call/repository.d.ts +1 -1
  172. package/dist/schema/call/reward.d.ts +1 -1
  173. package/dist/schema/call/semantic.js +1 -1
  174. package/dist/schema/call/service.d.ts +87 -25
  175. package/dist/schema/call/service.js +1 -1
  176. package/dist/schema/call/treasury.d.ts +1 -1
  177. package/dist/schema/common/index.js +1 -1
  178. package/dist/schema/common/tokentype-short-probe.spec.js +1 -0
  179. package/dist/schema/evaluation/index.d.ts +14 -82
  180. package/dist/schema/evaluation/index.js +1 -1
  181. package/dist/schema/goal/index.d.ts +8 -41
  182. package/dist/schema/goal/planning.d.ts +22 -57
  183. package/dist/schema/goal/planning.js +1 -1
  184. package/dist/schema/industry-pack/index.d.ts +15 -0
  185. package/dist/schema/industry-pack/modes.d.ts +15 -0
  186. package/dist/schema/industry-pack/modes.js +1 -1
  187. package/dist/schema/intent-radar/index.d.ts +5 -20
  188. package/dist/schema/intent-radar/index.js +1 -1
  189. package/dist/schema/interaction/index.d.ts +1 -1
  190. package/dist/schema/keeper/index.d.ts +3 -0
  191. package/dist/schema/keeper/index.js +1 -1
  192. package/dist/schema/local/index.d.ts +577 -18
  193. package/dist/schema/local/index.js +1 -1
  194. package/dist/schema/messenger/index.d.ts +140 -20
  195. package/dist/schema/messenger/index.js +1 -1
  196. package/dist/schema/operations.d.ts +97 -35
  197. package/dist/schema/operations.js +1 -1
  198. package/dist/schema/persona/index.d.ts +811 -916
  199. package/dist/schema/persona/index.js +1 -1
  200. package/dist/schema/query/bi.d.ts +161 -8
  201. package/dist/schema/query/bi.js +1 -1
  202. package/dist/schema/query/index.d.ts +49 -30
  203. package/dist/schema/query/index.js +1 -1
  204. package/dist/schema/schema-query/index.d.ts +2 -2
  205. package/dist/schema/workflow/index.d.ts +2 -2
  206. package/dist/schema-query-impl/index.d.ts +1 -0
  207. package/dist/schema-query-impl/index.js +1 -1
  208. package/dist/schemas/account_operation.output.json +8 -4
  209. package/dist/schemas/account_operation.schema.json +1 -1
  210. package/dist/schemas/benchmark_migration_operation.output.json +116 -2
  211. package/dist/schemas/benchmark_migration_operation.schema.json +2 -10
  212. package/dist/schemas/bridge_operation.output.json +2 -2
  213. package/dist/schemas/bridge_operation.schema.json +2 -10
  214. package/dist/schemas/evaluation_operation.output.json +2 -0
  215. package/dist/schemas/evaluation_operation.schema.json +9 -70
  216. package/dist/schemas/goal_operation.schema.json +6 -39
  217. package/dist/schemas/index.json +7 -1
  218. package/dist/schemas/industry_pack_operation.output.json +87 -4
  219. package/dist/schemas/intent_radar.output.json +6 -20
  220. package/dist/schemas/intent_radar.schema.json +1 -0
  221. package/dist/schemas/keeper_operation.output.json +2 -2
  222. package/dist/schemas/keeper_operation.schema.json +9 -4
  223. package/dist/schemas/local_cache_operation.output.json +1536 -0
  224. package/dist/schemas/local_cache_operation.schema.json +101 -0
  225. package/dist/schemas/local_history_operation.output.json +2 -2
  226. package/dist/schemas/local_info_operation.output.json +2 -2
  227. package/dist/schemas/local_mark_operation.output.json +53 -38
  228. package/dist/schemas/local_mark_operation.schema.json +1 -0
  229. package/dist/schemas/messenger_operation.output.json +2 -2
  230. package/dist/schemas/messenger_operation.schema.json +358 -35
  231. package/dist/schemas/monitor_events.output.json +2 -2
  232. package/dist/schemas/monitor_subscription.output.json +2 -2
  233. package/dist/schemas/onchain_events.output.json +2 -2
  234. package/dist/schemas/onchain_operations.output.json +6 -6
  235. package/dist/schemas/onchain_operations.schema.json +237 -64
  236. package/dist/schemas/onchain_operations_allocation.schema.json +12 -11
  237. package/dist/schemas/onchain_operations_arbitration.schema.json +16 -16
  238. package/dist/schemas/onchain_operations_machine.schema.json +27 -5
  239. package/dist/schemas/onchain_operations_order.schema.json +1 -1
  240. package/dist/schemas/onchain_operations_payment.schema.json +3 -3
  241. package/dist/schemas/onchain_operations_reward.schema.json +2 -2
  242. package/dist/schemas/onchain_operations_service.schema.json +174 -24
  243. package/dist/schemas/onchain_operations_treasury.schema.json +2 -2
  244. package/dist/schemas/onchain_table_data.output.json +68 -4
  245. package/dist/schemas/persona_operation.output.json +11 -88
  246. package/dist/schemas/persona_operation.schema.json +4 -32
  247. package/dist/schemas/query_toolkit.output.json +331 -26
  248. package/dist/schemas/query_toolkit.schema.json +66 -2
  249. package/dist/tools/handlers/benchmark-migration.js +1 -1
  250. package/dist/tools/handlers/bridge.js +1 -1
  251. package/dist/tools/handlers/dispatch-expectations.spec.js +1 -1
  252. package/dist/tools/handlers/keeper.d.ts +1 -1
  253. package/dist/tools/handlers/local.d.ts +1 -0
  254. package/dist/tools/handlers/local.js +1 -1
  255. package/dist/tools/handlers/messenger.d.ts +9 -2
  256. package/dist/tools/handlers/messenger.js +1 -1
  257. package/dist/tools/handlers/name-resolution.d.ts +4 -0
  258. package/dist/tools/handlers/name-resolution.js +1 -0
  259. package/dist/tools/handlers/name-resolution.spec.js +1 -0
  260. package/dist/tools/handlers/onchain-name-registration.d.ts +37 -0
  261. package/dist/tools/handlers/onchain-name-registration.js +1 -0
  262. package/dist/tools/handlers/onchain-name-registration.spec.js +1 -0
  263. package/dist/tools/handlers/onchain.d.ts +1 -0
  264. package/dist/tools/handlers/onchain.js +1 -1
  265. package/dist/tools/handlers/query.d.ts +1 -0
  266. package/dist/tools/handlers/query.js +1 -1
  267. package/dist/tools/handlers/schema-query.js +1 -1
  268. package/dist/tools/index.js +1 -1
  269. package/dist/tools/move-fn-index.gen.js +1 -1
  270. package/dist/tools/registry/business.js +1 -1
  271. package/dist/tools/registry/local.js +1 -1
  272. package/dist/tools/sanitize-description-roundtrip.spec.js +1 -0
  273. package/dist/tools/sanitize-output.d.ts +1 -0
  274. package/dist/tools/sanitize-output.js +1 -1
  275. package/dist/tools/wrap.js +1 -1
  276. package/package.json +2 -2
  277. package/dist/knowledge/alloc-audit-policy.spec.js +0 -1
  278. package/dist/knowledge/event-semantics.spec.js +0 -1
  279. package/dist/knowledge/facts-sync.spec.js +0 -1
  280. package/dist/knowledge/guard-design-patterns.spec.js +0 -1
  281. package/dist/knowledge/guard-eval.spec.js +0 -1
  282. package/dist/knowledge/rule-node-analyzers.spec.d.ts +0 -1
  283. package/dist/knowledge/rule-node-analyzers.spec.js +0 -1
  284. package/dist/knowledge/safety-rules.extract-amount.spec.d.ts +0 -1
  285. package/dist/knowledge/safety-rules.extract-amount.spec.js +0 -1
  286. package/dist/knowledge/template-loader.spec.d.ts +0 -1
  287. package/dist/knowledge/template-loader.spec.js +0 -1
  288. package/dist/knowledge/template-scanner.spec.d.ts +0 -1
  289. package/dist/knowledge/template-scanner.spec.js +0 -1
  290. /package/dist/{knowledge/alloc-audit-policy.spec.d.ts → playbooks/service-build/reverse-mapping-refund-p0-5.spec.d.ts} +0 -0
  291. /package/dist/{knowledge/event-semantics.spec.d.ts → schema/common/tokentype-short-probe.spec.d.ts} +0 -0
  292. /package/dist/{knowledge/facts-sync.spec.d.ts → tools/handlers/name-resolution.spec.d.ts} +0 -0
  293. /package/dist/{knowledge/guard-design-patterns.spec.d.ts → tools/handlers/onchain-name-registration.spec.d.ts} +0 -0
  294. /package/dist/{knowledge/guard-eval.spec.d.ts → tools/sanitize-description-roundtrip.spec.d.ts} +0 -0
@@ -1 +1 @@
1
- export const MOVE_FUNCTIONS={'allocation':['alloc','allocator_add','allocators','assert_allocation_mode','assert_allocators_not_empty','create','new_with_balance','new_with_coin','receive','sharing_for_address','sharing_for_guard_identifier','sharing_for_signer','sharing_imp'],'arb':['arbitration','arbitration_address','arbitrator_confirm','assert_permission','description_change','emit_arb_event','feedback','finish','new','objection','principal_confirm','proposition','proposition_change','reset','statement','vote','voting_deadline_change','withdraw'],'arbitration':['arb_withdraw','arb_withdraw_with_passport','arbitration','arbitration_event_emit','arbitration_imp','arbitration_with_passport','compensate','confirm','confirm_imp','confirm_with_passport','description_set','description_set_imp','description_set_with_passport','dispute','dispute_with_passport','fee_set','fee_set_imp','fee_set_with_passport','feed_back_imp','feedback','feedback_with_passport','fees_alloc','fees_alloc_with_passport','fees_transfer','fees_transfer_imp','fees_transfer_with_passport','location_set','location_set_imp','location_set_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','pause','pause_imp','pause_with_passport','permission','permission_set','reset','reset_imp','reset_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport','usage_guard_none','usage_guard_none_imp','usage_guard_none_with_passport','usage_guard_set','usage_guard_set_imp','usage_guard_set_with_passport','vote','vote_imp','vote_imp_','vote_with_passport','vote_with_voting_guard','voting_deadline_change','voting_deadline_change_imp','voting_deadline_change_with_passport','voting_guard_add_by_id_add_with_passport','voting_guard_add_imp','voting_guard_by_id_add','voting_guard_clear','voting_guard_clear_imp','voting_guard_clear_with_passport','voting_guard_fixed_add','voting_guard_fixed_add_with_passport','voting_guard_remove','voting_guard_remove_imp','voting_guard_remove_with_passport','withdraw_imp'],'common':['assert_service_object_type','assert_valid_value','de_address','de_address_compatible','de_number','de_u64','is_number_type','is_number_type2','is_type_address_compatible','is_valid_value','is_value_type','object_type_as_u8','object_type_from_u8','truncate_utf8_chars','value_type_as_u8','value_type_from_u8'],'parent_linked_table':['back','borrow','borrow_mut','contains','front','is_empty','length','new','next','pop_back','pop_front','prev','push_back','push_front','remove'],'parent_table':['add','borrow','borrow_mut','contains','is_empty','length','new','remove'],'parent_table_vec':['borrow','borrow_mut','empty','is_empty','length','pop_back','push_back','singleton','swap','swap_remove'],'util':['is_chiild_object_address_byte','is_child_object_address','is_object_address','is_object_address_byte','is_user_address','is_user_address_byte'],'contact':['change_status','create','description_set','description_set_imp','description_set_with_passport','im_add','im_add_imp','im_add_with_passport','im_clear','im_clear_imp','im_clear_with_passport','im_remove','im_remove_imp','im_remove_with_passport','location_set','location_set_imp','location_set_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','permission_um_set'],'demand':['demand_changed_event_emit','description_set','description_set_imp','description_set_with_passport','feedback','feedback_imp','feedback_with_passport','guard_add','guard_add_imp','guard_add_with_passport','guard_clear','guard_clear_imp','guard_clear_with_passport','guard_remove','guard_remove_imp','guard_remove_with_passport','location_set','location_set_imp','location_set_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','present','present_imp','present_service','present_service_with_passport','present_with_passport','present_with_passport_imp','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_remove','reward_remove_imp','reward_remove_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'entity_contact':['contact_add','contact_remove','contact_remove_imp','create'],'entity_order':['create','order_role_remove_imp','role_add','role_agent','role_move','role_owner','role_remove'],'entity_permission':['create','permission_role_remove_imp','role_add','role_admin','role_entity','role_move','role_owner','role_remove'],'guard':['assert_submission_object_type','create','create_imp','create_v2','get_submission_object_type','get_submission_value_type','has_identifier','has_submissions','is_depended','is_identifier_address','is_identifier_address_compatible','is_immutable','make_submissions','new','parse_constant_data_modules','relies','relies_add','relies_clear','relies_logic_and','relies_remove','rep','submission','submission_value','table_item','try_submission_value','validate_guard_data'],'machine':['assert_not_published','assert_published','consensus_repositories_add','consensus_repositories_add_imp','consensus_repositories_add_with_passport','consensus_repositories_clear','consensus_repositories_clear_imp','consensus_repositories_clear_with_passport','consensus_repositories_remove','consensus_repositories_remove_imp','consensus_repositories_remove_with_passport','description_set','description_set_imp','description_set_with_passport','forward','forward_remove','forward_remove2','forward_with_guard','forwards_add','forwards_add_imp','forwards_add_with_passport','forwards_remove','forwards_remove_imp','forwards_remove_with_passport','info_borrow','init_node_name','is_init_node_name','new','new_imp','new_with_passport','node','node2','node3','node_add','node_add2','node_add2_with_passport','node_add_imp','node_add_imp_','node_add_single','node_add_with_passport','node_clear','node_clear_imp','node_clear_with_passport','node_exchange_name','node_exchange_name_imp','node_exchange_name_with_passport','node_remove','node_remove2','node_remove2_with_passport','node_remove_imp','node_remove_imp_','node_remove_single','node_remove_with_passport','node_rename','node_rename_imp','node_rename_with_passport','nodepair','nodepair2','nodepair3','nodepair_add','nodepair_exchange_name_imp','nodepair_remove','nodepair_remove2','nodepair_remove_imp','nodepair_rename_imp','nodepair_threshold_set','on_progress_new','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','pause','pause_imp','pause_with_passport','permission_id','permission_set','prev_nodes_remove','prev_nodes_remove_imp','prev_nodes_remove_with_passport','publish','publish_imp','publish_with_passport','threshold_get','threshold_set','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'object_linker':['affiliation_change_core','affiliation_change_tx','affiliation_core','affiliation_tx','create','disaffiliation_core','disaffiliation_tx'],'order':['agent_set','agent_set_imp','amount','assert_not_claimed','assert_op_permission','assert_owner','compensate','dispute','has_op_permission','item','item_name','item_price','item_quantity','new','on_allocation','on_progress','owner','owner_change','owner_change_imp','owner_receive','owner_receive_object','required_info_update','service'],'passport':['calculate_relies_result','destroy','freezen','guard_add','guard_clear','guard_table_item','has_impack_guard','new','new_v2','result','result_for_guard','result_for_permission','submission_get','submissions_get','verify','verify_guard'],'payment':['assert_count','create','for_object','from_object_set','from_object_set2','new','new_inner','new_singleton','new_singleton2','payment_info','payment_info2','payment_info2_with_guard','payment_info_imp','payment_info_with_guard','payment_signer','transfer_multi_imp','unwrap','unwrap_to_myself','unwrap_with_check'],'permission':['admin_add','admin_remove','admin_set','assert_admin','assert_owner','assert_permission','assert_permission_with_passport','assert_permission_with_sender','assert_with_passport','assert_with_sender','create','description_set','entity_add','entity_copy','entity_del','entity_remove','entity_replace','entity_set','entity_swap','has_permission','has_permission_idchecked','new','owner_receive','owner_receive_inner','owner_receive_object','perm_add','perm_remove','perm_set','remark_clear','remark_remove','remark_set','sender_has_permission','sender_has_permission_idcheck','transfer','um_none','um_set'],'progress':['context_repository_add','context_repository_add_imp','context_repository_add_with_passport','context_repository_clear','context_repository_clear_imp','context_repository_clear_with_passport','context_repository_remove','context_repository_remove_imp','context_repository_remove_with_passport','hold','hold_imp','hold_imp_with_passport','hold_with_passport','named','new','new_imp','new_with_passport','next','next_imp','next_with_passport','next_with_passport_imp','order_hold','order_hold_with_passport','order_next','order_next_with_passport','order_owner_set','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','session_accomplish','session_accomplish_imp','session_hold','task_set','task_set_imp','task_set_with_passport','unhold','unhold_with_passport'],'proof':['create_wowok_proof','create_wowok_proof_imp','create_wowok_proof_v2'],'registrar':['clear_favor','clear_vote','create','dislike','entity_cancel','entity_description_set','entity_info_add','entity_info_clear','entity_info_remove','entity_new','entity_register','entity_register_with_resource_forced','entity_resource_destroy','entity_resource_transfer','entity_resource_use','favor','find_vote','handle_vote','is_all_votes_cleared','is_dislike_set','is_favor_set','is_like_set','like','record','record_add','set_dislike','set_favor','set_like','toggle_dislike','toggle_favor','toggle_like','toggle_vote','vote_name'],'repository':['assert_id_from','data_add_imp','data_batch_imp','data_batch_remove_imp','data_remove_imp','data_remove_when_id_from_set','data_remove_when_id_from_set_with_passport','data_when_id_from_set','data_when_id_from_set_with_passport','description_set','description_set_imp','description_set_with_passport','gen_id','id_data','id_data_mixed_remove_with_passport','id_data_mixed_with_passport','id_data_remove','id_data_remove_with_passport','id_data_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','policy','policy_add','policy_add_imp','policy_add_with_passport','policy_by_name','policy_clear','policy_clear_imp','policy_clear_with_passport','policy_guard','policy_quote_guard_none','policy_quote_guard_set','policy_remove','policy_remove_imp','policy_remove_with_passport','policy_set','policy_set_imp','policy_set_with_passport','policy_write_guard_add','policy_write_guard_clear','policy_write_guard_has','policy_write_guard_set','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_remove','reward_remove_imp','reward_remove_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'resource':['add_object_tags','destroy','new','remove_object','remove_object_tags','switch','tag_set','tag_unset','transfer'],'reward':['claim','coin_add','coin_add_imp','coin_add_with_passport','create','description_set','description_set_imp','description_set_with_passport','guard_add','guard_add_imp','guard_add_with_passport','guard_entity_u64','guard_entity_u8','guard_expiration_time_add','guard_expiration_time_add_imp','guard_expiration_time_add_with_passport','guard_remove_expired','guard_remove_expired_imp','guard_remove_expired_with_passport','guard_signer_u64','guard_signer_u8','guard_u8_u64','guard_u8_u8','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','receive','receive_imp','receive_with_passport','reward_guard','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'service':['arb_statement','arb_statement_imp','arb_statement_with_passport','arbitration_add','arbitration_add_imp','arbitration_add_with_passport','arbitration_clear','arbitration_clear_imp','arbitration_clear_with_passport','arbitration_remove','arbitration_remove_imp','arbitration_remove_with_passport','assert_discount_type','assert_not_published','buy','buy_guard_none','buy_guard_none_imp','buy_guard_none_with_passport','buy_guard_set','buy_guard_set_imp','buy_guard_set_with_passport','buy_imp','buy_with_passport','compensation_claim','compensation_fund_add','compensation_fund_add_imp','compensation_fund_add_with_passport','compensation_fund_receive','compensation_fund_receive_with_passport','compensation_fund_withdraw','compensation_fund_withdraw_imp','compensation_fund_withdraw_with_passport','custom_required_info_set','custom_required_info_set_imp','custom_required_info_set_with_passport','description_set','description_set_imp','description_set_with_passport','discount','discount_destroy','discount_send','discount_send_singleton','discount_with_passport','discounts','location_set','location_set_imp','location_set_with_passport','machine_none','machine_none_imp','machine_none_with_passport','machine_set','machine_set_imp','machine_set_with_passport','new','new_imp','new_with_passport','order_allocation','order_allocators_set','order_allocators_set_imp','order_allocators_set_with_passport','order_progress','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','pause','pause_imp','pause_with_passport','permission_set','price_add','price_add_imp','price_add_with_passport','price_reduce','price_reduce_imp','price_reduce_with_passport','publish','publish_imp','publish_with_passport','quote','quote_discount_imp','quote_imp','quote_item','quote_with_discount','receive_imp','repository_add','repository_add_imp','repository_add_with_passport','repository_clear','repository_clear_imp','repository_clear_with_passport','repository_remove','repository_remove_imp','repository_remove_with_passport','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_remove','reward_remove_imp','reward_remove_with_passport','sale','sale_suspension','sale_suspension_imp','sale_suspension_with_passport','sales_add','sales_add_imp','sales_add_with_passport','sales_clear','sales_clear_imp','sales_clear_with_passport','sales_remove','sales_remove_imp','sales_remove_with_passport','sales_set','sales_set_imp','sales_set_with_passport','service_event_emit','setting_lock_duration_add','setting_lock_duration_add_imp','setting_lock_duration_add_with_passport','stock_add','stock_add_imp','stock_add_with_passport','stock_reduce','stock_reduce_imp','stock_reduce_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'treasury':['deposit','deposit2','deposit2_with_passport','deposit_imp','deposit_imp_','deposit_with_passport','description_set','description_set_imp','description_set_with_passport','external_deposit','external_deposit_guard_add','external_deposit_guard_add_imp','external_deposit_guard_add_with_passport','external_deposit_guard_clear','external_deposit_guard_clear_imp','external_deposit_guard_clear_with_passport','external_deposit_guard_remove','external_deposit_guard_remove_imp','external_deposit_guard_remove_with_passport','external_withdraw','external_withdraw_guard_add','external_withdraw_guard_add_imp','external_withdraw_guard_add_with_passport','external_withdraw_guard_clear','external_withdraw_guard_clear_imp','external_withdraw_guard_clear_with_passport','external_withdraw_guard_remove','external_withdraw_guard_remove_imp','external_withdraw_guard_remove_with_passport','join_coins','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','receive','receive_imp','receive_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport','withdraw','withdraw_imp','withdraw_with_passport']};export const MOVE_MODULE_NAMES=['allocation','arb','arbitration','common','contact','demand','entity_contact','entity_order','entity_permission','guard','machine','object_linker','order','parent_linked_table','parent_table','parent_table_vec','passport','payment','permission','progress','proof','registrar','repository','resource','reward','service','treasury','util'];export const MOVE_DISTINCTIVE_FN_NAMES=['add_object_tags','admin_add','admin_remove','admin_set','affiliation_change_core','affiliation_change_tx','affiliation_core','affiliation_tx','agent_set','agent_set_imp','allocator_add','arb_statement','arb_statement_imp','arb_statement_with_passport','arb_withdraw','arb_withdraw_with_passport','arbitration_add','arbitration_add_imp','arbitration_add_with_passport','arbitration_address','arbitration_clear','arbitration_clear_imp','arbitration_clear_with_passport','arbitration_event_emit','arbitration_imp','arbitration_remove','arbitration_remove_imp','arbitration_remove_with_passport','arbitration_with_passport','arbitrator_confirm','assert_admin','assert_allocation_mode','assert_allocators_not_empty','assert_count','assert_discount_type','assert_id_from','assert_not_claimed','assert_not_published','assert_op_permission','assert_owner','assert_permission','assert_permission_with_passport','assert_permission_with_sender','assert_published','assert_service_object_type','assert_submission_object_type','assert_valid_value','assert_with_passport','assert_with_sender','borrow_mut','buy_guard_none','buy_guard_none_imp','buy_guard_none_with_passport','buy_guard_set','buy_guard_set_imp','buy_guard_set_with_passport','buy_imp','buy_with_passport','calculate_relies_result','change_status','clear_favor','clear_vote','coin_add','coin_add_imp','coin_add_with_passport','compensation_claim','compensation_fund_add','compensation_fund_add_imp','compensation_fund_add_with_passport','compensation_fund_receive','compensation_fund_receive_with_passport','compensation_fund_withdraw','compensation_fund_withdraw_imp','compensation_fund_withdraw_with_passport','confirm_imp','confirm_with_passport','consensus_repositories_add','consensus_repositories_add_imp','consensus_repositories_add_with_passport','consensus_repositories_clear','consensus_repositories_clear_imp','consensus_repositories_clear_with_passport','consensus_repositories_remove','consensus_repositories_remove_imp','consensus_repositories_remove_with_passport','contact_add','contact_remove','contact_remove_imp','context_repository_add','context_repository_add_imp','context_repository_add_with_passport','context_repository_clear','context_repository_clear_imp','context_repository_clear_with_passport','context_repository_remove','context_repository_remove_imp','context_repository_remove_with_passport','create_imp','create_v2','create_wowok_proof','create_wowok_proof_imp','create_wowok_proof_v2','custom_required_info_set','custom_required_info_set_imp','custom_required_info_set_with_passport','data_add_imp','data_batch_imp','data_batch_remove_imp','data_remove_imp','data_remove_when_id_from_set','data_remove_when_id_from_set_with_passport','data_when_id_from_set','data_when_id_from_set_with_passport','de_address','de_address_compatible','de_number','de_u64','demand_changed_event_emit','deposit2_with_passport','deposit_imp','deposit_imp_','deposit_with_passport','description_change','description_set','description_set_imp','description_set_with_passport','disaffiliation_core','disaffiliation_tx','discount_destroy','discount_send','discount_send_singleton','discount_with_passport','dispute_with_passport','emit_arb_event','entity_add','entity_cancel','entity_copy','entity_del','entity_description_set','entity_info_add','entity_info_clear','entity_info_remove','entity_new','entity_register','entity_register_with_resource_forced','entity_remove','entity_replace','entity_resource_destroy','entity_resource_transfer','entity_resource_use','entity_set','entity_swap','external_deposit','external_deposit_guard_add','external_deposit_guard_add_imp','external_deposit_guard_add_with_passport','external_deposit_guard_clear','external_deposit_guard_clear_imp','external_deposit_guard_clear_with_passport','external_deposit_guard_remove','external_deposit_guard_remove_imp','external_deposit_guard_remove_with_passport','external_withdraw','external_withdraw_guard_add','external_withdraw_guard_add_imp','external_withdraw_guard_add_with_passport','external_withdraw_guard_clear','external_withdraw_guard_clear_imp','external_withdraw_guard_clear_with_passport','external_withdraw_guard_remove','external_withdraw_guard_remove_imp','external_withdraw_guard_remove_with_passport','fee_set','fee_set_imp','fee_set_with_passport','feed_back_imp','feedback_imp','feedback_with_passport','fees_alloc','fees_alloc_with_passport','fees_transfer','fees_transfer_imp','fees_transfer_with_passport','find_vote','for_object','forward_remove','forward_remove2','forward_with_guard','forwards_add','forwards_add_imp','forwards_add_with_passport','forwards_remove','forwards_remove_imp','forwards_remove_with_passport','from_object_set','from_object_set2','gen_id','get_submission_object_type','get_submission_value_type','guard_add','guard_add_imp','guard_add_with_passport','guard_clear','guard_clear_imp','guard_clear_with_passport','guard_entity_u64','guard_entity_u8','guard_expiration_time_add','guard_expiration_time_add_imp','guard_expiration_time_add_with_passport','guard_remove','guard_remove_expired','guard_remove_expired_imp','guard_remove_expired_with_passport','guard_remove_imp','guard_remove_with_passport','guard_signer_u64','guard_signer_u8','guard_table_item','guard_u8_u64','guard_u8_u8','handle_vote','has_identifier','has_impack_guard','has_op_permission','has_permission','has_permission_idchecked','has_submissions','hold_imp','hold_imp_with_passport','hold_with_passport','id_data','id_data_mixed_remove_with_passport','id_data_mixed_with_passport','id_data_remove','id_data_remove_with_passport','id_data_with_passport','im_add','im_add_imp','im_add_with_passport','im_clear','im_clear_imp','im_clear_with_passport','im_remove','im_remove_imp','im_remove_with_passport','info_borrow','init_node_name','is_all_votes_cleared','is_chiild_object_address_byte','is_child_object_address','is_depended','is_dislike_set','is_empty','is_favor_set','is_identifier_address','is_identifier_address_compatible','is_immutable','is_init_node_name','is_like_set','is_number_type','is_number_type2','is_object_address','is_object_address_byte','is_type_address_compatible','is_user_address','is_user_address_byte','is_valid_value','is_value_type','item_name','item_price','item_quantity','join_coins','location_set','location_set_imp','location_set_with_passport','machine_none','machine_none_imp','machine_none_with_passport','machine_set','machine_set_imp','machine_set_with_passport','make_submissions','new_imp','new_inner','new_singleton','new_singleton2','new_v2','new_with_balance','new_with_coin','new_with_passport','next_imp','next_with_passport','next_with_passport_imp','node_add','node_add2','node_add2_with_passport','node_add_imp','node_add_imp_','node_add_single','node_add_with_passport','node_clear','node_clear_imp','node_clear_with_passport','node_exchange_name','node_exchange_name_imp','node_exchange_name_with_passport','node_remove','node_remove2','node_remove2_with_passport','node_remove_imp','node_remove_imp_','node_remove_single','node_remove_with_passport','node_rename','node_rename_imp','node_rename_with_passport','nodepair_add','nodepair_exchange_name_imp','nodepair_remove','nodepair_remove2','nodepair_remove_imp','nodepair_rename_imp','nodepair_threshold_set','object_type_as_u8','object_type_from_u8','on_allocation','on_progress','on_progress_new','order_allocation','order_allocators_set','order_allocators_set_imp','order_allocators_set_with_passport','order_hold','order_hold_with_passport','order_next','order_next_with_passport','order_owner_set','order_progress','order_role_remove_imp','owner_change','owner_change_imp','owner_receive','owner_receive_imp','owner_receive_inner','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','parse_constant_data_modules','pause_imp','pause_with_passport','payment_info','payment_info2','payment_info2_with_guard','payment_info_imp','payment_info_with_guard','payment_signer','perm_add','perm_remove','perm_set','permission_id','permission_role_remove_imp','permission_set','permission_um_set','policy_add','policy_add_imp','policy_add_with_passport','policy_by_name','policy_clear','policy_clear_imp','policy_clear_with_passport','policy_guard','policy_quote_guard_none','policy_quote_guard_set','policy_remove','policy_remove_imp','policy_remove_with_passport','policy_set','policy_set_imp','policy_set_with_passport','policy_write_guard_add','policy_write_guard_clear','policy_write_guard_has','policy_write_guard_set','pop_back','pop_front','present_imp','present_service','present_service_with_passport','present_with_passport','present_with_passport_imp','prev_nodes_remove','prev_nodes_remove_imp','prev_nodes_remove_with_passport','price_add','price_add_imp','price_add_with_passport','price_reduce','price_reduce_imp','price_reduce_with_passport','principal_confirm','proposition_change','publish_imp','publish_with_passport','push_back','push_front','quote_discount_imp','quote_imp','quote_item','quote_with_discount','receive_imp','receive_with_passport','record_add','relies_add','relies_clear','relies_logic_and','relies_remove','remark_clear','remark_remove','remark_set','remove_object','remove_object_tags','repository_add','repository_add_imp','repository_add_with_passport','repository_clear','repository_clear_imp','repository_clear_with_passport','repository_remove','repository_remove_imp','repository_remove_with_passport','required_info_update','reset_imp','reset_with_passport','result_for_guard','result_for_permission','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_guard','reward_remove','reward_remove_imp','reward_remove_with_passport','role_add','role_admin','role_agent','role_entity','role_move','role_owner','role_remove','sale_suspension','sale_suspension_imp','sale_suspension_with_passport','sales_add','sales_add_imp','sales_add_with_passport','sales_clear','sales_clear_imp','sales_clear_with_passport','sales_remove','sales_remove_imp','sales_remove_with_passport','sales_set','sales_set_imp','sales_set_with_passport','sender_has_permission','sender_has_permission_idcheck','service_event_emit','session_accomplish','session_accomplish_imp','session_hold','set_dislike','set_favor','set_like','setting_lock_duration_add','setting_lock_duration_add_imp','setting_lock_duration_add_with_passport','sharing_for_address','sharing_for_guard_identifier','sharing_for_signer','sharing_imp','stock_add','stock_add_imp','stock_add_with_passport','stock_reduce','stock_reduce_imp','stock_reduce_with_passport','submission_get','submission_value','submissions_get','swap_remove','table_item','tag_set','tag_unset','task_set','task_set_imp','task_set_with_passport','threshold_get','threshold_set','toggle_dislike','toggle_favor','toggle_like','toggle_vote','transfer_multi_imp','truncate_utf8_chars','try_submission_value','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport','unhold_with_passport','unwrap_to_myself','unwrap_with_check','usage_guard_none','usage_guard_none_imp','usage_guard_none_with_passport','usage_guard_set','usage_guard_set_imp','usage_guard_set_with_passport','validate_guard_data','value_type_as_u8','value_type_from_u8','verify_guard','vote_imp','vote_imp_','vote_name','vote_with_passport','vote_with_voting_guard','voting_deadline_change','voting_deadline_change_imp','voting_deadline_change_with_passport','voting_guard_add_by_id_add_with_passport','voting_guard_add_imp','voting_guard_by_id_add','voting_guard_clear','voting_guard_clear_imp','voting_guard_clear_with_passport','voting_guard_fixed_add','voting_guard_fixed_add_with_passport','voting_guard_remove','voting_guard_remove_imp','voting_guard_remove_with_passport','withdraw_imp','withdraw_with_passport'];
1
+ export const MOVE_FUNCTIONS={'allocation':['alloc','allocator_add','allocators','assert_allocation_mode','assert_allocators_not_empty','create','new_with_balance','new_with_coin','receive','sharing_for_address','sharing_for_guard_identifier','sharing_for_signer','sharing_imp'],'arb':['arbitration','arbitration_address','arbitrator_confirm','assert_permission','description_change','emit_arb_event','feedback','finish','new','objection','principal_confirm','proposition','proposition_change','reset','statement','vote','voting_deadline_change','withdraw'],'arbitration':['arb_withdraw','arb_withdraw_with_passport','arbitration','arbitration_event_emit','arbitration_imp','arbitration_with_passport','compensate','confirm','confirm_imp','confirm_with_passport','description_set','description_set_imp','description_set_with_passport','dispute','dispute_with_passport','fee_set','fee_set_imp','fee_set_with_passport','feed_back_imp','feedback','feedback_with_passport','fees_alloc','fees_alloc_with_passport','fees_transfer','fees_transfer_imp','fees_transfer_with_passport','location_set','location_set_imp','location_set_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','pause','pause_imp','pause_with_passport','permission','permission_set','reset','reset_imp','reset_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport','usage_guard_none','usage_guard_none_imp','usage_guard_none_with_passport','usage_guard_set','usage_guard_set_imp','usage_guard_set_with_passport','vote','vote_imp','vote_imp_','vote_with_passport','vote_with_voting_guard','voting_deadline_change','voting_deadline_change_imp','voting_deadline_change_with_passport','voting_guard_add_by_id_add_with_passport','voting_guard_add_imp','voting_guard_by_id_add','voting_guard_clear','voting_guard_clear_imp','voting_guard_clear_with_passport','voting_guard_fixed_add','voting_guard_fixed_add_with_passport','voting_guard_remove','voting_guard_remove_imp','voting_guard_remove_with_passport','withdraw_imp'],'common':['assert_service_object_type','assert_valid_value','de_address','de_address_compatible','de_number','de_u64','is_number_type','is_number_type2','is_type_address_compatible','is_valid_value','is_value_type','object_type_as_u8','object_type_from_u8','truncate_utf8_chars','value_type_as_u8','value_type_from_u8'],'parent_linked_table':['back','borrow','borrow_mut','contains','front','is_empty','length','new','next','pop_back','pop_front','prev','push_back','push_front','remove'],'parent_table':['add','borrow','borrow_mut','contains','is_empty','length','new','remove'],'parent_table_vec':['borrow','borrow_mut','empty','is_empty','length','pop_back','push_back','singleton','swap','swap_remove'],'util':['is_chiild_object_address_byte','is_child_object_address','is_object_address','is_object_address_byte','is_user_address','is_user_address_byte'],'contact':['change_status','create','description_set','description_set_imp','description_set_with_passport','im_add','im_add_imp','im_add_with_passport','im_clear','im_clear_imp','im_clear_with_passport','im_remove','im_remove_imp','im_remove_with_passport','location_set','location_set_imp','location_set_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','permission_um_set'],'demand':['demand_changed_event_emit','description_set','description_set_imp','description_set_with_passport','feedback','feedback_imp','feedback_with_passport','guard_add','guard_add_imp','guard_add_with_passport','guard_clear','guard_clear_imp','guard_clear_with_passport','guard_remove','guard_remove_imp','guard_remove_with_passport','location_set','location_set_imp','location_set_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','present','present_imp','present_service','present_service_with_passport','present_with_passport','present_with_passport_imp','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_remove','reward_remove_imp','reward_remove_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'entity_contact':['contact_add','contact_remove','contact_remove_imp','create'],'entity_order':['create','order_role_remove_imp','role_add','role_agent','role_move','role_owner','role_remove'],'entity_permission':['create','permission_role_remove_imp','role_add','role_admin','role_entity','role_move','role_owner','role_remove'],'guard':['assert_submission_object_type','create','create_imp','create_v2','get_submission_object_type','get_submission_value_type','has_identifier','has_submissions','is_depended','is_identifier_address','is_identifier_address_compatible','is_immutable','make_submissions','new','parse_constant_data_modules','relies','relies_add','relies_clear','relies_logic_and','relies_remove','rep','submission','submission_value','table_item','try_submission_value','validate_guard_data'],'machine':['assert_not_published','assert_published','consensus_repositories_add','consensus_repositories_add_imp','consensus_repositories_add_with_passport','consensus_repositories_clear','consensus_repositories_clear_imp','consensus_repositories_clear_with_passport','consensus_repositories_remove','consensus_repositories_remove_imp','consensus_repositories_remove_with_passport','description_set','description_set_imp','description_set_with_passport','forward','forward_remove','forward_remove2','forward_with_guard','forwards_add','forwards_add_imp','forwards_add_with_passport','forwards_remove','forwards_remove_imp','forwards_remove_with_passport','info_borrow','init_node_name','is_init_node_name','new','new_imp','new_with_passport','node','node2','node3','node_add','node_add2','node_add2_with_passport','node_add_imp','node_add_imp_','node_add_single','node_add_with_passport','node_clear','node_clear_imp','node_clear_with_passport','node_exchange_name','node_exchange_name_imp','node_exchange_name_with_passport','node_remove','node_remove2','node_remove2_with_passport','node_remove_imp','node_remove_imp_','node_remove_single','node_remove_with_passport','node_rename','node_rename_imp','node_rename_with_passport','nodepair','nodepair2','nodepair3','nodepair_add','nodepair_exchange_name_imp','nodepair_remove','nodepair_remove2','nodepair_remove_imp','nodepair_rename_imp','nodepair_threshold_set','on_progress_new','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','pause','pause_imp','pause_with_passport','permission_id','permission_set','prev_nodes_remove','prev_nodes_remove_imp','prev_nodes_remove_with_passport','publish','publish_imp','publish_with_passport','threshold_get','threshold_set','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'object_linker':['affiliation_change_core','affiliation_change_tx','affiliation_core','affiliation_tx','create','disaffiliation_core','disaffiliation_tx'],'order':['agent_set','agent_set_imp','amount','assert_not_claimed','assert_op_permission','assert_owner','compensate','dispute','has_op_permission','item','item_name','item_price','item_quantity','new','on_allocation','on_progress','owner','owner_change','owner_change_imp','owner_receive','owner_receive_object','required_info_update','service'],'passport':['calculate_relies_result','destroy','failed_impack_guard','freezen','guard_add','guard_clear','guard_table_item','has_impack_guard','new','new_v2','result','result_for_guard','result_for_permission','submission_get','submission_try','submissions_get','verify','verify_guard'],'payment':['assert_count','create','for_object','from_object_set','from_object_set2','new','new_inner','new_singleton','new_singleton2','payment_info','payment_info2','payment_info2_with_guard','payment_info_imp','payment_info_with_guard','payment_signer','transfer_multi_imp','unwrap','unwrap_to_myself','unwrap_with_check'],'permission':['admin_add','admin_remove','admin_set','assert_admin','assert_owner','assert_permission','assert_permission_with_passport','assert_permission_with_sender','assert_with_passport','assert_with_sender','create','description_set','entity_add','entity_copy','entity_del','entity_remove','entity_replace','entity_set','entity_swap','has_permission','has_permission_idchecked','new','owner_receive','owner_receive_inner','owner_receive_object','perm_add','perm_remove','perm_set','remark_clear','remark_remove','remark_set','sender_has_permission','sender_has_permission_idcheck','transfer','um_none','um_set'],'progress':['context_repository_add','context_repository_add_imp','context_repository_add_with_passport','context_repository_clear','context_repository_clear_imp','context_repository_clear_with_passport','context_repository_remove','context_repository_remove_imp','context_repository_remove_with_passport','hold','hold_imp','hold_imp_with_passport','hold_with_passport','named','new','new_imp','new_with_passport','next','next_imp','next_with_passport','next_with_passport_imp','order_hold','order_hold_with_passport','order_next','order_next_with_passport','order_owner_set','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','session_accomplish','session_accomplish_imp','session_hold','task_set','task_set_imp','task_set_with_passport','unhold','unhold_with_passport'],'proof':['create_wowok_proof','create_wowok_proof_imp','create_wowok_proof_v2'],'registrar':['clear_favor','clear_vote','create','dislike','entity_cancel','entity_description_set','entity_info_add','entity_info_clear','entity_info_remove','entity_new','entity_register','entity_register_with_resource_forced','entity_resource_destroy','entity_resource_transfer','entity_resource_use','favor','find_vote','handle_vote','is_all_votes_cleared','is_dislike_set','is_favor_set','is_like_set','like','record','record_add','set_dislike','set_favor','set_like','toggle_dislike','toggle_favor','toggle_like','toggle_vote','vote_name'],'repository':['assert_id_from','data_add_imp','data_batch_imp','data_batch_remove_imp','data_remove_imp','data_remove_when_id_from_set','data_remove_when_id_from_set_with_passport','data_when_id_from_set','data_when_id_from_set_with_passport','description_set','description_set_imp','description_set_with_passport','gen_id','id_data','id_data_mixed_remove_with_passport','id_data_mixed_with_passport','id_data_remove','id_data_remove_with_passport','id_data_with_passport','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','policy','policy_add','policy_add_imp','policy_add_with_passport','policy_by_name','policy_clear','policy_clear_imp','policy_clear_with_passport','policy_guard','policy_quote_guard_none','policy_quote_guard_set','policy_remove','policy_remove_imp','policy_remove_with_passport','policy_set','policy_set_imp','policy_set_with_passport','policy_write_guard_add','policy_write_guard_clear','policy_write_guard_has','policy_write_guard_set','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_remove','reward_remove_imp','reward_remove_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'resource':['add_object_tags','destroy','new','remove_object','remove_object_tags','switch','tag_set','tag_unset','transfer'],'reward':['claim','coin_add','coin_add_imp','coin_add_with_passport','create','description_set','description_set_imp','description_set_with_passport','guard_add','guard_add_imp','guard_add_with_passport','guard_entity_u64','guard_entity_u8','guard_expiration_time_add','guard_expiration_time_add_imp','guard_expiration_time_add_with_passport','guard_remove_expired','guard_remove_expired_imp','guard_remove_expired_with_passport','guard_signer_u64','guard_signer_u8','guard_u8_u64','guard_u8_u8','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','receive','receive_imp','receive_with_passport','reward_guard','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'service':['apply_discount','arb_statement','arb_statement_imp','arb_statement_with_passport','arbitration_add','arbitration_add_imp','arbitration_add_with_passport','arbitration_clear','arbitration_clear_imp','arbitration_clear_with_passport','arbitration_remove','arbitration_remove_imp','arbitration_remove_with_passport','assert_discount_type','assert_not_published','buy','buy2','buy2_imp','buy2_with_passport','buy_guard_none','buy_guard_none_imp','buy_guard_none_with_passport','buy_guard_set','buy_guard_set_imp','buy_guard_set_with_passport','buy_with_passport','compensation_claim','compensation_fund_add','compensation_fund_add_imp','compensation_fund_add_with_passport','compensation_fund_receive','compensation_fund_receive_with_passport','compensation_fund_withdraw','compensation_fund_withdraw_imp','compensation_fund_withdraw_with_passport','custom_required_info_set','custom_required_info_set_imp','custom_required_info_set_with_passport','decrement_stock','description_set','description_set_imp','description_set_with_passport','discount','discount_destroy','discount_send','discount_send_singleton','discount_with_passport','discounts','location_set','location_set_imp','location_set_with_passport','machine_none','machine_none_imp','machine_none_with_passport','machine_set','machine_set_imp','machine_set_with_passport','new','new_imp','new_with_passport','order_allocation','order_allocators_set','order_allocators_set_imp','order_allocators_set_with_passport','order_progress','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','pause','pause_imp','pause_with_passport','permission_set','price_add','price_add_imp','price_add_with_passport','price_reduce','price_reduce_imp','price_reduce_with_passport','publish','publish_imp','publish_with_passport','quote','quote2','quote2_with_discount','quote_calc','quote_item','quote_with_discount','receive_imp','repository_add','repository_add_imp','repository_add_with_passport','repository_clear','repository_clear_imp','repository_clear_with_passport','repository_remove','repository_remove_imp','repository_remove_with_passport','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_remove','reward_remove_imp','reward_remove_with_passport','sale','sale_suspension','sale_suspension_imp','sale_suspension_with_passport','sales_add','sales_add_imp','sales_add_with_passport','sales_clear','sales_clear_imp','sales_clear_with_passport','sales_remove','sales_remove_imp','sales_remove_with_passport','sales_set','sales_set_imp','sales_set_with_passport','service_event_emit','setting_lock_duration_add','setting_lock_duration_add_imp','setting_lock_duration_add_with_passport','stock_add','stock_add_imp','stock_add_with_passport','stock_reduce','stock_reduce_imp','stock_reduce_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport'],'treasury':['deposit','deposit2','deposit2_with_passport','deposit_imp','deposit_imp_','deposit_with_passport','description_set','description_set_imp','description_set_with_passport','external_deposit','external_deposit_guard_add','external_deposit_guard_add_imp','external_deposit_guard_add_with_passport','external_deposit_guard_clear','external_deposit_guard_clear_imp','external_deposit_guard_clear_with_passport','external_deposit_guard_remove','external_deposit_guard_remove_imp','external_deposit_guard_remove_with_passport','external_withdraw','external_withdraw_guard_add','external_withdraw_guard_add_imp','external_withdraw_guard_add_with_passport','external_withdraw_guard_clear','external_withdraw_guard_clear_imp','external_withdraw_guard_clear_with_passport','external_withdraw_guard_remove','external_withdraw_guard_remove_imp','external_withdraw_guard_remove_with_passport','join_coins','new','new_imp','new_with_passport','owner_receive','owner_receive_imp','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','permission_set','receive','receive_imp','receive_with_passport','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport','withdraw','withdraw_imp','withdraw_with_passport']};export const MOVE_MODULE_NAMES=['allocation','arb','arbitration','common','contact','demand','entity_contact','entity_order','entity_permission','guard','machine','object_linker','order','parent_linked_table','parent_table','parent_table_vec','passport','payment','permission','progress','proof','registrar','repository','resource','reward','service','treasury','util'];export const MOVE_DISTINCTIVE_FN_NAMES=['add_object_tags','admin_add','admin_remove','admin_set','affiliation_change_core','affiliation_change_tx','affiliation_core','affiliation_tx','agent_set','agent_set_imp','allocator_add','apply_discount','arb_statement','arb_statement_imp','arb_statement_with_passport','arb_withdraw','arb_withdraw_with_passport','arbitration_add','arbitration_add_imp','arbitration_add_with_passport','arbitration_address','arbitration_clear','arbitration_clear_imp','arbitration_clear_with_passport','arbitration_event_emit','arbitration_imp','arbitration_remove','arbitration_remove_imp','arbitration_remove_with_passport','arbitration_with_passport','arbitrator_confirm','assert_admin','assert_allocation_mode','assert_allocators_not_empty','assert_count','assert_discount_type','assert_id_from','assert_not_claimed','assert_not_published','assert_op_permission','assert_owner','assert_permission','assert_permission_with_passport','assert_permission_with_sender','assert_published','assert_service_object_type','assert_submission_object_type','assert_valid_value','assert_with_passport','assert_with_sender','borrow_mut','buy2_imp','buy2_with_passport','buy_guard_none','buy_guard_none_imp','buy_guard_none_with_passport','buy_guard_set','buy_guard_set_imp','buy_guard_set_with_passport','buy_with_passport','calculate_relies_result','change_status','clear_favor','clear_vote','coin_add','coin_add_imp','coin_add_with_passport','compensation_claim','compensation_fund_add','compensation_fund_add_imp','compensation_fund_add_with_passport','compensation_fund_receive','compensation_fund_receive_with_passport','compensation_fund_withdraw','compensation_fund_withdraw_imp','compensation_fund_withdraw_with_passport','confirm_imp','confirm_with_passport','consensus_repositories_add','consensus_repositories_add_imp','consensus_repositories_add_with_passport','consensus_repositories_clear','consensus_repositories_clear_imp','consensus_repositories_clear_with_passport','consensus_repositories_remove','consensus_repositories_remove_imp','consensus_repositories_remove_with_passport','contact_add','contact_remove','contact_remove_imp','context_repository_add','context_repository_add_imp','context_repository_add_with_passport','context_repository_clear','context_repository_clear_imp','context_repository_clear_with_passport','context_repository_remove','context_repository_remove_imp','context_repository_remove_with_passport','create_imp','create_v2','create_wowok_proof','create_wowok_proof_imp','create_wowok_proof_v2','custom_required_info_set','custom_required_info_set_imp','custom_required_info_set_with_passport','data_add_imp','data_batch_imp','data_batch_remove_imp','data_remove_imp','data_remove_when_id_from_set','data_remove_when_id_from_set_with_passport','data_when_id_from_set','data_when_id_from_set_with_passport','de_address','de_address_compatible','de_number','de_u64','decrement_stock','demand_changed_event_emit','deposit2_with_passport','deposit_imp','deposit_imp_','deposit_with_passport','description_change','description_set','description_set_imp','description_set_with_passport','disaffiliation_core','disaffiliation_tx','discount_destroy','discount_send','discount_send_singleton','discount_with_passport','dispute_with_passport','emit_arb_event','entity_add','entity_cancel','entity_copy','entity_del','entity_description_set','entity_info_add','entity_info_clear','entity_info_remove','entity_new','entity_register','entity_register_with_resource_forced','entity_remove','entity_replace','entity_resource_destroy','entity_resource_transfer','entity_resource_use','entity_set','entity_swap','external_deposit','external_deposit_guard_add','external_deposit_guard_add_imp','external_deposit_guard_add_with_passport','external_deposit_guard_clear','external_deposit_guard_clear_imp','external_deposit_guard_clear_with_passport','external_deposit_guard_remove','external_deposit_guard_remove_imp','external_deposit_guard_remove_with_passport','external_withdraw','external_withdraw_guard_add','external_withdraw_guard_add_imp','external_withdraw_guard_add_with_passport','external_withdraw_guard_clear','external_withdraw_guard_clear_imp','external_withdraw_guard_clear_with_passport','external_withdraw_guard_remove','external_withdraw_guard_remove_imp','external_withdraw_guard_remove_with_passport','failed_impack_guard','fee_set','fee_set_imp','fee_set_with_passport','feed_back_imp','feedback_imp','feedback_with_passport','fees_alloc','fees_alloc_with_passport','fees_transfer','fees_transfer_imp','fees_transfer_with_passport','find_vote','for_object','forward_remove','forward_remove2','forward_with_guard','forwards_add','forwards_add_imp','forwards_add_with_passport','forwards_remove','forwards_remove_imp','forwards_remove_with_passport','from_object_set','from_object_set2','gen_id','get_submission_object_type','get_submission_value_type','guard_add','guard_add_imp','guard_add_with_passport','guard_clear','guard_clear_imp','guard_clear_with_passport','guard_entity_u64','guard_entity_u8','guard_expiration_time_add','guard_expiration_time_add_imp','guard_expiration_time_add_with_passport','guard_remove','guard_remove_expired','guard_remove_expired_imp','guard_remove_expired_with_passport','guard_remove_imp','guard_remove_with_passport','guard_signer_u64','guard_signer_u8','guard_table_item','guard_u8_u64','guard_u8_u8','handle_vote','has_identifier','has_impack_guard','has_op_permission','has_permission','has_permission_idchecked','has_submissions','hold_imp','hold_imp_with_passport','hold_with_passport','id_data','id_data_mixed_remove_with_passport','id_data_mixed_with_passport','id_data_remove','id_data_remove_with_passport','id_data_with_passport','im_add','im_add_imp','im_add_with_passport','im_clear','im_clear_imp','im_clear_with_passport','im_remove','im_remove_imp','im_remove_with_passport','info_borrow','init_node_name','is_all_votes_cleared','is_chiild_object_address_byte','is_child_object_address','is_depended','is_dislike_set','is_empty','is_favor_set','is_identifier_address','is_identifier_address_compatible','is_immutable','is_init_node_name','is_like_set','is_number_type','is_number_type2','is_object_address','is_object_address_byte','is_type_address_compatible','is_user_address','is_user_address_byte','is_valid_value','is_value_type','item_name','item_price','item_quantity','join_coins','location_set','location_set_imp','location_set_with_passport','machine_none','machine_none_imp','machine_none_with_passport','machine_set','machine_set_imp','machine_set_with_passport','make_submissions','new_imp','new_inner','new_singleton','new_singleton2','new_v2','new_with_balance','new_with_coin','new_with_passport','next_imp','next_with_passport','next_with_passport_imp','node_add','node_add2','node_add2_with_passport','node_add_imp','node_add_imp_','node_add_single','node_add_with_passport','node_clear','node_clear_imp','node_clear_with_passport','node_exchange_name','node_exchange_name_imp','node_exchange_name_with_passport','node_remove','node_remove2','node_remove2_with_passport','node_remove_imp','node_remove_imp_','node_remove_single','node_remove_with_passport','node_rename','node_rename_imp','node_rename_with_passport','nodepair_add','nodepair_exchange_name_imp','nodepair_remove','nodepair_remove2','nodepair_remove_imp','nodepair_rename_imp','nodepair_threshold_set','object_type_as_u8','object_type_from_u8','on_allocation','on_progress','on_progress_new','order_allocation','order_allocators_set','order_allocators_set_imp','order_allocators_set_with_passport','order_hold','order_hold_with_passport','order_next','order_next_with_passport','order_owner_set','order_progress','order_role_remove_imp','owner_change','owner_change_imp','owner_receive','owner_receive_imp','owner_receive_inner','owner_receive_object','owner_receive_object_imp','owner_receive_object_with_passport','owner_receive_with_passport','parse_constant_data_modules','pause_imp','pause_with_passport','payment_info','payment_info2','payment_info2_with_guard','payment_info_imp','payment_info_with_guard','payment_signer','perm_add','perm_remove','perm_set','permission_id','permission_role_remove_imp','permission_set','permission_um_set','policy_add','policy_add_imp','policy_add_with_passport','policy_by_name','policy_clear','policy_clear_imp','policy_clear_with_passport','policy_guard','policy_quote_guard_none','policy_quote_guard_set','policy_remove','policy_remove_imp','policy_remove_with_passport','policy_set','policy_set_imp','policy_set_with_passport','policy_write_guard_add','policy_write_guard_clear','policy_write_guard_has','policy_write_guard_set','pop_back','pop_front','present_imp','present_service','present_service_with_passport','present_with_passport','present_with_passport_imp','prev_nodes_remove','prev_nodes_remove_imp','prev_nodes_remove_with_passport','price_add','price_add_imp','price_add_with_passport','price_reduce','price_reduce_imp','price_reduce_with_passport','principal_confirm','proposition_change','publish_imp','publish_with_passport','push_back','push_front','quote2_with_discount','quote_calc','quote_item','quote_with_discount','receive_imp','receive_with_passport','record_add','relies_add','relies_clear','relies_logic_and','relies_remove','remark_clear','remark_remove','remark_set','remove_object','remove_object_tags','repository_add','repository_add_imp','repository_add_with_passport','repository_clear','repository_clear_imp','repository_clear_with_passport','repository_remove','repository_remove_imp','repository_remove_with_passport','required_info_update','reset_imp','reset_with_passport','result_for_guard','result_for_permission','reward_add','reward_add_imp','reward_add_with_passport','reward_clear','reward_clear_imp','reward_clear_with_passport','reward_guard','reward_remove','reward_remove_imp','reward_remove_with_passport','role_add','role_admin','role_agent','role_entity','role_move','role_owner','role_remove','sale_suspension','sale_suspension_imp','sale_suspension_with_passport','sales_add','sales_add_imp','sales_add_with_passport','sales_clear','sales_clear_imp','sales_clear_with_passport','sales_remove','sales_remove_imp','sales_remove_with_passport','sales_set','sales_set_imp','sales_set_with_passport','sender_has_permission','sender_has_permission_idcheck','service_event_emit','session_accomplish','session_accomplish_imp','session_hold','set_dislike','set_favor','set_like','setting_lock_duration_add','setting_lock_duration_add_imp','setting_lock_duration_add_with_passport','sharing_for_address','sharing_for_guard_identifier','sharing_for_signer','sharing_imp','stock_add','stock_add_imp','stock_add_with_passport','stock_reduce','stock_reduce_imp','stock_reduce_with_passport','submission_get','submission_try','submission_value','submissions_get','swap_remove','table_item','tag_set','tag_unset','task_set','task_set_imp','task_set_with_passport','threshold_get','threshold_set','toggle_dislike','toggle_favor','toggle_like','toggle_vote','transfer_multi_imp','truncate_utf8_chars','try_submission_value','um_none','um_none_imp','um_none_with_passport','um_set','um_set_imp','um_set_with_passport','unhold_with_passport','unwrap_to_myself','unwrap_with_check','usage_guard_none','usage_guard_none_imp','usage_guard_none_with_passport','usage_guard_set','usage_guard_set_imp','usage_guard_set_with_passport','validate_guard_data','value_type_as_u8','value_type_from_u8','verify_guard','vote_imp','vote_imp_','vote_name','vote_with_passport','vote_with_voting_guard','voting_deadline_change','voting_deadline_change_imp','voting_deadline_change_with_passport','voting_guard_add_by_id_add_with_passport','voting_guard_add_imp','voting_guard_by_id_add','voting_guard_clear','voting_guard_clear_imp','voting_guard_clear_with_passport','voting_guard_fixed_add','voting_guard_fixed_add_with_passport','voting_guard_remove','voting_guard_remove_imp','voting_guard_remove_with_passport','withdraw_imp','withdraw_with_passport'];
@@ -1 +1 @@
1
- import{handleIndustryPackOperation}from'../handlers/industry-pack.js';import{handleBenchmarkMigrationOperation}from'../handlers/benchmark-migration.js';import{handleStrategyReviewOperation}from'../handlers/strategy-review.js';import{handleWorkspaceOperation}from'../handlers/workspace.js';import{handleWorkflowOperation}from'../handlers/workflow.js';import{handlePermissionOperation}from'../handlers/permission.js';import{createToolMeta,IndustryPackOperationInputSchema,IndustryPackOperationOutputSchema,BenchmarkMigrationSchema,BenchmarkMigrationOutputSchema,StrategyReviewOperationInputSchema,StrategyReviewOperationOutputSchema,WorkspaceOperationInputSchema,WorkspaceOperationOutputSchema,WorkflowOperationInputSchema,WorkflowOperationOutputSchema,PermissionOperationInputSchema,PermissionOperationOutputSchema}from'../../schema/index.js';export const BUSINESS_TOOLS=[{'name':'industry_pack_operation','handler':handleIndustryPackOperation,'config':{'title':'🧩\x20Industry\x20Pack\x20-\x20Knowledge\x20Template\x20Orchestration','summary':'Industry\x20knowledge\x20packs:\x20scaffold,\x20register,\x20list,\x20reset\x20templates.','description':'Manage\x20industry\x20knowledge\x20packs\x20(distributable,\x20registrable,\x20versionable\x20units\x20carrying\x20'+'one\x20industry\x27s\x20object-shape,\x20matching\x20rules,\x20and\x20role\x20personae).\x0a\x0a'+'Pack\x20layout\x20(merged\x20v2):\x20pack.json\x20(settings\x20only\x20—\x20manifest\x20+\x20match\x20+\x20personae\x20+\x20'+'dispute/compliance/supply/rules\x20sections;\x20field\x20explanations\x20live\x20in\x20the\x20industry-root\x20'+'README.md)\x20and\x20playbook.md\x20(chaptered\x20AI\x20prompt\x20guide).\x20Legacy\x20split-file\x20layouts\x20'+'(manifest.json/match.json/personae)\x20are\x20still\x20read\x20for\x20backward\x20compatibility.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20scaffold\x20—\x20generate\x20a\x20pack\x20template\x20skeleton\x20(pack.json\x20+\x20playbook.md,\x20settings\x20only)\x20'+'into\x20the\x20industry\x20directory;\x20the\x20user\x20fills\x20in\x20the\x20content.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20currently\x20registered\x20packs.\x0a'+'\x20\x20•\x20scan\x20—\x20scan\x20+\x20register\x20every\x20pack\x20under\x20the\x20default\x20industry\x20directory.\x0a'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20industry\x20root\x20directory.\x0a'+'\x20\x20•\x20list_files\x20—\x20list\x20files\x20under\x20the\x20industry\x20directory.\x0a'+'\x20\x20•\x20read_file\x20—\x20read\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20write_file\x20—\x20write\x20content\x20to\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20+\x20content\x20required).\x0a'+'\x20\x20•\x20get\x20—\x20return\x20registered\x20layer\x20data\x20for\x20an\x20industry\x20(name\x20required;\x20dispute/compliance/supply/rules/playbook).\x0a'+'\x20\x20•\x20diff\x20—\x20compare\x20registered\x20vs\x20on-disk\x20manifest\x20version/layers\x20(name\x20required).\x0a'+'\x20\x20•\x20reset\x20—\x20restore\x20a\x20file\x20or\x20entire\x20pack\x20folder\x20to\x20its\x20pristine\x20annotated\x20template\x20(path\x20required).\x0a'+'\x20\x20•\x20delete_file\x20—\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20/\x20rename\x20—\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20recommend_industry\x20—\x20business\x20intent\x20text\x20→\x20top-3\x20similar\x20industry\x20modes\x20(trait\x20similarity;\x20optional\x20strategy\x20statements\x20re-rank\x20by\x20lever\x20alignment).\x0a'+'\x20\x20•\x20list_modes\x20—\x20list\x20builtin\x20+\x20caller\x27s\x20custom\x20industry\x20modes.\x0a'+'\x20\x20•\x20derive_user_mode\x20—\x20derive\x20(and\x20register)\x20a\x20custom\x20mode\x20from\x20a\x20builtin\x20mode.\x0a'+'\x20\x20•\x20evolve_user_mode\x20—\x20iterate\x20an\x20existing\x20custom\x20mode\x20(version-bumped\x20evolution\x20history).\x0a'+'\x20\x20•\x20register_user_mode\x20—\x20register\x20a\x20fully\x20custom\x20mode\x20(machine_shape\x20+\x20key_risk\x20required).\x0a'+'\x20\x20•\x20unregister_user_mode\x20—\x20delete\x20a\x20custom\x20mode\x20(owner\x20only).\x0a'+'\x20\x20•\x20register_custom_metric\x20—\x20register\x20a\x20global\x20custom\x20evaluation\x20metric\x20(risk/benefit;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_metric\x20—\x20delete\x20a\x20custom\x20metric\x20(custom\x20only;\x20builtin\x20metrics\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20register_custom_constraint\x20—\x20register\x20a\x20custom\x20mode\x20constraint\x20(4\x20rule\x20types;\x20hard/soft;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_constraint\x20—\x20delete\x20a\x20custom\x20constraint\x20(custom\x20only;\x20builtin\x20constraints\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20list_metrics_constraints\x20—\x20list\x20metrics\x20+\x20constraints\x20(filterable\x20by\x20type/scope).\x0a\x0a'+'Local\x20filesystem\x20+\x20in-memory\x20registry\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27industry_pack_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':IndustryPackOperationInputSchema,'outputSchema':IndustryPackOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('industry_pack',['industry','pack','mode','match','persona','scaffold','template'])}},{'name':'benchmark_migration_operation','handler':handleBenchmarkMigrationOperation,'config':{'title':'🏆\x20Template\x20Migration\x20-\x20Industry\x20Templates\x20&\x20Competitor\x20Migration','summary':'MD\x20industry-archetype\x20templates\x20(hot-loaded,\x2012\x20built-ins)\x20+\x20pre-deploy\x20risk\x20scan\x20+\x20one-click\x20competitor\x20migration.','description':'Industry-archetype\x20MD\x20templates\x20and\x20one-click\x20competitor\x20migration\x20(V2\x20MD-template\x20architecture).\x20'+'Templates\x20live\x20in\x20`.wowok/industry/<industry>/templates/<variant>.md`\x20(the\x20client\x27s\x20industry\x20drawer\x20tree\x20—\x20hot-loaded,\x20zod-validated\x20frontmatter;\x20'+'12\x20built-in\x20archetypes\x20—\x206\x20industries\x20x\x20leader\x20+\x20challenger\x20—\x20are\x20seeded\x20idempotently\x20and\x20never\x20'+'overwritten).\x20Each\x20template\x20is\x20a\x20ScenarioMode-compatible\x20build\x20shape\x20(machine_shape\x20/\x20guards\x20/\x20'+'allocator)\x20plus\x20fee\x20parameters\x20and\x20R1-R10\x20trust\x20mechanisms.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20template_list\x20—\x20list\x20the\x20loaded\x20MD\x20templates\x20(optional\x20industry\x20filter);\x20load\x20errors\x20are\x20'+'reported,\x20never\x20silently\x20dropped.\x0a'+'\x20\x20•\x20template_get\x20—\x20fetch\x20one\x20template\x20by\x20template_id\x20(full\x20machine_shape/guards/allocator/'+'fee_params/trust_mechanisms/body).\x0a'+'\x20\x20•\x20template_generate\x20—\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20description\x20optional\x20as\x20the\x20intent\x20'+'text;\x20fee_overrides\x20optional;\x20never\x20executes\x20on-chain).\x0a'+'\x20\x20•\x20template_scan\x20—\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required):\x20synthetic\x20draft\x20'+'topology\x20through\x20the\x20same\x20rule\x20surface\x20as\x20on-chain\x20analyze\x20+\x20static\x20R1-R10\x20checks;\x20returns\x20'+'risk_level/findings/red_flags;\x20CRITICAL\x20blocks\x20generation/apply.\x0a'+'\x20\x20•\x20migration_import\x20—\x20competitor\x20URL/description\x20→\x20structured\x20MigrationLog:\x20mapped\x20/\x20'+'unmapped\x20/\x20manual_review\x20entries,\x20WoWok\x20advantages,\x20customizable\x20modules,\x20role\x20assessment\x20'+'and\x20a\x20dry-run\x20risk\x20check\x20(description\x20required;\x20url\x20recorded\x20as\x20provenance\x20only;\x20default\x20'+'network\x20testnet).\x0a'+'\x20\x20•\x20migration_review\x20—\x20surface\x20a\x20prior\x20MigrationLog\x20with\x20counts\x20+\x20risk\x20status\x20for\x20user\x20'+'confirmation\x20(log\x20required).\x0a'+'\x20\x20•\x20migration_apply\x20—\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20creation\x20plan\x20only\x20—\x20never\x20executes\x20'+'on-chain;\x20default\x20network\x20testnet,\x20mainnet\x20requires\x20explicit\x20user\x20confirmation).\x0a\x0a'+'Deterministic\x20knowledge\x20lookups\x20+\x20planning;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27benchmark_migration_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':BenchmarkMigrationSchema,'outputSchema':BenchmarkMigrationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('benchmark_migration',['template','migration','competitor','industry','leader','challenger','scan','risk'])}},{'name':'strategy_review_operation','handler':handleStrategyReviewOperation,'config':{'title':'📈\x20Strategy\x20Review\x20-\x20Posture-Weighted\x20Scorecard\x20&\x20Periodic\x20Review','summary':'Collect\x20on-chain/derived\x20evidence\x20for\x20an\x20(account,\x20industry),\x20snapshot\x20it\x20locally,\x20and\x20assemble\x20posture-weighted\x20strategy\x20reviews\x20with\x20current-layer\x20persona\x20proposals.','description':'Evidence-driven\x20operating\x20review\x20for\x20one\x20merchant\x20account\x20in\x20one\x20industry,\x20built\x20on\x20the\x20six-industry\x20'+'strategy\x20catalog\x20(education/rental/freelance/subscription/travel/retail\x20+\x20pack-registered\x20ids).\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20collect\x20—\x20gather\x20fresh\x20evidence\x20(journey\x20funnel,\x20order\x20flow,\x20market\x20metrics,\x20service\x20discovery\x20/\x20'+'competitor\x20count,\x20arbitration\x20trust,\x20account\x20attention),\x20persist\x20ONE\x20append-only\x20snapshot\x20in\x20local\x20'+'SQLite\x20KV,\x20and\x20return\x20the\x20raw\x20collection.\x20Failed\x20evidence\x20sources\x20degrade\x20single\x20metrics\x20to\x20'+'unavailable/error\x20—\x20never\x20zero-filled;\x20storage\x20failure\x20is\x20fail-soft\x20and\x20never\x20loses\x20the\x20collection.\x0a'+'\x20\x20•\x20review\x20—\x20gather\x20fresh\x20evidence\x20WITHOUT\x20persisting,\x20diff\x20against\x20the\x20latest\x20stored\x20snapshot,\x20'+'score\x200–100\x20under\x20the\x20persona\x27s\x20merchant\x20posture\x20(volume/balanced/margin,\x20renormalized\x20over\x20'+'available\x20anchored\x20metrics),\x20and\x20return\x20findings,\x20deterministic\x20pricing/posture\x20recommendations,\x20'+'cadence\x20status\x20and\x20at\x20most\x20two\x20persona\x20proposals.\x20Proposals\x20target\x20the\x20CURRENT\x20layer\x20ONLY\x20and\x20are\x20'+'applied\x20only\x20when\x20the\x20user\x20explicitly\x20calls\x20persona_operation\x20apply\x20—\x20this\x20tool\x20never\x20writes\x20the\x20'+'persona\x20and\x20never\x20mutates\x20chain\x20state.\x0a'+'\x20\x20•\x20list_snapshots\x20—\x20list\x20stored\x20snapshot\x20summaries\x20(oldest-first)\x20for\x20account+industry.\x0a\x0a'+'Posture\x20defaults:\x20explicit\x20`posture`\x20arg\x20→\x20merchant\x20posture\x20in\x20the\x20effective\x20persona\x20→\x20\x27balanced\x27.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27strategy_review_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':StrategyReviewOperationInputSchema,'outputSchema':StrategyReviewOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('strategy',['strategy','scorecard','review','posture','metrics','industry','competitor','retention','dispute'])},'timeoutMs':0x1d4c0},{'name':'workspace_operation','handler':handleWorkspaceOperation,'config':{'title':'📁\x20Workspace\x20-\x20File\x20Generation\x20&\x20User\x20Data','summary':'Local\x20workspace\x20files:\x20list,\x20read,\x20search,\x20glob,\x20edit,\x20write,\x20move,\x20copy,\x20delete.','description':'Manage\x20the\x20local\x20workspace\x20directory\x20(`.wowok/workspace`):\x20files\x20generated\x20for\x20review\x20'+'(machine/guard/wts/wip\x20JSON)\x20and\x20user-created\x20documents.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20workspace\x20root\x20directory.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20files\x20under\x20the\x20workspace.\x0a'+'\x20\x20•\x20read\x20—\x20read\x20a\x20file\x27s\x20content\x20(use\x20as\x20AI\x20context);\x20optional\x20offset/limit\x20line\x20slicing\x20'+'(1-based\x20offset,\x20max\x202000\x20lines)\x20and\x20encoding=\x27base64\x27\x20for\x20raw\x20bytes\x20(≤10MB).\x0a'+'\x20\x20•\x20search\x20—\x20regex\x20content\x20search\x20across\x20workspace\x20files\x20(pattern\x20required;\x20optional\x20path\x20scope,\x20'+'glob\x20basename\x20filter,\x20ignore_case,\x20max_results\x20≤200,\x20context_lines\x20≤5).\x20Skips\x20binary/large\x20files.\x0a'+'\x20\x20•\x20glob\x20—\x20list\x20files\x20whose\x20workspace-relative\x20path\x20matches\x20a\x20wildcard\x20pattern\x20(\x27**\x27\x20spans\x20'+'directories,\x20\x27*\x27\x20stays\x20within\x20one\x20segment,\x20\x27?\x27\x20=\x20one\x20char,\x20\x27{a,b}\x27\x20alternation).\x0a'+'\x20\x20•\x20edit\x20—\x20exact\x20string\x20replacement\x20inside\x20a\x20file\x20(path\x20+\x20old_string\x20+\x20new_string\x20required;\x20'+'errors\x20when\x20old_string\x20is\x20not\x20unique\x20unless\x20replace_all=true;\x20files\x20≤2MB).\x0a'+'\x20\x20•\x20write\x20—\x20write/overwrite\x20a\x20file\x20(path\x20+\x20content).\x0a'+'\x20\x20•\x20delete\x20—\x20delete\x20a\x20file.\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20—\x20move\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20rename\x20—\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a\x0a'+'Local\x20filesystem\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workspace_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkspaceOperationInputSchema,'outputSchema':WorkspaceOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('workspace',['workspace','file','document','machine','guard','wts','wip','context'])}},{'name':'workflow_operation','handler':handleWorkflowOperation,'config':{'title':'🔀\x20Workflow\x20-\x20Local-Account\x20Progress\x20Tasks','summary':'List\x20local-account\x20progress\x20(actionable\x20+\x20related/history)\x20+\x20advance/hold/unhold\x20forwards\x20+\x20view\x20progress\x20history.','description':'Local-account\x20workflow\x20view\x20over\x20on-chain\x20Progress\x20objects.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20progress\x20related\x20to\x20local\x20accounts:\x20actionable\x20first\x20(a\x20'+'local\x20account\x20can\x20advance\x20a\x20forward),\x20plus\x20related\x20/\x20completed\x20progress\x20(order\x20'+'holder,\x20named\x20operator,\x20or\x20session\x20operator\x20involvement)\x20so\x20the\x20user\x20always\x20'+'keeps\x20visibility\x20of\x20their\x20own\x20progress\x20history.\x20Each\x20task\x20carries\x20every\x20'+'reachable\x20next\x20node\x20+\x20forward,\x20the\x20local\x20accounts\x20that\x20can\x20execute\x20each\x20'+'forward\x20(order\x20holder\x20/\x20named\x20operator\x20/\x20permission\x20index,\x20including\x20admin),\x20'+'guard\x20reminders\x20(a\x20forward\x20with\x20a\x20guard\x20must\x20be\x20verified\x20via\x20passport),\x20and\x20'+'the\x20on-chain\x20history_count.\x0a'+'\x20\x20•\x20operate\x20—\x20advance\x20(\x27next\x27)\x20/\x20block\x20(\x27hold\x27)\x20/\x20release\x20(\x27unhold\x27)\x20/\x20force-release\x20'+'(\x27adminUnhold\x27)\x20a\x20forward\x20as\x20a\x20chosen\x20local\x20account\x20(env.account).\x20Delegates\x20to\x20the\x20'+'on-chain\x20progress\x20operation\x20(guard-aware).\x0a'+'\x20\x20•\x20history\x20—\x20incrementally\x20sync\x20a\x20progress\x27s\x20ON-CHAIN\x20history\x20(Progress.history\x20'+'append-only\x20u64\x20index)\x20into\x20the\x20local\x20SQLite\x20mirror\x20via\x20a\x20per-progress\x20cursor\x20'+'(only\x20NEW\x20records\x20are\x20pulled),\x20then\x20return\x20the\x20migration\x20timeline\x20(newest\x20first)\x20'+'with\x20each\x20migration\x27s\x20session\x20snapshot\x20(forwards\x20/\x20operator\x20address\x20/\x20weight\x20/\x20time).\x20'+'Also\x20runs\x20a\x2090-day\x20retention\x20cleanup\x20of\x20stale\x20progress\x20histories\x20by\x20default.\x0a\x0a'+'Permission\x20model\x20(chain-authoritative):\x20a\x20forward\x20is\x20executable\x20by\x20an\x20account\x20when\x20'+'(a)\x20namedOperator=\x22\x22\x20and\x20the\x20account\x20is\x20the\x20order\x20holder\x20(order\x20builder\x20or\x20agent),\x20'+'or\x20(b)\x20namedOperator=name\x20and\x20the\x20account\x20is\x20in\x20progress.namedOperator[name],\x20or\x20'+'(c)\x20permissionIndex\x20is\x20set\x20and\x20the\x20account\x20is\x20in\x20permission.admin\x20or\x20permission.table.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workflow_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkflowOperationInputSchema,'outputSchema':WorkflowOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('workflow',['workflow','progress','forward','permission','named-operator','guard','advance','hold'])},'timeoutMs':0x1d4c0},{'name':'permission_operation','handler':handlePermissionOperation,'config':{'title':'🛡️\x20Permissions\x20-\x20Local-Account\x20Overview','summary':'List\x20Permissions\x20related\x20to\x20local\x20accounts\x20with\x20related\x20accounts/objects.','description':'Local-account\x20Permission\x20overview.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20every\x20on-chain\x20Permission\x20object\x20related\x20to\x20at\x20least\x20one\x20LOCAL\x20'+'account\x20(reverse-looked-up\x20via\x20the\x20global\x20entity_permission\x20index\x20@0xaad),\x20deduplicated\x20'+'and\x20merged.\x20Each\x20row\x20includes\x20description,\x20owner,\x20latest\x20on-chain\x20update\x20time,\x20related\x20'+'accounts\x20(owner/admin/entity),\x20and\x20related\x20objects\x20(grouped\x20by\x20type\x20via\x20the\x20registrar\x20'+'linker).\x20Pass\x20`permission`\x20to\x20scope\x20the\x20listing\x20to\x20ONE\x20Permission\x20address\x20—\x20fast\x20path\x20'+'(metadata\x20+\x20local-account\x20roles\x20only;\x20skips\x20the\x20per-permission\x20linker/tx-time\x20fan-out)\x20'+'for\x20detail-page\x20Permission\x20rows.\x0a\x0a'+'Read-only\x20(no\x20on-chain\x20mutation).\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27permission_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':PermissionOperationInputSchema,'outputSchema':PermissionOperationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('query',['permission','account','role','owner','admin','entity','overview','registrar','reverse-index'])}}];
1
+ import{handleIndustryPackOperation}from'../handlers/industry-pack.js';import{handleBenchmarkMigrationOperation}from'../handlers/benchmark-migration.js';import{handleStrategyReviewOperation}from'../handlers/strategy-review.js';import{handleWorkspaceOperation}from'../handlers/workspace.js';import{handleWorkflowOperation}from'../handlers/workflow.js';import{handlePermissionOperation}from'../handlers/permission.js';import{createToolMeta,IndustryPackOperationInputSchema,IndustryPackOperationOutputSchema,BenchmarkMigrationSchema,BenchmarkMigrationOutputSchema,StrategyReviewOperationInputSchema,StrategyReviewOperationOutputSchema,WorkspaceOperationInputSchema,WorkspaceOperationOutputSchema,WorkflowOperationInputSchema,WorkflowOperationOutputSchema,PermissionOperationInputSchema,PermissionOperationOutputSchema}from'../../schema/index.js';export const BUSINESS_TOOLS=[{'name':'industry_pack_operation','handler':handleIndustryPackOperation,'config':{'title':'🧩\x20Industry\x20Pack\x20-\x20Knowledge\x20Template\x20Orchestration','summary':'Industry\x20knowledge\x20packs:\x20scaffold,\x20register,\x20list,\x20reset\x20templates.','description':'Manage\x20industry\x20knowledge\x20packs\x20(distributable,\x20registrable,\x20versionable\x20units\x20carrying\x20'+'one\x20industry\x27s\x20object-shape,\x20matching\x20rules,\x20and\x20role\x20personae).\x0a\x0a'+'Pack\x20layout\x20(merged\x20v2):\x20pack.json\x20(settings\x20only\x20—\x20manifest\x20+\x20match\x20+\x20personae\x20+\x20'+'dispute/compliance/supply/rules\x20sections;\x20field\x20explanations\x20live\x20in\x20the\x20industry-root\x20'+'README.md)\x20and\x20playbook.md\x20(chaptered\x20AI\x20prompt\x20guide).\x20Legacy\x20split-file\x20layouts\x20'+'(manifest.json/match.json/personae)\x20are\x20still\x20read\x20for\x20backward\x20compatibility.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20scaffold\x20—\x20generate\x20a\x20pack\x20template\x20skeleton\x20(pack.json\x20+\x20playbook.md,\x20settings\x20only)\x20'+'into\x20the\x20industry\x20directory;\x20the\x20user\x20fills\x20in\x20the\x20content.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20currently\x20registered\x20packs.\x0a'+'\x20\x20•\x20scan\x20—\x20scan\x20+\x20register\x20every\x20pack\x20under\x20the\x20default\x20industry\x20directory.\x0a'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20industry\x20root\x20directory.\x0a'+'\x20\x20•\x20list_files\x20—\x20list\x20files\x20under\x20the\x20industry\x20directory.\x0a'+'\x20\x20•\x20read_file\x20—\x20read\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20write_file\x20—\x20write\x20content\x20to\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20+\x20content\x20required).\x0a'+'\x20\x20•\x20get\x20—\x20return\x20registered\x20layer\x20data\x20for\x20an\x20industry\x20(name\x20required;\x20dispute/compliance/supply/rules/playbook).\x0a'+'\x20\x20•\x20diff\x20—\x20compare\x20registered\x20vs\x20on-disk\x20manifest\x20version/layers\x20(name\x20required).\x0a'+'\x20\x20•\x20reset\x20—\x20restore\x20a\x20file\x20or\x20entire\x20pack\x20folder\x20to\x20its\x20pristine\x20annotated\x20template\x20(path\x20required).\x0a'+'\x20\x20•\x20delete_file\x20—\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20/\x20rename\x20—\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20recommend_industry\x20—\x20business\x20intent\x20text\x20→\x20top-3\x20similar\x20industry\x20modes\x20(trait\x20similarity;\x20optional\x20strategy\x20statements\x20re-rank\x20by\x20lever\x20alignment).\x0a'+'\x20\x20•\x20list_modes\x20—\x20list\x20builtin\x20+\x20caller\x27s\x20custom\x20industry\x20modes.\x0a'+'\x20\x20•\x20derive_user_mode\x20—\x20derive\x20(and\x20register)\x20a\x20custom\x20mode\x20from\x20a\x20builtin\x20mode.\x0a'+'\x20\x20•\x20evolve_user_mode\x20—\x20iterate\x20an\x20existing\x20custom\x20mode\x20(version-bumped\x20evolution\x20history).\x0a'+'\x20\x20•\x20register_user_mode\x20—\x20register\x20a\x20fully\x20custom\x20mode\x20(machine_shape\x20+\x20key_risk\x20required).\x0a'+'\x20\x20•\x20unregister_user_mode\x20—\x20delete\x20a\x20custom\x20mode\x20(owner\x20only).\x0a'+'\x20\x20•\x20register_custom_metric\x20—\x20register\x20a\x20global\x20custom\x20evaluation\x20metric\x20(risk/benefit;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_metric\x20—\x20delete\x20a\x20custom\x20metric\x20(custom\x20only;\x20builtin\x20metrics\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20register_custom_constraint\x20—\x20register\x20a\x20custom\x20mode\x20constraint\x20(4\x20rule\x20types;\x20hard/soft;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_constraint\x20—\x20delete\x20a\x20custom\x20constraint\x20(custom\x20only;\x20builtin\x20constraints\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20list_metrics_constraints\x20—\x20list\x20metrics\x20+\x20constraints\x20(filterable\x20by\x20type/scope).\x0a\x0a'+'Local\x20filesystem\x20+\x20in-memory\x20registry\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27industry_pack_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':IndustryPackOperationInputSchema,'outputSchema':IndustryPackOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('industry_pack',['industry','pack','mode','match','persona','scaffold','template'])}},{'name':'benchmark_migration_operation','handler':handleBenchmarkMigrationOperation,'config':{'title':'🏆\x20Template\x20Migration\x20-\x20Industry\x20Templates\x20&\x20Competitor\x20Migration','summary':'MD\x20industry-archetype\x20templates\x20(hot-loaded,\x2012\x20built-ins)\x20+\x20pre-deploy\x20risk\x20scan\x20+\x20one-click\x20competitor\x20migration.','description':'Industry-archetype\x20MD\x20templates\x20and\x20one-click\x20competitor\x20migration\x20(V2\x20MD-template\x20architecture).\x20'+'Templates\x20live\x20in\x20`.wowok/industry/<industry>/templates/<variant>.md`\x20(the\x20client\x27s\x20industry\x20drawer\x20tree\x20—\x20hot-loaded,\x20zod-validated\x20frontmatter;\x20'+'12\x20built-in\x20archetypes\x20—\x206\x20industries\x20x\x20leader\x20+\x20challenger\x20—\x20are\x20seeded\x20idempotently\x20and\x20never\x20'+'overwritten).\x20Each\x20template\x20is\x20a\x20ScenarioMode-compatible\x20build\x20shape\x20(machine_shape\x20/\x20guards\x20/\x20'+'allocator)\x20plus\x20fee\x20parameters\x20and\x20R1-R10\x20trust\x20mechanisms.\x0a\x0a'+'Product\x20tagging:\x20every\x20built-in\x20carries\x20a\x20`product_ref`\x20benchmark\x20slug\x20(e.g.\x20retail/scale-marketplace\x20→\x20'+'\x27amazon\x27,\x20travel/global-ota\x20→\x20\x27booking-com\x27).\x20This\x20is\x20the\x20ONLY\x20sanctioned\x20company\x20name\x20—\x20it\x20lets\x20a\x20user\x20'+'pick\x20a\x20template\x20by\x20naming\x20the\x20incumbent\x20product\x20they\x20want\x20to\x20migrate\x20from.\x20When\x20the\x20user\x20names\x20a\x20product,\x20'+'call\x20template_list\x20and\x20match\x20on\x20product_ref,\x20then\x20template_generate/migration_apply\x20with\x20that\x20template_id.\x0a\x0a'+'Three\x20build\x20modes\x20(choose\x20from\x20the\x20user\x27s\x20intent):\x0a'+'\x20\x20•\x20template-driven\x20—\x20pick\x20the\x20closest\x20product_ref/industry\x20template,\x20adopt\x20it\x20as-is\x20(template_generate).\x0a'+'\x20\x20•\x20template\x20+\x20partial\x20customization\x20—\x20start\x20from\x20a\x20template,\x20then\x20override\x20fee_params\x20(fee_overrides)\x20or\x20'+'edit\x20the\x20MD\x20file\x20via\x20industry_pack_operation\x20write_file\x20before\x20generating.\x0a'+'\x20\x20•\x20fully\x20custom\x20—\x20skip\x20templates;\x20drive\x20the\x20merchant-guide\x20pipeline\x20from\x20a\x20free-text\x20description.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20template_list\x20—\x20list\x20the\x20loaded\x20MD\x20templates\x20(optional\x20industry\x20filter;\x20rows\x20carry\x20product_ref);\x20load\x20errors\x20are\x20'+'reported,\x20never\x20silently\x20dropped.\x0a'+'\x20\x20•\x20template_get\x20—\x20fetch\x20one\x20template\x20by\x20template_id\x20(full\x20machine_shape/guards/allocator/'+'fee_params/trust_mechanisms/body).\x0a'+'\x20\x20•\x20template_generate\x20—\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20description\x20optional\x20as\x20the\x20intent\x20'+'text;\x20fee_overrides\x20optional;\x20never\x20executes\x20on-chain).\x0a'+'\x20\x20•\x20template_scan\x20—\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required):\x20synthetic\x20draft\x20'+'topology\x20through\x20the\x20same\x20rule\x20surface\x20as\x20on-chain\x20analyze\x20+\x20static\x20R1-R10\x20checks;\x20returns\x20'+'risk_level/findings/red_flags;\x20CRITICAL\x20blocks\x20generation/apply.\x0a'+'\x20\x20•\x20migration_import\x20—\x20competitor\x20URL/description\x20→\x20structured\x20MigrationLog:\x20mapped\x20/\x20'+'unmapped\x20/\x20manual_review\x20entries,\x20WoWok\x20advantages,\x20customizable\x20modules,\x20role\x20assessment\x20'+'and\x20a\x20dry-run\x20risk\x20check\x20(description\x20required;\x20url\x20recorded\x20as\x20provenance\x20only;\x20default\x20'+'network\x20testnet).\x0a'+'\x20\x20•\x20migration_review\x20—\x20surface\x20a\x20prior\x20MigrationLog\x20with\x20counts\x20+\x20risk\x20status\x20for\x20user\x20'+'confirmation\x20(log\x20required).\x0a'+'\x20\x20•\x20migration_apply\x20—\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20creation\x20plan\x20only\x20—\x20never\x20executes\x20'+'on-chain;\x20default\x20network\x20testnet,\x20mainnet\x20requires\x20explicit\x20user\x20confirmation).\x0a\x0a'+'Deterministic\x20knowledge\x20lookups\x20+\x20planning;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27benchmark_migration_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':BenchmarkMigrationSchema,'outputSchema':BenchmarkMigrationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('benchmark_migration',['template','migration','competitor','industry','leader','challenger','scan','risk'])}},{'name':'strategy_review_operation','handler':handleStrategyReviewOperation,'config':{'title':'📈\x20Strategy\x20Review\x20-\x20Posture-Weighted\x20Scorecard\x20&\x20Periodic\x20Review','summary':'Collect\x20on-chain/derived\x20evidence\x20for\x20an\x20(account,\x20industry),\x20snapshot\x20it\x20locally,\x20and\x20assemble\x20posture-weighted\x20strategy\x20reviews\x20with\x20current-layer\x20persona\x20proposals.','description':'Evidence-driven\x20operating\x20review\x20for\x20one\x20merchant\x20account\x20in\x20one\x20industry,\x20built\x20on\x20the\x20six-industry\x20'+'strategy\x20catalog\x20(education/rental/freelance/subscription/travel/retail\x20+\x20pack-registered\x20ids).\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20collect\x20—\x20gather\x20fresh\x20evidence\x20(journey\x20funnel,\x20order\x20flow,\x20market\x20metrics,\x20service\x20discovery\x20/\x20'+'competitor\x20count,\x20arbitration\x20trust,\x20account\x20attention),\x20persist\x20ONE\x20append-only\x20snapshot\x20in\x20local\x20'+'SQLite\x20KV,\x20and\x20return\x20the\x20raw\x20collection.\x20Failed\x20evidence\x20sources\x20degrade\x20single\x20metrics\x20to\x20'+'unavailable/error\x20—\x20never\x20zero-filled;\x20storage\x20failure\x20is\x20fail-soft\x20and\x20never\x20loses\x20the\x20collection.\x0a'+'\x20\x20•\x20review\x20—\x20gather\x20fresh\x20evidence\x20WITHOUT\x20persisting,\x20diff\x20against\x20the\x20latest\x20stored\x20snapshot,\x20'+'score\x200–100\x20under\x20the\x20persona\x27s\x20merchant\x20posture\x20(volume/balanced/margin,\x20renormalized\x20over\x20'+'available\x20anchored\x20metrics),\x20and\x20return\x20findings,\x20deterministic\x20pricing/posture\x20recommendations,\x20'+'cadence\x20status\x20and\x20at\x20most\x20two\x20persona\x20proposals.\x20Proposals\x20target\x20the\x20CURRENT\x20layer\x20ONLY\x20and\x20are\x20'+'applied\x20only\x20when\x20the\x20user\x20explicitly\x20calls\x20persona_operation\x20apply\x20—\x20this\x20tool\x20never\x20writes\x20the\x20'+'persona\x20and\x20never\x20mutates\x20chain\x20state.\x0a'+'\x20\x20•\x20list_snapshots\x20—\x20list\x20stored\x20snapshot\x20summaries\x20(oldest-first)\x20for\x20account+industry.\x0a\x0a'+'Posture\x20defaults:\x20explicit\x20`posture`\x20arg\x20→\x20merchant\x20posture\x20in\x20the\x20effective\x20persona\x20→\x20\x27balanced\x27.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27strategy_review_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':StrategyReviewOperationInputSchema,'outputSchema':StrategyReviewOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('strategy',['strategy','scorecard','review','posture','metrics','industry','competitor','retention','dispute'])},'timeoutMs':0x1d4c0},{'name':'workspace_operation','handler':handleWorkspaceOperation,'config':{'title':'📁\x20Workspace\x20-\x20File\x20Generation\x20&\x20User\x20Data','summary':'Local\x20workspace\x20files:\x20list,\x20read,\x20search,\x20glob,\x20edit,\x20write,\x20move,\x20copy,\x20delete.','description':'Manage\x20the\x20local\x20workspace\x20directory\x20(`.wowok/workspace`):\x20files\x20generated\x20for\x20review\x20'+'(machine/guard/wts/wip\x20JSON)\x20and\x20user-created\x20documents.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20workspace\x20root\x20directory.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20files\x20under\x20the\x20workspace.\x0a'+'\x20\x20•\x20read\x20—\x20read\x20a\x20file\x27s\x20content\x20(use\x20as\x20AI\x20context);\x20optional\x20offset/limit\x20line\x20slicing\x20'+'(1-based\x20offset,\x20max\x202000\x20lines)\x20and\x20encoding=\x27base64\x27\x20for\x20raw\x20bytes\x20(≤10MB).\x0a'+'\x20\x20•\x20search\x20—\x20regex\x20content\x20search\x20across\x20workspace\x20files\x20(pattern\x20required;\x20optional\x20path\x20scope,\x20'+'glob\x20basename\x20filter,\x20ignore_case,\x20max_results\x20≤200,\x20context_lines\x20≤5).\x20Skips\x20binary/large\x20files.\x0a'+'\x20\x20•\x20glob\x20—\x20list\x20files\x20whose\x20workspace-relative\x20path\x20matches\x20a\x20wildcard\x20pattern\x20(\x27**\x27\x20spans\x20'+'directories,\x20\x27*\x27\x20stays\x20within\x20one\x20segment,\x20\x27?\x27\x20=\x20one\x20char,\x20\x27{a,b}\x27\x20alternation).\x0a'+'\x20\x20•\x20edit\x20—\x20exact\x20string\x20replacement\x20inside\x20a\x20file\x20(path\x20+\x20old_string\x20+\x20new_string\x20required;\x20'+'errors\x20when\x20old_string\x20is\x20not\x20unique\x20unless\x20replace_all=true;\x20files\x20≤2MB).\x0a'+'\x20\x20•\x20write\x20—\x20write/overwrite\x20a\x20file\x20(path\x20+\x20content).\x0a'+'\x20\x20•\x20delete\x20—\x20delete\x20a\x20file.\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20—\x20move\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20rename\x20—\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a\x0a'+'Local\x20filesystem\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workspace_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkspaceOperationInputSchema,'outputSchema':WorkspaceOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('workspace',['workspace','file','document','machine','guard','wts','wip','context'])}},{'name':'workflow_operation','handler':handleWorkflowOperation,'config':{'title':'🔀\x20Workflow\x20-\x20Local-Account\x20Progress\x20Tasks','summary':'List\x20local-account\x20progress\x20(actionable\x20+\x20related/history)\x20+\x20advance/hold/unhold\x20forwards\x20+\x20view\x20progress\x20history.','description':'Local-account\x20workflow\x20view\x20over\x20on-chain\x20Progress\x20objects.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20progress\x20related\x20to\x20local\x20accounts:\x20actionable\x20first\x20(a\x20'+'local\x20account\x20can\x20advance\x20a\x20forward),\x20plus\x20related\x20/\x20completed\x20progress\x20(order\x20'+'holder,\x20named\x20operator,\x20or\x20session\x20operator\x20involvement)\x20so\x20the\x20user\x20always\x20'+'keeps\x20visibility\x20of\x20their\x20own\x20progress\x20history.\x20Each\x20task\x20carries\x20every\x20'+'reachable\x20next\x20node\x20+\x20forward,\x20the\x20local\x20accounts\x20that\x20can\x20execute\x20each\x20'+'forward\x20(order\x20holder\x20/\x20named\x20operator\x20/\x20permission\x20index,\x20including\x20admin),\x20'+'guard\x20reminders\x20(a\x20forward\x20with\x20a\x20guard\x20must\x20be\x20verified\x20via\x20passport),\x20and\x20'+'the\x20on-chain\x20history_count.\x0a'+'\x20\x20•\x20operate\x20—\x20advance\x20(\x27next\x27)\x20/\x20block\x20(\x27hold\x27)\x20/\x20release\x20(\x27unhold\x27)\x20/\x20force-release\x20'+'(\x27adminUnhold\x27)\x20a\x20forward\x20as\x20a\x20chosen\x20local\x20account\x20(env.account).\x20Delegates\x20to\x20the\x20'+'on-chain\x20progress\x20operation\x20(guard-aware).\x0a'+'\x20\x20•\x20history\x20—\x20incrementally\x20sync\x20a\x20progress\x27s\x20ON-CHAIN\x20history\x20(Progress.history\x20'+'append-only\x20u64\x20index)\x20into\x20the\x20local\x20SQLite\x20mirror\x20via\x20a\x20per-progress\x20cursor\x20'+'(only\x20NEW\x20records\x20are\x20pulled),\x20then\x20return\x20the\x20migration\x20timeline\x20(newest\x20first)\x20'+'with\x20each\x20migration\x27s\x20session\x20snapshot\x20(forwards\x20/\x20operator\x20address\x20/\x20weight\x20/\x20time).\x20'+'Also\x20runs\x20a\x2090-day\x20retention\x20cleanup\x20of\x20stale\x20progress\x20histories\x20by\x20default.\x0a\x0a'+'Permission\x20model\x20(chain-authoritative):\x20a\x20forward\x20is\x20executable\x20by\x20an\x20account\x20when\x20'+'(a)\x20namedOperator=\x22\x22\x20and\x20the\x20account\x20is\x20the\x20order\x20holder\x20(order\x20builder\x20or\x20agent),\x20'+'or\x20(b)\x20namedOperator=name\x20and\x20the\x20account\x20is\x20in\x20progress.namedOperator[name],\x20or\x20'+'(c)\x20permissionIndex\x20is\x20set\x20and\x20the\x20account\x20is\x20in\x20permission.admin\x20or\x20permission.table.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workflow_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkflowOperationInputSchema,'outputSchema':WorkflowOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('workflow',['workflow','progress','forward','permission','named-operator','guard','advance','hold'])},'timeoutMs':0x1d4c0},{'name':'permission_operation','handler':handlePermissionOperation,'config':{'title':'🛡️\x20Permissions\x20-\x20Local-Account\x20Overview','summary':'List\x20Permissions\x20related\x20to\x20local\x20accounts\x20with\x20related\x20accounts/objects.','description':'Local-account\x20Permission\x20overview.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20every\x20on-chain\x20Permission\x20object\x20related\x20to\x20at\x20least\x20one\x20LOCAL\x20'+'account\x20(reverse-looked-up\x20via\x20the\x20global\x20entity_permission\x20index\x20@0xaad),\x20deduplicated\x20'+'and\x20merged.\x20Each\x20row\x20includes\x20description,\x20owner,\x20latest\x20on-chain\x20update\x20time,\x20related\x20'+'accounts\x20(owner/admin/entity),\x20and\x20related\x20objects\x20(grouped\x20by\x20type\x20via\x20the\x20registrar\x20'+'linker).\x20Pass\x20`permission`\x20to\x20scope\x20the\x20listing\x20to\x20ONE\x20Permission\x20address\x20—\x20fast\x20path\x20'+'(metadata\x20+\x20local-account\x20roles\x20only;\x20skips\x20the\x20per-permission\x20linker/tx-time\x20fan-out)\x20'+'for\x20detail-page\x20Permission\x20rows.\x0a\x0a'+'Read-only\x20(no\x20on-chain\x20mutation).\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27permission_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':PermissionOperationInputSchema,'outputSchema':PermissionOperationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('query',['permission','account','role','owner','admin','entity','overview','registrar','reverse-index'])}}];
@@ -1 +1 @@
1
- import{handleAccountOperation,handleMarkOperation,handleInfoOperation,handleHistoryOperation}from'../handlers/local.js';import{statusErrorShape}from'../wrap.js';import{createToolMeta,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,AccountOperationOutputWrappedSchema,LocalMarkOperationOutputWrappedSchema,LocalInfoOperationOutputWrappedSchema,LocalHistoryOperationOutputWrappedSchema}from'../../schema/index.js';export const LOCAL_TOOLS=[{'name':'account_operation','handler':handleAccountOperation,'config':{'title':'Account\x20-\x20Wallet\x20Management\x20&\x20On-Chain\x20Coin\x20Transactions','summary':'Wallet\x20management\x20(local)\x20+\x20token\x20transfer\x20and\x20coin-object\x20production\x20(on-chain,\x20confirmed).','description':'Manage\x20WoWok\x20accounts\x20locally:\x20generate,\x20suspend,\x20resume,\x20faucet-test,\x20sign\x20data,\x20etc.\x0a\x0a💰\x20ON-CHAIN\x20COIN\x20TRANSACTIONS\x20(IRREVERSIBLE,\x20confirmed):\x20`transfer`\x20moves\x20tokens\x20to\x20another\x20account\x20(fund\x20movement);\x20`get`\x20splits/merges\x20the\x20account\x27s\x20coins\x20to\x20produce\x20a\x20coin\x20object\x20carrying\x20at\x20least\x20the\x20required\x20balance\x20and\x20self-delivers\x20it\x20to\x20the\x20same\x20account\x20(fund\x20never\x20leaves\x20the\x20account\x20minus\x20gas,\x20but\x20a\x20real\x20transaction\x20IS\x20executed\x20and\x20SPENDS\x20GAS,\x20and\x20its\x20digest\x20is\x20returned).\x20Both\x20amounts\x20accept\x20display\x20format\x20with\x20symbol\x20(\x222.5WOW\x22)\x20—\x20converted\x20with\x20the\x20token\x27s\x20decimals\x20—\x20or\x20raw\x20smallest-unit\x20integers;\x20bare\x20decimals\x20are\x20rejected.\x20The\x20first\x20call\x20returns\x20a\x20pending_confirmation\x20preview\x20(amount,\x20token\x20full\x20type,\x20counterparty/account);\x20re-call\x20with\x20transfer.confirmed=true\x20or\x20get.confirmed=true\x20after\x20user\x20consent\x20to\x20execute.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27account_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':AccountOperationSchema,'outputSchema':AccountOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['account','local','private','wallet','transfer','fund'])},'errorShapeBuilder':statusErrorShape,'timeoutMs':0x1d4c0},{'name':'local_mark_operation','handler':handleMarkOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalMark\x20-\x20Address\x20Book\x20Management','summary':'LOCAL\x20address\x20book\x20(name/tag\x20for\x20addresses\x20and\x20object\x20IDs).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20ID\x20names\x20and\x20tags\x20stored\x20ONLY\x20on\x20your\x20local\x20device\x20for\x20easy\x20identification\x20of\x20user\x20address\x20or\x20object\x20IDs\x20by\x20name.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_mark_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalMarkOperationSchema,'outputSchema':LocalMarkOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['mark','local','private','address-book','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_info_operation','handler':handleInfoOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalInfo\x20-\x20Private\x20Data\x20Management','summary':'LOCAL\x20private\x20data\x20(delivery\x20addresses,\x20phone\x20numbers).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20sensitive\x20personal\x20information\x20stored\x20ONLY\x20on\x20your\x20device:\x20delivery\x20addresses,\x20phone\x20numbers,\x20contacts.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_info_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalInfoOperationSchema,'outputSchema':LocalInfoOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['info','local','private','data-management','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_history_operation','handler':handleHistoryOperation,'config':{'title':'🕘\x20LOCAL\x20ONLY:\x20LocalHistory\x20-\x20Explorer\x20Visit\x20History','summary':'LOCAL\x20visit\x20history\x20of\x20Explorer\x20objects\x20(recently\x20viewed,\x20newest\x20first).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20the\x20Explorer\x20visit\x20history\x20stored\x20ONLY\x20on\x20your\x20device.\x20Each\x20entry\x20keeps\x20the\x20stable\x20object\x20key,\x20canonical\x200x\x20address,\x20object\x20type\x20tag\x20(detail\x20visits\x20only),\x20network\x20and\x20visit\x20timestamp\x20—\x20display\x20names\x20are\x20NEVER\x20stored\x20and\x20are\x20resolved\x20live\x20at\x20render\x20time.\x0a\x0aOmit\x20every\x20operation\x20field\x20to\x20LIST\x20history\x20(newest\x20first,\x20auto-pruned\x20to\x20the\x20last\x2030\x20recorded\x20days\x20/\x20300\x20entries).\x20Use\x20{add:{op:\x27add\x27,data:[...]}}\x20to\x20record\x20visits\x20(upsert\x20by\x20key),\x20{remove:{op:\x27remove\x27,keys:[...]}}\x20to\x20delete\x20entries,\x20or\x20{clear:{op:\x27clear\x27}}\x20to\x20erase\x20all\x20history.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_history_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalHistoryOperationSchema,'outputSchema':LocalHistoryOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['history','local','private','recent','off-chain'])},'errorShapeBuilder':statusErrorShape}];
1
+ import{handleAccountOperation,handleMarkOperation,handleInfoOperation,handleHistoryOperation,handleCacheOperation}from'../handlers/local.js';import{statusErrorShape}from'../wrap.js';import{createToolMeta,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,LocalCacheOperationSchema,AccountOperationOutputWrappedSchema,LocalMarkOperationOutputWrappedSchema,LocalInfoOperationOutputWrappedSchema,LocalHistoryOperationOutputWrappedSchema,LocalCacheOperationOutputWrappedSchema}from'../../schema/index.js';export const LOCAL_TOOLS=[{'name':'account_operation','handler':handleAccountOperation,'config':{'title':'Account\x20-\x20Wallet\x20Management\x20&\x20On-Chain\x20Coin\x20Transactions','summary':'Wallet\x20management\x20(local)\x20+\x20token\x20transfer\x20and\x20coin-object\x20production\x20(on-chain,\x20confirmed).','description':'Manage\x20WoWok\x20accounts\x20locally:\x20generate,\x20suspend,\x20resume,\x20faucet-test,\x20sign\x20data,\x20etc.\x0a\x0a💰\x20ON-CHAIN\x20COIN\x20TRANSACTIONS\x20(IRREVERSIBLE,\x20confirmed):\x20`transfer`\x20moves\x20tokens\x20to\x20another\x20account\x20(fund\x20movement);\x20`get`\x20splits/merges\x20the\x20account\x27s\x20coins\x20to\x20produce\x20a\x20coin\x20object\x20carrying\x20at\x20least\x20the\x20required\x20balance\x20and\x20self-delivers\x20it\x20to\x20the\x20same\x20account\x20(fund\x20never\x20leaves\x20the\x20account\x20minus\x20gas,\x20but\x20a\x20real\x20transaction\x20IS\x20executed\x20and\x20SPENDS\x20GAS,\x20and\x20its\x20digest\x20is\x20returned).\x20Both\x20amounts\x20accept\x20display\x20format\x20with\x20symbol\x20(\x222.5WOW\x22)\x20—\x20converted\x20with\x20the\x20token\x27s\x20decimals\x20—\x20or\x20raw\x20smallest-unit\x20integers;\x20bare\x20decimals\x20are\x20rejected.\x20The\x20first\x20call\x20returns\x20a\x20pending_confirmation\x20preview\x20(amount,\x20token\x20full\x20type,\x20counterparty/account);\x20re-call\x20with\x20transfer.confirmed=true\x20or\x20get.confirmed=true\x20after\x20user\x20consent\x20to\x20execute.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27account_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':AccountOperationSchema,'outputSchema':AccountOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['account','local','private','wallet','transfer','fund'])},'errorShapeBuilder':statusErrorShape,'timeoutMs':0x1d4c0},{'name':'local_mark_operation','handler':handleMarkOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalMark\x20-\x20Address\x20Book\x20Management','summary':'LOCAL\x20address\x20book\x20(name/tag\x20for\x20addresses\x20and\x20object\x20IDs).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20ID\x20names\x20and\x20tags\x20stored\x20ONLY\x20on\x20your\x20local\x20device\x20for\x20easy\x20identification\x20of\x20user\x20address\x20or\x20object\x20IDs\x20by\x20name.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_mark_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalMarkOperationSchema,'outputSchema':LocalMarkOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['mark','local','private','address-book','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_info_operation','handler':handleInfoOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalInfo\x20-\x20Private\x20Data\x20Management','summary':'LOCAL\x20private\x20data\x20(delivery\x20addresses,\x20phone\x20numbers).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20sensitive\x20personal\x20information\x20stored\x20ONLY\x20on\x20your\x20device:\x20delivery\x20addresses,\x20phone\x20numbers,\x20contacts.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_info_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalInfoOperationSchema,'outputSchema':LocalInfoOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['info','local','private','data-management','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_history_operation','handler':handleHistoryOperation,'config':{'title':'🕘\x20LOCAL\x20ONLY:\x20LocalHistory\x20-\x20Explorer\x20Visit\x20History','summary':'LOCAL\x20visit\x20history\x20of\x20Explorer\x20objects\x20(recently\x20viewed,\x20newest\x20first).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20the\x20Explorer\x20visit\x20history\x20stored\x20ONLY\x20on\x20your\x20device.\x20Each\x20entry\x20keeps\x20the\x20stable\x20object\x20key,\x20canonical\x200x\x20address,\x20object\x20type\x20tag\x20(detail\x20visits\x20only),\x20network\x20and\x20visit\x20timestamp\x20—\x20display\x20names\x20are\x20NEVER\x20stored\x20and\x20are\x20resolved\x20live\x20at\x20render\x20time.\x0a\x0aOmit\x20every\x20operation\x20field\x20to\x20LIST\x20history\x20(newest\x20first,\x20auto-pruned\x20to\x20the\x20last\x2030\x20recorded\x20days\x20/\x20300\x20entries).\x20Use\x20{add:{op:\x27add\x27,data:[...]}}\x20to\x20record\x20visits\x20(upsert\x20by\x20key),\x20{remove:{op:\x27remove\x27,keys:[...]}}\x20to\x20delete\x20entries,\x20or\x20{clear:{op:\x27clear\x27}}\x20to\x20erase\x20all\x20history.\x0a\x0a💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_history_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalHistoryOperationSchema,'outputSchema':LocalHistoryOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['history','local','private','recent','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_cache_operation','handler':handleCacheOperation,'config':{'title':'🧹\x20LOCAL\x20ONLY:\x20SDK\x20Read\x20Cache\x20-\x20Diagnose\x20&\x20Clear','summary':'LOCAL\x20SDK\x20read\x20cache:\x20report\x20diagnostics,\x20clear\x20a\x20prefix\x20or\x20everything,\x20re-detect\x20chain\x20identity\x20after\x20a\x20node\x20reset.','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Inspect\x20and\x20clear\x20this\x20device\x27s\x20WoWok\x20SDK\x20read\x20cache.\x20Does\x20NOT\x20touch\x20accounts,\x20marks,\x20info\x20or\x20history\x20(separate\x20stores,\x20separate\x20tools)\x20and\x20never\x20touches\x20the\x20blockchain.\x0a\x0a'+'WHEN\x20TO\x20USE:\x20after\x20the\x20chain\x20node\x20was\x20restarted\x20or\x20reset,\x20or\x20when\x20a\x20call\x20fails\x20with\x20\x27object\x200x…\x20version\x200x…\x20is\x20unavailable\x27.\x20The\x20SDK\x20namespaces\x20its\x20cache\x20by\x20CHAIN\x20IDENTITY\x20(the\x20genesis\x20checkpoint\x20digest\x20from\x20w_getChainIdentifier),\x20which\x20changes\x20exactly\x20when\x20the\x20chain\x20is\x20replaced\x20—\x20so\x20a\x20reset\x20normally\x20needs\x20no\x20action.\x20Use\x20{refresh_chain_scope:\x20{op:\x27refresh_chain_scope\x27}}\x20to\x20force\x20that\x20re-detection\x20when\x20the\x20node\x20was\x20unreachable\x20at\x20startup\x20(leaving\x20the\x20cache\x20unscoped),\x20{status:\x20{op:\x27status\x27}}\x20to\x20see\x20whether\x20a\x20chain\x20identity\x20is\x20active,\x20{clear_prefix:\x20{op:\x27clear_prefix\x27,\x20prefix:\x27objectv2\x27}}\x20to\x20drop\x20only\x20the\x20on-chain\x20object\x20cache,\x20or\x20{clear:\x20{op:\x27clear\x27}}\x20to\x20drop\x20everything.\x0a\x0a'+'READ-ONLY\x20SUB-OP:\x20`status`\x20changes\x20nothing.\x20The\x20others\x20discard\x20cached\x20reads\x20only\x20—\x20the\x20next\x20call\x20re-reads\x20from\x20the\x20node.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_cache_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalCacheOperationSchema,'outputSchema':LocalCacheOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['cache','local','private','diagnostics','off-chain','stale'])},'errorShapeBuilder':statusErrorShape}];
@@ -0,0 +1 @@
1
+ import{describe,expect,it}from'vitest';import{isVerbatimTextField,redactInternalSources,sanitizeToolDispatchResult}from'./sanitize-output.js';const REPRO_DESCRIPTION='...\x20Countermeasure\x20to\x20empty-name\x20namedOperator\x20escalation:\x20'+'service::order_progress\x20is\x20permissionless\x20and\x20self-registers\x20its\x20caller\x20'+'under\x20init-node\x20name\x20\x27\x27.';describe('C-7:\x20user-authored\x20description\x20survives\x20the\x20output\x20hygiene\x20pass',()=>{it('does\x20not\x20delete\x20a\x20qualified\x20Move\x20fn\x20token\x20from\x20a\x20description',()=>{expect(redactInternalSources(REPRO_DESCRIPTION))['not']['toContain']('service::order_progress');const a=sanitizeToolDispatchResult({'content':[],'structuredContent':{'result':[{'type':'Guard','description':REPRO_DESCRIPTION}]}}),b=a['structuredContent']['result'][0x0]['description'];expect(b)['toBe'](REPRO_DESCRIPTION);}),it('round-trips\x20other\x20::\x20tokens,\x20CamelCase\x20type\x20tags\x20and\x20file-like\x20words',()=>{const a='Refunds\x20go\x20through\x20the\x20escrow\x20at\x200x2::wow::WOW<0x2::wow::WOW>;\x20'+'the\x20seller\x20object\x20is\x20a\x20Service\x20and\x20the\x20buyer\x20object\x20is\x20an\x20Order.\x20'+'See\x20also\x20mod::alpha_beta\x20and\x20mod::gamma_delta,\x20and\x20my-notes.ts\x20stays.',b=sanitizeToolDispatchResult({'content':[],'structuredContent':{'result':{'description':a}}});expect(b['structuredContent']['result']['description'])['toBe'](a);}),it('survives\x20a\x20description\x20nested\x20at\x20any\x20depth\x20(created\x20record,\x20list,\x20wrapper)',()=>{const a=[{'description':REPRO_DESCRIPTION},{'created':[{'description':REPRO_DESCRIPTION}]},{'result':{'objects':[{'content':{'description':REPRO_DESCRIPTION}}]}},{'list':[{'nested':{'deep':{'description':REPRO_DESCRIPTION}}}]}];for(const b of a){const c=sanitizeToolDispatchResult({'content':[],'structuredContent':b});expect(JSON['stringify'](c['structuredContent']))['toContain']('service::order_progress');}}),it('survives\x20a\x20JSON\x20text\x20block\x20that\x20embeds\x20the\x20description',()=>{const a=sanitizeToolDispatchResult({'content':[{'type':'text','text':JSON['stringify']({'result':{'description':REPRO_DESCRIPTION}})}],'structuredContent':{'result':{'description':REPRO_DESCRIPTION}}}),b=a['content']?.[0x0]?.['text']??'';expect(b)['toContain']('service::order_progress'),expect(JSON['parse'](b)['result']['description'])['toBe'](REPRO_DESCRIPTION);}),it('survives\x20a\x20text\x20block\x20whose\x20description\x20contains\x20quotes\x20and\x20newlines',()=>{const a='He\x20said\x20\x22service::order_progress\x22\x20then\x0aleft.\x09Tab\x20too.',b=sanitizeToolDispatchResult({'content':[{'type':'text','text':JSON['stringify']({'description':a})}],'structuredContent':{'description':a}});expect(JSON['parse'](b['content']?.[0x0]?.['text']??'{}')['description'])['toBe'](a);}),it('STILL\x20redacts\x20machine-authored\x20narrative\x20in\x20the\x20same\x20payload',()=>{const a=sanitizeToolDispatchResult({'content':[{'type':'text','text':'payout\x20cap\x20(arb.move:302-358)'}],'structuredContent':{'description':REPRO_DESCRIPTION,'evidence':'service.move\x20L175-194','narrative':'the\x20guard\x20advances\x20via\x20progress::next\x20each\x20cycle'}}),b=a['structuredContent'];expect(b['description'])['toBe'](REPRO_DESCRIPTION),expect(b['evidence'])['not']['toContain']('.move'),expect(b['narrative'])['not']['toContain']('progress::next'),expect(a['content']?.[0x0]?.['text'])['toBe']('payout\x20cap');}),it('isVerbatimTextField\x20marks\x20exactly\x20the\x20free-text\x20fields,\x20not\x20narrative',()=>{expect(isVerbatimTextField('description'))['toBe'](!![]),expect(isVerbatimTextField('evidence'))['toBe'](![]),expect(isVerbatimTextField('message'))['toBe'](![]),expect(isVerbatimTextField('summary'))['toBe'](![]);}),it('passes\x20a\x20result\x20without\x20content\x20/\x20structuredContent\x20through\x20untouched',()=>{const a={'content':[],'structuredContent':undefined};expect(sanitizeToolDispatchResult(a))['toEqual'](a);});});
@@ -1,3 +1,4 @@
1
1
  import type { ToolDispatchResult } from "./types.js";
2
+ export declare function isVerbatimTextField(key: string): boolean;
2
3
  export declare function redactInternalSources(input: string): string;
3
4
  export declare function sanitizeToolDispatchResult(result: ToolDispatchResult): ToolDispatchResult;
@@ -1 +1 @@
1
- import{MOVE_FUNCTIONS,MOVE_MODULE_NAMES}from'./move-fn-index.gen.js';const PROTOCOL_MOVE_MODULES=['object_linker','entity_order','entity_permission','entity_contact','arbitration','allocation','repository','permission','progress','registrar','passport','treasury','contact','service','machine','payment','reward','demand','guard','order','proof','resource','bridge','common','arb'],INTERNAL_TS_FILES=['onchain-constants','guard-ins','error-codes'],LINE_ANCHOR=String['raw']`(?:\s*[#:]\s*|\s+)L?\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*`,FILE_TOKEN_SOURCE=String['raw']`(?<![A-Za-z0-9_-])(?:${PROTOCOL_MOVE_MODULES['join']('|')})\.move(?:${LINE_ANCHOR})?`+String['raw']`|(?<![A-Za-z0-9_-])[A-Za-z_][A-Za-z0-9_-]*\.(?:move|ts|rs)(?:${LINE_ANCHOR})`+String['raw']`|(?<![A-Za-z0-9_-])(?:${INTERNAL_TS_FILES['join']('|')})\.ts\b`;function fileTokenRegex(){return new RegExp(FILE_TOKEN_SOURCE,'g');}const ORPHAN_LINE_ANCHOR=/\bL\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*/g,DANGLING_LINE_ANCHOR=/[#,\s]L\d{2,4}(?:\s*[\-,–/]\s*L?\d{2,4})+/g;function hasFileToken(a){return fileTokenRegex()['test'](a);}function escapeRegExp(a){return a['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');}let moveFnRefRegex=null;function moveFnRefTokenRegex(){if(!moveFnRefRegex){const a=[...MOVE_MODULE_NAMES]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp),b=[...new Set(Object['values'](MOVE_FUNCTIONS)['flat']())]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp);moveFnRefRegex=new RegExp('\x5cb(?:'+a['join']('|')+')::(?:'+b['join']('|')+')\x5cb','g');}return moveFnRefRegex;}export function redactInternalSources(a){if(!hasFileToken(a)&&!a['includes']('::'))return a;let b=a;for(let c=0x0;c<0x3;c++){const d=b;b=b['replace'](/\(([^()]*)\)/g,(e,f)=>{if(!hasFileToken(f)&&!f['includes']('::'))return e;let g=f['replace'](fileTokenRegex(),'')['replace'](moveFnRefTokenRegex(),'')['replace'](ORPHAN_LINE_ANCHOR,'');return g=g['replace'](/\s+/g,'\x20')['trim']()['replace'](/^[\s,;:/·.\-–—]+|[\s,;:/·.\-–—]+$/g,'')['trim'](),g?'('+g+')':'';});if(b===d)break;}b=b['replace'](fileTokenRegex(),''),b=b['replace'](moveFnRefTokenRegex(),'');if(!hasFileToken(a)&&b===a)return a;return b=b['replace'](DANGLING_LINE_ANCHOR,''),b=b['replace'](/\s+[,;:]\s+/g,'\x20'),b=b['replace'](/\(\s+/g,'(')['replace'](/\s+\)/g,')')['replace'](/\(\s*[\s,;:/·.\-–—]*\)/g,'')['replace'](/([(\[])\s+/g,'$1')['replace'](/\s{2,}/g,'\x20')['replace'](/\s+([,.;:])/g,'$1'),b=b['replace'](/[\s,;:+\u00b7\-–—]+(\.\s*)$/,'$1')['replace'](/[\s,;:+\u00b7\-–—]+\s*$/,''),b!==a&&(b=b['replace'](/^ /,'')['replace'](/ $/,'')),b;}function sanitizeDeep(a,b){if(typeof a==='string')return redactInternalSources(a);if(Array['isArray'](a))return a['map'](c=>sanitizeDeep(c,b));if(a&&typeof a==='object'){if(b['has'](a))return a;b['add'](a);const c={};for(const [d,e]of Object['entries'](a)){c[d]=sanitizeDeep(e,b);}return c;}return a;}export function sanitizeToolDispatchResult(a){try{const b=a['content']?.['map'](d=>d['type']==='text'?{...d,'text':redactInternalSources(d['text'])}:d),c=a['structuredContent']?sanitizeDeep(a['structuredContent'],new WeakSet()):a['structuredContent'];return{...a,'content':b,'structuredContent':c};}catch{return a;}}
1
+ import{MOVE_FUNCTIONS,MOVE_MODULE_NAMES}from'./move-fn-index.gen.js';const PROTOCOL_MOVE_MODULES=['object_linker','entity_order','entity_permission','entity_contact','arbitration','allocation','repository','permission','progress','registrar','passport','treasury','contact','service','machine','payment','reward','demand','guard','order','proof','resource','bridge','common','arb'],INTERNAL_TS_FILES=['onchain-constants','guard-ins','error-codes'],LINE_ANCHOR=String['raw']`(?:\s*[#:]\s*|\s+)L?\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*`,FILE_TOKEN_SOURCE=String['raw']`(?<![A-Za-z0-9_-])(?:${PROTOCOL_MOVE_MODULES['join']('|')})\.move(?:${LINE_ANCHOR})?`+String['raw']`|(?<![A-Za-z0-9_-])[A-Za-z_][A-Za-z0-9_-]*\.(?:move|ts|rs)(?:${LINE_ANCHOR})`+String['raw']`|(?<![A-Za-z0-9_-])(?:${INTERNAL_TS_FILES['join']('|')})\.ts\b`;function fileTokenRegex(){return new RegExp(FILE_TOKEN_SOURCE,'g');}const ORPHAN_LINE_ANCHOR=/\bL\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*/g,DANGLING_LINE_ANCHOR=/[#,\s]L\d{2,4}(?:\s*[\-,–/]\s*L?\d{2,4})+/g;function hasFileToken(a){return fileTokenRegex()['test'](a);}function escapeRegExp(a){return a['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');}let moveFnRefRegex=null;function moveFnRefTokenRegex(){if(!moveFnRefRegex){const a=[...MOVE_MODULE_NAMES]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp),b=[...new Set(Object['values'](MOVE_FUNCTIONS)['flat']())]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp);moveFnRefRegex=new RegExp('\x5cb(?:'+a['join']('|')+')::(?:'+b['join']('|')+')\x5cb','g');}return moveFnRefRegex;}const VERBATIM_TEXT_FIELDS=new Set(['description']);export function isVerbatimTextField(a){return VERBATIM_TEXT_FIELDS['has'](a);}export function redactInternalSources(a){if(!hasFileToken(a)&&!a['includes']('::'))return a;let b=a;for(let c=0x0;c<0x3;c++){const d=b;b=b['replace'](/\(([^()]*)\)/g,(e,f)=>{if(!hasFileToken(f)&&!f['includes']('::'))return e;let g=f['replace'](fileTokenRegex(),'')['replace'](moveFnRefTokenRegex(),'')['replace'](ORPHAN_LINE_ANCHOR,'');return g=g['replace'](/\s+/g,'\x20')['trim']()['replace'](/^[\s,;:/·.\-–—]+|[\s,;:/·.\-–—]+$/g,'')['trim'](),g?'('+g+')':'';});if(b===d)break;}b=b['replace'](fileTokenRegex(),''),b=b['replace'](moveFnRefTokenRegex(),'');if(!hasFileToken(a)&&b===a)return a;return b=b['replace'](DANGLING_LINE_ANCHOR,''),b=b['replace'](/\s+[,;:]\s+/g,'\x20'),b=b['replace'](/\(\s+/g,'(')['replace'](/\s+\)/g,')')['replace'](/\(\s*[\s,;:/·.\-–—]*\)/g,'')['replace'](/([(\[])\s+/g,'$1')['replace'](/\s{2,}/g,'\x20')['replace'](/\s+([,.;:])/g,'$1'),b=b['replace'](/[\s,;:+\u00b7\-–—]+(\.\s*)$/,'$1')['replace'](/[\s,;:+\u00b7\-–—]+\s*$/,''),b!==a&&(b=b['replace'](/^ /,'')['replace'](/ $/,'')),b;}function sanitizeDeep(a,b){if(typeof a==='string')return redactInternalSources(a);if(Array['isArray'](a))return a['map'](c=>sanitizeDeep(c,b));if(a&&typeof a==='object'){if(b['has'](a))return a;b['add'](a);const c={};for(const [d,e]of Object['entries'](a)){c[d]=isVerbatimTextField(d)?e:sanitizeDeep(e,b);}return c;}return a;}function collectVerbatimStrings(a,b,c){if(Array['isArray'](a)){for(const e of a)collectVerbatimStrings(e,b,c);return;}if(!a||typeof a!=='object')return;if(c['has'](a))return;c['add'](a);const d=a;for(const [f,g]of Object['entries'](d)){if(isVerbatimTextField(f)){if(typeof g==='string'&&g['length']>0x0)b['push'](g);continue;}collectVerbatimStrings(g,b,c);}}const MASK_PREFIX='\x00wv',MASK_SUFFIX='\x00';function redactTextBlockPreservingVerbatim(a,b){if(b['length']===0x0)return redactInternalSources(a);const c=[];for(const g of b){c['push'](g);const h=JSON['stringify'](g)['slice'](0x1,-0x1);if(h!==g)c['push'](h);}c['sort']((j,k)=>k['length']-j['length']);const d=[];let e=a;for(let j=0x0;j<c['length'];j++){if(c[j]['length']===0x0||!e['includes'](c[j]))continue;const k=''+MASK_PREFIX+j+MASK_SUFFIX;e=e['split'](c[j])['join'](k),d['push']({'marker':k,'original':c[j]});}if(d['length']===0x0)return redactInternalSources(a);let f=redactInternalSources(e);for(const {marker:l,original:m}of d){f=f['split'](l)['join'](m);}return f;}export function sanitizeToolDispatchResult(a){try{const b=a['structuredContent']?sanitizeDeep(a['structuredContent'],new WeakSet()):a['structuredContent'],c=[];a['structuredContent']&&collectVerbatimStrings(a['structuredContent'],c,new WeakSet());const d=a['content']?.['map'](e=>e['type']==='text'?{...e,'text':redactTextBlockPreservingVerbatim(e['text'],c)}:e);return{...a,'content':d,'structuredContent':b};}catch{return a;}}
@@ -1 +1 @@
1
- import{classifyError,buildDataSemantic}from'../schema/call/semantic.js';import{buildClassifiedErrorResult}from'./shared.js';import{shouldRunLightHooks,shouldRunHeavyHooks,recordOperationFailure,recordCriticalRisk,recordCriticalOperation,recordSubstepFailure}from'../harness/auto-escalation.js';import{getHarnessTier,setHarnessTier,isEnabled}from'../config/runtime.js';import{getHarness}from'../harness/index.js';import{recover}from'../harness/recover.js';import{recordOperationOutcome}from'../experience/index.js';import{recordIndustrySignal}from'../knowledge/flywheel-loop.js';import{getStageCache}from'../playbooks/service-build/index.js';import{SERVICE_BUILD_STAGES}from'../playbooks/service-build/process.js';import{extractAmount,getAmountThreshold,formatAmount}from'../knowledge/safety-rules.js';function stageIndexOf(a){const b=SERVICE_BUILD_STAGES['indexOf'](a);return b>=0x0?b:0x0;}export function withTimeout(a,b=0x7530,c='operation'){let d;return Promise['race']([a['finally'](()=>{if(d)clearTimeout(d);}),new Promise((e,f)=>{d=setTimeout(()=>{let g='';if(c['includes']('messenger'))g='\x20This\x20is\x20a\x20messenger\x20network\x20operation.\x20Possible\x20causes:\x20'+'(1)\x20messenger\x20server\x20(https://messenger.wowok.net)\x20unreachable,\x20'+'(2)\x20no\x20messenger-enabled\x20account\x20configured\x20(use\x20account_operation\x20to\x20set\x20messenger\x20name),\x20'+'(3)\x20network\x20connectivity\x20issue.\x20'+'Ensure\x20you\x20have\x20a\x20messenger-enabled\x20account\x20and\x20the\x20server\x20is\x20reachable.';else(c['includes']('onchain')||c['includes']('account_operation')||c['includes']('bridge')||c['includes']('workflow')||c['includes']('keeper')||c['includes']('wowok'))&&(g='\x20This\x20tool\x20may\x20submit\x20an\x20ON-CHAIN\x20transaction.\x20The\x20transaction\x20was\x20NOT\x20cancelled\x20'+'by\x20this\x20timeout\x20—\x20it\x20may\x20already\x20be\x20submitted\x20and\x20still\x20finalize\x20on-chain.\x20'+'DO\x20NOT\x20blindly\x20retry\x20(risk\x20of\x20duplicate\x20operations).\x20First\x20verify:\x20'+'(1)\x20if\x20the\x20error\x20above\x20carries\x20a\x20tx\x20digest,\x20check\x20it\x20via\x20query_toolkit\x20'+'(query_type=\x27onchain_transaction\x27);\x20(2)\x20otherwise\x20verify\x20via\x20query_toolkit\x20'+'onchain_events\x20(or\x20the\x20account\x27s\x20recent\x20transactions).\x20Do\x20NOT\x20rely\x20on\x20an\x20'+'onchain_objects\x20read\x20alone:\x20it\x20may\x20serve\x20a\x20pre-transaction\x20cached\x20snapshot,\x20'+'so\x20an\x20unchanged\x20object\x20must\x20never\x20on\x20its\x20own\x20justify\x20a\x20retry.');f(new Error('Operation\x20\x27'+c+'\x27\x20timed\x20out\x20after\x20'+b+'ms.'+g));},b);})]);}export function wrapHandlerWithErrorShape(a,b,c,d){return async(e,f)=>{try{return await withTimeout(a(e,f),b,c);}catch(g){if(d){const h=g instanceof Error?g['message']:String(g),i=classifyError(h),j={'operation_type':c,'data':e},k=d(h,i,j);return{'content':[{'type':'text','text':'Error:\x20'+h}],'structuredContent':k};}throw g;}};}export const statusErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'status':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const operationErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'operation':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const strictStatusErrorShape=(a,b,c)=>({'result':{'status':'error','error':a}});function checkProjectStage(a,b,c){const d={'analyze_intent':'puzzle','aggregate_risks':'risk','trace_substeps':'substeps'},e=d[a];if(!e)return null;const f=getStageCache(b,c);if(!f){if(a==='analyze_intent')return null;return'project_stage:\x20calling\x20\x27'+a+'\x27\x20before\x20\x27analyze_intent\x27\x20—\x20recommend\x20calling\x20analyze_intent\x20first\x20for\x20project\x20\x27'+b+':'+c+'\x27';}if(stageIndexOf(f['stage'])<stageIndexOf(e)-0x1)return'project_stage:\x20calling\x20\x27'+a+'\x27\x20(stage\x20\x27'+e+'\x27)\x20but\x20project\x20is\x20at\x20stage\x20\x27'+f['stage']+'\x27\x20—\x20recommend\x20completing\x20prior\x20stages\x20first\x20for\x20\x27'+b+':'+c+'\x27';return null;}export function dispatchWithHarness(a,b){return async(d,f)=>{const g=[],h=getHarness(),i=shouldRunLightHooks(),j=shouldRunHeavyHooks(),k=isPublishOperation(b,d),l=isSignOperation(b,d),m=getHarnessTier();if(b==='goal_operation'&&i)try{const o=d,p=o?.['action'],q=o?.['project'],r=o?.['version'];if(p&&q&&r){const s=checkProjectStage(p,q,r);s&&g['push'](s);}}catch{}k&&m==='lightweight'&&(setHarnessTier('full'),g['push']('pre_publish:\x20tier\x20forced\x20to\x20full\x20for\x20publish-class\x20operation\x20(GLM5-21\x20§3.3)'));if(k&&m!=='off')try{const t=runPrePublishChecks(b,d);g['push'](...t['warnings']);if(t['critical']['length']>0x0){for(const u of t['critical']){const v=recordCriticalRisk(u);if(v)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+v['reason']);}return buildHarnessBlockResult('pre_publish','Publish\x20BLOCKED\x20by\x20Harness\x20pre-publish\x20gate\x20(GLM5-21\x20V6):\x20'+(t['critical']['length']+'\x20CRITICAL\x20risk(s)\x20must\x20be\x20resolved\x20before\x20publish.'),t['critical'],t['warnings'],'immutable_violation','Fix\x20the\x20CRITICAL\x20risks\x20listed\x20in\x20the\x20message\x20(e.g.\x20rename\x20dispute/refund\x20nodes\x20per\x20R-M1-11,\x20add\x20the\x20entry\x20pair\x20prev_node=\x22\x22),\x20then\x20retry\x20publish.\x20Nodes/pairs/forwards\x20are\x20immutable\x20after\x20publish\x20—\x20verify\x20via\x20machineNode2file\x20first.');}}catch(x){g['push']('pre_publish\x20hook\x20failed:\x20'+(x instanceof Error?x['message']:String(x)));}if(l&&j)try{const y=extractData(d),z=y?extractAmount(y):null;if(z!==null){const A=getAmountThreshold();let B=null;try{B=BigInt(z);}catch{B=null;}if(B!==null&&B>A)return buildHarnessBlockResult('pre_sign','Sign\x20BLOCKED\x20by\x20Harness\x20pre-sign\x20gate\x20(GLM5-21\x20V7):\x20amount\x20'+formatAmount(B)+'\x20WOW\x20exceeds\x20the\x20full-tier\x20threshold\x20'+formatAmount(A)+'\x20WOW.',['amount\x20'+z+'\x20(smallest\x20unit)\x20>\x20threshold\x20'+A['toString']()+'\x20(smallest\x20unit)'],[],'invalid_parameter','Raise\x20WOWOK_AMOUNT_THRESHOLD\x20to\x20match\x20the\x20intended\x20amount,\x20split\x20the\x20transaction,\x20or\x20reset\x20the\x20harness\x20tier\x20to\x20lightweight\x20(config_operation)\x20after\x20explicit\x20user\x20confirmation.');}}catch(C){g['push']('pre_sign\x20hook\x20failed:\x20'+(C instanceof Error?C['message']:String(C)));}let n;try{n=await a(d,f);}catch(D){const E=D instanceof Error?D['message']:String(D),F=recordOperationFailure(b,E);F&&g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+F['reason']);if(b==='onchain_operations')try{const G=classifyError(E,D);if(!G['retryable']&&G['error_code']!=='unknown'){const H=recordCriticalOperation(b,G['error_code']);if(H)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+H['reason']);}}catch{}throw D;}if(b==='onchain_operations')try{if(classifyOutcome(n)==='failed'){const I=extractErrorCode(n)??'',J=classifyError(I);if(!J['retryable']&&J['error_code']!=='unknown'){const K=recordCriticalOperation(b,J['error_code']);if(K)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+K['reason']);}}}catch{}if(i&&!isOutcomeDiscriminated(n)){const L=extractIntent(b,d)??b;try{const M=classifyOutcome(n);if(M==='failed'){const N=extractErrorCode(n)??'',O=classifyError(N),P=h['recover'](O['error_code'],L,{'operation_type':b,'data':extractData(d)});g['push']('Harness\x20recover:\x20strategy='+P['strategy']+('\x20(attempt\x20'+P['current_attempt']+'/'+P['max_attempts']+')')+(P['should_retry']?'\x20—\x20retryable':'\x20—\x20do\x20NOT\x20retry\x20blindly')+(P['user_prompt']?'\x20—\x20'+P['user_prompt']:'\x20—\x20'+P['detail']));}else M==='success'&&h['resetRecovery'](L);}catch(Q){g['push']('recover\x20hook\x20failed:\x20'+(Q instanceof Error?Q['message']:String(Q)));}}if(b==='goal_operation')try{const R=d?.['action'];if(R==='trace_substeps'){const S=extractCriticalFindingCount(n);if(S>0x0){const T=recordSubstepFailure(String(R)+':\x20'+S+'\x20critical\x20finding(s)');if(T)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+T['reason']);}}}catch{}if(isWriteClassTool(b)&&!SEMANTIC_RECORDED_TOOLS['has'](b))try{const U=extractOperationType(b,d)??b,V=extractIntent(b,d)??b,W=extractData(d)??d,X=classifyOutcome(n),Y=extractErrorCode(n),Z=isEnabled('experience_layer');if(Z)recordOperationOutcome(U,W,V,X,Y);else{const a0=extractIndustry(d);a0&&isEnabled('industry_evolution')&&recordIndustrySignal(a0,{'type':U},{'success':X==='success','error_code':Y});}}catch(a1){g['push']('signal\x20collection\x20failed:\x20'+(a1 instanceof Error?a1['message']:String(a1)));}if(g['length']>0x0){if(n?.['structuredContent']){const a2=n['structuredContent'],a3=a2['semantic'];if(a3){const a4=Array['isArray'](a3['warnings'])?a3['warnings']:[];a3['warnings']=[...a4,...g];}else for(const a5 of g){console['warn']('[harness]\x20'+a5);}}else for(const a6 of g){console['warn']('[harness]\x20'+a6);}}return n;};}function isPublishOperation(a,b){if(a!=='onchain_operations')return![];const c=extractOperationType(a,b);if(c!=='service'&&c!=='machine')return![];const d=extractData(b);return d?.['publish']===!![]||d?.['bPublished']===!![];}function isSignOperation(a,b){if(a==='wip_file'){const c=b?.['operation_type'];return c==='sign';}return a==='onchain_operations';}function extractOperationType(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if(a==='onchain_operations')return typeof c['operation_type']==='string'?c['operation_type']:undefined;if(a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')return typeof c['action']==='string'?c['action']:undefined;return typeof c['operation_type']==='string'?c['operation_type']:undefined;}function extractIntent(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if((a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')&&typeof c['action']==='string')return a+':'+c['action'];const d=c['operation_type'];if(typeof d==='string')return a+':'+d;return a;}function extractData(a){if(!a||typeof a!=='object')return undefined;const b=a,c=b['data'];return c&&typeof c==='object'?c:undefined;}const WRITE_CLASS_TOOLS=new Set(['onchain_operations','goal_operation','industry_pack_operation','strategy_review_operation','wip_file','messenger_operation','bridge_operation']),SEMANTIC_RECORDED_TOOLS=new Set(['onchain_operations','bridge_operation']);function isWriteClassTool(a){return WRITE_CLASS_TOOLS['has'](a);}function classifyOutcome(a){if(!a?.['structuredContent'])return'failed';const b=a['structuredContent'];if(b['outcome']==='failed')return'failed';if(b['outcome']==='executed')return'success';if(b['outcome']==='pending_input')return'partial';const c=typeof b['status']==='string'?b['status']:typeof b['result_type']==='string'?b['result_type']:'';if(c==='error'||c==='failed')return'failed';if(c==='partial')return'partial';return'success';}function isOutcomeDiscriminated(a){const b=a?.['structuredContent'];return!!b&&typeof b==='object'&&'outcome'in b;}function extractErrorCode(a){if(!a?.['structuredContent'])return undefined;const b=a['structuredContent'];if(typeof b['error_code']==='string')return b['error_code'];const c=b['error'];if(typeof c==='string')return c;if(c&&typeof c==='object'){const d=c['code'];if(typeof d==='string')return d;}return undefined;}function extractIndustry(a){if(!a||typeof a!=='object')return undefined;const b=a;if(typeof b['industry']==='string')return b['industry'];const c=b['data'];if(c&&typeof c==='object'){const e=c;if(typeof e['industry']==='string')return e['industry'];}return undefined;}const ANTI_PATTERN_NODE_REGEX=/(^|_)(disputed?|refund(?:ed)?|arbitration|arb)(_|$)/i;function runPrePublishChecks(a,b){const c=[],d=[],e=extractOperationType(a,b),g=extractData(b)??{};if(e==='machine'){const h=g['node'],i=Array['isArray'](h)?h:Array['isArray'](h?.['nodes'])?h['nodes']:[];if(i['length']>0x0){for(const l of i){const m=typeof l?.['name']==='string'?l['name']:'';m&&ANTI_PATTERN_NODE_REGEX['test'](m)&&c['push']('R-M1-11:\x20machine\x20node\x20\x22'+m+'\x22\x20models\x20dispute/refund\x20flow\x20—\x20'+'refunds\x20must\x20route\x20via\x20an\x20Allocator\x20triggered\x20by\x20business\x20states,\x20'+'disputes\x20via\x20the\x20separate\x20Arbitration\x20object\x20(off-Machine)');}const j=new Set();for(const o of i){const q=typeof o?.['name']==='string'?o['name']:'';if(!q)continue;j['has'](q)&&c['push']('MC-C-04:\x20duplicate\x20machine\x20node\x20name\x20\x22'+q+'\x22\x20—\x20on-chain\x20will\x20reject\x20the\x20publish\x20transaction'),j['add'](q);}const k=i['some'](r=>Array['isArray'](r?.['pairs'])&&r['pairs']['some'](s=>s?.['prev_node']===''));!k&&c['push']('Machine\x20has\x20no\x20entry\x20pair\x20(prev_node=\x22\x22)\x20—\x20Progress\x20can\x20never\x20advance\x20'+'from\x20the\x20initial\x20state;\x20orders\x20are\x20permanently\x20stuck');for(const r of i){const s=typeof r?.['name']==='string'?r['name']:'?';for(const t of r?.['pairs']??[]){for(const u of t?.['forwards']??[]){const v=u?.['namedOperator']!==undefined&&u?.['namedOperator']!==null,w=u?.['permissionIndex']!==undefined&&u?.['permissionIndex']!==null;!v&&!w&&d['push']('pre_publish:\x20node\x20\x22'+s+'\x22\x20forward\x20\x22'+String(u?.['name']??'?')+'\x22\x20has\x20neither\x20namedOperator\x20nor\x20permissionIndex\x20—\x20no\x20one\x20can\x20advance\x20it');}}}}else d['push']('pre_publish:\x20publishing\x20machine\x20without\x20inline\x20node\x20data\x20—\x20topology\x20not\x20verifiable\x20in\x20this\x20call;\x20'+'verify\x20nodes/pairs/forwards\x20via\x20machineNode2file\x20BEFORE\x20publish\x20(immutable\x20after\x20publish,\x20IMMUT-001)');d['push']('pre_publish:\x20machine\x20nodes/pairs/forwards\x20become\x20immutable\x20after\x20publish\x20(IMMUT-001)');}return e==='service'&&(d['push']('pre_publish:\x20service\x20machine/order_allocators/arbitrations\x20become\x20immutable\x20after\x20publish\x20(IMMUT-002);\x20sales\x20remains\x20modifiable'),g['machine']===undefined&&d['push']('pre_publish:\x20\x27machine\x27\x20not\x20set\x20in\x20this\x20call\x20—\x20if\x20the\x20service\x20was\x20never\x20bound\x20to\x20a\x20published\x20machine,\x20'+'it\x20cannot\x20process\x20orders\x20and\x20CANNOT\x20be\x20fixed\x20after\x20publish'),g['order_allocators']===undefined&&d['push']('pre_publish:\x20\x27order_allocators\x27\x20not\x20set\x20in\x20this\x20call\x20—\x20immutable\x20after\x20publish;\x20'+'orders\x20will\x20have\x20no\x20fund\x20distribution\x20if\x20never\x20configured')),{'critical':c,'warnings':d};}function buildHarnessBlockResult(a,b,c,d,e,f){const g=[...c['map'](i=>'CRITICAL:\x20'+i),...d['map'](i=>'WARN:\x20'+i)]['join']('\x0a'),h='Error:\x20'+b+(g?'\x0a'+g:'')+'\x0aRecovery:\x20'+f;return{'content':[{'type':'text','text':h}],'structuredContent':{'outcome':'failed','result':{'type':'error','error':b+'\x20[gate='+a+']','error_code':e,'retryable':![],'recovery_hint':f},'message':h,'recovery':recover(e,'harness:'+a)}};}function extractCriticalFindingCount(a){const b=a?.['structuredContent'];if(!b)return 0x0;const c=b['semantic'],d=c?.['summary'];if(typeof d?.['critical_count']==='number'&&d['critical_count']>0x0)return d['critical_count'];const e=b['findings']??c?.['findings'];if(Array['isArray'](e))return e['filter'](h=>h?.['severity']==='error')['length'];const f=a?.['content']?.['map'](h=>'text'in h?h['text']:'')['join']('\x0a')??'',g=f['match'](/\[AUDIT ERROR\]/g);return g?g['length']:0x0;}
1
+ import{classifyError,buildDataSemantic}from'../schema/call/semantic.js';import{buildClassifiedErrorResult}from'./shared.js';import{shouldRunLightHooks,shouldRunHeavyHooks,recordOperationFailure,recordCriticalRisk,recordCriticalOperation,recordSubstepFailure}from'../harness/auto-escalation.js';import{getHarnessTier,setHarnessTier,isEnabled}from'../config/runtime.js';import{getHarness}from'../harness/index.js';import{recover}from'../harness/recover.js';import{recordOperationOutcome}from'../experience/index.js';import{recordIndustrySignal}from'../knowledge/flywheel-loop.js';import{getStageCache}from'../playbooks/service-build/index.js';import{SERVICE_BUILD_STAGES}from'../playbooks/service-build/process.js';import{extractAmount,getAmountThreshold,getFundCoverageMin,formatAmount}from'../knowledge/safety-rules.js';import{auditMachineNodes}from'../knowledge/audit-rules.js';import{fetchMachineNodes}from'../graph/onchain/sdk-batch.js';function stageIndexOf(a){const b=SERVICE_BUILD_STAGES['indexOf'](a);return b>=0x0?b:0x0;}export function withTimeout(a,b=0x7530,c='operation'){let d;return Promise['race']([a['finally'](()=>{if(d)clearTimeout(d);}),new Promise((e,f)=>{d=setTimeout(()=>{let g='';if(c['includes']('messenger'))g='\x20This\x20is\x20a\x20messenger\x20network\x20operation.\x20Possible\x20causes:\x20'+'(1)\x20messenger\x20server\x20(https://messenger.wowok.net)\x20unreachable,\x20'+'(2)\x20no\x20messenger-enabled\x20account\x20configured\x20(use\x20account_operation\x20to\x20set\x20messenger\x20name),\x20'+'(3)\x20network\x20connectivity\x20issue.\x20'+'Ensure\x20you\x20have\x20a\x20messenger-enabled\x20account\x20and\x20the\x20server\x20is\x20reachable.';else(c['includes']('onchain')||c['includes']('account_operation')||c['includes']('bridge')||c['includes']('workflow')||c['includes']('keeper')||c['includes']('wowok'))&&(g='\x20This\x20tool\x20may\x20submit\x20an\x20ON-CHAIN\x20transaction.\x20The\x20transaction\x20was\x20NOT\x20cancelled\x20'+'by\x20this\x20timeout\x20—\x20it\x20may\x20already\x20be\x20submitted\x20and\x20still\x20finalize\x20on-chain.\x20'+'DO\x20NOT\x20blindly\x20retry\x20(risk\x20of\x20duplicate\x20operations).\x20First\x20verify:\x20'+'(1)\x20if\x20the\x20error\x20above\x20carries\x20a\x20tx\x20digest,\x20check\x20it\x20via\x20query_toolkit\x20'+'(query_type=\x27onchain_transaction\x27);\x20(2)\x20otherwise\x20verify\x20via\x20query_toolkit\x20'+'onchain_events\x20(or\x20the\x20account\x27s\x20recent\x20transactions).\x20Do\x20NOT\x20rely\x20on\x20an\x20'+'onchain_objects\x20read\x20alone:\x20it\x20may\x20serve\x20a\x20pre-transaction\x20cached\x20snapshot,\x20'+'so\x20an\x20unchanged\x20object\x20must\x20never\x20on\x20its\x20own\x20justify\x20a\x20retry.');f(new Error('Operation\x20\x27'+c+'\x27\x20timed\x20out\x20after\x20'+b+'ms.'+g));},b);})]);}export function wrapHandlerWithErrorShape(a,b,c,d){return async(e,f)=>{try{return await withTimeout(a(e,f),b,c);}catch(g){if(d){const h=g instanceof Error?g['message']:String(g),i=classifyError(h),j={'operation_type':c,'data':e},k=d(h,i,j);return{'content':[{'type':'text','text':'Error:\x20'+h}],'structuredContent':k};}throw g;}};}export const statusErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'status':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const operationErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'operation':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const strictStatusErrorShape=(a,b,c)=>({'result':{'status':'error','error':a}});function checkProjectStage(a,b,c){const d={'analyze_intent':'puzzle','aggregate_risks':'risk','trace_substeps':'substeps'},e=d[a];if(!e)return null;const f=getStageCache(b,c);if(!f){if(a==='analyze_intent')return null;return'project_stage:\x20calling\x20\x27'+a+'\x27\x20before\x20\x27analyze_intent\x27\x20—\x20recommend\x20calling\x20analyze_intent\x20first\x20for\x20project\x20\x27'+b+':'+c+'\x27';}if(stageIndexOf(f['stage'])<stageIndexOf(e)-0x1)return'project_stage:\x20calling\x20\x27'+a+'\x27\x20(stage\x20\x27'+e+'\x27)\x20but\x20project\x20is\x20at\x20stage\x20\x27'+f['stage']+'\x27\x20—\x20recommend\x20completing\x20prior\x20stages\x20first\x20for\x20\x27'+b+':'+c+'\x27';return null;}export function dispatchWithHarness(a,b){return async(d,f)=>{const g=[],h=getHarness(),i=shouldRunLightHooks(),j=shouldRunHeavyHooks(),k=isPublishOperation(b,d),l=isSignOperation(b,d),m=getHarnessTier();if(b==='goal_operation'&&i)try{const o=d,p=o?.['action'],q=o?.['project'],r=o?.['version'];if(p&&q&&r){const s=checkProjectStage(p,q,r);s&&g['push'](s);}}catch{}k&&m==='lightweight'&&(setHarnessTier('full'),g['push']('pre_publish:\x20tier\x20forced\x20to\x20full\x20for\x20publish-class\x20operation\x20(GLM5-21\x20§3.3)'));if(k&&m!=='off')try{const t=await runPrePublishChecks(b,d);g['push'](...t['warnings']);if(t['critical']['length']>0x0){for(const u of t['critical']){const v=recordCriticalRisk(u);if(v)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+v['reason']);}return buildHarnessBlockResult('pre_publish','Publish\x20BLOCKED\x20by\x20Harness\x20pre-publish\x20gate\x20(GLM5-21\x20V6):\x20'+(t['critical']['length']+'\x20CRITICAL\x20risk(s)\x20must\x20be\x20resolved\x20before\x20publish.'),t['critical'],t['warnings'],'immutable_violation','Fix\x20the\x20CRITICAL\x20risks\x20listed\x20in\x20the\x20message\x20(e.g.\x20rename\x20dispute/refund\x20nodes\x20per\x20R-M1-11,\x20add\x20the\x20entry\x20pair\x20prev_node=\x22\x22),\x20then\x20retry\x20publish.\x20Nodes/pairs/forwards\x20are\x20immutable\x20after\x20publish\x20—\x20verify\x20via\x20machineNode2file\x20first.');}}catch(x){g['push']('pre_publish\x20hook\x20failed:\x20'+(x instanceof Error?x['message']:String(x)));}if(l&&j)try{const y=extractData(d),z=y?extractAmount(y,{'excludeConfigAmounts':!![]}):null;if(z!==null){const A=getAmountThreshold();let B=null;try{B=BigInt(z);}catch{B=null;}if(B!==null&&B>A)return buildHarnessBlockResult('pre_sign','Sign\x20BLOCKED\x20by\x20Harness\x20pre-sign\x20gate\x20(GLM5-21\x20V7):\x20amount\x20'+formatAmount(B)+'\x20WOW\x20exceeds\x20the\x20full-tier\x20threshold\x20'+formatAmount(A)+'\x20WOW.',['amount\x20'+z+'\x20(smallest\x20unit)\x20>\x20threshold\x20'+A['toString']()+'\x20(smallest\x20unit)'],[],'invalid_parameter','Raise\x20WOWOK_AMOUNT_THRESHOLD\x20to\x20match\x20the\x20intended\x20amount,\x20split\x20the\x20transaction,\x20or\x20reset\x20the\x20harness\x20tier\x20to\x20lightweight\x20(config_operation)\x20after\x20explicit\x20user\x20confirmation.');}}catch(C){g['push']('pre_sign\x20hook\x20failed:\x20'+(C instanceof Error?C['message']:String(C)));}let n;try{n=await a(d,f);}catch(D){const E=D instanceof Error?D['message']:String(D),F=recordOperationFailure(b,E);F&&g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+F['reason']);if(b==='onchain_operations')try{const G=classifyError(E,D);if(!G['retryable']&&G['error_code']!=='unknown'){const H=recordCriticalOperation(b,G['error_code']);if(H)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+H['reason']);}}catch{}throw D;}if(b==='onchain_operations')try{if(classifyOutcome(n)==='failed'){const I=extractErrorCode(n)??'',J=classifyError(I);if(!J['retryable']&&J['error_code']!=='unknown'){const K=recordCriticalOperation(b,J['error_code']);if(K)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+K['reason']);}}}catch{}if(i&&!isOutcomeDiscriminated(n)){const L=extractIntent(b,d)??b;try{const M=classifyOutcome(n);if(M==='failed'){const N=extractErrorCode(n)??'',O=classifyError(N),P=h['recover'](O['error_code'],L,{'operation_type':b,'data':extractData(d)});g['push']('Harness\x20recover:\x20strategy='+P['strategy']+('\x20(attempt\x20'+P['current_attempt']+'/'+P['max_attempts']+')')+(P['should_retry']?'\x20—\x20retryable':'\x20—\x20do\x20NOT\x20retry\x20blindly')+(P['user_prompt']?'\x20—\x20'+P['user_prompt']:'\x20—\x20'+P['detail']));}else M==='success'&&h['resetRecovery'](L);}catch(Q){g['push']('recover\x20hook\x20failed:\x20'+(Q instanceof Error?Q['message']:String(Q)));}}if(b==='goal_operation')try{const R=d?.['action'];if(R==='trace_substeps'){const S=extractCriticalFindingCount(n);if(S>0x0){const T=recordSubstepFailure(String(R)+':\x20'+S+'\x20critical\x20finding(s)');if(T)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+T['reason']);}}}catch{}if(isWriteClassTool(b)&&!SEMANTIC_RECORDED_TOOLS['has'](b))try{const U=extractOperationType(b,d)??b,V=extractIntent(b,d)??b,W=extractData(d)??d,X=classifyOutcome(n),Y=extractErrorCode(n),Z=isEnabled('experience_layer');if(Z)recordOperationOutcome(U,W,V,X,Y);else{const a0=extractIndustry(d);a0&&isEnabled('industry_evolution')&&recordIndustrySignal(a0,{'type':U},{'success':X==='success','error_code':Y});}}catch(a1){g['push']('signal\x20collection\x20failed:\x20'+(a1 instanceof Error?a1['message']:String(a1)));}if(g['length']>0x0){if(n?.['structuredContent']){const a2=n['structuredContent'],a3=a2['semantic'];if(a3){const a4=Array['isArray'](a3['warnings'])?a3['warnings']:[];a3['warnings']=[...a4,...g];}else for(const a5 of g){console['warn']('[harness]\x20'+a5);}}else for(const a6 of g){console['warn']('[harness]\x20'+a6);}}return n;};}function isPublishOperation(a,b){if(a!=='onchain_operations')return![];const c=extractOperationType(a,b);if(c!=='service'&&c!=='machine')return![];const d=extractData(b);return d?.['publish']===!![]||d?.['bPublished']===!![];}function isSignOperation(a,b){if(a==='wip_file'){const c=b?.['operation_type'];return c==='sign';}return a==='onchain_operations';}function extractOperationType(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if(a==='onchain_operations')return typeof c['operation_type']==='string'?c['operation_type']:undefined;if(a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')return typeof c['action']==='string'?c['action']:undefined;return typeof c['operation_type']==='string'?c['operation_type']:undefined;}function extractIntent(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if((a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')&&typeof c['action']==='string')return a+':'+c['action'];const d=c['operation_type'];if(typeof d==='string')return a+':'+d;return a;}function extractData(a){if(!a||typeof a!=='object')return undefined;const b=a,c=b['data'];return c&&typeof c==='object'?c:undefined;}const WRITE_CLASS_TOOLS=new Set(['onchain_operations','goal_operation','industry_pack_operation','strategy_review_operation','wip_file','messenger_operation','bridge_operation']),SEMANTIC_RECORDED_TOOLS=new Set(['onchain_operations','bridge_operation']);function isWriteClassTool(a){return WRITE_CLASS_TOOLS['has'](a);}function classifyOutcome(a){if(!a?.['structuredContent'])return'failed';const b=a['structuredContent'];if(b['outcome']==='failed')return'failed';if(b['outcome']==='executed')return'success';if(b['outcome']==='pending_input')return'partial';const c=typeof b['status']==='string'?b['status']:typeof b['result_type']==='string'?b['result_type']:'';if(c==='error'||c==='failed')return'failed';if(c==='partial')return'partial';return'success';}function isOutcomeDiscriminated(a){const b=a?.['structuredContent'];return!!b&&typeof b==='object'&&'outcome'in b;}function extractErrorCode(a){if(!a?.['structuredContent'])return undefined;const b=a['structuredContent'];if(typeof b['error_code']==='string')return b['error_code'];const c=b['error'];if(typeof c==='string')return c;if(c&&typeof c==='object'){const d=c['code'];if(typeof d==='string')return d;}return undefined;}function extractIndustry(a){if(!a||typeof a!=='object')return undefined;const b=a;if(typeof b['industry']==='string')return b['industry'];const c=b['data'];if(c&&typeof c==='object'){const e=c;if(typeof e['industry']==='string')return e['industry'];}return undefined;}function numericBalance(a){if(typeof a==='number'&&Number['isFinite'](a))return a;if(typeof a==='string'&&a['trim']()!==''&&Number['isFinite'](Number(a)))return Number(a);return undefined;}async function runPrePublishChecks(a,b){const c=[],d=[],f=extractOperationType(a,b),g=extractData(b)??{};if(f==='machine'){const h=g['node'];let i=Array['isArray'](h)?h:Array['isArray'](h?.['nodes'])?h['nodes']:[];if(i['length']===0x0&&typeof g['object']==='string'){const j=g['object'],k=b?.['env']?.['network'];try{const l=await fetchMachineNodes(j,k,!![]);l['length']>0x0&&(i=l,d['push']('pre_publish:\x20machine\x20\x22'+j+'\x22\x20published\x20by\x20reference\x20—\x20audited\x20against\x20its\x20'+(l['length']+'\x20on-chain\x20node(s)\x20(effective-state\x20gate)')));}catch(m){d['push']('pre_publish:\x20could\x20not\x20fetch\x20on-chain\x20nodes\x20for\x20machine\x20\x22'+j+'\x22\x20'+('('+(m instanceof Error?m['message']:String(m))+')\x20—\x20topology\x20not\x20verifiable\x20in\x20this\x20call;\x20')+'verify\x20via\x20machineNode2file\x20BEFORE\x20publish\x20(immutable\x20after\x20publish,\x20IMMUT-001)');}}if(i['length']>0x0){const n=auditMachineNodes(i);c['push'](...n['critical']),d['push'](...n['warnings']);}else typeof g['object']!=='string'&&d['push']('pre_publish:\x20publishing\x20machine\x20without\x20inline\x20node\x20data\x20—\x20topology\x20not\x20verifiable\x20in\x20this\x20call;\x20'+'verify\x20nodes/pairs/forwards\x20via\x20machineNode2file\x20BEFORE\x20publish\x20(immutable\x20after\x20publish,\x20IMMUT-001)');d['push']('pre_publish:\x20machine\x20nodes/pairs/forwards\x20become\x20immutable\x20after\x20publish\x20(IMMUT-001)');}if(f==='service'){d['push']('pre_publish:\x20service\x20machine/order_allocators/arbitrations\x20become\x20immutable\x20after\x20publish\x20(IMMUT-002);\x20sales\x20remains\x20modifiable');g['machine']===undefined&&d['push']('pre_publish:\x20\x27machine\x27\x20absent\x20from\x20THIS\x20call\x20(the\x20store\x20may\x20already\x20be\x20bound\x20—\x20verify\x20before\x20assuming\x20otherwise):\x20'+'query_toolkit\x20query_type=\x27service_panorama\x27\x20and\x20read\x20service.machine;\x20an\x20unset\x20machine\x20cannot\x20process\x20orders\x20and\x20CANNOT\x20be\x20fixed\x20after\x20publish\x20(IMMUT-002)');g['order_allocators']===undefined&&d['push']('pre_publish:\x20\x27order_allocators\x27\x20absent\x20from\x20THIS\x20call\x20(the\x20store\x20may\x20already\x20be\x20configured\x20—\x20verify\x20before\x20assuming\x20otherwise):\x20'+'query_toolkit\x20query_type=\x27service_panorama\x27\x20and\x20read\x20order_allocators;\x20immutable\x20after\x20publish,\x20so\x20orders\x20get\x20no\x20fund\x20distribution\x20if\x20never\x20configured\x20(IMMUT-002)');const o=g,p=numericBalance(o['compensation_fund_add']?.['balance']);if(p!==undefined&&p>0x0){const q=o['sales'],r=(Array['isArray'](q?.['sales'])?q['sales']:[])['map'](s=>numericBalance(s?.['price']?.['balance']))['filter'](s=>s!==undefined);if(r['length']>0x0){const s=r['reduce']((u,v)=>u+v,0x0),t=s*0x3;if(t>0x0){const u=p/t,v=getFundCoverageMin(),w='fund='+p+',\x20max\x20single\x20order=Σ(price×1)='+s+'\x20(quantity\x20set\x20at\x20buy\x20time),\x20'+('award\x20cap=3×order='+t+'\x20(MAX_INDEMNITY_MULTIPLE),\x20coverage='+u['toFixed'](0x2));if(v>0x0&&u<v)d['push']('pre_publish:\x20G7\x20advisory\x20—\x20compensation-fund\x20coverage\x20below\x20the\x20configured\x20minimum\x20—\x20'+w+'\x20<\x20'+v+'.\x20'+'Awards\x20beyond\x20the\x20fund\x20draw\x20from\x20the\x20merchant\x20wallet.\x20'+'Consider\x20adding\x20funds\x20(compensation_fund_add),\x20or\x20set\x20WOWOK_FUND_COVERAGE_MIN\x20'+'(0\x20silences\x20this\x20advisory).\x20Informational\x20—\x20does\x20not\x20block\x20publish');else u<0x1&&d['push']('pre_publish:\x20compensation-fund\x20coverage\x20below\x20the\x20award\x20ceiling\x20—\x20'+w+'\x20<\x201\x20—\x20'+'awards\x20beyond\x20the\x20fund\x20draw\x20from\x20the\x20merchant\x20wallet.\x20Informational');}}else d['push']('pre_publish:\x20compensation_fund_add\x20present\x20but\x20\x27sales\x27\x20absent\x20from\x20THIS\x20call\x20(sales\x20may\x20already\x20be\x20configured\x20—\x20verify,\x20do\x20not\x20assume):\x20'+'the\x20fund\x20should\x20cover\x203×\x20the\x20maximum\x20single-order\x20amount\x20(MAX_INDEMNITY_MULTIPLE=3).\x20'+'query_toolkit\x20query_type=\x27service_panorama\x27\x20to\x20read\x20the\x20current\x20sales\x20prices,\x20then\x20re-check\x20coverage');}}return{'critical':c,'warnings':d};}function buildHarnessBlockResult(a,b,c,d,e,f){const g=[...c['map'](i=>'CRITICAL:\x20'+i),...d['map'](i=>'WARN:\x20'+i)]['join']('\x0a'),h='Error:\x20'+b+(g?'\x0a'+g:'')+'\x0aRecovery:\x20'+f;return{'content':[{'type':'text','text':h}],'structuredContent':{'outcome':'failed','result':{'type':'error','error':b+'\x20[gate='+a+']','error_code':e,'retryable':![],'recovery_hint':f},'message':h,'recovery':recover(e,'harness:'+a)}};}function extractCriticalFindingCount(a){const b=a?.['structuredContent'];if(!b)return 0x0;const c=b['semantic'],d=c?.['summary'];if(typeof d?.['critical_count']==='number'&&d['critical_count']>0x0)return d['critical_count'];const e=b['findings']??c?.['findings'];if(Array['isArray'](e))return e['filter'](h=>h?.['severity']==='error')['length'];const f=a?.['content']?.['map'](h=>'text'in h?h['text']:'')['join']('\x0a')??'',g=f['match'](/\[AUDIT ERROR\]/g);return g?g['length']:0x0;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/agent-mcp",
3
- "version": "3.1.7",
3
+ "version": "3.2.1",
4
4
  "description": "Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -54,7 +54,7 @@
54
54
  "license": "Apache-2.0",
55
55
  "dependencies": {
56
56
  "@modelcontextprotocol/server": "^2.0.0",
57
- "@wowok/wowok": "3.1.7",
57
+ "@wowok/wowok": "3.2.1",
58
58
  "lodash": "^4.18.1",
59
59
  "zod": "^4.2.0"
60
60
  },
@@ -1 +0,0 @@
1
- import{mkdtempSync,writeFileSync}from'node:fs';import{tmpdir}from'node:os';import{join}from'node:path';import{afterAll,beforeAll,describe,expect,it}from'vitest';import{beginPolicyRun,endPolicyRun,factoryRulePack,getJudgmentDoc,judgmentStatus}from'../config/judgment.js';import{evaluateRuleBook}from'../config/rule-engine.js';import{serviceAllocatorAuditNodeAnalyzer}from'./service-allocator-audit-node.js';const CONFIG_DIR=mkdtempSync(join(tmpdir(),'wowok-alloc-audit-'));process['env']['WOWOK_CONFIG_DIR']=CONFIG_DIR;const PACK_IDS=['RC-FIND-01','RC-FIND-02','RC-FIND-03','RC-FIND-04','RC-FIND-05','RC-FIND-06','RC-FIND-07','RC-FIND-08','RC-FIND-09','RC-GAP','RC-SUMMARY'];function rule(a,b){const c=factoryRulePack('alloc_audit');if(!c)throw new Error('alloc_audit\x20factory\x20pack\x20missing');const d=c['rules']['find'](e=>e['rule_id']===a);if(!d)throw new Error('rule\x20'+a+'\x20missing');return evaluateRuleBook([d],b)['findings'][0x0];}const BASE={'host_service':'0xsvc','code':'RC-FIND-01','base_level':'high','evidence_paths':'(root)','evidence_count':0x0};function resnapshot(){endPolicyRun(),beginPolicyRun();}beforeAll(()=>{beginPolicyRun();}),afterAll(()=>{endPolicyRun();}),describe('alloc_audit\x20factory\x20parity\x20—\x20per-finding\x20rules',()=>{it('the\x20pack\x20carries\x20exactly\x20the\x20canonical\x20emission\x20ids',()=>{const a=factoryRulePack('alloc_audit');expect(a)['not']['toBeNull'](),expect(a['rules']['map'](b=>b['rule_id'])['sort']())['toEqual']([...PACK_IDS]['sort']());}),it('fact:base_level\x20passes\x20the\x20kernel\x20severity\x20through\x20unchanged',()=>{for(const a of['high','medium','low']){expect(rule('RC-FIND-01',{...BASE,'base_level':a})?.['level'])['toBe'](a);}}),it('copy\x20is\x20pack-owned\x20and\x20interpolates\x20the\x20kernel\x20facts',()=>{const a=rule('RC-FIND-01',{...BASE,'evidence_paths':'root.and(0)'});expect(a?.['title'])['toBe']('Fund\x20theft\x20risk:\x20Signer\x20recipient\x20without\x20caller\x20identity\x20constraint'),expect(a?.['description'])['toContain']('service\x200xsvc'),expect(a?.['description'])['toContain']('rule\x20RC-FIND-01,\x20evidence\x20paths\x20root.and(0)'),expect(a?.['mitigation'])['toContain']('do\x20NOT\x20pay\x20this\x20service\x20before\x20the\x20fix');}),it('fixed\x20levels\x20hold\x20where\x20the\x20kernel\x20hardcoded\x20them',()=>{expect(rule('RC-FIND-05',{...BASE,'code':'RC-FIND-05','base_level':'high'})?.['level'])['toBe']('medium'),expect(rule('RC-FIND-06',{...BASE,'code':'RC-FIND-06','base_level':'high'})?.['level'])['toBe']('low'),expect(rule('RC-FIND-07',{...BASE,'code':'RC-FIND-07','base_level':'high'})?.['level'])['toBe']('medium');}),it('shortfall\x20findings\x20(05/07)\x20carry\x20loss\x20parties\x20only\x20and\x20are\x20never\x20downgraded',()=>{for(const a of['RC-FIND-05','RC-FIND-07']){const b=rule(a,{...BASE,'code':a});expect(b?.['exposure']?.['gainPaths'])['toHaveLength'](0x0),expect(b?.['exposure']?.['lossParties']['length'])['toBeGreaterThan'](0x0),expect(b?.['exposure']?.['verdict'])['toBe']('confirmed'),expect(b?.['level'])['not']['toBe']('info');}expect(rule('RC-FIND-05',{...BASE,'code':'RC-FIND-05'})?.['exposure']?.['lossParties']['map'](c=>c['role']))['toEqual'](['supplier','buyer']);}),it('RC-FIND-08\x20keeps\x20its\x20level\x20as\x20pending-disclosure\x20(undecided\x20predicate)',()=>{const a=rule('RC-FIND-08',{...BASE,'code':'RC-FIND-08','base_level':'medium','evidence_count':0x2});expect(a?.['level'])['toBe']('medium'),expect(a?.['description'])['toContain']('composes\x202\x20sub-guard(s)'),expect(a?.['exposure']?.['verdict'])['toBe']('pending-disclosure'),expect(a?.['exposure']?.['gainPaths'][0x0]?.['viability'])['toBe']('unverifiable');}),it('RC-FIND-09\x20stays\x20low\x20(visibility\x20hint\x20—\x20omission\x20is\x20often\x20intended,\x20not\x20theft)',()=>{const a=rule('RC-FIND-09',{...BASE,'code':'RC-FIND-09','base_level':'low'});expect(a?.['level'])['toBe']('low'),expect(a?.['mitigation'])['toContain']('anchor\x20row'),expect(a?.['description'])['toContain']('confirm\x20it\x20is');}),it('an\x20unknown\x20canonical\x20code\x20fires\x20no\x20case\x20(kernel\x20fallback\x20stays\x20in\x20charge)',()=>{const a=factoryRulePack('alloc_audit'),b=a['rules']['find'](d=>d['rule_id']==='RC-FIND-01'),{findings:c}=evaluateRuleBook([b],{...BASE,'code':'RC-FIND-99'});expect(c)['toHaveLength'](0x0);});}),describe('alloc_audit\x20factory\x20parity\x20—\x20gap\x20and\x20verdict',()=>{it('RC-GAP\x20emits\x20info\x20with\x20the\x20unfetched\x20evidence\x20interpolated',()=>{const a=rule('RC-GAP',{'host_service':'0xsvc','unfetched_count':0x2,'unfetched_list':'0xa,\x200xb\x20(guard.relies)'});expect(a?.['level'])['toBe']('info'),expect(a?.['title'])['toContain']('evidence\x20gap'),expect(a?.['description'])['toContain']('references\x202\x20guard(s)'),expect(a?.['description'])['toContain']('0xa,\x200xb\x20(guard.relies)'),expect(a?.['exposure']?.['gainPaths'])['toHaveLength'](0x0),expect(a?.['exposure']?.['verdict'])['toBe']('confirmed');}),it('RC-SUMMARY\x20—\x20unsafe\x20wins\x20at\x20high,\x20with\x20and\x20without\x20the\x20residual\x20suffix',()=>{const a=rule('RC-SUMMARY',summaryFacts({'dest_unsafe':!![],'resolution_required':![]}));expect(a?.['level'])['toBe']('high'),expect(a?.['title'])['toBe']('Fund\x20destination\x20and\x20condition\x20integrity:\x20stealable\x20destination\x20exists'),expect(a?.['description'])['toContain']('WARNING:\x20an\x20unbound\x20Signer\x20direct-pay\x20path\x20exists'),expect(a?.['exposure']?.['gainPaths'][0x0]?.['viability'])['toBe']('viable'),expect(a?.['exposure']?.['verdict'])['toBe']('confirmed');const b=rule('RC-SUMMARY',summaryFacts({'dest_unsafe':!![],'resolution_required':!![]}));expect(b?.['level'])['toBe']('high'),expect(b?.['title'])['toBe']('Fund\x20destination\x20and\x20condition\x20integrity:\x20stealable\x20destination\x20exists\x20(residual\x20requires\x20explicit\x20decision)');}),it('RC-SUMMARY\x20—\x20safe\x20+\x20residual\x20is\x20medium\x20conditional\x20with\x20the\x20destinations\x20interpolated',()=>{const a=rule('RC-SUMMARY',summaryFacts({'dest_unsafe':![],'resolution_required':!![]}));expect(a?.['level'])['toBe']('medium'),expect(a?.['title'])['toBe']('Fund\x20destination\x20and\x20condition\x20integrity:\x20destination\x20safe\x20(residual\x20requires\x20explicit\x20decision)'),expect(a?.['exposure']?.['gainPaths'][0x0]?.['viability'])['toBe']('conditional'),expect(a?.['exposure']?.['lossParties'][0x0]?.['basis'])['toContain']('0xmerchant'),expect(a?.['exposure']?.['verdict'])['toBe']('confirmed');}),it('RC-SUMMARY\x20—\x20fully\x20safe\x20downgrades\x20to\x20info\x20(redirect\x20provably\x20blocked)',()=>{const a=rule('RC-SUMMARY',summaryFacts({'dest_unsafe':![],'resolution_required':![]}));expect(a?.['level'])['toBe']('info'),expect(a?.['title'])['toBe']('Fund\x20destination\x20and\x20condition\x20integrity:\x20destination\x20safe'),expect(a?.['exposure']?.['gainPaths'][0x0]?.['viability'])['toBe']('blocked'),expect(a?.['exposure']?.['verdict'])['toBe']('downgraded'),expect(a?.['exposure']?.['baseSeverity'])['toBe']('info');});});function summaryFacts(a){return{'host_service':'0xsvc','allocator_count':0x1,'guard_count':0x1,'destinations_text':'0xmerchant','dest_unsafe':a['dest_unsafe'],'resolution_required':a['resolution_required'],'audit_summary':'Analyzed\x201\x20allocator(s):\x201\x20actionable,\x200\x20unavoidable.'};}const GUARD='0xguard0000000000000000000000000000000000000000000000000000000001';function serviceNode(){return{'id':'0xsvc','kind':'object','state':'fetched','origins':[],'depth':0x0,'raw':{'data':{'order_allocators':{'allocators':[{'guard':GUARD,'sharing':[{'who':{'Signer':!![]},'sharing':'10000','mode':'Rate'}]}]}}}};}function guardNode(){return{'id':GUARD,'kind':'object','state':'fetched','origins':[],'depth':0x1,'raw':{'data':{'table':[],'root':{'type':'value','value':!![]}}}};}function viewport(){return{'visibleEdges':[{'id':'service.order_allocator_guard|0xsvc→'+GUARD,'schema':'service.order_allocator_guard','family':'F','from':'0xsvc','to':GUARD,'retention':'complete','observedAt':0x0}],'graph':{'nodes':new Map([[GUARD,guardNode()]])}};}function scopedGuardNode(a){return{'id':GUARD,'kind':'object','state':'fetched','origins':[],'depth':0x1,'raw':{'data':{'table':[{'identifier':0x0,'b_submission':!![],'value_type':a,'value':undefined,'name':'order_slot'},{'identifier':0x2,'b_submission':![],'value_type':'Address','value':'0xsvc','name':'svc'}],'root':{'type':'logic_and','nodes':[{'type':'logic_equal','nodes':[{'type':'query','query':'order.service','object':{'identifier':0x0}},{'type':'identifier','identifier':0x2}]}]}}}};}function scopedServiceNode(){return{'id':'0xsvc','kind':'object','state':'fetched','origins':[],'depth':0x0,'raw':{'data':{'order_allocators':{'allocators':[{'guard':GUARD,'sharing':[{'who':{'GuardIdentifier':0x0},'sharing':'10000','mode':'Rate'}]}]}}}};}function scopedViewport(a){return{'visibleEdges':[{'id':'service.order_allocator_guard|0xsvc→'+GUARD,'schema':'service.order_allocator_guard','family':'F','from':'0xsvc','to':GUARD,'retention':'complete','observedAt':0x0}],'graph':{'nodes':new Map([[GUARD,scopedGuardNode(a)]])}};}describe('alloc_audit\x20binding\x20—\x20identifier-constant\x20scope\x20binding\x20(docs#44-b)',()=>{it('does\x20NOT\x20fire\x20RC-FIND-02\x20when\x20the\x20table\x20constant\x20is\x20a\x20chain-serialized\x20type\x20name',()=>{const a=serviceAllocatorAuditNodeAnalyzer['run'](scopedServiceNode(),scopedViewport('Address'));expect(a['map'](c=>c['title'])['some'](c=>c['includes']('no\x20scope\x20binding')))['toBe'](![]);const b=a['find'](c=>c['title']['startsWith']('Fund\x20destination\x20and\x20condition\x20integrity'));expect(b?.['title'])['toContain']('destination\x20safe');}),it('does\x20NOT\x20fire\x20RC-FIND-02\x20when\x20the\x20table\x20constant\x20is\x20a\x20numeric\x20value_type\x20enum',()=>{const a=serviceAllocatorAuditNodeAnalyzer['run'](scopedServiceNode(),scopedViewport(0x1));expect(a['map'](c=>c['title'])['some'](c=>c['includes']('no\x20scope\x20binding')))['toBe'](![]);const b=a['find'](c=>c['title']['startsWith']('Fund\x20destination\x20and\x20condition\x20integrity'));expect(b?.['title'])['toContain']('destination\x20safe');});}),describe('alloc_audit\x20binding\x20—\x20end\x20to\x20end',()=>{it('a\x20signer-recipient\x20service\x20yields\x20the\x20pack-driven\x20theft\x20finding\x20+\x20unsafe\x20verdict',()=>{const a=serviceAllocatorAuditNodeAnalyzer['run'](serviceNode(),viewport());expect(a)['toHaveLength'](0x4);const [b,c,d,e]=a;expect(b['id'])['toBe']('ALC1:0xsvc#0'),expect(b['title'])['toBe']('Fund\x20theft\x20risk:\x20Signer\x20recipient\x20without\x20caller\x20identity\x20constraint'),expect(b['severity'])['toBe']('high'),expect(b['exposure']?.['verdict'])['toBe']('confirmed'),expect(b['exposure']?.['gainPaths'][0x0]?.['viability'])['toBe']('viable'),expect(b['detail'])['toContain']('service\x200xsvc'),expect(c['id'])['toBe']('ALC1:0xsvc#1'),expect(c['title'])['toBe']('Allocator\x20Guard\x20has\x20no\x20GuardIdentifier\x20sharing\x20row\x20—\x20bound\x20to\x20no\x20particular\x20order'),expect(c['severity'])['toBe']('low'),expect(d['id'])['toBe']('ALC1:0xsvc#2'),expect(d['title'])['toBe']('Permissionless\x20alloc\x20—\x20settlement\x20timing\x20can\x20be\x20front-run'),expect(d['severity'])['toBe']('low'),expect(d['exposure']?.['verdict'])['toBe']('confirmed'),expect(e['id'])['toBe']('ALC1:0xsvc#3'),expect(e['title'])['toBe']('Fund\x20destination\x20and\x20condition\x20integrity:\x20stealable\x20destination\x20exists'),expect(e['severity'])['toBe']('high'),expect(e['detail'])['toContain']('1\x20allocator(s)\x20/\x201\x20resolved\x20guard(s)');}),it('a\x20user\x20disable\x20suppresses\x20the\x20theft\x20finding;\x20the\x20verdict\x20stays',()=>{writeFileSync(join(CONFIG_DIR,'judgment.json'),JSON['stringify']({'version':0x1,'rules':{'domains':{'alloc_audit':{'rules':[{'rule_id':'RC-FIND-01','enabled':![]}]}}}}),'utf-8'),resnapshot();const a=serviceAllocatorAuditNodeAnalyzer['run'](serviceNode(),viewport());expect(a['map'](c=>c['title']))['toEqual'](['Allocator\x20Guard\x20has\x20no\x20GuardIdentifier\x20sharing\x20row\x20—\x20bound\x20to\x20no\x20particular\x20order','Permissionless\x20alloc\x20—\x20settlement\x20timing\x20can\x20be\x20front-run','Fund\x20destination\x20and\x20condition\x20integrity:\x20stealable\x20destination\x20exists']);const b=judgmentStatus();expect(b['user_doc_loaded'])['toBe'](!![]);}),it('a\x20fact:\x20reference\x20outside\x20the\x20factory\x20vocabulary\x20is\x20rejected\x20loudly;\x20the\x20factory\x20keeps\x20serving',()=>{writeFileSync(join(CONFIG_DIR,'judgment.json'),JSON['stringify']({'version':0x1,'rules':{'domains':{'alloc_audit':{'rules':[{'rule_id':'RC-FIND-01','cases':[{'when':{'field':'code','op':'eq','value':'RC-FIND-01'},'level':'fact:not_a_kernel_fact','title':'t','description':'d'}]}]}}}}),'utf-8'),void getJudgmentDoc(),resnapshot();const a=judgmentStatus();expect(a['last_reload_error'])['toContain']('fact:not_a_kernel_fact'),expect(a['last_reload_error'])['toContain']('RC-FIND-01');const b=serviceAllocatorAuditNodeAnalyzer['run'](serviceNode(),viewport());expect(b['map'](c=>c['title']))['toEqual'](['Allocator\x20Guard\x20has\x20no\x20GuardIdentifier\x20sharing\x20row\x20—\x20bound\x20to\x20no\x20particular\x20order','Permissionless\x20alloc\x20—\x20settlement\x20timing\x20can\x20be\x20front-run','Fund\x20destination\x20and\x20condition\x20integrity:\x20stealable\x20destination\x20exists']);});});
@@ -1 +0,0 @@
1
- import{describe,expect,it}from'vitest';import{EVENT_SEMANTIC_REGISTRY}from'./event-semantics.js';const EXPECTED_EVENTS=['NewOrderEvent','ArbEvent','ArbitrationEvent','VoteEvent','FeedbackEvent','DemandPresentEvent','DemandFeedbackEvent','DemandChangedEvent','ProgressEvent','NewEntityEvent','ServiceEvent','AllocationEvent','TreasuryEvent','RewardClaimEvent','RewardFundEvent','NewPaymentEvent'];describe('event\x20semantics\x20channel\x20ownership\x20(N-3)',()=>{it('registry\x20covers\x20all\x2016\x20framework\x20events',()=>{expect(EVENT_SEMANTIC_REGISTRY['map'](a=>a['name'])['sort']())['toEqual']([...EXPECTED_EVENTS]['sort']());}),it('every\x20entry\x20declares\x20at\x20least\x20one\x20consumer\x20channel',()=>{for(const a of EVENT_SEMANTIC_REGISTRY){expect(a['consumers']['length'],a['name']+'\x20has\x20no\x20consumer\x20channel')['toBeGreaterThan'](0x0);}}),it('an\x20entry\x20without\x20any\x20push\x20consumer\x20must\x20document\x20why\x20(channel_note)',()=>{const a=['suggestion_bridge','problem_bridge'];for(const b of EVENT_SEMANTIC_REGISTRY){const c=b['consumers']['some'](d=>a['includes'](d));!c&&expect(b['channel_note'],b['name']+'\x20lacks\x20push\x20consumers\x20but\x20has\x20no\x20channel_note')['toBeTruthy']();}}),it('the\x20deliberate\x20non-bridge\x20events\x20carry\x20their\x20documented\x20ownership',()=>{const a=new Map(EVENT_SEMANTIC_REGISTRY['map'](b=>[b['name'],b]));for(const b of['VoteEvent','DemandChangedEvent','NewEntityEvent','ArbitrationEvent']){expect(a['get'](b)?.['consumers'])['toEqual'](['intent_radar']);}expect(a['get']('NewPaymentEvent')?.['consumers'])['toEqual'](['keeper','intent_radar']);});});