Complete agent monitoring and Galaxy Control integration
- expose command-monitor conversations and preserve visible agent transcripts - add bounded polling and a dedicated shell interrupt tool - improve direct-provider images, skills, tool history, and usage handling - package and brand Galaxy Control across releases, installers, persistence, and docs
This commit is contained in:
@@ -12,20 +12,20 @@ fn oz_install_target_path() -> PathBuf {
|
||||
PathBuf::from("/usr/local/bin").join(ChannelState::channel().cli_command_name())
|
||||
}
|
||||
|
||||
/// Compute the target path where the Warp Control symlink should be installed, based on channel
|
||||
fn warpctrl_install_target_path() -> PathBuf {
|
||||
PathBuf::from("/usr/local/bin").join(ChannelState::channel().warpctrl_command_name())
|
||||
/// Compute the target path where the Galaxy Control symlink should be installed, based on channel
|
||||
fn galaxyctrl_install_target_path() -> PathBuf {
|
||||
PathBuf::from("/usr/local/bin").join(ChannelState::channel().galaxyctrl_command_name())
|
||||
}
|
||||
|
||||
/// Compute the source path of the warpctrl wrapper inside the current app bundle.
|
||||
/// Compute the source path of the galaxyctrl wrapper inside the current app bundle.
|
||||
///
|
||||
/// Oz commands are part of the shared executable's normal argument parser, so
|
||||
/// Oz can symlink directly to the current executable. Warp Control has a
|
||||
/// separate parser selected by the hidden `--warpctrl` flag, so its installed
|
||||
/// Oz can symlink directly to the current executable. Galaxy Control has a
|
||||
/// separate parser selected by the hidden `--galaxyctrl` flag, so its installed
|
||||
/// symlink must target the bundled wrapper that injects that flag. Without it,
|
||||
/// Warp Control subcommands such as `tab` would reach the normal parser and be
|
||||
/// Galaxy Control subcommands such as `tab` would reach the normal parser and be
|
||||
/// rejected as unknown.
|
||||
fn warpctrl_bundle_source_path() -> Result<PathBuf> {
|
||||
fn galaxyctrl_bundle_source_path() -> Result<PathBuf> {
|
||||
let current_binary =
|
||||
std::env::current_exe().context("Failed to get current executable path")?;
|
||||
let bundle_root = current_binary
|
||||
@@ -35,7 +35,7 @@ fn warpctrl_bundle_source_path() -> Result<PathBuf> {
|
||||
.ok_or_else(|| anyhow!("Current executable is not inside a bundled app"))?;
|
||||
Ok(bundle_root
|
||||
.join("Contents/Resources/bin")
|
||||
.join(ChannelState::channel().warpctrl_command_name()))
|
||||
.join(ChannelState::channel().galaxyctrl_command_name()))
|
||||
}
|
||||
fn path_resolves_to(path: &Path, expected_path: &Path) -> bool {
|
||||
let Ok(path) = path.canonicalize() else {
|
||||
@@ -47,12 +47,12 @@ fn path_resolves_to(path: &Path, expected_path: &Path) -> bool {
|
||||
path == expected_path
|
||||
}
|
||||
|
||||
/// Whether the installed Warp Control command resolves to this app bundle's wrapper.
|
||||
pub fn is_warpctrl_installed() -> bool {
|
||||
let Ok(source) = warpctrl_bundle_source_path() else {
|
||||
/// Whether the installed Galaxy Control command resolves to this app bundle's wrapper.
|
||||
pub fn is_galaxyctrl_installed() -> bool {
|
||||
let Ok(source) = galaxyctrl_bundle_source_path() else {
|
||||
return false;
|
||||
};
|
||||
path_resolves_to(&warpctrl_install_target_path(), &source)
|
||||
path_resolves_to(&galaxyctrl_install_target_path(), &source)
|
||||
}
|
||||
|
||||
/// Create a symlink with elevated privileges using osascript
|
||||
@@ -213,29 +213,29 @@ pub fn uninstall_oz() -> Result<()> {
|
||||
uninstall_symlink(&oz_install_target_path(), "Oz command")
|
||||
}
|
||||
|
||||
/// Install Warp Control by symlinking its bundled wrapper into /usr/local/bin.
|
||||
/// Install Galaxy Control by symlinking its bundled wrapper into /usr/local/bin.
|
||||
///
|
||||
/// The wrapper contains no control implementation. It resolves this installed
|
||||
/// symlink back into the app bundle, launches the shared Warp executable, and
|
||||
/// injects `--warpctrl` so startup selects the separate Warp Control parser
|
||||
/// symlink back into the app bundle, launches the shared Galaxy executable, and
|
||||
/// injects `--galaxyctrl` so startup selects the separate Galaxy Control parser
|
||||
/// before normal parsing or GUI startup.
|
||||
pub fn install_warpctrl() -> Result<()> {
|
||||
let warpctrl_path = warpctrl_install_target_path();
|
||||
let warpctrl_source = warpctrl_bundle_source_path()?;
|
||||
pub fn install_galaxyctrl() -> Result<()> {
|
||||
let galaxyctrl_path = galaxyctrl_install_target_path();
|
||||
let galaxyctrl_source = galaxyctrl_bundle_source_path()?;
|
||||
|
||||
if !warpctrl_source.exists() {
|
||||
if !galaxyctrl_source.exists() {
|
||||
return Err(anyhow!(
|
||||
"Cannot install Warp Control CLI: bundled wrapper not found at {}",
|
||||
warpctrl_source.display()
|
||||
"Cannot install Galaxy Control CLI: bundled wrapper not found at {}",
|
||||
galaxyctrl_source.display()
|
||||
));
|
||||
}
|
||||
|
||||
install_symlink(&warpctrl_source, &warpctrl_path, "Warp Control CLI")
|
||||
install_symlink(&galaxyctrl_source, &galaxyctrl_path, "Galaxy Control CLI")
|
||||
}
|
||||
|
||||
/// Uninstall the Warp Control CLI by removing the symlink from /usr/local/bin
|
||||
pub fn uninstall_warpctrl() -> Result<()> {
|
||||
uninstall_symlink(&warpctrl_install_target_path(), "Warp Control command")
|
||||
/// Uninstall the Galaxy Control CLI by removing the symlink from /usr/local/bin
|
||||
pub fn uninstall_galaxyctrl() -> Result<()> {
|
||||
uninstall_symlink(&galaxyctrl_install_target_path(), "Galaxy Control command")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user