machineconfig 1.95__py3-none-any.whl → 1.97__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/mcinit +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/ai/__pycache__/init.cpython-311.pyc +0 -0
- machineconfig/scripts/python/ai/init.py +56 -0
- machineconfig/scripts/python/ai/rules/python/dev.md +31 -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 +62 -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/scripts/windows/mcinit.ps1 +4 -0
- 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.97.dist-info}/METADATA +2 -2
- machineconfig-1.97.dist-info/RECORD +442 -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.97.dist-info}/WHEEL +0 -0
- {machineconfig-1.95.dist-info → machineconfig-1.97.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
import json
|
|
4
|
+
import uuid
|
|
5
|
+
import logging
|
|
6
|
+
import subprocess
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Optional, Dict, List, Any
|
|
9
|
+
|
|
10
|
+
from rich.console import Console
|
|
11
|
+
|
|
12
|
+
from machineconfig.utils.utils5 import Scheduler
|
|
13
|
+
from machineconfig.cluster.sessions_managers.zellij_local import ZellijLayoutGenerator
|
|
14
|
+
|
|
15
|
+
logging.basicConfig(level=logging.INFO)
|
|
16
|
+
logger = logging.getLogger(__name__)
|
|
17
|
+
console = Console()
|
|
18
|
+
|
|
19
|
+
TMP_SERIALIZATION_DIR = Path.home().joinpath("tmp_results", "session_manager", "zellij", "local_manager")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ZellijLocalManager:
|
|
23
|
+
"""Manages multiple local zellij sessions and monitors their tabs and processes."""
|
|
24
|
+
|
|
25
|
+
def __init__(self, session2zellij_tabs: Dict[str, Dict[str, tuple[str, str]]], session_name_prefix: str = "LocalJobMgr"):
|
|
26
|
+
"""
|
|
27
|
+
Initialize the local zellij manager.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
session2zellij_tabs: Dict mapping session names to their tab configs
|
|
31
|
+
Format: {session_name: {tab_name: (cwd, command), ...}, ...}
|
|
32
|
+
session_name_prefix: Prefix for session names
|
|
33
|
+
"""
|
|
34
|
+
self.session_name_prefix = session_name_prefix
|
|
35
|
+
self.session2zellij_tabs = session2zellij_tabs # Store the original config
|
|
36
|
+
self.managers: List[ZellijLayoutGenerator] = []
|
|
37
|
+
|
|
38
|
+
# Create a ZellijLayoutGenerator for each session
|
|
39
|
+
for session_name, tab_config in session2zellij_tabs.items():
|
|
40
|
+
manager = ZellijLayoutGenerator()
|
|
41
|
+
full_session_name = f"{self.session_name_prefix}_{session_name}"
|
|
42
|
+
manager.create_zellij_layout(tab_config=tab_config, session_name=full_session_name)
|
|
43
|
+
self.managers.append(manager)
|
|
44
|
+
|
|
45
|
+
# Enhanced Rich logging for initialization
|
|
46
|
+
console.print(f"[bold green]🔧 Initialized ZellijLocalManager[/bold green] [dim]with[/dim] [bright_green]{len(self.managers)} sessions[/bright_green]")
|
|
47
|
+
|
|
48
|
+
def get_all_session_names(self) -> List[str]:
|
|
49
|
+
"""Get all managed session names."""
|
|
50
|
+
return [manager.session_name for manager in self.managers if manager.session_name is not None]
|
|
51
|
+
|
|
52
|
+
def start_all_sessions(self) -> Dict[str, Any]:
|
|
53
|
+
"""Start all zellij sessions with their layouts."""
|
|
54
|
+
results = {}
|
|
55
|
+
for manager in self.managers:
|
|
56
|
+
try:
|
|
57
|
+
session_name = manager.session_name
|
|
58
|
+
if session_name is None:
|
|
59
|
+
continue # Skip managers without a session name
|
|
60
|
+
|
|
61
|
+
layout_path = manager.layout_path
|
|
62
|
+
|
|
63
|
+
if not layout_path:
|
|
64
|
+
results[session_name] = {
|
|
65
|
+
"success": False,
|
|
66
|
+
"error": "No layout file path available"
|
|
67
|
+
}
|
|
68
|
+
continue
|
|
69
|
+
|
|
70
|
+
# Delete existing session if it exists, then start with layout
|
|
71
|
+
cmd = f"zellij delete-session --force {session_name}; zellij --layout {layout_path} attach {session_name} --create"
|
|
72
|
+
|
|
73
|
+
console.print(f"[bold cyan]🚀 Starting session[/bold cyan] [yellow]'{session_name}'[/yellow] [dim]with layout:[/dim] [blue]{layout_path}[/blue]")
|
|
74
|
+
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
|
|
75
|
+
|
|
76
|
+
if result.returncode == 0:
|
|
77
|
+
results[session_name] = {
|
|
78
|
+
"success": True,
|
|
79
|
+
"message": f"Session '{session_name}' started successfully"
|
|
80
|
+
}
|
|
81
|
+
console.print(f"[bold green]✅ Session[/bold green] [yellow]'{session_name}'[/yellow] [green]started successfully[/green]")
|
|
82
|
+
else:
|
|
83
|
+
results[session_name] = {
|
|
84
|
+
"success": False,
|
|
85
|
+
"error": result.stderr or result.stdout
|
|
86
|
+
}
|
|
87
|
+
console.print(f"[bold red]❌ Failed to start session[/bold red] [yellow]'{session_name}'[/yellow][red]:[/red] [dim]{result.stderr}[/dim]")
|
|
88
|
+
|
|
89
|
+
except Exception as e:
|
|
90
|
+
# Use a fallback key since session_name might not be defined here
|
|
91
|
+
try:
|
|
92
|
+
key = getattr(manager, 'session_name', None) or f"manager_{self.managers.index(manager)}"
|
|
93
|
+
except Exception:
|
|
94
|
+
key = f"manager_{self.managers.index(manager)}"
|
|
95
|
+
results[key] = {
|
|
96
|
+
"success": False,
|
|
97
|
+
"error": str(e)
|
|
98
|
+
}
|
|
99
|
+
logger.error(f"❌ Exception starting session '{key}': {e}")
|
|
100
|
+
|
|
101
|
+
return results
|
|
102
|
+
|
|
103
|
+
def kill_all_sessions(self) -> Dict[str, Any]:
|
|
104
|
+
"""Kill all managed zellij sessions."""
|
|
105
|
+
results = {}
|
|
106
|
+
for manager in self.managers:
|
|
107
|
+
try:
|
|
108
|
+
session_name = manager.session_name
|
|
109
|
+
if session_name is None:
|
|
110
|
+
continue # Skip managers without a session name
|
|
111
|
+
|
|
112
|
+
cmd = f"zellij delete-session --force {session_name}"
|
|
113
|
+
|
|
114
|
+
logger.info(f"Killing session '{session_name}'")
|
|
115
|
+
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=10)
|
|
116
|
+
|
|
117
|
+
results[session_name] = {
|
|
118
|
+
"success": result.returncode == 0,
|
|
119
|
+
"message": "Session killed" if result.returncode == 0 else result.stderr
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
except Exception as e:
|
|
123
|
+
# Use a fallback key since session_name might not be defined here
|
|
124
|
+
key = getattr(manager, 'session_name', None) or f"manager_{self.managers.index(manager)}"
|
|
125
|
+
results[key] = {
|
|
126
|
+
"success": False,
|
|
127
|
+
"error": str(e)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return results
|
|
131
|
+
|
|
132
|
+
def attach_to_session(self, session_name: Optional[str] = None) -> str:
|
|
133
|
+
"""
|
|
134
|
+
Generate command to attach to a specific session or list attachment commands for all.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
session_name: Specific session to attach to, or None for all sessions
|
|
138
|
+
|
|
139
|
+
Returns:
|
|
140
|
+
Command string to attach to session(s)
|
|
141
|
+
"""
|
|
142
|
+
if session_name:
|
|
143
|
+
# Find the specific session
|
|
144
|
+
for manager in self.managers:
|
|
145
|
+
if manager.session_name == session_name:
|
|
146
|
+
return f"zellij attach {session_name}"
|
|
147
|
+
raise ValueError(f"Session '{session_name}' not found")
|
|
148
|
+
else:
|
|
149
|
+
# Return commands for all sessions
|
|
150
|
+
commands = []
|
|
151
|
+
for manager in self.managers:
|
|
152
|
+
commands.append(f"# Attach to session '{manager.session_name}':")
|
|
153
|
+
commands.append(f"zellij attach {manager.session_name}")
|
|
154
|
+
commands.append("")
|
|
155
|
+
return "\n".join(commands)
|
|
156
|
+
|
|
157
|
+
def check_all_sessions_status(self) -> Dict[str, Dict[str, Any]]:
|
|
158
|
+
"""Check the status of all sessions and their commands."""
|
|
159
|
+
status_report = {}
|
|
160
|
+
|
|
161
|
+
for manager in self.managers:
|
|
162
|
+
session_name = manager.session_name
|
|
163
|
+
if session_name is None:
|
|
164
|
+
continue # Skip managers without a session name
|
|
165
|
+
|
|
166
|
+
# Get session status
|
|
167
|
+
session_status = ZellijLayoutGenerator.check_zellij_session_status(session_name)
|
|
168
|
+
|
|
169
|
+
# Get commands status for this session
|
|
170
|
+
commands_status = manager.check_all_commands_status()
|
|
171
|
+
|
|
172
|
+
# Calculate summary for this session
|
|
173
|
+
running_count = sum(1 for status in commands_status.values() if status.get("running", False))
|
|
174
|
+
total_count = len(commands_status)
|
|
175
|
+
|
|
176
|
+
status_report[session_name] = {
|
|
177
|
+
"session_status": session_status,
|
|
178
|
+
"commands_status": commands_status,
|
|
179
|
+
"summary": {
|
|
180
|
+
"total_commands": total_count,
|
|
181
|
+
"running_commands": running_count,
|
|
182
|
+
"stopped_commands": total_count - running_count,
|
|
183
|
+
"session_healthy": session_status.get("session_exists", False)
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return status_report
|
|
188
|
+
|
|
189
|
+
def get_global_summary(self) -> Dict[str, Any]:
|
|
190
|
+
"""Get a global summary across all sessions."""
|
|
191
|
+
all_status = self.check_all_sessions_status()
|
|
192
|
+
|
|
193
|
+
total_sessions = len(all_status)
|
|
194
|
+
healthy_sessions = sum(1 for status in all_status.values()
|
|
195
|
+
if status["summary"]["session_healthy"])
|
|
196
|
+
total_commands = sum(status["summary"]["total_commands"]
|
|
197
|
+
for status in all_status.values())
|
|
198
|
+
total_running = sum(status["summary"]["running_commands"]
|
|
199
|
+
for status in all_status.values())
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
"total_sessions": total_sessions,
|
|
203
|
+
"healthy_sessions": healthy_sessions,
|
|
204
|
+
"unhealthy_sessions": total_sessions - healthy_sessions,
|
|
205
|
+
"total_commands": total_commands,
|
|
206
|
+
"running_commands": total_running,
|
|
207
|
+
"stopped_commands": total_commands - total_running,
|
|
208
|
+
"all_sessions_healthy": healthy_sessions == total_sessions,
|
|
209
|
+
"all_commands_running": total_running == total_commands
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
def print_status_report(self) -> None:
|
|
213
|
+
"""Print a comprehensive status report for all sessions."""
|
|
214
|
+
all_status = self.check_all_sessions_status()
|
|
215
|
+
global_summary = self.get_global_summary()
|
|
216
|
+
|
|
217
|
+
print("=" * 80)
|
|
218
|
+
print("🔍 ZELLIJ LOCAL MANAGER STATUS REPORT")
|
|
219
|
+
print("=" * 80)
|
|
220
|
+
|
|
221
|
+
# Global summary
|
|
222
|
+
print("🌐 GLOBAL SUMMARY:")
|
|
223
|
+
print(f" Total sessions: {global_summary['total_sessions']}")
|
|
224
|
+
print(f" Healthy sessions: {global_summary['healthy_sessions']}")
|
|
225
|
+
print(f" Total commands: {global_summary['total_commands']}")
|
|
226
|
+
print(f" Running commands: {global_summary['running_commands']}")
|
|
227
|
+
print(f" All healthy: {'✅' if global_summary['all_sessions_healthy'] else '❌'}")
|
|
228
|
+
print()
|
|
229
|
+
|
|
230
|
+
# Per-session details
|
|
231
|
+
for session_name, status in all_status.items():
|
|
232
|
+
session_status = status["session_status"]
|
|
233
|
+
commands_status = status["commands_status"]
|
|
234
|
+
summary = status["summary"]
|
|
235
|
+
|
|
236
|
+
print(f"📋 SESSION: {session_name}")
|
|
237
|
+
print("-" * 60)
|
|
238
|
+
|
|
239
|
+
# Session health
|
|
240
|
+
if session_status.get("session_exists", False):
|
|
241
|
+
print("✅ Session is running")
|
|
242
|
+
else:
|
|
243
|
+
print(f"❌ Session not found: {session_status.get('error', 'Unknown error')}")
|
|
244
|
+
|
|
245
|
+
# Commands in this session
|
|
246
|
+
print(f" Commands ({summary['running_commands']}/{summary['total_commands']} running):")
|
|
247
|
+
for tab_name, cmd_status in commands_status.items():
|
|
248
|
+
status_icon = "✅" if cmd_status.get("running", False) else "❌"
|
|
249
|
+
print(f" {status_icon} {tab_name}: {cmd_status.get('command', 'Unknown')}")
|
|
250
|
+
|
|
251
|
+
if cmd_status.get("processes"):
|
|
252
|
+
for proc in cmd_status["processes"][:2]: # Show first 2 processes
|
|
253
|
+
print(f" └─ PID {proc['pid']}: {proc['name']} ({proc['status']})")
|
|
254
|
+
print()
|
|
255
|
+
|
|
256
|
+
print("=" * 80)
|
|
257
|
+
|
|
258
|
+
def run_monitoring_routine(self, wait_ms: int = 30000) -> None:
|
|
259
|
+
"""
|
|
260
|
+
Run a continuous monitoring routine that checks status periodically.
|
|
261
|
+
|
|
262
|
+
Args:
|
|
263
|
+
wait_ms: How long to wait between checks in milliseconds (default: 30000ms = 30s)
|
|
264
|
+
"""
|
|
265
|
+
def routine(scheduler: Scheduler):
|
|
266
|
+
print(f"\n⏰ Monitoring cycle {scheduler.cycle} at {datetime.now()}")
|
|
267
|
+
print("-" * 50)
|
|
268
|
+
|
|
269
|
+
if scheduler.cycle % 2 == 0:
|
|
270
|
+
# Detailed status check every other cycle
|
|
271
|
+
all_status = self.check_all_sessions_status()
|
|
272
|
+
|
|
273
|
+
# Create DataFrame for easier viewing
|
|
274
|
+
status_data = []
|
|
275
|
+
for session_name, status in all_status.items():
|
|
276
|
+
for tab_name, cmd_status in status["commands_status"].items():
|
|
277
|
+
status_data.append({
|
|
278
|
+
"session": session_name,
|
|
279
|
+
"tab": tab_name,
|
|
280
|
+
"running": cmd_status.get("running", False),
|
|
281
|
+
"command": cmd_status.get("command", "Unknown")[:50] + "..." if len(cmd_status.get("command", "")) > 50 else cmd_status.get("command", ""),
|
|
282
|
+
"processes": len(cmd_status.get("processes", []))
|
|
283
|
+
})
|
|
284
|
+
|
|
285
|
+
if status_data:
|
|
286
|
+
# Format data as table
|
|
287
|
+
if status_data:
|
|
288
|
+
# Create header
|
|
289
|
+
headers = list(status_data[0].keys()) if status_data else []
|
|
290
|
+
header_line = " | ".join(f"{h:<15}" for h in headers)
|
|
291
|
+
separator = "-" * len(header_line)
|
|
292
|
+
print(header_line)
|
|
293
|
+
print(separator)
|
|
294
|
+
for row in status_data:
|
|
295
|
+
values = [str(row.get(h, ""))[:15] for h in headers]
|
|
296
|
+
print(" | ".join(f"{v:<15}" for v in values))
|
|
297
|
+
|
|
298
|
+
# Check if all sessions have stopped
|
|
299
|
+
running_count = sum(1 for row in status_data if row.get("running", False))
|
|
300
|
+
if running_count == 0:
|
|
301
|
+
print("\n⚠️ All commands have stopped. Stopping monitoring.")
|
|
302
|
+
scheduler.max_cycles = scheduler.cycle
|
|
303
|
+
return
|
|
304
|
+
else:
|
|
305
|
+
print("No status data available")
|
|
306
|
+
else:
|
|
307
|
+
# Quick summary check
|
|
308
|
+
global_summary = self.get_global_summary()
|
|
309
|
+
print(f"📊 Quick Summary: {global_summary['running_commands']}/{global_summary['total_commands']} commands running across {global_summary['healthy_sessions']}/{global_summary['total_sessions']} sessions")
|
|
310
|
+
|
|
311
|
+
logger.info(f"Starting monitoring routine with {wait_ms}ms intervals")
|
|
312
|
+
sched = Scheduler(routine=routine, wait_ms=wait_ms)
|
|
313
|
+
sched.run()
|
|
314
|
+
|
|
315
|
+
def save(self, session_id: Optional[str] = None) -> str:
|
|
316
|
+
"""Save the manager state to disk."""
|
|
317
|
+
if session_id is None:
|
|
318
|
+
session_id = str(uuid.uuid4())[:8]
|
|
319
|
+
|
|
320
|
+
# Create session directory
|
|
321
|
+
session_dir = TMP_SERIALIZATION_DIR / session_id
|
|
322
|
+
session_dir.mkdir(parents=True, exist_ok=True)
|
|
323
|
+
|
|
324
|
+
# Save the session2zellij_tabs configuration
|
|
325
|
+
config_file = session_dir / "session2zellij_tabs.json"
|
|
326
|
+
with open(config_file, 'w', encoding='utf-8') as f:
|
|
327
|
+
json.dump(self.session2zellij_tabs, f, indent=2, ensure_ascii=False)
|
|
328
|
+
|
|
329
|
+
# Save metadata
|
|
330
|
+
metadata = {
|
|
331
|
+
"session_name_prefix": self.session_name_prefix,
|
|
332
|
+
"created_at": str(datetime.now()),
|
|
333
|
+
"num_managers": len(self.managers),
|
|
334
|
+
"sessions": list(self.session2zellij_tabs.keys()),
|
|
335
|
+
"manager_type": "ZellijLocalManager"
|
|
336
|
+
}
|
|
337
|
+
metadata_file = session_dir / "metadata.json"
|
|
338
|
+
with open(metadata_file, 'w', encoding='utf-8') as f:
|
|
339
|
+
json.dump(metadata, f, indent=2, ensure_ascii=False)
|
|
340
|
+
|
|
341
|
+
# Save each manager's state
|
|
342
|
+
managers_dir = session_dir / "managers"
|
|
343
|
+
managers_dir.mkdir(exist_ok=True)
|
|
344
|
+
|
|
345
|
+
for i, manager in enumerate(self.managers):
|
|
346
|
+
manager_data = {
|
|
347
|
+
"session_name": manager.session_name,
|
|
348
|
+
"tab_config": manager.tab_config,
|
|
349
|
+
"layout_path": manager.layout_path
|
|
350
|
+
}
|
|
351
|
+
manager_file = managers_dir / f"manager_{i}_{manager.session_name}.json"
|
|
352
|
+
with open(manager_file, 'w', encoding='utf-8') as f:
|
|
353
|
+
json.dump(manager_data, f, indent=2, ensure_ascii=False)
|
|
354
|
+
|
|
355
|
+
logger.info(f"✅ Saved ZellijLocalManager session to: {session_dir}")
|
|
356
|
+
return session_id
|
|
357
|
+
|
|
358
|
+
@classmethod
|
|
359
|
+
def load(cls, session_id: str) -> 'ZellijLocalManager':
|
|
360
|
+
"""Load a saved manager state from disk."""
|
|
361
|
+
session_dir = TMP_SERIALIZATION_DIR / session_id
|
|
362
|
+
|
|
363
|
+
if not session_dir.exists():
|
|
364
|
+
raise FileNotFoundError(f"Session directory not found: {session_dir}")
|
|
365
|
+
|
|
366
|
+
# Load configuration
|
|
367
|
+
config_file = session_dir / "session2zellij_tabs.json"
|
|
368
|
+
if not config_file.exists():
|
|
369
|
+
raise FileNotFoundError(f"Configuration file not found: {config_file}")
|
|
370
|
+
|
|
371
|
+
with open(config_file, 'r', encoding='utf-8') as f:
|
|
372
|
+
session2zellij_tabs = json.load(f)
|
|
373
|
+
|
|
374
|
+
# Load metadata
|
|
375
|
+
metadata_file = session_dir / "metadata.json"
|
|
376
|
+
session_name_prefix = "LocalJobMgr" # default fallback
|
|
377
|
+
if metadata_file.exists():
|
|
378
|
+
with open(metadata_file, 'r', encoding='utf-8') as f:
|
|
379
|
+
metadata = json.load(f)
|
|
380
|
+
session_name_prefix = metadata.get("session_name_prefix", "LocalJobMgr")
|
|
381
|
+
|
|
382
|
+
# Create new instance
|
|
383
|
+
instance = cls(session2zellij_tabs=session2zellij_tabs, session_name_prefix=session_name_prefix)
|
|
384
|
+
|
|
385
|
+
# Load saved manager states
|
|
386
|
+
managers_dir = session_dir / "managers"
|
|
387
|
+
if managers_dir.exists():
|
|
388
|
+
instance.managers = []
|
|
389
|
+
manager_files = sorted(managers_dir.glob("manager_*.json"))
|
|
390
|
+
|
|
391
|
+
for manager_file in manager_files:
|
|
392
|
+
try:
|
|
393
|
+
with open(manager_file, 'r', encoding='utf-8') as f:
|
|
394
|
+
manager_data = json.load(f)
|
|
395
|
+
|
|
396
|
+
# Recreate the manager
|
|
397
|
+
manager = ZellijLayoutGenerator()
|
|
398
|
+
manager.session_name = manager_data["session_name"]
|
|
399
|
+
manager.tab_config = manager_data["tab_config"]
|
|
400
|
+
manager.layout_path = manager_data["layout_path"]
|
|
401
|
+
|
|
402
|
+
instance.managers.append(manager)
|
|
403
|
+
|
|
404
|
+
except Exception as e:
|
|
405
|
+
logger.warning(f"Failed to load manager from {manager_file}: {e}")
|
|
406
|
+
|
|
407
|
+
logger.info(f"✅ Loaded ZellijLocalManager session from: {session_dir}")
|
|
408
|
+
return instance
|
|
409
|
+
|
|
410
|
+
@staticmethod
|
|
411
|
+
def list_saved_sessions() -> List[str]:
|
|
412
|
+
"""List all saved session IDs."""
|
|
413
|
+
if not TMP_SERIALIZATION_DIR.exists():
|
|
414
|
+
return []
|
|
415
|
+
|
|
416
|
+
sessions = []
|
|
417
|
+
for item in TMP_SERIALIZATION_DIR.iterdir():
|
|
418
|
+
if item.is_dir() and (item / "metadata.json").exists():
|
|
419
|
+
sessions.append(item.name)
|
|
420
|
+
|
|
421
|
+
return sorted(sessions)
|
|
422
|
+
|
|
423
|
+
@staticmethod
|
|
424
|
+
def delete_session(session_id: str) -> bool:
|
|
425
|
+
"""Delete a saved session."""
|
|
426
|
+
session_dir = TMP_SERIALIZATION_DIR / session_id
|
|
427
|
+
|
|
428
|
+
if not session_dir.exists():
|
|
429
|
+
logger.warning(f"Session directory not found: {session_dir}")
|
|
430
|
+
return False
|
|
431
|
+
|
|
432
|
+
try:
|
|
433
|
+
import shutil
|
|
434
|
+
shutil.rmtree(session_dir)
|
|
435
|
+
logger.info(f"✅ Deleted session: {session_id}")
|
|
436
|
+
return True
|
|
437
|
+
except Exception as e:
|
|
438
|
+
logger.error(f"Failed to delete session {session_id}: {e}")
|
|
439
|
+
return False
|
|
440
|
+
|
|
441
|
+
def list_active_sessions(self) -> List[Dict[str, Any]]:
|
|
442
|
+
"""List currently active zellij sessions managed by this instance."""
|
|
443
|
+
active_sessions = []
|
|
444
|
+
|
|
445
|
+
try:
|
|
446
|
+
# Get all running zellij sessions
|
|
447
|
+
result = subprocess.run(
|
|
448
|
+
['zellij', 'list-sessions'],
|
|
449
|
+
capture_output=True,
|
|
450
|
+
text=True,
|
|
451
|
+
timeout=10
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
if result.returncode == 0:
|
|
455
|
+
all_sessions = result.stdout.strip().split('\n') if result.stdout.strip() else []
|
|
456
|
+
|
|
457
|
+
# Filter to only our managed sessions
|
|
458
|
+
for manager in self.managers:
|
|
459
|
+
session_name = manager.session_name
|
|
460
|
+
if session_name is None:
|
|
461
|
+
continue # Skip managers without a session name
|
|
462
|
+
is_active = any(session_name in session for session in all_sessions)
|
|
463
|
+
|
|
464
|
+
active_sessions.append({
|
|
465
|
+
"session_name": session_name,
|
|
466
|
+
"is_active": is_active,
|
|
467
|
+
"tab_count": len(manager.tab_config),
|
|
468
|
+
"tabs": list(manager.tab_config.keys())
|
|
469
|
+
})
|
|
470
|
+
|
|
471
|
+
except Exception as e:
|
|
472
|
+
logger.error(f"Error listing active sessions: {e}")
|
|
473
|
+
|
|
474
|
+
return active_sessions
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
if __name__ == "__main__":
|
|
478
|
+
# Example usage
|
|
479
|
+
sample_sessions = {
|
|
480
|
+
"development": {
|
|
481
|
+
"🚀Frontend": ("~/code/myapp/frontend", "npm run dev"),
|
|
482
|
+
"⚙️Backend": ("~/code/myapp/backend", "python manage.py runserver"),
|
|
483
|
+
"📊Monitor": ("~", "htop")
|
|
484
|
+
},
|
|
485
|
+
"testing": {
|
|
486
|
+
"🧪Tests": ("~/code/myapp", "pytest --watch"),
|
|
487
|
+
"🔍Coverage": ("~/code/myapp", "coverage run --source=. -m pytest"),
|
|
488
|
+
"📝Logs": ("~/logs", "tail -f app.log")
|
|
489
|
+
},
|
|
490
|
+
"deployment": {
|
|
491
|
+
"🐳Docker": ("~/code/myapp", "docker-compose up"),
|
|
492
|
+
"☸️K8s": ("~/k8s", "kubectl get pods --watch"),
|
|
493
|
+
"📈Metrics": ("~", "k9s")
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
try:
|
|
498
|
+
# Create the local manager
|
|
499
|
+
manager = ZellijLocalManager(sample_sessions, session_name_prefix="DevEnv")
|
|
500
|
+
print(f"✅ Local manager created with {len(manager.managers)} sessions")
|
|
501
|
+
|
|
502
|
+
# Show session names
|
|
503
|
+
print(f"📋 Sessions: {manager.get_all_session_names()}")
|
|
504
|
+
|
|
505
|
+
# Print attachment commands (without actually starting)
|
|
506
|
+
print("\n📎 Attachment commands:")
|
|
507
|
+
print(manager.attach_to_session())
|
|
508
|
+
|
|
509
|
+
# Show current status
|
|
510
|
+
print("\n🔍 Current status:")
|
|
511
|
+
manager.print_status_report()
|
|
512
|
+
|
|
513
|
+
# Demonstrate save/load
|
|
514
|
+
print("\n💾 Demonstrating save/load...")
|
|
515
|
+
session_id = manager.save()
|
|
516
|
+
print(f"✅ Saved session: {session_id}")
|
|
517
|
+
|
|
518
|
+
# List saved sessions
|
|
519
|
+
saved_sessions = ZellijLocalManager.list_saved_sessions()
|
|
520
|
+
print(f"📋 Saved sessions: {saved_sessions}")
|
|
521
|
+
|
|
522
|
+
# Load and verify
|
|
523
|
+
loaded_manager = ZellijLocalManager.load(session_id)
|
|
524
|
+
print(f"✅ Loaded session with {len(loaded_manager.managers)} sessions")
|
|
525
|
+
|
|
526
|
+
# Show how to start monitoring (commented out to prevent infinite loop in demo)
|
|
527
|
+
print("\n⏰ To start monitoring, run:")
|
|
528
|
+
print("manager.run_monitoring_routine(wait_ms=30000) # 30 seconds")
|
|
529
|
+
|
|
530
|
+
except Exception as e:
|
|
531
|
+
print(f"❌ Error: {e}")
|
|
532
|
+
import traceback
|
|
533
|
+
traceback.print_exc()
|