Fix Local Agent Execution And Auth Checks

- Gate server requests on available credentials
- Run local child agents directly without a parent run ID
- Include command IDs in Bedrock context and recognize transfer tools
This commit is contained in:
2026-07-28 10:43:59 -05:00
parent 87e0c83e9e
commit a078287f4b
35 changed files with 1078 additions and 237 deletions
@@ -318,4 +318,3 @@ pub fn init_logging() {
.try_init();
});
}
-1
View File
@@ -195,7 +195,6 @@ impl ChannelState {
CHANNEL_STATE.lock().config.telemetry_config.is_some()
}
pub fn releases_base_url() -> Cow<'static, str> {
CHANNEL_STATE
.lock()
+1 -2
View File
@@ -108,8 +108,7 @@ pub trait ErrorExt: RegisteredError + std::error::Error {
/// engineering team.
fn is_actionable(&self) -> bool;
fn report_error(&self) {
}
fn report_error(&self) {}
}
#[cfg(test)]
+1 -2
View File
@@ -24,6 +24,5 @@ impl AnyhowErrorExt for anyhow::Error {
true
}
fn report_error(&self) {
}
fn report_error(&self) {}
}
@@ -554,10 +554,7 @@ pub fn test_restore_snapshot_with_settings_page() -> Builder {
let settings_view = settings_views.first().expect("Settings view must exist");
settings_view.read(app, |view, _| {
async_assert_eq!(
view.current_settings_section(),
SettingsSection::About
)
async_assert_eq!(view.current_settings_section(), SettingsSection::About)
})
}),
)
@@ -79,7 +79,14 @@ impl TypeScriptLanguageServerCandidate {
if let Some(path_env) = path_env_var {
let mut cmd = command::r#async::Command::new("npx");
cmd.env("PATH", path_env);
cmd.args(["--yes", "--package", "typescript", "node", "-e", "console.log(require('typescript').sys.getExecutingFilePath())"]);
cmd.args([
"--yes",
"--package",
"typescript",
"node",
"-e",
"console.log(require('typescript').sys.getExecutingFilePath())",
]);
// Set cwd to workspace so npx resolves in the right context
cmd.current_dir(workspace_root);
if let Ok(output) = cmd.output().await {
@@ -268,6 +268,15 @@ impl AuthState {
self.credentials.read().clone()
}
/// Returns whether requests to authenticated server endpoints can be made.
///
/// Galaxy's local-first experience treats the user as logged in even when no
/// Warp server credentials are configured, so `is_logged_in` is not sufficient
/// for guarding authenticated network requests.
pub fn has_server_credentials(&self) -> bool {
self.credentials.read().is_some()
}
/// Sets the credentials. Should only be called within the auth module.
pub fn set_credentials(&self, credentials: Option<Credentials>) {
*self.credentials.write() = credentials;