machineconfig 1.95__py3-none-any.whl → 1.96__py3-none-any.whl
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.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/cluster/cloud_manager.py +445 -343
- machineconfig/cluster/data_transfer.py +63 -57
- machineconfig/cluster/distribute.py +284 -280
- machineconfig/cluster/file_manager.py +234 -237
- machineconfig/cluster/job_params.py +133 -133
- machineconfig/cluster/loader_runner.py +183 -149
- machineconfig/cluster/remote_machine.py +269 -252
- machineconfig/cluster/script_execution.py +215 -209
- machineconfig/cluster/script_notify_upon_completion.py +50 -43
- machineconfig/cluster/self_ssh.py +52 -54
- machineconfig/cluster/sessions_managers/__init__.py +0 -0
- machineconfig/cluster/sessions_managers/archive/__init__.py +0 -0
- machineconfig/{jobs/python → cluster/sessions_managers/archive}/create_zellij_template.py +5 -3
- machineconfig/cluster/sessions_managers/archive/session_managers.py +184 -0
- machineconfig/cluster/sessions_managers/demo_rich_zellij.py +0 -0
- machineconfig/cluster/sessions_managers/enhanced_command_runner.py +160 -0
- machineconfig/cluster/sessions_managers/wt_local.py +494 -0
- machineconfig/cluster/sessions_managers/wt_local_manager.py +577 -0
- machineconfig/cluster/sessions_managers/wt_remote.py +288 -0
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +483 -0
- machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +196 -0
- machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +418 -0
- machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py +175 -0
- machineconfig/cluster/sessions_managers/wt_utils/session_manager.py +300 -0
- machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +228 -0
- machineconfig/cluster/sessions_managers/zellij_local.py +418 -0
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +533 -0
- machineconfig/cluster/sessions_managers/zellij_remote.py +229 -0
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +188 -0
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +64 -0
- machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +126 -0
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +334 -0
- machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py +68 -0
- machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py +119 -0
- machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +85 -0
- machineconfig/cluster/templates/cli_click.py +0 -1
- machineconfig/cluster/templates/cli_gooey.py +102 -104
- machineconfig/cluster/templates/run_cloud.py +51 -51
- machineconfig/cluster/templates/run_cluster.py +103 -59
- machineconfig/cluster/templates/run_remote.py +57 -58
- machineconfig/cluster/templates/utils.py +69 -36
- machineconfig/jobs/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/check_installations.py +258 -190
- machineconfig/jobs/python/create_bootable_media.py +7 -3
- machineconfig/jobs/python/python_cargo_build_share.py +50 -50
- machineconfig/jobs/python/python_ve_symlink.py +6 -6
- machineconfig/jobs/python/vscode/__pycache__/select_interpreter.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/api.py +1 -1
- machineconfig/jobs/python/vscode/link_ve.py +2 -2
- machineconfig/jobs/python/vscode/select_interpreter.py +9 -5
- machineconfig/jobs/python/vscode/sync_code.py +8 -5
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/archive/ngrok.py +1 -1
- machineconfig/jobs/python_custom_installers/dev/alacritty.py +3 -2
- machineconfig/jobs/python_custom_installers/dev/brave.py +7 -3
- machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +3 -4
- machineconfig/jobs/python_custom_installers/dev/code.py +3 -1
- machineconfig/jobs/python_custom_installers/dev/cursor.py +66 -5
- machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +0 -1
- machineconfig/jobs/python_custom_installers/dev/espanso.py +13 -9
- machineconfig/jobs/python_custom_installers/dev/goes.py +2 -8
- machineconfig/jobs/python_custom_installers/dev/lvim.py +3 -2
- machineconfig/jobs/python_custom_installers/dev/nerdfont.py +1 -1
- machineconfig/jobs/python_custom_installers/dev/redis.py +7 -3
- machineconfig/jobs/python_custom_installers/dev/wezterm.py +8 -4
- machineconfig/jobs/python_custom_installers/dev/winget.py +194 -0
- machineconfig/jobs/python_custom_installers/{dev/docker.py → docker.py} +8 -3
- machineconfig/jobs/python_custom_installers/gh.py +4 -3
- machineconfig/jobs/python_custom_installers/hx.py +9 -8
- machineconfig/jobs/python_custom_installers/scripts/linux/vscode.sh +97 -30
- machineconfig/jobs/python_custom_installers/{dev/warp-cli.py → warp-cli.py} +1 -1
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_generic_installers/config.json +133 -9
- machineconfig/jobs/python_generic_installers/dev/config.json +208 -37
- machineconfig/jobs/python_generic_installers/update.py +3 -0
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_linux_installers/config.json +42 -6
- machineconfig/jobs/python_linux_installers/dev/config.json +79 -11
- machineconfig/jobs/python_windows_installers/config.json +6 -0
- machineconfig/profile/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/create.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/shell.cpython-311.pyc +0 -0
- machineconfig/profile/create.py +5 -5
- machineconfig/profile/create_hardlinks.py +5 -5
- machineconfig/profile/shell.py +44 -17
- machineconfig/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/linux/fire_agents +27 -0
- machineconfig/scripts/linux/wifi_conn +24 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_copy.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_mount.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_backup_retrieve.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_agents.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/get_zellij_cmd.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/archive/im2text.py +1 -3
- machineconfig/scripts/python/choose_wezterm_theme.py +3 -3
- machineconfig/scripts/python/cloud_copy.py +10 -10
- machineconfig/scripts/python/cloud_manager.py +77 -99
- machineconfig/scripts/python/cloud_mount.py +13 -12
- machineconfig/scripts/python/cloud_repo_sync.py +14 -11
- machineconfig/scripts/python/croshell.py +24 -21
- machineconfig/scripts/python/devops.py +12 -17
- machineconfig/scripts/python/devops_add_identity.py +32 -10
- machineconfig/scripts/python/devops_add_ssh_key.py +10 -10
- machineconfig/scripts/python/devops_backup_retrieve.py +9 -8
- machineconfig/scripts/python/devops_devapps_install.py +6 -6
- machineconfig/scripts/python/devops_update_repos.py +4 -3
- machineconfig/scripts/python/dotfile.py +10 -7
- machineconfig/scripts/python/fire_agents.py +69 -0
- machineconfig/scripts/python/fire_jobs.py +56 -65
- machineconfig/scripts/python/ftpx.py +8 -8
- machineconfig/scripts/python/get_zellij_cmd.py +3 -3
- machineconfig/scripts/python/gh_models.py +6 -4
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/cloud_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers2.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/repo_sync_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/cloud_helpers.py +12 -12
- machineconfig/scripts/python/helpers/helpers2.py +9 -8
- machineconfig/scripts/python/helpers/helpers4.py +23 -35
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +17 -16
- machineconfig/scripts/python/mount_nfs.py +8 -11
- machineconfig/scripts/python/mount_nw_drive.py +4 -4
- machineconfig/scripts/python/mount_ssh.py +2 -2
- machineconfig/scripts/python/onetimeshare.py +56 -57
- machineconfig/scripts/python/pomodoro.py +55 -55
- machineconfig/scripts/python/repos.py +26 -18
- machineconfig/scripts/python/scheduler.py +70 -53
- machineconfig/scripts/python/snapshot.py +21 -24
- machineconfig/scripts/python/start_slidev.py +6 -5
- machineconfig/scripts/python/start_terminals.py +3 -1
- machineconfig/scripts/python/viewer.py +5 -4
- machineconfig/scripts/python/viewer_template.py +138 -140
- machineconfig/scripts/python/wifi_conn.py +412 -60
- machineconfig/scripts/python/wsl_windows_transfer.py +18 -3
- machineconfig/settings/linters/.pylintrc +6 -7
- machineconfig/settings/lvim/windows/config.lua +0 -0
- machineconfig/settings/shells/bash/init.sh +6 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/playext.py +7 -6
- machineconfig/settings/shells/pwsh/init.ps1 +6 -6
- machineconfig/settings/shells/wt/settings.json +51 -266
- machineconfig/setup_linux/web_shortcuts/interactive.sh +5 -2
- machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +3 -6
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +11 -9
- machineconfig/utils/ai/url2md.py +2 -2
- machineconfig/utils/cloud/onedrive/setup_oauth.py +59 -0
- machineconfig/utils/cloud/onedrive/transaction.py +796 -0
- machineconfig/utils/code.py +22 -13
- machineconfig/utils/installer.py +78 -35
- machineconfig/utils/installer_utils/installer_abc.py +7 -6
- machineconfig/utils/installer_utils/installer_class.py +44 -25
- machineconfig/utils/io_save.py +107 -0
- machineconfig/utils/links.py +19 -15
- machineconfig/utils/options.py +4 -8
- machineconfig/utils/path.py +91 -78
- machineconfig/utils/path_reduced.py +608 -0
- machineconfig/utils/procs.py +110 -45
- machineconfig/utils/scheduling.py +312 -222
- machineconfig/utils/utils.py +7 -7
- machineconfig/utils/utils2.py +42 -0
- machineconfig/utils/utils5.py +84 -0
- machineconfig/utils/ve.py +49 -87
- {machineconfig-1.95.dist-info → machineconfig-1.96.dist-info}/METADATA +2 -2
- machineconfig-1.96.dist-info/RECORD +437 -0
- machineconfig/cluster/session_managers.py +0 -183
- machineconfig/cluster/templates/f.py +0 -4
- machineconfig/jobs/python/__pycache__/check_installations.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/checkout_version.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/python_ve_symlink.cpython-311.pyc +0 -0
- machineconfig/jobs/python/checkout_version.py +0 -123
- machineconfig/jobs/python/vscode/__pycache__/api.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/__pycache__/link_ve.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/__pycache__/hx.cpython-311.pyc +0 -0
- machineconfig/jobs/python_windows_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/.mypy_cache/.gitignore +0 -2
- machineconfig/scripts/python/.mypy_cache/3.11/@plugins_snapshot.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_io.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_io.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/ast.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/ast.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dis.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dis.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/enum.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/enum.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/functools.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/functools.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/glob.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/glob.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/io.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/io.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/locale.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/locale.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/platform.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/platform.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/re.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/re.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/resource.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/resource.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/signal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/signal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/stat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/stat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/string.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/string.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/struct.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/struct.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/threading.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/threading.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/time.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/time.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/types.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/types.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/CACHEDIR.TAG +0 -3
- machineconfig/scripts/python/__pycache__/cloud_repo_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/gh_models.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/url2md.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/viewer.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/vscode_api.cpython-311.pyc +0 -0
- machineconfig/settings/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/linters/.ruff_cache/.gitignore +0 -2
- machineconfig/settings/linters/.ruff_cache/CACHEDIR.TAG +0 -1
- machineconfig/settings/shells/ipy/profiles/default/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/playext.cpython-311.pyc +0 -0
- machineconfig/utils/ve_utils/ve1.py +0 -111
- machineconfig/utils/ve_utils/ve2.py +0 -155
- machineconfig-1.95.dist-info/RECORD +0 -712
- {machineconfig-1.95.dist-info → machineconfig-1.96.dist-info}/WHEEL +0 -0
- {machineconfig-1.95.dist-info → machineconfig-1.96.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from typing import Dict, Tuple, Optional, List, Any
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import logging
|
|
5
|
+
import json
|
|
6
|
+
import uuid
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
|
|
9
|
+
from machineconfig.cluster.sessions_managers.wt_utils.remote_executor import WTRemoteExecutor
|
|
10
|
+
from machineconfig.cluster.sessions_managers.wt_utils.layout_generator import WTLayoutGenerator
|
|
11
|
+
from machineconfig.cluster.sessions_managers.wt_utils.process_monitor import WTProcessMonitor
|
|
12
|
+
from machineconfig.cluster.sessions_managers.wt_utils.session_manager import WTSessionManager
|
|
13
|
+
from machineconfig.cluster.sessions_managers.wt_utils.status_reporter import WTStatusReporter
|
|
14
|
+
|
|
15
|
+
logging.basicConfig(level=logging.INFO)
|
|
16
|
+
logger = logging.getLogger(__name__)
|
|
17
|
+
TMP_LAYOUT_DIR = Path.home().joinpath("tmp_results", "wt_layouts", "layout_manager")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class WTRemoteLayoutGenerator:
|
|
21
|
+
|
|
22
|
+
def __init__(self, remote_name: str, session_name_prefix: str):
|
|
23
|
+
self.remote_name = remote_name
|
|
24
|
+
self.session_name = session_name_prefix + "_" + WTLayoutGenerator.generate_random_suffix()
|
|
25
|
+
self.tab_config: Dict[str, Tuple[str, str]] = {}
|
|
26
|
+
self.script_path: Optional[str] = None
|
|
27
|
+
|
|
28
|
+
# Initialize modular components
|
|
29
|
+
self.remote_executor = WTRemoteExecutor(remote_name)
|
|
30
|
+
self.layout_generator = WTLayoutGenerator()
|
|
31
|
+
self.process_monitor = WTProcessMonitor(self.remote_executor)
|
|
32
|
+
self.session_manager = WTSessionManager(self.remote_executor, self.session_name, TMP_LAYOUT_DIR)
|
|
33
|
+
self.status_reporter = WTStatusReporter(self.process_monitor, self.session_manager)
|
|
34
|
+
|
|
35
|
+
def copy_script_to_remote(self, local_script_file: Path, random_suffix: str) -> str:
|
|
36
|
+
return self.session_manager.copy_script_to_remote(local_script_file, random_suffix)
|
|
37
|
+
|
|
38
|
+
def create_wt_layout(self, tab_config: Dict[str, Tuple[str, str]], output_dir: Optional[str] = None) -> str:
|
|
39
|
+
logger.info(f"Creating Windows Terminal layout with {len(tab_config)} tabs for remote '{self.remote_name}'")
|
|
40
|
+
self.tab_config = tab_config.copy()
|
|
41
|
+
if output_dir:
|
|
42
|
+
output_path = Path(output_dir)
|
|
43
|
+
else:
|
|
44
|
+
output_path = TMP_LAYOUT_DIR
|
|
45
|
+
self.script_path = self.layout_generator.create_wt_script(tab_config, output_path, self.session_name)
|
|
46
|
+
return self.script_path
|
|
47
|
+
|
|
48
|
+
def get_layout_preview(self, tab_config: Dict[str, Tuple[str, str]]) -> str:
|
|
49
|
+
return self.layout_generator.generate_wt_command(tab_config)
|
|
50
|
+
|
|
51
|
+
def check_command_status(self, tab_name: str, use_verification: bool = True) -> Dict[str, Any]:
|
|
52
|
+
return self.process_monitor.check_command_status(tab_name, self.tab_config, use_verification)
|
|
53
|
+
|
|
54
|
+
def check_all_commands_status(self) -> Dict[str, Dict[str, Any]]:
|
|
55
|
+
return self.process_monitor.check_all_commands_status(self.tab_config)
|
|
56
|
+
|
|
57
|
+
def check_wt_session_status(self) -> Dict[str, Any]:
|
|
58
|
+
return self.session_manager.check_wt_session_status()
|
|
59
|
+
|
|
60
|
+
def get_comprehensive_status(self) -> Dict[str, Any]:
|
|
61
|
+
return self.status_reporter.get_comprehensive_status(self.tab_config)
|
|
62
|
+
|
|
63
|
+
def print_status_report(self) -> None:
|
|
64
|
+
self.status_reporter.print_status_report(self.tab_config)
|
|
65
|
+
|
|
66
|
+
def start_wt_session(self, script_file_path: Optional[str] = None) -> Dict[str, Any]:
|
|
67
|
+
return self.session_manager.start_wt_session(script_file_path or self.script_path)
|
|
68
|
+
|
|
69
|
+
def attach_to_session(self) -> None:
|
|
70
|
+
self.session_manager.attach_to_session()
|
|
71
|
+
|
|
72
|
+
# Legacy methods for backward compatibility
|
|
73
|
+
def force_fresh_process_check(self, tab_name: str) -> Dict[str, Any]:
|
|
74
|
+
return self.process_monitor.force_fresh_process_check(tab_name, self.tab_config)
|
|
75
|
+
|
|
76
|
+
def verify_process_alive(self, pid: int) -> bool:
|
|
77
|
+
return self.process_monitor.verify_process_alive(pid)
|
|
78
|
+
|
|
79
|
+
def get_verified_process_status(self, tab_name: str) -> Dict[str, Any]:
|
|
80
|
+
return self.process_monitor.get_verified_process_status(tab_name, self.tab_config)
|
|
81
|
+
|
|
82
|
+
# Static methods for backward compatibility
|
|
83
|
+
@staticmethod
|
|
84
|
+
def run_remote_command(remote_name: str, command: str, timeout: int = 30):
|
|
85
|
+
executor = WTRemoteExecutor(remote_name)
|
|
86
|
+
return executor.run_command(command, timeout)
|
|
87
|
+
|
|
88
|
+
def kill_wt_session(self, force: bool = True) -> Dict[str, Any]:
|
|
89
|
+
"""Kill Windows Terminal processes on the remote machine."""
|
|
90
|
+
return self.session_manager.kill_wt_session(force)
|
|
91
|
+
|
|
92
|
+
def create_new_tab(self, tab_name: str, cwd: str, command: str) -> Dict[str, Any]:
|
|
93
|
+
"""Create a new tab in the Windows Terminal session."""
|
|
94
|
+
return self.session_manager.create_new_tab(tab_name, cwd, command, self.session_name)
|
|
95
|
+
|
|
96
|
+
def get_wt_version(self) -> Dict[str, Any]:
|
|
97
|
+
"""Get Windows Terminal version information on the remote machine."""
|
|
98
|
+
return self.session_manager.get_wt_version()
|
|
99
|
+
|
|
100
|
+
def get_remote_windows_info(self) -> Dict[str, Any]:
|
|
101
|
+
"""Get information about the remote Windows system."""
|
|
102
|
+
return self.remote_executor.get_remote_windows_info()
|
|
103
|
+
|
|
104
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
105
|
+
return {
|
|
106
|
+
"remote_name": self.remote_name,
|
|
107
|
+
"session_name": self.session_name,
|
|
108
|
+
"tab_config": self.tab_config,
|
|
109
|
+
"script_path": self.script_path,
|
|
110
|
+
"created_at": datetime.now().isoformat(),
|
|
111
|
+
"class_name": self.__class__.__name__
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
def to_json(self, file_path: Optional[str] = None) -> str:
|
|
115
|
+
# Generate file path if not provided
|
|
116
|
+
if file_path is None:
|
|
117
|
+
random_id = str(uuid.uuid4())[:8]
|
|
118
|
+
default_dir = Path.home() / "tmp_results" / "wt_sessions" / "serialized"
|
|
119
|
+
default_dir.mkdir(parents=True, exist_ok=True)
|
|
120
|
+
path_obj = default_dir / f"wt_session_{random_id}.json"
|
|
121
|
+
else:
|
|
122
|
+
path_obj = Path(file_path)
|
|
123
|
+
|
|
124
|
+
# Ensure .json extension
|
|
125
|
+
if not str(path_obj).endswith('.json'):
|
|
126
|
+
path_obj = path_obj.with_suffix('.json')
|
|
127
|
+
|
|
128
|
+
# Ensure parent directory exists
|
|
129
|
+
path_obj.parent.mkdir(parents=True, exist_ok=True)
|
|
130
|
+
|
|
131
|
+
# Serialize to JSON
|
|
132
|
+
data = self.to_dict()
|
|
133
|
+
|
|
134
|
+
with open(path_obj, 'w', encoding='utf-8') as f:
|
|
135
|
+
json.dump(data, f, indent=2, ensure_ascii=False)
|
|
136
|
+
|
|
137
|
+
logger.info(f"✅ Serialized WTRemoteLayoutGenerator to: {path_obj}")
|
|
138
|
+
return str(path_obj)
|
|
139
|
+
|
|
140
|
+
@classmethod
|
|
141
|
+
def from_json(cls, file_path: str) -> 'WTRemoteLayoutGenerator':
|
|
142
|
+
path_obj = Path(file_path)
|
|
143
|
+
|
|
144
|
+
# Ensure .json extension
|
|
145
|
+
if not str(path_obj).endswith('.json'):
|
|
146
|
+
path_obj = path_obj.with_suffix('.json')
|
|
147
|
+
|
|
148
|
+
if not path_obj.exists():
|
|
149
|
+
raise FileNotFoundError(f"JSON file not found: {path_obj}")
|
|
150
|
+
|
|
151
|
+
# Load JSON data
|
|
152
|
+
with open(path_obj, 'r', encoding='utf-8') as f:
|
|
153
|
+
data = json.load(f)
|
|
154
|
+
|
|
155
|
+
# Validate that it's the correct class
|
|
156
|
+
if data.get('class_name') != cls.__name__:
|
|
157
|
+
logger.warning(f"Class name mismatch: expected {cls.__name__}, got {data.get('class_name')}")
|
|
158
|
+
|
|
159
|
+
# Create new instance
|
|
160
|
+
# Extract session name prefix by removing the suffix
|
|
161
|
+
session_name = data['session_name']
|
|
162
|
+
if '_' in session_name:
|
|
163
|
+
session_name_prefix = '_'.join(session_name.split('_')[:-1])
|
|
164
|
+
else:
|
|
165
|
+
session_name_prefix = session_name
|
|
166
|
+
|
|
167
|
+
instance = cls(remote_name=data['remote_name'], session_name_prefix=session_name_prefix)
|
|
168
|
+
|
|
169
|
+
# Restore state
|
|
170
|
+
instance.session_name = data['session_name']
|
|
171
|
+
instance.tab_config = data['tab_config']
|
|
172
|
+
instance.script_path = data['script_path']
|
|
173
|
+
|
|
174
|
+
logger.info(f"✅ Loaded WTRemoteLayoutGenerator from: {file_path}")
|
|
175
|
+
return instance
|
|
176
|
+
|
|
177
|
+
@staticmethod
|
|
178
|
+
def list_saved_sessions(directory_path: Optional[str] = None) -> List[str]:
|
|
179
|
+
if directory_path is None:
|
|
180
|
+
dir_path = Path.home() / "tmp_results" / "wt_sessions" / "serialized"
|
|
181
|
+
else:
|
|
182
|
+
dir_path = Path(directory_path)
|
|
183
|
+
|
|
184
|
+
if not dir_path.exists():
|
|
185
|
+
return []
|
|
186
|
+
|
|
187
|
+
json_files = [f.name for f in dir_path.glob("*.json")]
|
|
188
|
+
return sorted(json_files)
|
|
189
|
+
|
|
190
|
+
def check_wt_available(self) -> bool:
|
|
191
|
+
"""Check if Windows Terminal is available on the remote machine."""
|
|
192
|
+
return self.remote_executor.check_wt_available()
|
|
193
|
+
|
|
194
|
+
def list_wt_processes(self) -> Dict[str, Any]:
|
|
195
|
+
"""List Windows Terminal processes on the remote machine."""
|
|
196
|
+
return self.remote_executor.list_wt_processes()
|
|
197
|
+
|
|
198
|
+
def kill_wt_processes(self, process_ids: Optional[List[Any]] = None) -> Dict[str, Any]:
|
|
199
|
+
"""Kill Windows Terminal processes on the remote machine."""
|
|
200
|
+
return self.remote_executor.kill_wt_processes(process_ids)
|
|
201
|
+
|
|
202
|
+
def get_windows_terminal_overview(self) -> Dict[str, Any]:
|
|
203
|
+
"""Get overview of Windows Terminal on the remote machine."""
|
|
204
|
+
return self.status_reporter.get_windows_terminal_overview()
|
|
205
|
+
|
|
206
|
+
def print_windows_terminal_overview(self) -> None:
|
|
207
|
+
"""Print overview of Windows Terminal on the remote machine."""
|
|
208
|
+
self.status_reporter.print_windows_terminal_overview()
|
|
209
|
+
|
|
210
|
+
def generate_status_summary(self) -> Dict[str, Any]:
|
|
211
|
+
"""Generate a concise status summary for monitoring."""
|
|
212
|
+
return self.status_reporter.generate_status_summary(self.tab_config)
|
|
213
|
+
|
|
214
|
+
def check_tab_specific_status(self, tab_name: str) -> Dict[str, Any]:
|
|
215
|
+
"""Get detailed status for a specific tab."""
|
|
216
|
+
return self.status_reporter.check_tab_specific_status(tab_name, self.tab_config)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
if __name__ == "__main__":
|
|
220
|
+
# Example usage
|
|
221
|
+
sample_tabs = {
|
|
222
|
+
"🤖Bot1": ("~/code/bytesense/bithence", "python bot1.py --create_new_bot True"),
|
|
223
|
+
"🤖Bot2": ("~/code/bytesense/bithence", "python bot2.py --create_new_bot True"),
|
|
224
|
+
"📊Monitor": ("~", "Get-Process | Sort-Object CPU -Descending | Select-Object -First 10"),
|
|
225
|
+
"📝Logs": ("C:/logs", "Get-Content app.log -Wait")
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
# Replace 'myserver' with an actual SSH config alias for a Windows machine
|
|
229
|
+
remote_name = "myserver" # This should be in ~/.ssh/config
|
|
230
|
+
session_name = "test_remote_session"
|
|
231
|
+
|
|
232
|
+
try:
|
|
233
|
+
# Create layout using the remote generator
|
|
234
|
+
generator = WTRemoteLayoutGenerator(remote_name=remote_name, session_name_prefix=session_name)
|
|
235
|
+
script_path = generator.create_wt_layout(sample_tabs)
|
|
236
|
+
print(f"✅ Remote layout created successfully: {script_path}")
|
|
237
|
+
|
|
238
|
+
# Check if Windows Terminal is available on remote
|
|
239
|
+
wt_available = generator.check_wt_available()
|
|
240
|
+
print(f"🖥️ Windows Terminal available on {remote_name}: {'✅' if wt_available else '❌'}")
|
|
241
|
+
|
|
242
|
+
# Get remote Windows info
|
|
243
|
+
windows_info = generator.get_remote_windows_info()
|
|
244
|
+
if windows_info.get("wt_available"):
|
|
245
|
+
print(f"📦 Remote system info: {windows_info.get('windows_info', 'Unknown')}")
|
|
246
|
+
|
|
247
|
+
# Demonstrate serialization
|
|
248
|
+
print("\n💾 Demonstrating serialization...")
|
|
249
|
+
saved_path = generator.to_json()
|
|
250
|
+
print(f"✅ Session saved to: {saved_path}")
|
|
251
|
+
|
|
252
|
+
# List all saved sessions
|
|
253
|
+
saved_sessions = WTRemoteLayoutGenerator.list_saved_sessions()
|
|
254
|
+
print(f"📋 Available saved sessions: {saved_sessions}")
|
|
255
|
+
|
|
256
|
+
# Demonstrate loading (using the full path)
|
|
257
|
+
loaded_generator = WTRemoteLayoutGenerator.from_json(saved_path)
|
|
258
|
+
print(f"✅ Session loaded successfully: {loaded_generator.session_name}")
|
|
259
|
+
print(f"📊 Loaded tabs: {list(loaded_generator.tab_config.keys())}")
|
|
260
|
+
|
|
261
|
+
# Show command preview
|
|
262
|
+
preview = generator.get_layout_preview(sample_tabs)
|
|
263
|
+
print(f"\n📋 Command Preview:\n{preview}")
|
|
264
|
+
|
|
265
|
+
# Demonstrate status checking
|
|
266
|
+
print(f"\n🔍 Checking command status on remote '{remote_name}':")
|
|
267
|
+
generator.print_status_report()
|
|
268
|
+
|
|
269
|
+
# Show Windows Terminal overview
|
|
270
|
+
print(f"\n🖥️ Windows Terminal Overview:")
|
|
271
|
+
generator.print_windows_terminal_overview()
|
|
272
|
+
|
|
273
|
+
# Start the session (uncomment to actually start)
|
|
274
|
+
# start_result = generator.start_wt_session()
|
|
275
|
+
# print(f"Session start result: {start_result}")
|
|
276
|
+
|
|
277
|
+
# Attach to session (uncomment to attach)
|
|
278
|
+
# generator.attach_to_session()
|
|
279
|
+
|
|
280
|
+
print(f"\n▶️ To start this session, run:")
|
|
281
|
+
print(f" generator.start_wt_session()")
|
|
282
|
+
print(f"\n📎 To attach to this session, run:")
|
|
283
|
+
print(f" generator.attach_to_session()")
|
|
284
|
+
|
|
285
|
+
except Exception as e:
|
|
286
|
+
print(f"❌ Error: {e}")
|
|
287
|
+
import traceback
|
|
288
|
+
traceback.print_exc()
|