dexbot 1.3.3 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis/chart_utils.d.ts +11 -9
- package/dist/analysis/chart_utils.d.ts.map +1 -1
- package/dist/analysis/chart_utils.js +21 -16
- package/dist/analysis/chart_utils.js.map +1 -1
- package/dist/analysis/math_utils.d.ts +4 -13
- package/dist/analysis/math_utils.d.ts.map +1 -1
- package/dist/analysis/math_utils.js +16 -18
- package/dist/analysis/math_utils.js.map +1 -1
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts +3 -7
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts.map +1 -1
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +38 -34
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js.map +1 -1
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts +1 -4
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/hurst_analyzer.js +10 -7
- package/dist/analysis/trend_detection/hurst_analyzer.js.map +1 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts +6 -6
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js +23 -15
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js.map +1 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts +12 -13
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts.map +1 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js +16 -16
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js.map +1 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts +1 -4
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js +10 -7
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +6 -13
- package/dist/bot.js.map +1 -1
- package/dist/credential-daemon.d.ts.map +1 -1
- package/dist/credential-daemon.js +21 -22
- package/dist/credential-daemon.js.map +1 -1
- package/dist/dexbot.d.ts.map +1 -1
- package/dist/dexbot.js +16 -15
- package/dist/dexbot.js.map +1 -1
- package/dist/market_adapter/ama_signal_runner.d.ts +1 -1
- package/dist/market_adapter/ama_signal_runner.d.ts.map +1 -1
- package/dist/market_adapter/ama_signal_runner.js +8 -20
- package/dist/market_adapter/ama_signal_runner.js.map +1 -1
- package/dist/market_adapter/candle_utils.d.ts +2 -10
- package/dist/market_adapter/candle_utils.d.ts.map +1 -1
- package/dist/market_adapter/candle_utils.js +7 -8
- package/dist/market_adapter/candle_utils.js.map +1 -1
- package/dist/market_adapter/core/asymmetric_bounds.d.ts +12 -7
- package/dist/market_adapter/core/asymmetric_bounds.d.ts.map +1 -1
- package/dist/market_adapter/core/asymmetric_bounds.js +4 -5
- package/dist/market_adapter/core/asymmetric_bounds.js.map +1 -1
- package/dist/market_adapter/core/config_normalizers.d.ts +4 -9
- package/dist/market_adapter/core/config_normalizers.d.ts.map +1 -1
- package/dist/market_adapter/core/config_normalizers.js +9 -9
- package/dist/market_adapter/core/config_normalizers.js.map +1 -1
- package/dist/market_adapter/core/kibana_candles.d.ts +16 -20
- package/dist/market_adapter/core/kibana_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_candles.js +16 -15
- package/dist/market_adapter/core/kibana_candles.js.map +1 -1
- package/dist/market_adapter/core/kibana_client.d.ts +8 -11
- package/dist/market_adapter/core/kibana_client.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_client.js +13 -11
- package/dist/market_adapter/core/kibana_client.js.map +1 -1
- package/dist/market_adapter/core/kibana_market_candles.d.ts +5 -12
- package/dist/market_adapter/core/kibana_market_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_market_candles.js +12 -21
- package/dist/market_adapter/core/kibana_market_candles.js.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.d.ts +75 -53
- package/dist/market_adapter/core/market_adapter_service.d.ts.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.js +102 -98
- package/dist/market_adapter/core/market_adapter_service.js.map +1 -1
- package/dist/market_adapter/core/strategies/ama.d.ts +21 -1
- package/dist/market_adapter/core/strategies/ama.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama.js +10 -10
- package/dist/market_adapter/core/strategies/ama.js.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts +7 -11
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.js +23 -30
- package/dist/market_adapter/core/strategies/ama_slope_model.js.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts +5 -4
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.js +5 -3
- package/dist/market_adapter/core/strategies/atr/calculator.js.map +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts +4 -7
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.js +5 -4
- package/dist/market_adapter/core/strategies/collateral_manager.js.map +1 -1
- package/dist/market_adapter/core/strategies/regime_gate.d.ts +11 -19
- package/dist/market_adapter/core/strategies/regime_gate.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/regime_gate.js +22 -22
- package/dist/market_adapter/core/strategies/regime_gate.js.map +1 -1
- package/dist/market_adapter/index.d.ts +24 -2
- package/dist/market_adapter/index.d.ts.map +1 -1
- package/dist/market_adapter/index.js +82 -56
- package/dist/market_adapter/index.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +26 -37
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts +4 -12
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.js +100 -66
- package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
- package/dist/market_adapter/inputs/kibana_source.d.ts +4 -9
- package/dist/market_adapter/inputs/kibana_source.d.ts.map +1 -1
- package/dist/market_adapter/inputs/kibana_source.js +17 -18
- package/dist/market_adapter/inputs/kibana_source.js.map +1 -1
- package/dist/market_adapter/interval_utils.d.ts +1 -4
- package/dist/market_adapter/interval_utils.d.ts.map +1 -1
- package/dist/market_adapter/interval_utils.js +2 -3
- package/dist/market_adapter/interval_utils.js.map +1 -1
- package/dist/market_adapter/log_format.d.ts +1 -9
- package/dist/market_adapter/log_format.d.ts.map +1 -1
- package/dist/market_adapter/log_format.js +7 -8
- package/dist/market_adapter/log_format.js.map +1 -1
- package/dist/market_adapter/lp_chart_core.d.ts +1 -4
- package/dist/market_adapter/lp_chart_core.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_core.js +22 -20
- package/dist/market_adapter/lp_chart_core.js.map +1 -1
- package/dist/market_adapter/lp_chart_runner.d.ts +13 -24
- package/dist/market_adapter/lp_chart_runner.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_runner.js +58 -56
- package/dist/market_adapter/lp_chart_runner.js.map +1 -1
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts +4 -17
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_strategy_loader.js +36 -36
- package/dist/market_adapter/lp_chart_strategy_loader.js.map +1 -1
- package/dist/market_adapter/market_adapter.d.ts +51 -72
- package/dist/market_adapter/market_adapter.d.ts.map +1 -1
- package/dist/market_adapter/market_adapter.js +227 -192
- package/dist/market_adapter/market_adapter.js.map +1 -1
- package/dist/market_adapter/merge_lp_data.js +17 -16
- package/dist/market_adapter/merge_lp_data.js.map +1 -1
- package/dist/market_adapter/test_helpers.d.ts +9 -13
- package/dist/market_adapter/test_helpers.d.ts.map +1 -1
- package/dist/market_adapter/test_helpers.js +14 -14
- package/dist/market_adapter/test_helpers.js.map +1 -1
- package/dist/market_adapter/utils/adapter_client.d.ts +6 -14
- package/dist/market_adapter/utils/adapter_client.d.ts.map +1 -1
- package/dist/market_adapter/utils/adapter_client.js +16 -15
- package/dist/market_adapter/utils/adapter_client.js.map +1 -1
- package/dist/market_adapter/utils/atomic_write.d.ts +2 -5
- package/dist/market_adapter/utils/atomic_write.d.ts.map +1 -1
- package/dist/market_adapter/utils/atomic_write.js +5 -5
- package/dist/market_adapter/utils/atomic_write.js.map +1 -1
- package/dist/market_adapter/utils/chain.d.ts +19 -21
- package/dist/market_adapter/utils/chain.d.ts.map +1 -1
- package/dist/market_adapter/utils/chain.js +15 -16
- package/dist/market_adapter/utils/chain.js.map +1 -1
- package/dist/market_adapter/utils/data_discovery.d.ts +1 -4
- package/dist/market_adapter/utils/data_discovery.d.ts.map +1 -1
- package/dist/market_adapter/utils/data_discovery.js +10 -10
- package/dist/market_adapter/utils/data_discovery.js.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts +1 -6
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js +14 -14
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js.map +1 -1
- package/dist/market_adapter/utils/file_lock.d.ts +1 -7
- package/dist/market_adapter/utils/file_lock.d.ts.map +1 -1
- package/dist/market_adapter/utils/file_lock.js +21 -25
- package/dist/market_adapter/utils/file_lock.js.map +1 -1
- package/dist/market_adapter/utils/native_history.d.ts +12 -12
- package/dist/market_adapter/utils/native_history.d.ts.map +1 -1
- package/dist/market_adapter/utils/native_history.js +15 -15
- package/dist/market_adapter/utils/native_history.js.map +1 -1
- package/dist/market_adapter/utils/paths.d.ts +2 -4
- package/dist/market_adapter/utils/paths.d.ts.map +1 -1
- package/dist/market_adapter/utils/paths.js +6 -5
- package/dist/market_adapter/utils/paths.js.map +1 -1
- package/dist/modules/account_bots.d.ts +7 -8
- package/dist/modules/account_bots.d.ts.map +1 -1
- package/dist/modules/account_bots.js +92 -114
- package/dist/modules/account_bots.js.map +1 -1
- package/dist/modules/account_orders.d.ts +5 -9
- package/dist/modules/account_orders.d.ts.map +1 -1
- package/dist/modules/account_orders.js +69 -32
- package/dist/modules/account_orders.js.map +1 -1
- package/dist/modules/authority_resolver.d.ts +32 -1
- package/dist/modules/authority_resolver.d.ts.map +1 -1
- package/dist/modules/authority_resolver.js +18 -12
- package/dist/modules/authority_resolver.js.map +1 -1
- package/dist/modules/bitshares-native/chain_client.d.ts +3 -8
- package/dist/modules/bitshares-native/chain_client.d.ts.map +1 -1
- package/dist/modules/bitshares-native/chain_client.js +21 -16
- package/dist/modules/bitshares-native/chain_client.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts +21 -29
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.js +72 -38
- package/dist/modules/bitshares-native/crypto/ecc.browser.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.d.ts +9 -36
- package/dist/modules/bitshares-native/crypto/ecc.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.js +40 -83
- package/dist/modules/bitshares-native/crypto/ecc.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts +14 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.js +5 -3
- package/dist/modules/bitshares-native/crypto/ecc_selector.js.map +1 -1
- package/dist/modules/bitshares-native/index.d.ts +10 -2
- package/dist/modules/bitshares-native/index.d.ts.map +1 -1
- package/dist/modules/bitshares-native/index.js +68 -31
- package/dist/modules/bitshares-native/index.js.map +1 -1
- package/dist/modules/bitshares-native/lru_cache.d.ts +1 -4
- package/dist/modules/bitshares-native/lru_cache.d.ts.map +1 -1
- package/dist/modules/bitshares-native/lru_cache.js +6 -3
- package/dist/modules/bitshares-native/lru_cache.js.map +1 -1
- package/dist/modules/bitshares-native/resolvers.d.ts +3 -6
- package/dist/modules/bitshares-native/resolvers.d.ts.map +1 -1
- package/dist/modules/bitshares-native/resolvers.js +11 -9
- package/dist/modules/bitshares-native/resolvers.js.map +1 -1
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts +53 -55
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/chain_constants.js +28 -27
- package/dist/modules/bitshares-native/serial/chain_constants.js.map +1 -1
- package/dist/modules/bitshares-native/serial/index.d.ts +5 -9
- package/dist/modules/bitshares-native/serial/index.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/index.js +46 -12
- package/dist/modules/bitshares-native/serial/index.js.map +1 -1
- package/dist/modules/bitshares-native/serial/operations.d.ts +102 -100
- package/dist/modules/bitshares-native/serial/operations.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/operations.js +473 -471
- package/dist/modules/bitshares-native/serial/operations.js.map +1 -1
- package/dist/modules/bitshares-native/serial/serializer.d.ts +2 -7
- package/dist/modules/bitshares-native/serial/serializer.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/serializer.js +8 -3
- package/dist/modules/bitshares-native/serial/serializer.js.map +1 -1
- package/dist/modules/bitshares-native/serial/types.d.ts +26 -41
- package/dist/modules/bitshares-native/serial/types.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/types.js +76 -42
- package/dist/modules/bitshares-native/serial/types.js.map +1 -1
- package/dist/modules/bitshares-native/signing_client.d.ts +1 -5
- package/dist/modules/bitshares-native/signing_client.d.ts.map +1 -1
- package/dist/modules/bitshares-native/signing_client.js +49 -11
- package/dist/modules/bitshares-native/signing_client.js.map +1 -1
- package/dist/modules/bitshares-native/subscriptions.d.ts +1 -4
- package/dist/modules/bitshares-native/subscriptions.d.ts.map +1 -1
- package/dist/modules/bitshares-native/subscriptions.js +47 -84
- package/dist/modules/bitshares-native/subscriptions.js.map +1 -1
- package/dist/modules/bitshares-native/transport.d.ts +1 -8
- package/dist/modules/bitshares-native/transport.d.ts.map +1 -1
- package/dist/modules/bitshares-native/transport.js +22 -15
- package/dist/modules/bitshares-native/transport.js.map +1 -1
- package/dist/modules/bitshares-native/tx/builder.d.ts +3 -8
- package/dist/modules/bitshares-native/tx/builder.d.ts.map +1 -1
- package/dist/modules/bitshares-native/tx/builder.js +61 -23
- package/dist/modules/bitshares-native/tx/builder.js.map +1 -1
- package/dist/modules/bitshares-native/tx/tx_cache.d.ts +1 -8
- package/dist/modules/bitshares-native/tx/tx_cache.d.ts.map +1 -1
- package/dist/modules/bitshares-native/tx/tx_cache.js +21 -17
- package/dist/modules/bitshares-native/tx/tx_cache.js.map +1 -1
- package/dist/modules/bitshares_client.d.ts +12 -23
- package/dist/modules/bitshares_client.d.ts.map +1 -1
- package/dist/modules/bitshares_client.js +109 -56
- package/dist/modules/bitshares_client.js.map +1 -1
- package/dist/modules/bot_settings.d.ts +1 -13
- package/dist/modules/bot_settings.d.ts.map +1 -1
- package/dist/modules/bot_settings.js +34 -34
- package/dist/modules/bot_settings.js.map +1 -1
- package/dist/modules/bots_file_lock.d.ts +3 -9
- package/dist/modules/bots_file_lock.d.ts.map +1 -1
- package/dist/modules/bots_file_lock.js +8 -9
- package/dist/modules/bots_file_lock.js.map +1 -1
- package/dist/modules/chain_keys.d.ts +7 -39
- package/dist/modules/chain_keys.d.ts.map +1 -1
- package/dist/modules/chain_keys.js +126 -90
- package/dist/modules/chain_keys.js.map +1 -1
- package/dist/modules/chain_orders.d.ts +46 -52
- package/dist/modules/chain_orders.d.ts.map +1 -1
- package/dist/modules/chain_orders.js +152 -104
- package/dist/modules/chain_orders.js.map +1 -1
- package/dist/modules/config.d.ts +50 -57
- package/dist/modules/config.d.ts.map +1 -1
- package/dist/modules/config.js +28 -24
- package/dist/modules/config.js.map +1 -1
- package/dist/modules/constants.d.ts +492 -494
- package/dist/modules/constants.d.ts.map +1 -1
- package/dist/modules/constants.js +69 -39
- package/dist/modules/constants.js.map +1 -1
- package/dist/modules/cr_planner.d.ts +1 -13
- package/dist/modules/cr_planner.d.ts.map +1 -1
- package/dist/modules/cr_planner.js +28 -28
- package/dist/modules/cr_planner.js.map +1 -1
- package/dist/modules/credential_policy.d.ts +18 -33
- package/dist/modules/credential_policy.d.ts.map +1 -1
- package/dist/modules/credential_policy.js +114 -87
- package/dist/modules/credential_policy.js.map +1 -1
- package/dist/modules/credential_runtime.d.ts +11 -21
- package/dist/modules/credential_runtime.d.ts.map +1 -1
- package/dist/modules/credential_runtime.js +40 -40
- package/dist/modules/credential_runtime.js.map +1 -1
- package/dist/modules/credential_session_cache.d.ts +8 -8
- package/dist/modules/credential_session_cache.d.ts.map +1 -1
- package/dist/modules/credential_session_cache.js +41 -8
- package/dist/modules/credential_session_cache.js.map +1 -1
- package/dist/modules/credit_runtime.d.ts +51 -316
- package/dist/modules/credit_runtime.d.ts.map +1 -1
- package/dist/modules/credit_runtime.js +257 -183
- package/dist/modules/credit_runtime.js.map +1 -1
- package/dist/modules/crypto/browser_provider.js +6 -6
- package/dist/modules/crypto/browser_provider.js.map +1 -1
- package/dist/modules/crypto/index.d.ts.map +1 -1
- package/dist/modules/crypto/index.js +2 -0
- package/dist/modules/crypto/index.js.map +1 -1
- package/dist/modules/crypto/sync.js +3 -3
- package/dist/modules/crypto/sync.js.map +1 -1
- package/dist/modules/dexbot_class.d.ts +262 -81
- package/dist/modules/dexbot_class.d.ts.map +1 -1
- package/dist/modules/dexbot_class.js +156 -123
- package/dist/modules/dexbot_class.js.map +1 -1
- package/dist/modules/dexbot_cow_runtime.d.ts +12 -9
- package/dist/modules/dexbot_cow_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_cow_runtime.js +144 -63
- package/dist/modules/dexbot_cow_runtime.js.map +1 -1
- package/dist/modules/dexbot_credential_client.d.ts +5 -11
- package/dist/modules/dexbot_credential_client.d.ts.map +1 -1
- package/dist/modules/dexbot_credential_client.js +32 -30
- package/dist/modules/dexbot_credential_client.js.map +1 -1
- package/dist/modules/dexbot_fill_runtime.d.ts +5 -20
- package/dist/modules/dexbot_fill_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_fill_runtime.js +55 -116
- package/dist/modules/dexbot_fill_runtime.js.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.d.ts +12 -12
- package/dist/modules/dexbot_maintenance_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.js +55 -45
- package/dist/modules/dexbot_maintenance_runtime.js.map +1 -1
- package/dist/modules/dexbot_startup_runtime.d.ts +2 -6
- package/dist/modules/dexbot_startup_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_startup_runtime.js +122 -91
- package/dist/modules/dexbot_startup_runtime.js.map +1 -1
- package/dist/modules/dexbot_state_recovery.d.ts +11 -24
- package/dist/modules/dexbot_state_recovery.d.ts.map +1 -1
- package/dist/modules/dexbot_state_recovery.js +62 -28
- package/dist/modules/dexbot_state_recovery.js.map +1 -1
- package/dist/modules/fund_registry.d.ts +1 -13
- package/dist/modules/fund_registry.d.ts.map +1 -1
- package/dist/modules/fund_registry.js +23 -21
- package/dist/modules/fund_registry.js.map +1 -1
- package/dist/modules/general_settings.d.ts +3 -7
- package/dist/modules/general_settings.d.ts.map +1 -1
- package/dist/modules/general_settings.js +15 -14
- package/dist/modules/general_settings.js.map +1 -1
- package/dist/modules/graceful_shutdown.d.ts +1 -6
- package/dist/modules/graceful_shutdown.d.ts.map +1 -1
- package/dist/modules/graceful_shutdown.js +19 -16
- package/dist/modules/graceful_shutdown.js.map +1 -1
- package/dist/modules/key_store.d.ts.map +1 -1
- package/dist/modules/key_store.js +53 -19
- package/dist/modules/key_store.js.map +1 -1
- package/dist/modules/launcher/bot_supervisor.d.ts +23 -66
- package/dist/modules/launcher/bot_supervisor.d.ts.map +1 -1
- package/dist/modules/launcher/bot_supervisor.js +115 -107
- package/dist/modules/launcher/bot_supervisor.js.map +1 -1
- package/dist/modules/launcher/child_env.d.ts +2 -5
- package/dist/modules/launcher/child_env.d.ts.map +1 -1
- package/dist/modules/launcher/child_env.js +4 -4
- package/dist/modules/launcher/child_env.js.map +1 -1
- package/dist/modules/launcher/credential_bootstrap.d.ts +4 -8
- package/dist/modules/launcher/credential_bootstrap.d.ts.map +1 -1
- package/dist/modules/launcher/credential_bootstrap.js +30 -26
- package/dist/modules/launcher/credential_bootstrap.js.map +1 -1
- package/dist/modules/launcher/credential_daemon.d.ts +8 -15
- package/dist/modules/launcher/credential_daemon.d.ts.map +1 -1
- package/dist/modules/launcher/credential_daemon.js +72 -41
- package/dist/modules/launcher/credential_daemon.js.map +1 -1
- package/dist/modules/launcher/credential_secret.d.ts +1 -4
- package/dist/modules/launcher/credential_secret.d.ts.map +1 -1
- package/dist/modules/launcher/credential_secret.js +36 -4
- package/dist/modules/launcher/credential_secret.js.map +1 -1
- package/dist/modules/launcher/foreign_cred_daemon.d.ts +32 -1
- package/dist/modules/launcher/foreign_cred_daemon.d.ts.map +1 -1
- package/dist/modules/launcher/foreign_cred_daemon.js +25 -28
- package/dist/modules/launcher/foreign_cred_daemon.js.map +1 -1
- package/dist/modules/launcher/headless_password.d.ts +1 -4
- package/dist/modules/launcher/headless_password.d.ts.map +1 -1
- package/dist/modules/launcher/headless_password.js +11 -11
- package/dist/modules/launcher/headless_password.js.map +1 -1
- package/dist/modules/launcher/launch_modes.d.ts +15 -14
- package/dist/modules/launcher/launch_modes.d.ts.map +1 -1
- package/dist/modules/launcher/launch_modes.js +8 -8
- package/dist/modules/launcher/launch_modes.js.map +1 -1
- package/dist/modules/launcher/market_adapter_runtime.d.ts +10 -19
- package/dist/modules/launcher/market_adapter_runtime.d.ts.map +1 -1
- package/dist/modules/launcher/market_adapter_runtime.js +33 -33
- package/dist/modules/launcher/market_adapter_runtime.js.map +1 -1
- package/dist/modules/launcher/market_adapter_watchdog.d.ts +10 -17
- package/dist/modules/launcher/market_adapter_watchdog.d.ts.map +1 -1
- package/dist/modules/launcher/market_adapter_watchdog.js +42 -38
- package/dist/modules/launcher/market_adapter_watchdog.js.map +1 -1
- package/dist/modules/launcher/monolithic_runtime.d.ts +28 -57
- package/dist/modules/launcher/monolithic_runtime.d.ts.map +1 -1
- package/dist/modules/launcher/monolithic_runtime.js +135 -108
- package/dist/modules/launcher/monolithic_runtime.js.map +1 -1
- package/dist/modules/launcher/runtime_entry.d.ts +5 -10
- package/dist/modules/launcher/runtime_entry.d.ts.map +1 -1
- package/dist/modules/launcher/runtime_entry.js +14 -14
- package/dist/modules/launcher/runtime_entry.js.map +1 -1
- package/dist/modules/launcher/status_reporting.d.ts +17 -37
- package/dist/modules/launcher/status_reporting.d.ts.map +1 -1
- package/dist/modules/launcher/status_reporting.js +35 -34
- package/dist/modules/launcher/status_reporting.js.map +1 -1
- package/dist/modules/launcher/supervisor_control.d.ts +1 -4
- package/dist/modules/launcher/supervisor_control.d.ts.map +1 -1
- package/dist/modules/launcher/supervisor_control.js +9 -4
- package/dist/modules/launcher/supervisor_control.js.map +1 -1
- package/dist/modules/logger.d.ts +3 -1
- package/dist/modules/logger.d.ts.map +1 -1
- package/dist/modules/logger.js +38 -28
- package/dist/modules/logger.js.map +1 -1
- package/dist/modules/market_adapter_whitelist.d.ts +2 -10
- package/dist/modules/market_adapter_whitelist.d.ts.map +1 -1
- package/dist/modules/market_adapter_whitelist.js +18 -16
- package/dist/modules/market_adapter_whitelist.js.map +1 -1
- package/dist/modules/node_health_cache.d.ts +2 -12
- package/dist/modules/node_health_cache.d.ts.map +1 -1
- package/dist/modules/node_health_cache.js +24 -24
- package/dist/modules/node_health_cache.js.map +1 -1
- package/dist/modules/node_manager.d.ts +1 -1
- package/dist/modules/node_manager.d.ts.map +1 -1
- package/dist/modules/node_manager.js +44 -38
- package/dist/modules/node_manager.js.map +1 -1
- package/dist/modules/order/accounting.d.ts +12 -12
- package/dist/modules/order/accounting.d.ts.map +1 -1
- package/dist/modules/order/accounting.js +111 -76
- package/dist/modules/order/accounting.js.map +1 -1
- package/dist/modules/order/async_lock.d.ts +1 -2
- package/dist/modules/order/async_lock.d.ts.map +1 -1
- package/dist/modules/order/async_lock.js +4 -4
- package/dist/modules/order/async_lock.js.map +1 -1
- package/dist/modules/order/export.d.ts +8 -14
- package/dist/modules/order/export.d.ts.map +1 -1
- package/dist/modules/order/export.js +77 -42
- package/dist/modules/order/export.js.map +1 -1
- package/dist/modules/order/format.d.ts +17 -22
- package/dist/modules/order/format.d.ts.map +1 -1
- package/dist/modules/order/format.js +25 -31
- package/dist/modules/order/format.js.map +1 -1
- package/dist/modules/order/grid.d.ts +18 -104
- package/dist/modules/order/grid.d.ts.map +1 -1
- package/dist/modules/order/grid.js +346 -212
- package/dist/modules/order/grid.js.map +1 -1
- package/dist/modules/order/grid_reconcile.d.ts +8 -8
- package/dist/modules/order/grid_reconcile.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile.js +80 -23
- package/dist/modules/order/grid_reconcile.js.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.d.ts +224 -1
- package/dist/modules/order/grid_reconcile_internal.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.js +159 -73
- package/dist/modules/order/grid_reconcile_internal.js.map +1 -1
- package/dist/modules/order/index.d.ts +1 -1
- package/dist/modules/order/index.d.ts.map +1 -1
- package/dist/modules/order/index.js +42 -7
- package/dist/modules/order/index.js.map +1 -1
- package/dist/modules/order/logger.d.ts +6 -16
- package/dist/modules/order/logger.d.ts.map +1 -1
- package/dist/modules/order/logger.js +76 -53
- package/dist/modules/order/logger.js.map +1 -1
- package/dist/modules/order/logger_state.d.ts +4 -4
- package/dist/modules/order/logger_state.d.ts.map +1 -1
- package/dist/modules/order/logger_state.js +3 -1
- package/dist/modules/order/logger_state.js.map +1 -1
- package/dist/modules/order/manager.d.ts +160 -37
- package/dist/modules/order/manager.d.ts.map +1 -1
- package/dist/modules/order/manager.js +166 -128
- package/dist/modules/order/manager.js.map +1 -1
- package/dist/modules/order/processed_fill_store.d.ts +6 -10
- package/dist/modules/order/processed_fill_store.d.ts.map +1 -1
- package/dist/modules/order/processed_fill_store.js +10 -9
- package/dist/modules/order/processed_fill_store.js.map +1 -1
- package/dist/modules/order/strategy.d.ts +3 -3
- package/dist/modules/order/strategy.d.ts.map +1 -1
- package/dist/modules/order/strategy.js +29 -27
- package/dist/modules/order/strategy.js.map +1 -1
- package/dist/modules/order/sync_engine.d.ts +9 -19
- package/dist/modules/order/sync_engine.d.ts.map +1 -1
- package/dist/modules/order/sync_engine.js +176 -126
- package/dist/modules/order/sync_engine.js.map +1 -1
- package/dist/modules/order/utils/math.d.ts +55 -85
- package/dist/modules/order/utils/math.d.ts.map +1 -1
- package/dist/modules/order/utils/math.js +155 -88
- package/dist/modules/order/utils/math.js.map +1 -1
- package/dist/modules/order/utils/order.d.ts +27 -72
- package/dist/modules/order/utils/order.d.ts.map +1 -1
- package/dist/modules/order/utils/order.js +144 -105
- package/dist/modules/order/utils/order.js.map +1 -1
- package/dist/modules/order/utils/system.d.ts +103 -45
- package/dist/modules/order/utils/system.d.ts.map +1 -1
- package/dist/modules/order/utils/system.js +271 -150
- package/dist/modules/order/utils/system.js.map +1 -1
- package/dist/modules/order/utils/validate.d.ts +35 -47
- package/dist/modules/order/utils/validate.d.ts.map +1 -1
- package/dist/modules/order/utils/validate.js +233 -116
- package/dist/modules/order/utils/validate.js.map +1 -1
- package/dist/modules/order/working_grid.d.ts +1 -4
- package/dist/modules/order/working_grid.d.ts.map +1 -1
- package/dist/modules/order/working_grid.js +9 -7
- package/dist/modules/order/working_grid.js.map +1 -1
- package/dist/modules/path_api.js +2 -2
- package/dist/modules/path_api.js.map +1 -1
- package/dist/modules/paths.d.ts +50 -56
- package/dist/modules/paths.d.ts.map +1 -1
- package/dist/modules/paths.js +66 -57
- package/dist/modules/paths.js.map +1 -1
- package/dist/modules/process_discovery.d.ts +1 -1
- package/dist/modules/process_discovery.d.ts.map +1 -1
- package/dist/modules/process_discovery.js +7 -7
- package/dist/modules/process_discovery.js.map +1 -1
- package/dist/modules/runtime.d.ts +1 -1
- package/dist/modules/runtime.d.ts.map +1 -1
- package/dist/modules/runtime.js +4 -4
- package/dist/modules/runtime.js.map +1 -1
- package/dist/modules/runtime_settings.d.ts +1 -0
- package/dist/modules/runtime_settings.d.ts.map +1 -1
- package/dist/modules/runtime_settings.js +15 -10
- package/dist/modules/runtime_settings.js.map +1 -1
- package/dist/modules/settings_merge.d.ts +1 -4
- package/dist/modules/settings_merge.d.ts.map +1 -1
- package/dist/modules/settings_merge.js +2 -1
- package/dist/modules/settings_merge.js.map +1 -1
- package/dist/modules/storage/browser_adapter.d.ts +7 -3
- package/dist/modules/storage/browser_adapter.d.ts.map +1 -1
- package/dist/modules/storage/browser_adapter.js +2 -0
- package/dist/modules/storage/browser_adapter.js.map +1 -1
- package/dist/modules/storage/index.d.ts +2 -2
- package/dist/modules/storage/index.d.ts.map +1 -1
- package/dist/modules/storage/index.js +2 -5
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/modules/storage/node_adapter.d.ts +3 -3
- package/dist/modules/storage/node_adapter.d.ts.map +1 -1
- package/dist/modules/storage/node_adapter.js +9 -7
- package/dist/modules/storage/node_adapter.js.map +1 -1
- package/dist/modules/storage/types.d.ts +13 -10
- package/dist/modules/storage/types.d.ts.map +1 -1
- package/dist/modules/types.d.ts +0 -2
- package/dist/modules/types.d.ts.map +1 -1
- package/dist/modules/utils/base58check.d.ts +1 -9
- package/dist/modules/utils/base58check.d.ts.map +1 -1
- package/dist/modules/utils/base58check.js +14 -16
- package/dist/modules/utils/base58check.js.map +1 -1
- package/dist/modules/utils/build_dir.d.ts +2 -5
- package/dist/modules/utils/build_dir.d.ts.map +1 -1
- package/dist/modules/utils/build_dir.js +6 -3
- package/dist/modules/utils/build_dir.js.map +1 -1
- package/dist/modules/utils/errors.d.ts +2 -0
- package/dist/modules/utils/errors.d.ts.map +1 -0
- package/dist/modules/utils/errors.js +12 -0
- package/dist/modules/utils/errors.js.map +1 -0
- package/dist/modules/utils/fs_utils.d.ts +1 -8
- package/dist/modules/utils/fs_utils.d.ts.map +1 -1
- package/dist/modules/utils/fs_utils.js +8 -3
- package/dist/modules/utils/fs_utils.js.map +1 -1
- package/dist/modules/utils/math_utils.d.ts +2 -6
- package/dist/modules/utils/math_utils.d.ts.map +1 -1
- package/dist/modules/utils/math_utils.js +6 -2
- package/dist/modules/utils/math_utils.js.map +1 -1
- package/dist/modules/validate_profiles.d.ts +1 -11
- package/dist/modules/validate_profiles.d.ts.map +1 -1
- package/dist/modules/validate_profiles.js +25 -27
- package/dist/modules/validate_profiles.js.map +1 -1
- package/dist/pm2.d.ts +7 -6
- package/dist/pm2.d.ts.map +1 -1
- package/dist/pm2.js +132 -106
- package/dist/pm2.js.map +1 -1
- package/dist/scripts/analyze-git.d.ts.map +1 -1
- package/dist/scripts/analyze-git.js +15 -11
- package/dist/scripts/analyze-git.js.map +1 -1
- package/dist/scripts/analyze-orders.d.ts +146 -1
- package/dist/scripts/analyze-orders.d.ts.map +1 -1
- package/dist/scripts/analyze-orders.js +81 -105
- package/dist/scripts/analyze-orders.js.map +1 -1
- package/dist/scripts/diagnose-pool-history.d.ts.map +1 -1
- package/dist/scripts/diagnose-pool-history.js +9 -8
- package/dist/scripts/diagnose-pool-history.js.map +1 -1
- package/dist/scripts/divergence-calc.d.ts.map +1 -1
- package/dist/scripts/divergence-calc.js +11 -8
- package/dist/scripts/divergence-calc.js.map +1 -1
- package/dist/scripts/fix-err-message.d.ts +3 -0
- package/dist/scripts/fix-err-message.d.ts.map +1 -0
- package/dist/scripts/fix-err-message.js +198 -0
- package/dist/scripts/fix-err-message.js.map +1 -0
- package/dist/scripts/generate_lp_chart.d.ts +2 -9
- package/dist/scripts/generate_lp_chart.d.ts.map +1 -1
- package/dist/scripts/generate_lp_chart.js +14 -10
- package/dist/scripts/generate_lp_chart.js.map +1 -1
- package/dist/scripts/generate_mainnet_corpus_report.js +4 -4
- package/dist/scripts/generate_mainnet_corpus_report.js.map +1 -1
- package/dist/scripts/generate_market_adapter_whitelist.d.ts +17 -1
- package/dist/scripts/generate_market_adapter_whitelist.d.ts.map +1 -1
- package/dist/scripts/generate_market_adapter_whitelist.js +23 -20
- package/dist/scripts/generate_market_adapter_whitelist.js.map +1 -1
- package/dist/scripts/migrate_bot_keys.d.ts +1 -4
- package/dist/scripts/migrate_bot_keys.d.ts.map +1 -1
- package/dist/scripts/migrate_bot_keys.js +48 -124
- package/dist/scripts/migrate_bot_keys.js.map +1 -1
- package/dist/scripts/native_release_gates.d.ts.map +1 -1
- package/dist/scripts/native_release_gates.js +18 -14
- package/dist/scripts/native_release_gates.js.map +1 -1
- package/dist/scripts/print_grid.js +1 -1
- package/dist/scripts/print_grid.js.map +1 -1
- package/dist/scripts/run-tests.js +1 -0
- package/dist/scripts/run-tests.js.map +1 -1
- package/dist/scripts/runner.d.ts +1 -11
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +21 -19
- package/dist/scripts/runner.js.map +1 -1
- package/dist/scripts/test-credit-renewal.d.ts.map +1 -1
- package/dist/scripts/test-credit-renewal.js +2 -1
- package/dist/scripts/test-credit-renewal.js.map +1 -1
- package/dist/scripts/update.d.ts.map +1 -1
- package/dist/scripts/update.js +85 -79
- package/dist/scripts/update.js.map +1 -1
- package/dist/scripts/validate_bots.js +2 -2
- package/dist/scripts/validate_bots.js.map +1 -1
- package/dist/unlock.d.ts +4 -17
- package/dist/unlock.d.ts.map +1 -1
- package/dist/unlock.js +141 -108
- package/dist/unlock.js.map +1 -1
- package/package.json +1 -1
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts +0 -3
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js +0 -149
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js.map +0 -1
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts +0 -3
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js +0 -387
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js.map +0 -1
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts +0 -3
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js +0 -200
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js.map +0 -1
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts +0 -3
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/fetch_lp_candles.js +0 -212
- package/dist/analysis/ama_fitting/fetch_lp_candles.js.map +0 -1
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts +0 -31
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js +0 -249
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js.map +0 -1
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts +0 -2
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js +0 -782
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js.map +0 -1
- package/dist/analysis/analyze_derivatives.d.ts +0 -95
- package/dist/analysis/analyze_derivatives.d.ts.map +0 -1
- package/dist/analysis/analyze_derivatives.js +0 -295
- package/dist/analysis/analyze_derivatives.js.map +0 -1
- package/dist/analysis/analyze_dynamic_weight.d.ts +0 -14
- package/dist/analysis/analyze_dynamic_weight.d.ts.map +0 -1
- package/dist/analysis/analyze_dynamic_weight.js +0 -207
- package/dist/analysis/analyze_dynamic_weight.js.map +0 -1
- package/dist/analysis/analyze_kalman.d.ts +0 -13
- package/dist/analysis/analyze_kalman.d.ts.map +0 -1
- package/dist/analysis/analyze_kalman.js +0 -123
- package/dist/analysis/analyze_kalman.js.map +0 -1
- package/dist/analysis/analyze_regime.d.ts +0 -20
- package/dist/analysis/analyze_regime.d.ts.map +0 -1
- package/dist/analysis/analyze_regime.js +0 -139
- package/dist/analysis/analyze_regime.js.map +0 -1
- package/dist/analysis/analyze_regime_windows.d.ts +0 -19
- package/dist/analysis/analyze_regime_windows.d.ts.map +0 -1
- package/dist/analysis/analyze_regime_windows.js +0 -413
- package/dist/analysis/analyze_regime_windows.js.map +0 -1
- package/dist/analysis/analyze_risk_profile.d.ts +0 -3
- package/dist/analysis/analyze_risk_profile.d.ts.map +0 -1
- package/dist/analysis/analyze_risk_profile.js +0 -159
- package/dist/analysis/analyze_risk_profile.js.map +0 -1
- package/dist/analysis/analyze_trade_heatmap.d.ts +0 -3
- package/dist/analysis/analyze_trade_heatmap.d.ts.map +0 -1
- package/dist/analysis/analyze_trade_heatmap.js +0 -367
- package/dist/analysis/analyze_trade_heatmap.js.map +0 -1
- package/dist/analysis/analyze_volatility.d.ts +0 -22
- package/dist/analysis/analyze_volatility.d.ts.map +0 -1
- package/dist/analysis/analyze_volatility.js +0 -172
- package/dist/analysis/analyze_volatility.js.map +0 -1
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts +0 -99
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js +0 -804
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js.map +0 -1
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts +0 -2
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js +0 -347
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js.map +0 -1
- package/dist/analysis/bot_fitting/shared_utils.d.ts +0 -15
- package/dist/analysis/bot_fitting/shared_utils.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/shared_utils.js +0 -48
- package/dist/analysis/bot_fitting/shared_utils.js.map +0 -1
- package/dist/analysis/bot_key_utils.d.ts +0 -22
- package/dist/analysis/bot_key_utils.d.ts.map +0 -1
- package/dist/analysis/bot_key_utils.js +0 -162
- package/dist/analysis/bot_key_utils.js.map +0 -1
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts +0 -3
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts.map +0 -1
- package/dist/analysis/bot_usage/discover_bot_accounts.js +0 -498
- package/dist/analysis/bot_usage/discover_bot_accounts.js.map +0 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts +0 -546
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts.map +0 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.js +0 -427
- package/dist/analysis/bot_usage/kibana_bot_queries.js.map +0 -1
- package/dist/analysis/derivative_chart_generator.d.ts +0 -18
- package/dist/analysis/derivative_chart_generator.d.ts.map +0 -1
- package/dist/analysis/derivative_chart_generator.js +0 -896
- package/dist/analysis/derivative_chart_generator.js.map +0 -1
- package/dist/analysis/price_sources.d.ts +0 -34
- package/dist/analysis/price_sources.d.ts.map +0 -1
- package/dist/analysis/price_sources.js +0 -103
- package/dist/analysis/price_sources.js.map +0 -1
- package/dist/analysis/trade_profitability.d.ts +0 -115
- package/dist/analysis/trade_profitability.d.ts.map +0 -1
- package/dist/analysis/trade_profitability.js +0 -1247
- package/dist/analysis/trade_profitability.js.map +0 -1
- package/dist/analysis/tradingview/analyze_tradingview.d.ts +0 -36
- package/dist/analysis/tradingview/analyze_tradingview.d.ts.map +0 -1
- package/dist/analysis/tradingview/analyze_tradingview.js +0 -172
- package/dist/analysis/tradingview/analyze_tradingview.js.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts +0 -250
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.js +0 -903
- package/dist/analysis/trend_detection/derivative_analyzer.js.map +0 -1
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js +0 -1450
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/kalman_chart_generator.js +0 -408
- package/dist/analysis/trend_detection/kalman_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/regime_chart_generator.js +0 -345
- package/dist/analysis/trend_detection/regime_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts +0 -2
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js +0 -130
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts +0 -2
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js +0 -38
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js.map +0 -1
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/volatility_chart_generator.js +0 -732
- package/dist/analysis/trend_detection/volatility_chart_generator.js.map +0 -1
package/dist/unlock.d.ts
CHANGED
|
@@ -29,22 +29,9 @@
|
|
|
29
29
|
* BOT_NAME Fallback bot name when none is given as positional arg
|
|
30
30
|
* DEXBOT_MASTER_PASSWORD Master password for --headless mode (less secure than file)
|
|
31
31
|
*/
|
|
32
|
+
declare const waitForChildSpawn: any, pidMatchesScriptCandidates: any, candidateRuntimeScriptPaths: any;
|
|
33
|
+
declare const isLikelyCredentialDaemonProcess: any, ensureNoForeignCredentialDaemon: any, findCredentialSocketOwnerPid: any, buildDexbotStartArgs: any;
|
|
32
34
|
declare function waitForStableChildStartup(child: any, { label, timeoutMs }?: any): any;
|
|
33
|
-
declare function main({ argv, startupGraceMs }?:
|
|
34
|
-
|
|
35
|
-
startupGraceMs?: number;
|
|
36
|
-
}): Promise<void>;
|
|
37
|
-
declare const _default: {
|
|
38
|
-
buildDexbotStartArgs: any;
|
|
39
|
-
buildUnlockArgs: any;
|
|
40
|
-
candidateRuntimeScriptPaths: any;
|
|
41
|
-
ensureNoForeignCredentialDaemon: any;
|
|
42
|
-
findCredentialSocketOwnerPid: any;
|
|
43
|
-
isLikelyCredentialDaemonProcess: any;
|
|
44
|
-
main: typeof main;
|
|
45
|
-
pidMatchesScriptCandidates: any;
|
|
46
|
-
waitForChildSpawn: any;
|
|
47
|
-
waitForStableChildStartup: typeof waitForStableChildStartup;
|
|
48
|
-
};
|
|
49
|
-
export = _default;
|
|
35
|
+
declare function main({ argv, startupGraceMs }?: any): Promise<void>;
|
|
36
|
+
export { buildDexbotStartArgs, candidateRuntimeScriptPaths, ensureNoForeignCredentialDaemon, findCredentialSocketOwnerPid, isLikelyCredentialDaemonProcess, main, pidMatchesScriptCandidates, waitForChildSpawn, waitForStableChildStartup };
|
|
50
37
|
//# sourceMappingURL=unlock.d.ts.map
|
package/dist/unlock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../unlock.ts"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;
|
|
1
|
+
{"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../unlock.ts"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AA8BH,QAAA,MAII,iBAAiB,OAAE,0BAA0B,OAAE,2BAA2B,KAC9B,CAAC;AAQjD,QAAA,MAKI,+BAA+B,OAG/B,+BAA+B,OAAE,4BAA4B,OAE7D,oBAAoB,KAG4B,CAAC;AAqFrD,iBAAS,yBAAyB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,KAAuB,EAAE,SAAoC,EAAE,GAAE,GAAQ,OA+BzH;AA2ND,iBAAe,IAAI,CAAC,EAAE,IAAmB,EAAE,cAAyC,EAAE,GAAE,GAAQ,iBAmS/F;AA8PD,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,IAAI,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,CAAA"}
|
package/dist/unlock.js
CHANGED
|
@@ -31,50 +31,95 @@
|
|
|
31
31
|
* BOT_NAME Fallback bot name when none is given as positional arg
|
|
32
32
|
* DEXBOT_MASTER_PASSWORD Master password for --headless mode (less secure than file)
|
|
33
33
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
34
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
35
|
+
if (k2 === undefined) k2 = k;
|
|
36
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
37
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
38
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
39
|
+
}
|
|
40
|
+
Object.defineProperty(o, k2, desc);
|
|
41
|
+
}) : (function(o, m, k, k2) {
|
|
42
|
+
if (k2 === undefined) k2 = k;
|
|
43
|
+
o[k2] = m[k];
|
|
44
|
+
}));
|
|
45
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
46
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
47
|
+
}) : function(o, v) {
|
|
48
|
+
o["default"] = v;
|
|
49
|
+
});
|
|
50
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
51
|
+
var ownKeys = function(o) {
|
|
52
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
53
|
+
var ar = [];
|
|
54
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
55
|
+
return ar;
|
|
56
|
+
};
|
|
57
|
+
return ownKeys(o);
|
|
58
|
+
};
|
|
59
|
+
return function (mod) {
|
|
60
|
+
if (mod && mod.__esModule) return mod;
|
|
61
|
+
var result = {};
|
|
62
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
63
|
+
__setModuleDefault(result, mod);
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
})();
|
|
67
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
68
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
69
|
+
};
|
|
70
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71
|
+
exports.waitForChildSpawn = exports.pidMatchesScriptCandidates = exports.isLikelyCredentialDaemonProcess = exports.findCredentialSocketOwnerPid = exports.ensureNoForeignCredentialDaemon = exports.candidateRuntimeScriptPaths = exports.buildDexbotStartArgs = void 0;
|
|
72
|
+
exports.main = main;
|
|
73
|
+
exports.waitForStableChildStartup = waitForStableChildStartup;
|
|
74
|
+
const config_1 = require("./modules/config");
|
|
75
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
76
|
+
const path_api_1 = require("./modules/path_api");
|
|
77
|
+
const storage_1 = require("./modules/storage");
|
|
78
|
+
const node_child_process_1 = require("node:child_process");
|
|
79
|
+
const credential_daemon_1 = require("./modules/launcher/credential_daemon");
|
|
80
|
+
const child_env_1 = require("./modules/launcher/child_env");
|
|
81
|
+
const launch_modes_1 = require("./modules/launcher/launch_modes");
|
|
82
|
+
const constants_1 = require("./modules/constants");
|
|
83
|
+
const runtime_1 = require("./modules/runtime");
|
|
84
|
+
const paths_1 = require("./modules/paths");
|
|
85
|
+
const runtime_entry_1 = require("./modules/launcher/runtime_entry");
|
|
86
|
+
const supervisor_control_1 = require("./modules/launcher/supervisor_control");
|
|
87
|
+
const graceful_shutdown_1 = require("./modules/graceful_shutdown");
|
|
88
|
+
const bot_settings_1 = require("./modules/bot_settings");
|
|
89
|
+
const chainKeys = __importStar(require("./modules/chain_keys"));
|
|
90
|
+
const credentialPolicy = __importStar(require("./modules/credential_policy"));
|
|
91
|
+
const market_adapter_whitelist_1 = require("./modules/market_adapter_whitelist");
|
|
92
|
+
const fs_utils_1 = require("./modules/utils/fs_utils");
|
|
93
|
+
const market_adapter_watchdog_1 = require("./modules/launcher/market_adapter_watchdog");
|
|
94
|
+
const market_adapter_runtime_1 = require("./modules/launcher/market_adapter_runtime");
|
|
95
|
+
const config_2 = require("./modules/config");
|
|
96
|
+
const migrate_bot_keys_1 = require("./scripts/migrate_bot_keys");
|
|
97
|
+
const errors_1 = require("./modules/utils/errors");
|
|
98
|
+
(0, config_1.setUmask)(0o077);
|
|
99
|
+
const storage = (0, storage_1.getStorage)();
|
|
100
|
+
const { createBotSupervisor, SOCKET_PATH, forwardSignal, isPidAlive, waitForPidExit, readMarketAdapterLockPid, stopMarketAdapterFromLock, usesAmaGridPrice, waitForChildSpawn, pidMatchesScriptCandidates, candidateRuntimeScriptPaths, } = require('./modules/launcher/bot_supervisor');
|
|
101
|
+
exports.waitForChildSpawn = waitForChildSpawn;
|
|
102
|
+
exports.pidMatchesScriptCandidates = pidMatchesScriptCandidates;
|
|
103
|
+
exports.candidateRuntimeScriptPaths = candidateRuntimeScriptPaths;
|
|
104
|
+
const { statusTitle, statusLabel, statusBool, statusActiveBotName, statusSuccess, statusError, colorStatus, STATUS_COLORS, readProcStat, readProcMemMB, readProcCpuTime, readProcCpuPercent, readProcUptime, formatMemoryWithUptime, printControlStatus, } = require('./modules/launcher/status_reporting');
|
|
105
|
+
const { MONOLITHIC_PID_FILE, MONOLITHIC_BOT_PID_FILE, MONOLITHIC_BOT_INFO_FILE, MONOLITHIC_CRED_PID_FILE, MONOLITHIC_OUT_LOG, MONOLITHIC_ERROR_LOG, CREDENTIAL_SOCKET_FILE, cleanupStateFiles, readLiveMonolithicPid, readMonolithicBotInfo, isLikelyCredentialDaemonProcess, isExpectedMonolithicBotPid, stopCredentialDaemonPid, stopCredentialDaemon, ensureNoForeignCredentialDaemon, findCredentialSocketOwnerPid, readCredentialDaemonStatus, ensureLogDir: ensureMonolithicLogDir, buildDexbotStartArgs, createUpdateScheduler, listConfiguredBots, getControlBotNames, getControlActionLabel, getControlServiceNames, printControlActionSummary, formatBotCount, } = require('./modules/launcher/monolithic_runtime');
|
|
106
|
+
exports.isLikelyCredentialDaemonProcess = isLikelyCredentialDaemonProcess;
|
|
107
|
+
exports.ensureNoForeignCredentialDaemon = ensureNoForeignCredentialDaemon;
|
|
108
|
+
exports.findCredentialSocketOwnerPid = findCredentialSocketOwnerPid;
|
|
109
|
+
exports.buildDexbotStartArgs = buildDexbotStartArgs;
|
|
63
110
|
// Auto-migrate bot state files from old stable-ID key format to sanitized-name format
|
|
64
111
|
try {
|
|
65
|
-
|
|
66
|
-
runMigration();
|
|
112
|
+
(0, migrate_bot_keys_1.runMigration)();
|
|
67
113
|
}
|
|
68
114
|
catch (err) {
|
|
69
|
-
console.error(`Migration error: ${
|
|
115
|
+
console.error(`Migration error: ${(0, errors_1.getErrorMessage)(err)}`);
|
|
70
116
|
}
|
|
71
117
|
const CODE_ROOT = __dirname;
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const controller = createCredentialDaemonController({ root: PATHS.PROJECT_ROOT, codeRoot: CODE_ROOT });
|
|
118
|
+
const BOTS_FILE = paths_1.PATHS.PROFILES.BOTS_JSON;
|
|
119
|
+
const LOGS_DIR = paths_1.PATHS.LOGS_DIR;
|
|
120
|
+
const SUPERVISOR_OUT_LOG = path_api_1.path.join(LOGS_DIR, 'supervisor.log');
|
|
121
|
+
const SUPERVISOR_ERROR_LOG = path_api_1.path.join(LOGS_DIR, 'supervisor-error.log');
|
|
122
|
+
const controller = (0, credential_daemon_1.createCredentialDaemonController)({ root: paths_1.PATHS.PROJECT_ROOT, codeRoot: CODE_ROOT });
|
|
78
123
|
const DEFAULT_STARTUP_GRACE_MS = 750;
|
|
79
124
|
const botProcessRef = { current: null };
|
|
80
125
|
function printLauncherHeader({ botName = null, clawOnly = false, creditOnly = false, isolated = false, dryrun = false, headless = false } = {}) {
|
|
@@ -174,14 +219,14 @@ function waitForStableChildStartup(child, { label = 'child process', timeoutMs =
|
|
|
174
219
|
});
|
|
175
220
|
}
|
|
176
221
|
function resolveBotEntryForName(botName) {
|
|
177
|
-
const { config } = loadSettingsFile(BOTS_FILE);
|
|
178
|
-
const raw = resolveRawBotEntries(config);
|
|
222
|
+
const { config } = (0, bot_settings_1.loadSettingsFile)(BOTS_FILE);
|
|
223
|
+
const raw = (0, bot_settings_1.resolveRawBotEntries)(config);
|
|
179
224
|
const match = raw.find((b) => b && b.name === botName);
|
|
180
225
|
if (!match)
|
|
181
226
|
return null;
|
|
182
227
|
const entryCopy = JSON.parse(JSON.stringify(match));
|
|
183
228
|
entryCopy.active = true;
|
|
184
|
-
return normalizeBotEntry(entryCopy);
|
|
229
|
+
return (0, bot_settings_1.normalizeBotEntry)(entryCopy);
|
|
185
230
|
}
|
|
186
231
|
function getLaunchedBotNames(botName) {
|
|
187
232
|
return botName
|
|
@@ -190,7 +235,7 @@ function getLaunchedBotNames(botName) {
|
|
|
190
235
|
}
|
|
191
236
|
// ── Isolated supervisor mode ───────────────────────────────────────
|
|
192
237
|
function isSupervisorTransientError(err) {
|
|
193
|
-
const msg = String(err && err
|
|
238
|
+
const msg = String(err && (0, errors_1.getErrorMessage)(err) || '');
|
|
194
239
|
return msg.includes('No supervisor socket found') || msg.includes('Connection timed out');
|
|
195
240
|
}
|
|
196
241
|
function waitForSupervisorReady({ child = null, timeoutMs = 15000, intervalMs = 250 } = {}) {
|
|
@@ -209,7 +254,7 @@ function waitForSupervisorReady({ child = null, timeoutMs = 15000, intervalMs =
|
|
|
209
254
|
const startedAt = Date.now();
|
|
210
255
|
const poll = async () => {
|
|
211
256
|
try {
|
|
212
|
-
await sendControlCommand({ cmd: 'status' });
|
|
257
|
+
await (0, supervisor_control_1.sendControlCommand)({ cmd: 'status' });
|
|
213
258
|
finish(resolve, true);
|
|
214
259
|
}
|
|
215
260
|
catch (err) {
|
|
@@ -237,12 +282,12 @@ function waitForSupervisorReady({ child = null, timeoutMs = 15000, intervalMs =
|
|
|
237
282
|
}
|
|
238
283
|
function ensureSupervisorLogDir() {
|
|
239
284
|
if (!storage.exists(LOGS_DIR)) {
|
|
240
|
-
ensureDir(LOGS_DIR);
|
|
285
|
+
(0, fs_utils_1.ensureDir)(LOGS_DIR);
|
|
241
286
|
}
|
|
242
287
|
}
|
|
243
288
|
async function sendIsolatedDeleteIfAvailable() {
|
|
244
289
|
try {
|
|
245
|
-
const resp = await sendControlCommand({ cmd: 'delete' });
|
|
290
|
+
const resp = await (0, supervisor_control_1.sendControlCommand)({ cmd: 'delete' });
|
|
246
291
|
if (resp.ok && resp.status) {
|
|
247
292
|
printControlStatus(resp.status);
|
|
248
293
|
}
|
|
@@ -260,28 +305,28 @@ async function sendIsolatedDeleteIfAvailable() {
|
|
|
260
305
|
}
|
|
261
306
|
async function launchDetachedSupervisor({ botName = null, credentialDaemonPid = null } = {}) {
|
|
262
307
|
try {
|
|
263
|
-
await sendControlCommand({ cmd: 'status' });
|
|
264
|
-
throw new Error(`another isolated supervisor is already running at ${Config.DEXBOT_SUPERVISOR_SOCKET || SOCKET_PATH}`);
|
|
308
|
+
await (0, supervisor_control_1.sendControlCommand)({ cmd: 'status' });
|
|
309
|
+
throw new Error(`another isolated supervisor is already running at ${config_2.Config.DEXBOT_SUPERVISOR_SOCKET || SOCKET_PATH}`);
|
|
265
310
|
}
|
|
266
311
|
catch (err) {
|
|
267
|
-
if (!String(err && err
|
|
312
|
+
if (!String(err && (0, errors_1.getErrorMessage)(err) || '').includes('No supervisor socket found')) {
|
|
268
313
|
throw err;
|
|
269
314
|
}
|
|
270
315
|
}
|
|
271
316
|
ensureSupervisorLogDir();
|
|
272
317
|
const stdoutFd = storage.open(SUPERVISOR_OUT_LOG, 'a', 0o600);
|
|
273
318
|
const stderrFd = storage.open(SUPERVISOR_ERROR_LOG, 'a', 0o600);
|
|
274
|
-
const args = buildRuntimeScriptArgs({
|
|
319
|
+
const args = (0, runtime_entry_1.buildRuntimeScriptArgs)({
|
|
275
320
|
codeRoot: CODE_ROOT,
|
|
276
321
|
scriptSegments: ['unlock'],
|
|
277
322
|
scriptArgs: ['--isolated', ...(botName ? [botName] : [])],
|
|
278
323
|
});
|
|
279
324
|
let child = null;
|
|
280
325
|
try {
|
|
281
|
-
child = spawn(Config.EXEC_PATH, args, {
|
|
282
|
-
cwd: PATHS.PROJECT_ROOT,
|
|
326
|
+
child = (0, node_child_process_1.spawn)(config_2.Config.EXEC_PATH, args, {
|
|
327
|
+
cwd: paths_1.PATHS.PROJECT_ROOT,
|
|
283
328
|
detached: true,
|
|
284
|
-
env: buildScopedChildEnv({
|
|
329
|
+
env: (0, child_env_1.buildScopedChildEnv)({
|
|
285
330
|
extra: {
|
|
286
331
|
DEXBOT_ISOLATED_CHILD: '1',
|
|
287
332
|
...(credentialDaemonPid ? { DEXBOT_MANAGED_CRED_PID: String(credentialDaemonPid) } : {}),
|
|
@@ -299,7 +344,7 @@ async function launchDetachedSupervisor({ botName = null, credentialDaemonPid =
|
|
|
299
344
|
catch (err) {
|
|
300
345
|
if (child && child.pid) {
|
|
301
346
|
try {
|
|
302
|
-
runtime.kill(child.pid, 'SIGTERM');
|
|
347
|
+
runtime_1.runtime.kill(child.pid, 'SIGTERM');
|
|
303
348
|
}
|
|
304
349
|
catch (_) { }
|
|
305
350
|
}
|
|
@@ -328,7 +373,7 @@ async function runIsolated({ botName, botEntry = null, stayResident = false, sta
|
|
|
328
373
|
else {
|
|
329
374
|
supervisor = createBotSupervisor();
|
|
330
375
|
}
|
|
331
|
-
registerCleanup('Bot supervisor', () => supervisor.shutdown());
|
|
376
|
+
(0, graceful_shutdown_1.registerCleanup)('Bot supervisor', () => supervisor.shutdown());
|
|
332
377
|
await supervisor.start();
|
|
333
378
|
await supervisor.waitForStableStartup({ timeoutMs: startupGraceMs });
|
|
334
379
|
printLauncherStartupSummary({ botNames: getLaunchedBotNames(botName || null), mode: 'isolated' });
|
|
@@ -363,7 +408,7 @@ async function runIsolated({ botName, botEntry = null, stayResident = false, sta
|
|
|
363
408
|
return;
|
|
364
409
|
}
|
|
365
410
|
const elapsedMs = Date.now() - pollStartedAt;
|
|
366
|
-
if (elapsedMs >= LAUNCHER.MONOLITHIC.SUPERVISOR_POLL_TIMEOUT_MS) {
|
|
411
|
+
if (elapsedMs >= constants_1.LAUNCHER.MONOLITHIC.SUPERVISOR_POLL_TIMEOUT_MS) {
|
|
367
412
|
clearInterval(interval);
|
|
368
413
|
cleanupSignalHandlers();
|
|
369
414
|
reject(new Error(`Supervisor poll timeout after ${Math.ceil(elapsedMs / 1000)}s: ` +
|
|
@@ -383,14 +428,14 @@ async function main({ argv = process.argv, startupGraceMs = DEFAULT_STARTUP_GRAC
|
|
|
383
428
|
if (typeof chainKeys.checkKeysFileSecurity === 'function')
|
|
384
429
|
chainKeys.checkKeysFileSecurity();
|
|
385
430
|
if (typeof credentialPolicy.checkPolicyFileSecurity === 'function')
|
|
386
|
-
credentialPolicy.checkPolicyFileSecurity(PATHS.PROFILES.DAEMON_POLICIES_JSON);
|
|
387
|
-
const parsed = parseUnlockArgs(argv);
|
|
388
|
-
const isDetachedSupervisorChild = Config.DEXBOT_ISOLATED_CHILD;
|
|
389
|
-
const forceForegroundIsolated = Config.DEXBOT_ISOLATED_FOREGROUND;
|
|
390
|
-
const isMonolithicBgChild = Config.DEXBOT_MONOLITHIC_BG;
|
|
431
|
+
credentialPolicy.checkPolicyFileSecurity(paths_1.PATHS.PROFILES.DAEMON_POLICIES_JSON);
|
|
432
|
+
const parsed = (0, launch_modes_1.parseUnlockArgs)(argv);
|
|
433
|
+
const isDetachedSupervisorChild = config_2.Config.DEXBOT_ISOLATED_CHILD;
|
|
434
|
+
const forceForegroundIsolated = config_2.Config.DEXBOT_ISOLATED_FOREGROUND;
|
|
435
|
+
const isMonolithicBgChild = config_2.Config.DEXBOT_MONOLITHIC_BG;
|
|
391
436
|
const forceForeground = argv.includes('--foreground');
|
|
392
437
|
if (parsed.control) {
|
|
393
|
-
await handleControl(parsed.control);
|
|
438
|
+
await handleControl({ cmd: parsed.control.cmd, target: parsed.control.target ?? undefined });
|
|
394
439
|
return;
|
|
395
440
|
}
|
|
396
441
|
const { botName, clawOnly, creditOnly, isolated, dryrun, headless, passwordFile } = parsed;
|
|
@@ -502,8 +547,8 @@ async function main({ argv = process.argv, startupGraceMs = DEFAULT_STARTUP_GRAC
|
|
|
502
547
|
catch (_) { }
|
|
503
548
|
throw _e;
|
|
504
549
|
}
|
|
505
|
-
const child = spawn(Config.EXEC_PATH, [__filename, ...argv.slice(2)], {
|
|
506
|
-
cwd: PATHS.PROJECT_ROOT,
|
|
550
|
+
const child = (0, node_child_process_1.spawn)(config_2.Config.EXEC_PATH, [__filename, ...argv.slice(2)], {
|
|
551
|
+
cwd: paths_1.PATHS.PROJECT_ROOT,
|
|
507
552
|
detached: true,
|
|
508
553
|
env: {
|
|
509
554
|
...process.env,
|
|
@@ -526,7 +571,7 @@ async function main({ argv = process.argv, startupGraceMs = DEFAULT_STARTUP_GRAC
|
|
|
526
571
|
if (isolated) {
|
|
527
572
|
if (isDetachedSupervisorChild || forceForegroundIsolated) {
|
|
528
573
|
process.exitCode = await runIsolated({
|
|
529
|
-
botName,
|
|
574
|
+
botName: botName ?? undefined,
|
|
530
575
|
botEntry: selectedBot,
|
|
531
576
|
stayResident: isDetachedSupervisorChild,
|
|
532
577
|
startupGraceMs,
|
|
@@ -541,17 +586,17 @@ async function main({ argv = process.argv, startupGraceMs = DEFAULT_STARTUP_GRAC
|
|
|
541
586
|
daemonReleased = true;
|
|
542
587
|
printLauncherStartupSummary({ botNames: launchedBotNames, mode: 'isolated' });
|
|
543
588
|
console.log(`Supervisor PID: ${supervisorPid}`);
|
|
544
|
-
console.log(`Control socket: ${Config.DEXBOT_SUPERVISOR_SOCKET || SOCKET_PATH}`);
|
|
589
|
+
console.log(`Control socket: ${config_2.Config.DEXBOT_SUPERVISOR_SOCKET || SOCKET_PATH}`);
|
|
545
590
|
console.log(`Supervisor logs: ${SUPERVISOR_OUT_LOG}`);
|
|
546
591
|
process.exitCode = 0;
|
|
547
592
|
return;
|
|
548
593
|
}
|
|
549
594
|
// Monolithic foreground mode — spawn and supervise the bot process directly
|
|
550
|
-
const updater = UPDATER.ACTIVE ? createUpdateScheduler({ botProcessRef }) : null;
|
|
595
|
+
const updater = constants_1.UPDATER.ACTIVE ? createUpdateScheduler({ botProcessRef }) : null;
|
|
551
596
|
const cancelUpdater = updater ? updater.cancel : () => { };
|
|
552
|
-
const watchdog = createMarketAdapterWatchdog({
|
|
597
|
+
const watchdog = (0, market_adapter_watchdog_1.createMarketAdapterWatchdog)({
|
|
553
598
|
codeRoot: CODE_ROOT,
|
|
554
|
-
root: PATHS.PROJECT_ROOT,
|
|
599
|
+
root: paths_1.PATHS.PROJECT_ROOT,
|
|
555
600
|
logsDir: LOGS_DIR,
|
|
556
601
|
});
|
|
557
602
|
const cancelWatchdog = watchdog.schedule(MONOLITHIC_ERROR_LOG);
|
|
@@ -572,8 +617,8 @@ async function main({ argv = process.argv, startupGraceMs = DEFAULT_STARTUP_GRAC
|
|
|
572
617
|
do {
|
|
573
618
|
launchedBotNames = getLaunchedBotNames(effectiveBotName || botName);
|
|
574
619
|
const dexbotArgs = buildDexbotStartArgs(effectiveBotName || botName, dryrun);
|
|
575
|
-
const botProcess = spawn(Config.EXEC_PATH, dexbotArgs, {
|
|
576
|
-
cwd: PATHS.PROJECT_ROOT,
|
|
620
|
+
const botProcess = (0, node_child_process_1.spawn)(config_2.Config.EXEC_PATH, dexbotArgs, {
|
|
621
|
+
cwd: paths_1.PATHS.PROJECT_ROOT,
|
|
577
622
|
env: process.env,
|
|
578
623
|
stdio: isMonolithicBgChild ? 'pipe' : 'inherit',
|
|
579
624
|
});
|
|
@@ -590,8 +635,8 @@ async function main({ argv = process.argv, startupGraceMs = DEFAULT_STARTUP_GRAC
|
|
|
590
635
|
catch (_) { }
|
|
591
636
|
}
|
|
592
637
|
if (isMonolithicBgChild && botProcess.stdout) {
|
|
593
|
-
const outStream =
|
|
594
|
-
const errStream =
|
|
638
|
+
const outStream = node_fs_1.default.createWriteStream(MONOLITHIC_OUT_LOG, { flags: 'a' });
|
|
639
|
+
const errStream = node_fs_1.default.createWriteStream(MONOLITHIC_ERROR_LOG, { flags: 'a' });
|
|
595
640
|
botProcess.stdout.pipe(outStream);
|
|
596
641
|
botProcess.stderr.pipe(errStream);
|
|
597
642
|
botProcess.stdout.on('error', () => { });
|
|
@@ -638,18 +683,18 @@ async function main({ argv = process.argv, startupGraceMs = DEFAULT_STARTUP_GRAC
|
|
|
638
683
|
}
|
|
639
684
|
else if (exitCode !== 0) {
|
|
640
685
|
const uptime = Date.now() - lastStartTime;
|
|
641
|
-
if (uptime >= LAUNCHER.MONOLITHIC.minUptimeMs) {
|
|
686
|
+
if (uptime >= constants_1.LAUNCHER.MONOLITHIC.minUptimeMs) {
|
|
642
687
|
restartCount = 0;
|
|
643
688
|
}
|
|
644
689
|
restartCount++;
|
|
645
|
-
if (restartCount > LAUNCHER.MONOLITHIC.maxRestarts) {
|
|
646
|
-
console.error(statusError(`Bot crashed ${LAUNCHER.MONOLITHIC.maxRestarts} times without stable uptime. Exiting.`));
|
|
690
|
+
if (restartCount > constants_1.LAUNCHER.MONOLITHIC.maxRestarts) {
|
|
691
|
+
console.error(statusError(`Bot crashed ${constants_1.LAUNCHER.MONOLITHIC.maxRestarts} times without stable uptime. Exiting.`));
|
|
647
692
|
process.exitCode = exitCode || 1;
|
|
648
693
|
keepRunning = false;
|
|
649
694
|
}
|
|
650
695
|
else {
|
|
651
|
-
console.log(`Bot crashed (exit ${exitCode}), restarting in ${LAUNCHER.MONOLITHIC.restartDelayMs / 1000}s (attempt ${restartCount}/${LAUNCHER.MONOLITHIC.maxRestarts})...`);
|
|
652
|
-
await new Promise((r) => setTimeout(r, LAUNCHER.MONOLITHIC.restartDelayMs));
|
|
696
|
+
console.log(`Bot crashed (exit ${exitCode}), restarting in ${constants_1.LAUNCHER.MONOLITHIC.restartDelayMs / 1000}s (attempt ${restartCount}/${constants_1.LAUNCHER.MONOLITHIC.maxRestarts})...`);
|
|
697
|
+
await new Promise((r) => setTimeout(r, constants_1.LAUNCHER.MONOLITHIC.restartDelayMs));
|
|
653
698
|
}
|
|
654
699
|
}
|
|
655
700
|
else {
|
|
@@ -691,7 +736,7 @@ async function handleControl({ cmd, target }) {
|
|
|
691
736
|
console.log(`Stop signal sent to market adapter PID ${adapterResult.pid}`);
|
|
692
737
|
}
|
|
693
738
|
try {
|
|
694
|
-
runtime.kill(pid, 'SIGUSR2');
|
|
739
|
+
runtime_1.runtime.kill(pid, 'SIGUSR2');
|
|
695
740
|
}
|
|
696
741
|
catch (err) {
|
|
697
742
|
if (err.code !== 'ESRCH')
|
|
@@ -720,7 +765,7 @@ async function handleControl({ cmd, target }) {
|
|
|
720
765
|
const uptime = readProcUptime(targetPid);
|
|
721
766
|
// Prefer live bots.json (current intent) over the startup snapshot.
|
|
722
767
|
// Shows what the user configured, even if the wrapper hasn't respawned yet.
|
|
723
|
-
let displayedBots = listConfiguredBots().filter(b => b.active);
|
|
768
|
+
let displayedBots = listConfiguredBots().filter((b) => b.active);
|
|
724
769
|
if (displayedBots.length === 0) {
|
|
725
770
|
if (Array.isArray(botInfo?.botNames)) {
|
|
726
771
|
displayedBots = botInfo.botNames.map((name) => ({ name: String(name) }));
|
|
@@ -776,8 +821,8 @@ async function handleControl({ cmd, target }) {
|
|
|
776
821
|
console.log(` ${colorStatus('Rerun `dexbot unlock` to detach the foreign daemon and unlock with a fresh master password.', STATUS_COLORS.warn)}`);
|
|
777
822
|
}
|
|
778
823
|
const adapterPid = readMarketAdapterLockPid();
|
|
779
|
-
const adapterAlive = adapterPid > 0 && isLikelyMarketAdapterProcess(adapterPid);
|
|
780
|
-
const amaBots = listConfiguredBots().filter(b => b.active && usesAmaGridPrice(b));
|
|
824
|
+
const adapterAlive = adapterPid > 0 && (0, market_adapter_runtime_1.isLikelyMarketAdapterProcess)(adapterPid);
|
|
825
|
+
const amaBots = listConfiguredBots().filter((b) => b.active && usesAmaGridPrice(b));
|
|
781
826
|
console.log(` ${statusTitle('Market adapter:')}`);
|
|
782
827
|
if (adapterAlive) {
|
|
783
828
|
console.log(` ${statusLabel('PID:')} ${adapterPid}`);
|
|
@@ -794,7 +839,7 @@ async function handleControl({ cmd, target }) {
|
|
|
794
839
|
}
|
|
795
840
|
console.log(` ${statusLabel('Active:')} ${formatBotCount(amaBots.length)}`);
|
|
796
841
|
for (const b of amaBots) {
|
|
797
|
-
const flags = getWhitelistFlags(botKeyFromName(b.name));
|
|
842
|
+
const flags = (0, market_adapter_whitelist_1.getWhitelistFlags)(botKeyFromName(b.name));
|
|
798
843
|
const indicators = [];
|
|
799
844
|
if (flags.asymmetricBounds)
|
|
800
845
|
indicators.push('range');
|
|
@@ -807,11 +852,11 @@ async function handleControl({ cmd, target }) {
|
|
|
807
852
|
}
|
|
808
853
|
let monolithicExited = false;
|
|
809
854
|
try {
|
|
810
|
-
runtime.kill(pid, 'SIGTERM');
|
|
811
|
-
const timeoutMs = effectiveCmd === 'delete' ? LAUNCHER.MONOLITHIC.controlStopTimeoutMs : 5000;
|
|
855
|
+
runtime_1.runtime.kill(pid, 'SIGTERM');
|
|
856
|
+
const timeoutMs = effectiveCmd === 'delete' ? constants_1.LAUNCHER.MONOLITHIC.controlStopTimeoutMs : 5000;
|
|
812
857
|
monolithicExited = await waitForPidExit(pid, timeoutMs);
|
|
813
858
|
if (!monolithicExited && effectiveCmd === 'delete') {
|
|
814
|
-
runtime.kill(pid, 'SIGKILL');
|
|
859
|
+
runtime_1.runtime.kill(pid, 'SIGKILL');
|
|
815
860
|
monolithicExited = await waitForPidExit(pid, 2000);
|
|
816
861
|
if (!monolithicExited) {
|
|
817
862
|
throw new Error(`monolithic wrapper PID ${pid} did not exit after SIGKILL`);
|
|
@@ -870,7 +915,7 @@ async function handleControl({ cmd, target }) {
|
|
|
870
915
|
if (target)
|
|
871
916
|
controlCmd.bot = target;
|
|
872
917
|
try {
|
|
873
|
-
const resp = await sendControlCommand(controlCmd);
|
|
918
|
+
const resp = await (0, supervisor_control_1.sendControlCommand)(controlCmd);
|
|
874
919
|
if (resp.ok && resp.status) {
|
|
875
920
|
printControlStatus(resp.status);
|
|
876
921
|
}
|
|
@@ -888,21 +933,21 @@ async function handleControl({ cmd, target }) {
|
|
|
888
933
|
console.log('No runtime processes found.');
|
|
889
934
|
return;
|
|
890
935
|
}
|
|
891
|
-
console.error(statusError(`control ${cmd}: ${err
|
|
936
|
+
console.error(statusError(`control ${cmd}: ${(0, errors_1.getErrorMessage)(err)}`));
|
|
892
937
|
process.exitCode = 1;
|
|
893
938
|
}
|
|
894
939
|
}
|
|
895
940
|
// ── Bootstrap ──────────────────────────────────────────────────────
|
|
896
941
|
const isUnlockStartDirectRun = require.main === module || (process.argv[1] &&
|
|
897
|
-
path.parse(process.argv[1]).name === 'unlock');
|
|
942
|
+
path_api_1.path.parse(process.argv[1]).name === 'unlock');
|
|
898
943
|
if (isUnlockStartDirectRun) {
|
|
899
|
-
setupGracefulShutdown();
|
|
900
|
-
if (Config.DEXBOT_ISOLATED_CHILD) {
|
|
901
|
-
registerCleanup('Credential daemon', () => stopCredentialDaemonPid(Config.DEXBOT_MANAGED_CRED_PID));
|
|
944
|
+
(0, graceful_shutdown_1.setupGracefulShutdown)();
|
|
945
|
+
if (config_2.Config.DEXBOT_ISOLATED_CHILD) {
|
|
946
|
+
(0, graceful_shutdown_1.registerCleanup)('Credential daemon', () => stopCredentialDaemonPid(config_2.Config.DEXBOT_MANAGED_CRED_PID));
|
|
902
947
|
}
|
|
903
|
-
else if (Config.DEXBOT_MONOLITHIC_BG) {
|
|
904
|
-
registerCleanup('PID files', cleanupStateFiles);
|
|
905
|
-
registerCleanup('Bot process', async () => {
|
|
948
|
+
else if (config_2.Config.DEXBOT_MONOLITHIC_BG) {
|
|
949
|
+
(0, graceful_shutdown_1.registerCleanup)('PID files', cleanupStateFiles);
|
|
950
|
+
(0, graceful_shutdown_1.registerCleanup)('Bot process', async () => {
|
|
906
951
|
const bot = botProcessRef.current;
|
|
907
952
|
if (bot && !bot.killed) {
|
|
908
953
|
forwardSignal(bot, 'SIGTERM');
|
|
@@ -914,28 +959,16 @@ if (isUnlockStartDirectRun) {
|
|
|
914
959
|
});
|
|
915
960
|
}
|
|
916
961
|
else {
|
|
917
|
-
registerCleanup('Credential daemon', () => controller.stopManagedDaemon());
|
|
962
|
+
(0, graceful_shutdown_1.registerCleanup)('Credential daemon', () => controller.stopManagedDaemon());
|
|
918
963
|
}
|
|
919
964
|
(async () => {
|
|
920
965
|
try {
|
|
921
966
|
await main();
|
|
922
967
|
}
|
|
923
968
|
catch (err) {
|
|
924
|
-
console.error(statusError(`unlock failed: ${err
|
|
969
|
+
console.error(statusError(`unlock failed: ${(0, errors_1.getErrorMessage)(err) || err}`));
|
|
925
970
|
process.exit(1);
|
|
926
971
|
}
|
|
927
972
|
})();
|
|
928
973
|
}
|
|
929
|
-
module.exports = {
|
|
930
|
-
buildDexbotStartArgs,
|
|
931
|
-
buildUnlockArgs: require('./modules/launcher/monolithic_runtime').buildUnlockArgs,
|
|
932
|
-
candidateRuntimeScriptPaths: require('./modules/launcher/bot_supervisor').candidateRuntimeScriptPaths,
|
|
933
|
-
ensureNoForeignCredentialDaemon,
|
|
934
|
-
findCredentialSocketOwnerPid,
|
|
935
|
-
isLikelyCredentialDaemonProcess,
|
|
936
|
-
main,
|
|
937
|
-
pidMatchesScriptCandidates: require('./modules/launcher/bot_supervisor').pidMatchesScriptCandidates,
|
|
938
|
-
waitForChildSpawn,
|
|
939
|
-
waitForStableChildStartup,
|
|
940
|
-
};
|
|
941
974
|
//# sourceMappingURL=unlock.js.map
|