@wowok/agent-mcp 3.2.3 → 3.2.4
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.
- package/dist/chain-semantics/field-capability.js +1 -1
- package/dist/chain-semantics/freeze-map.js +1 -1
- package/dist/chain-semantics/fund-flow.js +1 -1
- package/dist/chain-semantics/guard-verbs.js +1 -1
- package/dist/communication/proof-reuse.d.ts +9 -0
- package/dist/communication/proof-reuse.js +1 -0
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/engine.js +1 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/builtin-templates.d.ts +1 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-templates.js +1 -1
- package/dist/knowledge/progress-ledger.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +1 -0
- package/dist/knowledge/template-loader.d.ts +1 -0
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/radar-core.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/service-quote.js +1 -1
- package/dist/playbooks/service-build/service-quote.spec.d.ts +1 -0
- package/dist/playbooks/service-build/service-quote.spec.js +1 -0
- package/dist/review/index.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +4 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +1 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/interaction/index.d.ts +1 -1
- package/dist/schema/local/index.d.ts +10 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/query/bi.d.ts +26 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +1 -0
- package/dist/schemas/bridge_operation.output.json +1 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/local_cache_operation.output.json +1 -0
- package/dist/schemas/local_history_operation.output.json +1 -0
- package/dist/schemas/local_info_operation.output.json +1 -0
- package/dist/schemas/local_mark_operation.output.json +1 -0
- package/dist/schemas/onchain_operations.output.json +1 -0
- package/dist/schemas/onchain_operations.schema.json +3 -3
- package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1
- package/dist/schemas/onchain_operations_machine.schema.json +1 -1
- package/dist/schemas/onchain_operations_service.schema.json +1 -1
- package/dist/schemas/query_toolkit.output.json +91 -7
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
|
@@ -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','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
|
+
export const MOVE_FUNCTIONS={'allocation':['alloc','allocator_add','allocators','allocators_guard_at','allocators_length','assert_allocation_mode','assert_allocators_extension','assert_allocators_matched','assert_allocators_not_empty','create','new_with_balance','new_with_coin','receive','receive_new','sharing_for_address','sharing_for_guard_identifier','sharing_for_signer','sharing_imp'],'arb':['arbitration','arbitration_address','arbitrator_confirm','assert_permission','dedupe_indices','description_change','emit_arb_event','feedback','finish','new','normalize_votes','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_for_service','dispute_for_service_with_passport','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_publishable','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','destroy_for_testing','dispute','disputes_for_testing','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','mark_verified_for_testing','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','has_recipient','new','new_inner','new_self','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_rebind','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':['assert_task_is_order','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','dispute_v2','dispute_v2_with_passport','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_append','order_allocators_append_imp','order_allocators_append_with_passport','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','inflow','join_coins','new','new_imp','new_with_passport','outflow','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','allocators_guard_at','allocators_length','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_extension','assert_allocators_matched','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_publishable','assert_published','assert_rebind','assert_service_object_type','assert_submission_object_type','assert_task_is_order','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','dedupe_indices','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','destroy_for_testing','disaffiliation_core','disaffiliation_tx','discount_destroy','discount_send','discount_send_singleton','discount_with_passport','dispute_for_service','dispute_for_service_with_passport','dispute_v2','dispute_v2_with_passport','dispute_with_passport','disputes_for_testing','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_recipient','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','mark_verified_for_testing','new_imp','new_inner','new_self','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','normalize_votes','object_type_as_u8','object_type_from_u8','on_allocation','on_progress','on_progress_new','order_allocation','order_allocators_append','order_allocators_append_imp','order_allocators_append_with_passport','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_new','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'];
|
package/dist/tools/wrap.js
CHANGED
|
@@ -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,getFundCoverageMin,formatAmount}from'../knowledge/safety-rules.js';import{auditMachineNodes}from'../knowledge/audit-rules.js';import{lintGuard}from'../knowledge/guard-lint.js';import{batchQueryObjectsByIds,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=isBuyOperation(b,d),n=getHarnessTier();if(b==='goal_operation'&&i)try{const p=d,q=p?.['action'],r=p?.['project'],s=p?.['version'];if(q&&r&&s){const t=checkProjectStage(q,r,s);t&&g['push'](t);}}catch{}k&&n==='lightweight'&&(setHarnessTier('full'),g['push']('pre_publish:\x20tier\x20forced\x20to\x20full\x20for\x20publish-class\x20operation\x20(GLM5-21\x20§3.3)'));if(k&&n!=='off')try{const u=await runPrePublishChecks(b,d);g['push'](...u['warnings']);if(u['critical']['length']>0x0){for(const v of u['critical']){const x=recordCriticalRisk(v);if(x)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+x['reason']);}return buildHarnessBlockResult('pre_publish','Publish\x20BLOCKED\x20by\x20Harness\x20pre-publish\x20gate\x20(GLM5-21\x20V6):\x20'+(u['critical']['length']+'\x20CRITICAL\x20risk(s)\x20must\x20be\x20resolved\x20before\x20publish.'),u['critical'],u['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(y){g['push']('pre_publish\x20hook\x20failed:\x20'+(y instanceof Error?y['message']:String(y)));}if(l&&j)try{const z=extractData(d),A=z?extractAmount(z,{'excludeConfigAmounts':!![]}):null;if(A!==null){const B=getAmountThreshold();let C=null;try{C=BigInt(A);}catch{C=null;}if(C!==null&&C>B)return buildHarnessBlockResult('pre_sign','Sign\x20BLOCKED\x20by\x20Harness\x20pre-sign\x20gate\x20(GLM5-21\x20V7):\x20amount\x20'+formatAmount(C)+'\x20WOW\x20exceeds\x20the\x20full-tier\x20threshold\x20'+formatAmount(B)+'\x20WOW.',['amount\x20'+A+'\x20(smallest\x20unit)\x20>\x20threshold\x20'+B['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(D){g['push']('pre_sign\x20hook\x20failed:\x20'+(D instanceof Error?D['message']:String(D)));}if(m&&n!=='off')try{const E=await runPreBuyChecks(b,d);g['push'](...E['warnings']);if(E['critical']['length']>0x0){for(const F of E['critical']){const G=recordCriticalRisk(F);if(G)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+G['reason']);}return buildHarnessBlockResult('pre_buy','Purchase\x20BLOCKED\x20by\x20Harness\x20pre-buy\x20gate:\x20'+E['critical']['length']+'\x20CRITICAL\x20allocator\x20risk(s)\x20—\x20'+'paying\x20into\x20this\x20service\x20as\x20currently\x20configured\x20would\x20fail\x20on-chain\x20or\x20lock\x20funds\x20with\x20no\x20distribution\x20path.',E['critical'],E['warnings'],'state_conflict','Do\x20NOT\x20retry\x20this\x20purchase\x20against\x20the\x20current\x20service\x20state.\x20Read\x20the\x20service\x27s\x20effective\x20allocator\x20plan\x20'+'(query_toolkit\x20query_type=\x27service_panorama\x27,\x20field\x20order_allocators)\x20and\x20confirm\x20every\x20finding\x20above\x20is\x20resolved\x20'+'(merchant\x20fixes\x20the\x20plan\x20—\x20post-publish\x20append\x20is\x20allowed\x20—\x20or\x20the\x20guard\x20definitions\x20are\x20repaired).\x20'+'Only\x20retry\x20the\x20buy\x20after\x20the\x20on-chain\x20state\x20changes;\x20otherwise\x20choose\x20a\x20different\x20service.');}}catch(H){g['push']('pre_buy\x20hook\x20failed:\x20'+(H instanceof Error?H['message']:String(H)));}let o;try{o=await a(d,f);}catch(I){const J=I instanceof Error?I['message']:String(I),K=recordOperationFailure(b,J);K&&g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+K['reason']);if(b==='onchain_operations')try{const L=classifyError(J,I);if(!L['retryable']&&L['error_code']!=='unknown'){const M=recordCriticalOperation(b,L['error_code']);if(M)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+M['reason']);}}catch{}throw I;}if(b==='onchain_operations')try{if(classifyOutcome(o)==='failed'){const N=extractErrorCode(o)??'',O=classifyError(N);if(!O['retryable']&&O['error_code']!=='unknown'){const P=recordCriticalOperation(b,O['error_code']);if(P)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+P['reason']);}}}catch{}if(i&&!isOutcomeDiscriminated(o)){const Q=extractIntent(b,d)??b;try{const R=classifyOutcome(o);if(R==='failed'){const S=extractErrorCode(o)??'',T=classifyError(S),U=h['recover'](T['error_code'],Q,{'operation_type':b,'data':extractData(d)});g['push']('Harness\x20recover:\x20strategy='+U['strategy']+('\x20(attempt\x20'+U['current_attempt']+'/'+U['max_attempts']+')')+(U['should_retry']?'\x20—\x20retryable':'\x20—\x20do\x20NOT\x20retry\x20blindly')+(U['user_prompt']?'\x20—\x20'+U['user_prompt']:'\x20—\x20'+U['detail']));}else R==='success'&&h['resetRecovery'](Q);}catch(V){g['push']('recover\x20hook\x20failed:\x20'+(V instanceof Error?V['message']:String(V)));}}if(b==='goal_operation')try{const W=d?.['action'];if(W==='trace_substeps'){const X=extractCriticalFindingCount(o);if(X>0x0){const Y=recordSubstepFailure(String(W)+':\x20'+X+'\x20critical\x20finding(s)');if(Y)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+Y['reason']);}}}catch{}if(isWriteClassTool(b)&&!SEMANTIC_RECORDED_TOOLS['has'](b))try{const Z=extractOperationType(b,d)??b,a0=extractIntent(b,d)??b,a1=extractData(d)??d,a2=classifyOutcome(o),a3=extractErrorCode(o),a4=isEnabled('experience_layer');if(a4)recordOperationOutcome(Z,a1,a0,a2,a3);else{const a5=extractIndustry(d);a5&&isEnabled('industry_evolution')&&recordIndustrySignal(a5,{'type':Z},{'success':a2==='success','error_code':a3});}}catch(a6){g['push']('signal\x20collection\x20failed:\x20'+(a6 instanceof Error?a6['message']:String(a6)));}if(g['length']>0x0){if(o?.['structuredContent']){const a7=o['structuredContent'],a8=a7['semantic'];if(a8){const a9=Array['isArray'](a8['warnings'])?a8['warnings']:[];a8['warnings']=[...a9,...g];}else for(const aa of g){console['warn']('[harness]\x20'+aa);}}else for(const ab of g){console['warn']('[harness]\x20'+ab);}}return o;};}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 isBuyOperation(a,b){if(a!=='onchain_operations')return![];if(extractOperationType(a,b)!=='service')return![];const c=extractData(b);return c?.['buy']!=null&&typeof c['object']==='string'&&c['object']!=='';}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);if(typeof a==='bigint')return Number(a);return undefined;}function collectAllocatorGuards(b){const c=new Map();for(const d of b){const e=d?.['allocators'];if(!Array['isArray'](e))continue;for(const f of e){const g=f?.['guard'];if(typeof g!=='string'||g['trim']()==='')continue;const h=g['toLowerCase']();let i=c['get'](h);!i&&(i={'ref':g,'recipients':new Set()},c['set'](h,i));const j=f?.['sharing'];if(!Array['isArray'](j))continue;for(const k of j){const l=k?.['who'];if(!l||typeof l!=='object')continue;if('Signer'in l)i['recipients']['add']('Signer');else{if('Entity'in l)i['recipients']['add']('Entity');else{if('GuardIdentifier'in l)i['recipients']['add']('GuardIdentifier');}}}}}return c;}async function lintAllocatorGuardSet(a,b,c,f){const h=[],i=[],j=collectAllocatorGuards(a);if(j['size']===0x0)return{'critical':h,'warnings':i};let l;try{l=await batchQueryObjectsByIds([...j['values']()]['map'](n=>n['ref']),b,!![]);}catch(n){return i['push'](c+':\x20allocator\x20guard\x20lint\x20skipped\x20—\x20could\x20not\x20query\x20guard\x20objects\x20'+('('+(n instanceof Error?n['message']:String(n))+');\x20')+(c==='pre_buy'?'the\x20guard\x20layer\x20of\x20this\x20service\x27s\x20allocator\x20plan\x20is\x20UNVERIFIED\x20—\x20verify\x20the\x20guards\x20yourself\x20before\x20trusting\x20this\x20buy':'run\x20guard\x20lint\x20manually\x20BEFORE\x20publish\x20(order_allocators\x20immutable\x20after\x20publish,\x20IMMUT-002)')),{'critical':h,'warnings':i};}const m=new Map();for(const o of l??[]){const p=o;if(p?.['type']!=='Guard')continue;for(const q of[p['query_name'],p['object']]){if(typeof q==='string'&&q!=='')m['set'](q['toLowerCase'](),p);}}for(const [r,s]of j){const t=m['get'](r);if(!t){const y=c+':\x20allocator\x20guard\x20\x22'+s['ref']+'\x22\x20not\x20found\x20on-chain\x20—\x20'+(f==='critical'?'the\x20pool\x20accepts\x20funds\x20but\x20no\x20distribution\x20run\x20can\x20ever\x20pass\x20a\x20missing\x20guard\x20(fund-lock\x20risk)':'lint\x20skipped\x20for\x20this\x20guard;\x20verify\x20the\x20guard\x20exists\x20and\x20is\x20final\x20BEFORE\x20publish\x20(order_allocators\x20immutable\x20after\x20publish,\x20IMMUT-002)');if(f==='critical')h['push'](y);else i['push'](y);continue;}const u=t['data']??t,v=Array['isArray'](u?.['table'])?u['table']:[],w=Array['isArray'](u?.['relies'])?u['relies']:[],x={'description':typeof u?.['description']==='string'?u['description']:undefined,'table':v['map'](z=>({'identifier':Number(z?.['identifier']??0x0),'b_submission':!!z?.['b_submission'],'value_type':z?.['value_type']!==undefined?String(z['value_type']):undefined,'value':z?.['value'],'name':z?.['name']!==undefined?String(z['name']):undefined,'object_type':z?.['object_type']!==undefined?String(z['object_type']):undefined})),'root':u?.['root'],'rely':w['length']>0x0?{'guards':w['map'](z=>String(z)),'logic_or':!u?.['relies_logic_and']}:undefined,'binding_hint':{'host_object':'Service','binding_field':'order_allocators','sharing_recipients':s['recipients']['size']>0x0?[...s['recipients']]:undefined}};try{const z=await lintGuard(x,{'auto_fix':![]});for(const A of z['diagnostics']){const B=c+':\x20allocator\x20guard\x20\x22'+s['ref']+'\x22\x20'+A['code']+'\x20('+A['source']+'):\x20'+A['message']+'\x20at\x20'+A['location']['path'];if(A['severity']==='error')h['push'](B);else{if(A['severity']==='warning')i['push'](B);}}}catch(C){i['push'](c+':\x20allocator\x20guard\x20\x22'+s['ref']+'\x22\x20lint\x20failed\x20'+('('+(C instanceof Error?C['message']:String(C))+')\x20—\x20non-blocking'));}}return{'critical':h,'warnings':i};}async function lintAllocatorGuards(a,b){return lintAllocatorGuardSet([a['order_allocators'],a['order_allocators_append']],b,'pre_publish','warning');}async function runPreBuyChecks(a,b){const c=[],d=[],f=extractData(b)??{},g=b?.['env']?.['network'],h=f['object'];let i;try{i=await batchQueryObjectsByIds([h],g,!![]);}catch(m){return d['push']('pre_buy:\x20allocator\x20screening\x20DEGRADED\x20—\x20could\x20not\x20query\x20service\x20\x22'+h+'\x22\x20'+('('+(m instanceof Error?m['message']:String(m))+');\x20the\x20purchase\x20was\x20NOT\x20screened.\x20')+'Verify\x20the\x20service\x27s\x20order_allocators\x20yourself\x20(query_toolkit\x20query_type=\x27service_panorama\x27)\x20before\x20trusting\x20this\x20buy'),{'critical':c,'warnings':d};}const j=(i??[])['find'](n=>n?.['type']==='Service');if(!j)return d['push']('pre_buy:\x20allocator\x20screening\x20DEGRADED\x20—\x20service\x20\x22'+h+'\x22\x20not\x20found\x20on-chain\x20(or\x20not\x20yet\x20indexed);\x20'+'the\x20purchase\x20was\x20NOT\x20screened.\x20Verify\x20the\x20address/network\x20and\x20the\x20service\x27s\x20order_allocators\x20before\x20trusting\x20this\x20buy'),{'critical':c,'warnings':d};const k=j['data']??j;k['bPublished']!==!![]&&c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20is\x20NOT\x20published\x20—\x20the\x20buy\x20aborts\x20on-chain\x20(E_NOT_PUBLISHED)');k['bPaused']===!![]&&c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20is\x20paused\x20—\x20the\x20buy\x20aborts\x20on-chain\x20(E_PAUSED)');const l=k['order_allocators'];if(l==null)c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20has\x20NO\x20order_allocators\x20—\x20the\x20payment\x20step\x20aborts\x20(no\x20distribution\x20plan).\x20'+'Funds\x20committed\x20to\x20this\x20service\x20would\x20have\x20NO\x20distribution\x20path\x20(the\x20fund-lock\x20incident\x20class).\x20'+'Do\x20not\x20buy\x20until\x20the\x20merchant\x20configures\x20an\x20allocator\x20plan');else{if(!Array['isArray'](l['allocators'])||l['allocators']['length']===0x0)c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20order_allocators\x20is\x20EMPTY\x20—\x20the\x20payment\x20step\x20aborts\x20(EALLOCATORS_EMPTY).\x20'+'Do\x20not\x20buy\x20until\x20the\x20merchant\x20configures\x20at\x20least\x20one\x20allocator');else{const n=f['buy'],o=Array['isArray'](n?.['items'])?n['items']:[],p=Array['isArray'](k['sales'])?k['sales']:[];let q=0x0,r=o['length']>0x0;const s=[];for(const v of o){const w=v,x=numericBalance(w?.['quantity']),y=p['find'](A=>A?.['name']===w?.['name']),z=numericBalance(y?.['price']);if(x===undefined||z===undefined){r=![],s['push'](typeof w?.['name']==='string'?w['name']:JSON['stringify'](w?.['name']));continue;}q+=z*x;}const t=numericBalance(l['threshold']);if(!r)d['push']('pre_buy:\x20could\x20not\x20price\x20'+s['length']+'\x20cart\x20item(s)\x20['+s['join'](',\x20')+']\x20against\x20the\x20service\x27s\x20on-chain\x20sales\x20—\x20'+'allocator-threshold\x20coverage\x20UNVERIFIED\x20for\x20this\x20cart\x20(unknown\x20items\x20also\x20abort\x20the\x20quote\x20step).\x20'+'Confirm\x20every\x20item\x20name\x20matches\x20a\x20current\x20sale\x20entry');else t!==undefined&&t>q&&c['push']('pre_buy:\x20allocator\x20threshold\x20'+t+'\x20exceeds\x20this\x20cart\x27s\x20total\x20'+q+'\x20(Σ\x20price×quantity\x20over\x20the\x20on-chain\x20sales)\x20—\x20'+'the\x20payment\x20step\x20aborts\x20(EINSUFFICIENT_BALANCE):\x20pool\x20creation\x20requires\x20amount\x20>=\x20threshold.\x20'+'The\x20merchant\x20must\x20lower\x20the\x20threshold\x20(new\x20service\x20—\x20threshold\x20is\x20frozen\x20at\x20publish)\x20or\x20the\x20cart\x20must\x20grow');n?.['discount']!=null&&r&&t!==undefined&&t<=q&&d['push']('pre_buy:\x20a\x20discount\x20is\x20applied\x20—\x20the\x20discounted\x20total\x20may\x20fall\x20below\x20the\x20list\x20total\x20'+q+'\x20used\x20here;\x20'+('if\x20it\x20lands\x20under\x20the\x20allocator\x20threshold\x20'+t+',\x20the\x20payment\x20step\x20aborts\x20(EINSUFFICIENT_BALANCE)'));const u=await lintAllocatorGuardSet([l],g,'pre_buy','critical');c['push'](...u['critical']),d['push'](...u['warnings']);}}return{'critical':c,'warnings':d};}export async function runPrePublishChecks(a,b){const c=[],d=[],f=extractOperationType(a,b),g=extractData(b)??{},h=b?.['env']?.['network'];if(f==='machine'){const i=g['node'];let j=Array['isArray'](i)?i:Array['isArray'](i?.['nodes'])?i['nodes']:[];if(j['length']===0x0&&typeof g['object']==='string'){const k=g['object'];try{const l=await fetchMachineNodes(k,h,!![]);l['length']>0x0&&(j=l,d['push']('pre_publish:\x20machine\x20\x22'+k+'\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'+k+'\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(j['length']>0x0){const n=auditMachineNodes(j);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 r=o['sales'],s=(Array['isArray'](r?.['sales'])?r['sales']:[])['map'](t=>numericBalance(t?.['price']?.['balance']))['filter'](t=>t!==undefined);if(s['length']>0x0){const t=s['reduce']((v,w)=>v+w,0x0),u=t*0x3;if(u>0x0){const v=p/u,w=getFundCoverageMin(),x='fund='+p+',\x20max\x20single\x20order=Σ(price×1)='+t+'\x20(quantity\x20set\x20at\x20buy\x20time),\x20'+('award\x20cap=3×order='+u+'\x20(MAX_INDEMNITY_MULTIPLE),\x20coverage='+v['toFixed'](0x2));if(w>0x0&&v<w)d['push']('pre_publish:\x20G7\x20advisory\x20—\x20compensation-fund\x20coverage\x20below\x20the\x20configured\x20minimum\x20—\x20'+x+'\x20<\x20'+w+'.\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 v<0x1&&d['push']('pre_publish:\x20compensation-fund\x20coverage\x20below\x20the\x20award\x20ceiling\x20—\x20'+x+'\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');}const q=await lintAllocatorGuards(o,h);c['push'](...q['critical']),d['push'](...q['warnings']);}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;}
|
|
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{lintGuard}from'../knowledge/guard-lint.js';import{batchQueryObjectsByIds,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=isBuyOperation(b,d),n=getHarnessTier();if(b==='goal_operation'&&i)try{const p=d,q=p?.['action'],r=p?.['project'],s=p?.['version'];if(q&&r&&s){const t=checkProjectStage(q,r,s);t&&g['push'](t);}}catch{}k&&n==='lightweight'&&(setHarnessTier('full'),g['push']('pre_publish:\x20tier\x20forced\x20to\x20full\x20for\x20publish-class\x20operation\x20(GLM5-21\x20§3.3)'));if(k&&n!=='off')try{const u=await runPrePublishChecks(b,d);g['push'](...u['warnings']);if(u['critical']['length']>0x0){for(const v of u['critical']){const x=recordCriticalRisk(v);if(x)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+x['reason']);}return buildHarnessBlockResult('pre_publish','Publish\x20BLOCKED\x20by\x20Harness\x20pre-publish\x20gate\x20(GLM5-21\x20V6):\x20'+(u['critical']['length']+'\x20CRITICAL\x20risk(s)\x20must\x20be\x20resolved\x20before\x20publish.'),u['critical'],u['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(y){g['push']('pre_publish\x20hook\x20failed:\x20'+(y instanceof Error?y['message']:String(y)));}if(l&&j)try{const z=extractData(d),A=z?extractAmount(z,{'excludeConfigAmounts':!![]}):null;if(A!==null){const B=getAmountThreshold();let C=null;try{C=BigInt(A);}catch{C=null;}if(C!==null&&C>B)return buildHarnessBlockResult('pre_sign','Sign\x20BLOCKED\x20by\x20Harness\x20pre-sign\x20gate\x20(GLM5-21\x20V7):\x20amount\x20'+formatAmount(C)+'\x20WOW\x20exceeds\x20the\x20full-tier\x20threshold\x20'+formatAmount(B)+'\x20WOW.',['amount\x20'+A+'\x20(smallest\x20unit)\x20>\x20threshold\x20'+B['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(D){g['push']('pre_sign\x20hook\x20failed:\x20'+(D instanceof Error?D['message']:String(D)));}if(m&&n!=='off')try{const E=await runPreBuyChecks(b,d);g['push'](...E['warnings']);if(E['critical']['length']>0x0){for(const F of E['critical']){const G=recordCriticalRisk(F);if(G)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+G['reason']);}return buildHarnessBlockResult('pre_buy','Purchase\x20BLOCKED\x20by\x20Harness\x20pre-buy\x20gate:\x20'+E['critical']['length']+'\x20CRITICAL\x20allocator\x20risk(s)\x20—\x20'+'paying\x20into\x20this\x20service\x20as\x20currently\x20configured\x20would\x20fail\x20on-chain\x20or\x20lock\x20funds\x20with\x20no\x20distribution\x20path.',E['critical'],E['warnings'],'state_conflict','Do\x20NOT\x20retry\x20this\x20purchase\x20against\x20the\x20current\x20service\x20state.\x20Read\x20the\x20service\x27s\x20effective\x20allocator\x20plan\x20'+'(query_toolkit\x20query_type=\x27service_panorama\x27,\x20field\x20order_allocators)\x20and\x20confirm\x20every\x20finding\x20above\x20is\x20resolved\x20'+'(merchant\x20fixes\x20the\x20plan\x20—\x20post-publish\x20append\x20is\x20allowed\x20—\x20or\x20the\x20guard\x20definitions\x20are\x20repaired).\x20'+'Only\x20retry\x20the\x20buy\x20after\x20the\x20on-chain\x20state\x20changes;\x20otherwise\x20choose\x20a\x20different\x20service.');}}catch(H){g['push']('pre_buy\x20hook\x20failed:\x20'+(H instanceof Error?H['message']:String(H)));}let o;try{o=await a(d,f);}catch(I){const J=I instanceof Error?I['message']:String(I),K=recordOperationFailure(b,J);K&&g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+K['reason']);if(b==='onchain_operations')try{const L=classifyError(J,I);if(!L['retryable']&&L['error_code']!=='unknown'){const M=recordCriticalOperation(b,L['error_code']);if(M)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+M['reason']);}}catch{}throw I;}if(b==='onchain_operations')try{if(classifyOutcome(o)==='failed'){const N=extractErrorCode(o)??'',O=classifyError(N);if(!O['retryable']&&O['error_code']!=='unknown'){const P=recordCriticalOperation(b,O['error_code']);if(P)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+P['reason']);}}}catch{}if(i&&!isOutcomeDiscriminated(o)){const Q=extractIntent(b,d)??b;try{const R=classifyOutcome(o);if(R==='failed'){const S=extractErrorCode(o)??'',T=classifyError(S),U=h['recover'](T['error_code'],Q,{'operation_type':b,'data':extractData(d)});g['push']('Harness\x20recover:\x20strategy='+U['strategy']+('\x20(attempt\x20'+U['current_attempt']+'/'+U['max_attempts']+')')+(U['should_retry']?'\x20—\x20retryable':'\x20—\x20do\x20NOT\x20retry\x20blindly')+(U['user_prompt']?'\x20—\x20'+U['user_prompt']:'\x20—\x20'+U['detail']));}else R==='success'&&h['resetRecovery'](Q);}catch(V){g['push']('recover\x20hook\x20failed:\x20'+(V instanceof Error?V['message']:String(V)));}}if(b==='goal_operation')try{const W=d?.['action'];if(W==='trace_substeps'){const X=extractCriticalFindingCount(o);if(X>0x0){const Y=recordSubstepFailure(String(W)+':\x20'+X+'\x20critical\x20finding(s)');if(Y)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+Y['reason']);}}}catch{}if(isWriteClassTool(b)&&!SEMANTIC_RECORDED_TOOLS['has'](b))try{const Z=extractOperationType(b,d)??b,a0=extractIntent(b,d)??b,a1=extractData(d)??d,a2=classifyOutcome(o),a3=extractErrorCode(o),a4=isEnabled('experience_layer');if(a4)recordOperationOutcome(Z,a1,a0,a2,a3);else{const a5=extractIndustry(d);a5&&isEnabled('industry_evolution')&&recordIndustrySignal(a5,{'type':Z},{'success':a2==='success','error_code':a3});}}catch(a6){g['push']('signal\x20collection\x20failed:\x20'+(a6 instanceof Error?a6['message']:String(a6)));}if(g['length']>0x0){if(o?.['structuredContent']){const a7=o['structuredContent'],a8=a7['semantic'];if(a8){const a9=Array['isArray'](a8['warnings'])?a8['warnings']:[];a8['warnings']=[...a9,...g];}else for(const aa of g){console['warn']('[harness]\x20'+aa);}}else for(const ab of g){console['warn']('[harness]\x20'+ab);}}return o;};}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 isBuyOperation(a,b){if(a!=='onchain_operations')return![];if(extractOperationType(a,b)!=='service')return![];const c=extractData(b);return c?.['buy']!=null&&typeof c['object']==='string'&&c['object']!=='';}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);if(typeof a==='bigint')return Number(a);return undefined;}function collectAllocatorGuards(b){const c=new Map();for(const d of b){const e=d?.['allocators'];if(!Array['isArray'](e))continue;for(const f of e){const g=f?.['guard'];if(typeof g!=='string'||g['trim']()==='')continue;const h=g['toLowerCase']();let i=c['get'](h);!i&&(i={'ref':g,'recipients':new Set()},c['set'](h,i));const j=f?.['sharing'];if(!Array['isArray'](j))continue;for(const k of j){const l=k?.['who'];if(!l||typeof l!=='object')continue;if('Signer'in l)i['recipients']['add']('Signer');else{if('Entity'in l)i['recipients']['add']('Entity');else{if('GuardIdentifier'in l)i['recipients']['add']('GuardIdentifier');}}}}}return c;}async function lintAllocatorGuardSet(a,b,c,f){const h=[],i=[],j=collectAllocatorGuards(a);if(j['size']===0x0)return{'critical':h,'warnings':i};let l;try{l=await batchQueryObjectsByIds([...j['values']()]['map'](n=>n['ref']),b,!![]);}catch(n){return i['push'](c+':\x20allocator\x20guard\x20lint\x20skipped\x20—\x20could\x20not\x20query\x20guard\x20objects\x20'+('('+(n instanceof Error?n['message']:String(n))+');\x20')+(c==='pre_buy'?'the\x20guard\x20layer\x20of\x20this\x20service\x27s\x20allocator\x20plan\x20is\x20UNVERIFIED\x20—\x20verify\x20the\x20guards\x20yourself\x20before\x20trusting\x20this\x20buy':'run\x20guard\x20lint\x20manually\x20BEFORE\x20publish\x20(order_allocators\x20immutable\x20after\x20publish,\x20IMMUT-002)')),{'critical':h,'warnings':i};}const m=new Map();for(const o of l??[]){const p=o;if(p?.['type']!=='Guard')continue;for(const q of[p['query_name'],p['object']]){if(typeof q==='string'&&q!=='')m['set'](q['toLowerCase'](),p);}}for(const [r,s]of j){const t=m['get'](r);if(!t){const y=c+':\x20allocator\x20guard\x20\x22'+s['ref']+'\x22\x20not\x20found\x20on-chain\x20—\x20'+(f==='critical'?'the\x20pool\x20accepts\x20funds\x20but\x20no\x20distribution\x20run\x20can\x20ever\x20pass\x20a\x20missing\x20guard\x20(fund-lock\x20risk)':'lint\x20skipped\x20for\x20this\x20guard;\x20verify\x20the\x20guard\x20exists\x20and\x20is\x20final\x20BEFORE\x20publish\x20(order_allocators\x20immutable\x20after\x20publish,\x20IMMUT-002)');if(f==='critical')h['push'](y);else i['push'](y);continue;}const u=t['data']??t,v=Array['isArray'](u?.['table'])?u['table']:[],w=Array['isArray'](u?.['relies'])?u['relies']:[],x={'description':typeof u?.['description']==='string'?u['description']:undefined,'table':v['map'](z=>({'identifier':Number(z?.['identifier']??0x0),'b_submission':!!z?.['b_submission'],'value_type':z?.['value_type']!==undefined?String(z['value_type']):undefined,'value':z?.['value'],'name':z?.['name']!==undefined?String(z['name']):undefined,'object_type':z?.['object_type']!==undefined?String(z['object_type']):undefined})),'root':u?.['root'],'rely':w['length']>0x0?{'guards':w['map'](z=>String(z)),'logic_or':!u?.['relies_logic_and']}:undefined,'binding_hint':{'host_object':'Service','binding_field':'order_allocators','sharing_recipients':s['recipients']['size']>0x0?[...s['recipients']]:undefined}};try{const z=await lintGuard(x,{'auto_fix':![]});for(const A of z['diagnostics']){const B=c+':\x20allocator\x20guard\x20\x22'+s['ref']+'\x22\x20'+A['code']+'\x20('+A['source']+'):\x20'+A['message']+'\x20at\x20'+A['location']['path'];if(A['severity']==='error')h['push'](B);else{if(A['severity']==='warning')i['push'](B);}}}catch(C){i['push'](c+':\x20allocator\x20guard\x20\x22'+s['ref']+'\x22\x20lint\x20failed\x20'+('('+(C instanceof Error?C['message']:String(C))+')\x20—\x20non-blocking'));}}return{'critical':h,'warnings':i};}async function lintAllocatorGuards(a,b){return lintAllocatorGuardSet([a['order_allocators'],a['order_allocators_append']],b,'pre_publish','warning');}async function checkArbitrationNeutrality(b,c){const d=[],f=[],g=[],h=p=>{const q=typeof p==='string'?p:p?.['object']??p?.['name'];if(typeof q==='string'&&q!==''&&!g['includes'](q))g['push'](q);};for(const p of Array['isArray'](b['arbitrations'])?b['arbitrations']:[])h(p);let i=typeof b['permission']==='string'?b['permission']:undefined;const j=typeof b['object']==='string'?b['object']:undefined;if(j){let q;try{const r=await batchQueryObjectsByIds([j],c,!![]);q=(r??[])['find'](s=>s?.['type']==='Service');}catch(s){f['push']('pre_publish:\x20arbitration\x20neutrality\x20check\x20DEGRADED\x20—\x20could\x20not\x20query\x20service\x20\x22'+j+'\x22\x20'+('('+(s instanceof Error?s['message']:String(s))+').\x20Verify\x20manually\x20that\x20every\x20bound\x20arbitration\x27s\x20')+'Permission\x20owner/admin\x20set\x20is\x20DISJOINT\x20from\x20the\x20service\x27s\x20controller\x20keys\x20before\x20publishing');}if(q){const t=q['data']??q;if(!i&&typeof t['permission']==='string')i=t['permission'];for(const u of Array['isArray'](t['arbitrations'])?t['arbitrations']:[])h(u);}}if(g['length']===0x0)return{'critical':d,'warnings':f};if(!i)return f['push']('pre_publish:\x20arbitration\x20neutrality\x20check\x20DEGRADED\x20—\x20the\x20service\x20Permission\x20address\x20is\x20not\x20resolvable\x20'+'from\x20this\x20call\x20(no\x20payload\x20\x27permission\x27,\x20service\x20object\x20not\x20found).\x20The\x20bound\x20arbitrations\x27\x20controller\x20'+'keys\x20are\x20UNVERIFIED:\x20confirm\x20each\x20arbitration\x20Permission\x27s\x20owner/admin\x20set\x20is\x20disjoint\x20from\x20the\x20service\x27s\x20'+'controller\x20keys\x20(same-controller\x20arbitration\x20=\x20the\x20merchant\x20can\x20rule\x20their\x20own\x20disputes)'),{'critical':d,'warnings':f};let k;try{k=await batchQueryObjectsByIds([i,...g],c,!![]);}catch(v){return f['push']('pre_publish:\x20arbitration\x20neutrality\x20check\x20DEGRADED\x20—\x20object\x20query\x20failed\x20'+('('+(v instanceof Error?v['message']:String(v))+').\x20Verify\x20the\x20arbitration\x20Permissions\x27\x20owner/admin\x20sets\x20')+'are\x20disjoint\x20from\x20the\x20service\x27s\x20controller\x20keys\x20before\x20publishing'),{'critical':d,'warnings':f};}const l=w=>(k??[])['find'](x=>{const y=x;return typeof y?.['object']==='string'&&y['object']['toLowerCase']()===w['toLowerCase']()||typeof y?.['query_name']==='string'&&y['query_name']['toLowerCase']()===w['toLowerCase']();}),m=w=>{if(!w)return new Set();const x=w['data']??w,y=new Set();for(const z of[x['owner'],x['builder']])if(typeof z==='string'&&z)y['add'](z['toLowerCase']());for(const A of Array['isArray'](x['admin'])?x['admin']:[])if(typeof A==='string'&&A)y['add'](A['toLowerCase']());return y;},n=l(i),o=m(n);if(o['size']===0x0)return f['push']('pre_publish:\x20arbitration\x20neutrality\x20check\x20DEGRADED\x20—\x20service\x20Permission\x20\x22'+i+'\x22\x20not\x20found\x20or\x20'+'carries\x20no\x20owner/admin\x20list.\x20The\x20bound\x20arbitrations\x27\x20controller\x20keys\x20are\x20UNVERIFIED\x20—\x20confirm\x20disjointness\x20manually'),{'critical':d,'warnings':f};for(const w of g){const x=l(w);if(!x){f['push']('pre_publish:\x20arbitration\x20\x22'+w+'\x22\x20not\x20found\x20on-chain\x20(or\x20not\x20yet\x20indexed)\x20—\x20its\x20Permission\x20controller\x20'+'keys\x20are\x20UNVERIFIED.\x20Confirm\x20the\x20arbitration\x20Permission\x27s\x20owner/admin\x20set\x20is\x20disjoint\x20from\x20the\x20service\x27s\x20'+'controller\x20keys\x20(same-controller\x20arbitration\x20=\x20the\x20merchant\x20can\x20rule\x20their\x20own\x20disputes)');continue;}const y=x['data']??x,z=typeof y['permission']==='string'?y['permission']:undefined;if(!z){f['push']('pre_publish:\x20arbitration\x20\x22'+w+'\x22\x20exposes\x20no\x20permission\x20address\x20—\x20controller-key\x20disjointness\x20UNVERIFIED');continue;}if(z['toLowerCase']()===i['toLowerCase']()){d['push']('pre_publish:\x20R-ARB-SAME-CONTROLLER\x20—\x20arbitration\x20\x22'+w+'\x22\x20shares\x20the\x20service\x27s\x20Permission\x20object\x20'+('('+i+').\x20The\x20chain\x20aborts\x20this\x20binding\x20(E_ARBITRATION_PERMISSION_CONFLICT);\x20bind\x20an\x20')+'arbitration\x20with\x20its\x20own\x20independent\x20Permission');continue;}if(!l(z))try{const D=await batchQueryObjectsByIds([z],c,!![]);k=[...k??[],...D??[]];}catch(E){f['push']('pre_publish:\x20arbitration\x20\x22'+w+'\x22\x20Permission\x20\x22'+z+'\x22\x20could\x20not\x20be\x20queried\x20'+('('+(E instanceof Error?E['message']:String(E))+')\x20—\x20controller-key\x20disjointness\x20UNVERIFIED'));continue;}const A=m(l(z));if(A['size']===0x0){f['push']('pre_publish:\x20arbitration\x20\x22'+w+'\x22\x20Permission\x20\x22'+z+'\x22\x20not\x20found\x20or\x20carries\x20no\x20owner/admin\x20list\x20—\x20'+'controller-key\x20disjointness\x20UNVERIFIED');continue;}const B=[...o]['filter'](F=>A['has'](F));B['length']>0x0&&d['push']('pre_publish:\x20R-ARB-SAME-CONTROLLER\x20—\x20the\x20arbitration\x20\x22'+w+'\x22\x20is\x20NOT\x20controller-independent:\x20'+('EOA(s)\x20'+B['join'](',\x20')+'\x20appear\x20in\x20BOTH\x20the\x20service\x20Permission\x20('+i+')\x20and\x20the\x20')+('arbitration\x20Permission\x20('+z+')\x20owner/admin\x20sets.\x20Object\x20isolation\x20is\x20enforced\x20on-chain\x20')+'(different\x20Permission\x20objects),\x20but\x20controller\x20isolation\x20is\x20NOT:\x20a\x20shared\x20EOA\x20can\x20confirm,\x20vote\x20in,\x20'+'and\x20rule\x20the\x20service\x27s\x20disputes\x20—\x20arbitration\x20neutrality\x20collapses\x20(live\x20mainnet:\x20the\x20reused\x20arb\x27s\x20'+'Permission\x20builder\x20AND\x20sole\x20admin\x20was\x20the\x20merchant).\x20Bind\x20an\x20arbitration\x20whose\x20Permission\x20is\x20controlled\x20'+'by\x20physically\x20independent\x20keys');const C=Array['isArray'](y['voting_guard'])?y['voting_guard']:undefined;C!==undefined&&C['length']===0x0&&f['push']('pre_publish:\x20arbitration\x20\x22'+w+'\x22\x20has\x20an\x20EMPTY\x20voting_guard\x20—\x20plain\x20votes\x20then\x20hard-require\x20permission\x20'+'358\x20on\x20the\x20arbitration\x27s\x20own\x20Permission,\x20which\x20the\x20disputing\x20CUSTOMER\x20cannot\x20hold\x20(the\x20arb\x20admin\x20'+'controls\x20grants).\x20Party/community\x20arbitration\x20is\x20effectively\x20unusable:\x20the\x20arb\x20admin\x20becomes\x20the\x20only\x20'+'possible\x20voter\x20AND\x20the\x20judge.\x20Prefer\x20an\x20arbitration\x20with\x20a\x20public\x20voting_guard\x20(registrar-weighted\x20or\x20'+'one-person-one-vote)\x20for\x20customer-facing\x20services');}return{'critical':d,'warnings':f};}async function runPreBuyChecks(a,b){const c=[],d=[],f=extractData(b)??{},g=b?.['env']?.['network'],h=f['object'];let i;try{i=await batchQueryObjectsByIds([h],g,!![]);}catch(m){return d['push']('pre_buy:\x20allocator\x20screening\x20DEGRADED\x20—\x20could\x20not\x20query\x20service\x20\x22'+h+'\x22\x20'+('('+(m instanceof Error?m['message']:String(m))+');\x20the\x20purchase\x20was\x20NOT\x20screened.\x20')+'Verify\x20the\x20service\x27s\x20order_allocators\x20yourself\x20(query_toolkit\x20query_type=\x27service_panorama\x27)\x20before\x20trusting\x20this\x20buy'),{'critical':c,'warnings':d};}const j=(i??[])['find'](n=>n?.['type']==='Service');if(!j)return d['push']('pre_buy:\x20allocator\x20screening\x20DEGRADED\x20—\x20service\x20\x22'+h+'\x22\x20not\x20found\x20on-chain\x20(or\x20not\x20yet\x20indexed);\x20'+'the\x20purchase\x20was\x20NOT\x20screened.\x20Verify\x20the\x20address/network\x20and\x20the\x20service\x27s\x20order_allocators\x20before\x20trusting\x20this\x20buy'),{'critical':c,'warnings':d};const k=j['data']??j;k['bPublished']!==!![]&&c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20is\x20NOT\x20published\x20—\x20the\x20buy\x20aborts\x20on-chain\x20(E_NOT_PUBLISHED)');k['bPaused']===!![]&&c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20is\x20paused\x20—\x20the\x20buy\x20aborts\x20on-chain\x20(E_PAUSED)');const l=k['order_allocators'];if(l==null)c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20has\x20NO\x20order_allocators\x20—\x20the\x20payment\x20step\x20aborts\x20(no\x20distribution\x20plan).\x20'+'Funds\x20committed\x20to\x20this\x20service\x20would\x20have\x20NO\x20distribution\x20path\x20(the\x20fund-lock\x20incident\x20class).\x20'+'Do\x20not\x20buy\x20until\x20the\x20merchant\x20configures\x20an\x20allocator\x20plan');else{if(!Array['isArray'](l['allocators'])||l['allocators']['length']===0x0)c['push']('pre_buy:\x20service\x20\x22'+h+'\x22\x20order_allocators\x20is\x20EMPTY\x20—\x20the\x20payment\x20step\x20aborts\x20(EALLOCATORS_EMPTY).\x20'+'Do\x20not\x20buy\x20until\x20the\x20merchant\x20configures\x20at\x20least\x20one\x20allocator');else{const n=f['buy'],o=Array['isArray'](n?.['items'])?n['items']:[],p=Array['isArray'](k['sales'])?k['sales']:[];let q=0x0,r=o['length']>0x0;const s=[];for(const v of o){const w=v,x=numericBalance(w?.['quantity']),y=p['find'](A=>A?.['name']===w?.['name']),z=numericBalance(y?.['price']);if(x===undefined||z===undefined){r=![],s['push'](typeof w?.['name']==='string'?w['name']:JSON['stringify'](w?.['name']));continue;}q+=z*x;}const t=numericBalance(l['threshold']);if(!r)d['push']('pre_buy:\x20could\x20not\x20price\x20'+s['length']+'\x20cart\x20item(s)\x20['+s['join'](',\x20')+']\x20against\x20the\x20service\x27s\x20on-chain\x20sales\x20—\x20'+'allocator-threshold\x20coverage\x20UNVERIFIED\x20for\x20this\x20cart\x20(unknown\x20items\x20also\x20abort\x20the\x20quote\x20step).\x20'+'Confirm\x20every\x20item\x20name\x20matches\x20a\x20current\x20sale\x20entry');else t!==undefined&&t>q&&c['push']('pre_buy:\x20allocator\x20threshold\x20'+t+'\x20exceeds\x20this\x20cart\x27s\x20total\x20'+q+'\x20(Σ\x20price×quantity\x20over\x20the\x20on-chain\x20sales)\x20—\x20'+'the\x20payment\x20step\x20aborts\x20(EINSUFFICIENT_BALANCE):\x20pool\x20creation\x20requires\x20amount\x20>=\x20threshold.\x20'+'The\x20merchant\x20must\x20lower\x20the\x20threshold\x20(new\x20service\x20—\x20threshold\x20is\x20frozen\x20at\x20publish)\x20or\x20the\x20cart\x20must\x20grow');n?.['discount']!=null&&r&&t!==undefined&&t<=q&&d['push']('pre_buy:\x20a\x20discount\x20is\x20applied\x20—\x20the\x20discounted\x20total\x20may\x20fall\x20below\x20the\x20list\x20total\x20'+q+'\x20used\x20here;\x20'+('if\x20it\x20lands\x20under\x20the\x20allocator\x20threshold\x20'+t+',\x20the\x20payment\x20step\x20aborts\x20(EINSUFFICIENT_BALANCE)'));const u=await lintAllocatorGuardSet([l],g,'pre_buy','critical');c['push'](...u['critical']),d['push'](...u['warnings']);}}return{'critical':c,'warnings':d};}export async function runPrePublishChecks(a,b){const c=[],d=[],f=extractOperationType(a,b),g=extractData(b)??{},h=b?.['env']?.['network'];if(f==='machine'){const i=g['node'];let j=Array['isArray'](i)?i:Array['isArray'](i?.['nodes'])?i['nodes']:[];if(j['length']===0x0&&typeof g['object']==='string'){const k=g['object'];try{const l=await fetchMachineNodes(k,h,!![]);l['length']>0x0&&(j=l,d['push']('pre_publish:\x20machine\x20\x22'+k+'\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'+k+'\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(j['length']>0x0){const n=auditMachineNodes(j);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 s=o['sales'],t=(Array['isArray'](s?.['sales'])?s['sales']:[])['map'](u=>numericBalance(u?.['price']?.['balance']))['filter'](u=>u!==undefined);if(t['length']>0x0){const u=t['reduce']((w,x)=>w+x,0x0),v=u*0x3;if(v>0x0){const w=p/v,x=getFundCoverageMin(),y='fund='+p+',\x20max\x20single\x20order=Σ(price×1)='+u+'\x20(quantity\x20set\x20at\x20buy\x20time),\x20'+('award\x20cap=3×order='+v+'\x20(MAX_INDEMNITY_MULTIPLE),\x20coverage='+w['toFixed'](0x2));if(x>0x0&&w<x)d['push']('pre_publish:\x20G7\x20advisory\x20—\x20compensation-fund\x20coverage\x20below\x20the\x20configured\x20minimum\x20—\x20'+y+'\x20<\x20'+x+'.\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 w<0x1&&d['push']('pre_publish:\x20compensation-fund\x20coverage\x20below\x20the\x20award\x20ceiling\x20—\x20'+y+'\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');}const q=await lintAllocatorGuards(o,h);c['push'](...q['critical']),d['push'](...q['warnings']);const r=await checkArbitrationNeutrality(o,h);c['push'](...r['critical']),d['push'](...r['warnings']);}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.2.
|
|
3
|
+
"version": "3.2.4",
|
|
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.2.
|
|
57
|
+
"@wowok/wowok": "3.2.4",
|
|
58
58
|
"lodash": "^4.18.1",
|
|
59
59
|
"zod": "^4.2.0"
|
|
60
60
|
},
|