Module shellintegration

Module shellintegration 

Source
Expand description

Shell integration script deployment and shell startup configuration.

Embeds shell integration scripts (bash, zsh, pwsh, fish) and deploys them to ~/.agentmux/shell/<type>/ on first use or when the version changes. The shell controller uses these scripts to install prompt hooks that send OSC 16162;E commands carrying AGENTMUX_AGENT_ID, enabling per-pane title and color to work.

StructsΒ§

ShellStartup
Shell startup configuration: extra args and env vars to inject.

EnumsΒ§

ShellType

ConstantsΒ§

BASH_SCRIPT πŸ”’
FISH_SCRIPT πŸ”’
MUXLOG_JS πŸ”’
Shared muxlog core (Node). Deployed once at <shell>/muxlog.mjs; every shell’s muxlog function delegates to it. One tested implementation does log discovery + NDJSON rendering + filtering for all shells.
PWSH_SCRIPT πŸ”’
VERSION_MARKER πŸ”’
ZSH_SCRIPT πŸ”’

FunctionsΒ§

deploy_scripts
Deploy shell integration scripts to <wave_data_dir>/shell/<type>/. Skips deployment if the version marker is already current. Errors are logged but not fatal β€” a missing script just means no integration.
detect_shell_type
Detect shell type from the shell binary path.
get_shell_startup
Get the startup configuration for launching an interactive shell with AgentMux integration. Returns None for unknown shell types.
shell_quote πŸ”’
Single-quote a path for POSIX shell usage.