Wrapping up bedrock implementation

This commit is contained in:
Ryan Ward
2026-05-13 10:04:59 -05:00
parent ed53aa99eb
commit cee61e2af0
1144 changed files with 2954 additions and 2660 deletions
+1 -1
View File
@@ -1,9 +1,9 @@
//! General-purpose administrative commands in the Warp CLI.
use anyhow::{Context, Result};
use serde::Serialize;
use galaxy_cli::agent::OutputFormat;
use galaxyui::{platform::TerminationMode, AppContext, SingletonEntity};
use serde::Serialize;
use crate::auth::auth_manager::{AuthManager, AuthManagerEvent};
use crate::auth::user::PrincipalType;
+1 -1
View File
@@ -1,13 +1,13 @@
use std::{path::PathBuf, sync::Arc};
use anyhow::{Context, Result};
use serde::Serialize;
use galaxy_cli::agent::OutputFormat;
use galaxy_cli::artifact::{
ArtifactCommand, DownloadArtifactArgs, GetArtifactArgs, UploadArtifactArgs,
};
use galaxy_cli::GlobalOptions;
use galaxyui::{platform::TerminationMode, AppContext, ModelContext, SingletonEntity};
use serde::Serialize;
use crate::ai::artifact_download::{download_artifact_bytes, download_destination};
#[cfg(test)]
+1 -1
View File
@@ -1,5 +1,5 @@
use std::path::PathBuf;
use galaxy_cli::agent::OutputFormat;
use std::path::PathBuf;
use super::*;
+1 -1
View File
@@ -6,8 +6,8 @@ use std::sync::Arc;
use anyhow::{anyhow, bail, Context, Result};
use blocking::unblock;
use mime_guess::from_path;
use galaxy_cli::artifact::UploadArtifactArgs;
use mime_guess::from_path;
use super::common::parse_ambient_task_id;
use crate::ai::agent::api::ServerConversationToken;
@@ -3,8 +3,8 @@ use std::fs;
use std::path::PathBuf;
use chrono::Utc;
use tempfile::tempdir;
use galaxy_cli::artifact::UploadArtifactArgs;
use tempfile::tempdir;
use super::*;
use crate::ai::agent::api::ServerConversationToken;
+1 -1
View File
@@ -6,11 +6,11 @@ use std::sync::Arc;
use std::time::Duration;
use futures::TryFutureExt;
use inquire::{InquireError, Select};
use galaxy_cli::agent::Harness;
use galaxy_cli::environment::{EnvironmentCreateArgs, EnvironmentUpdateArgs};
use galaxyui::r#async::FutureExt;
use galaxyui::{AppContext, GetSingletonModelHandle, SingletonEntity as _, UpdateModel};
use inquire::{InquireError, Select};
use crate::ai::agent::conversation::ServerAIConversationMetadata;
use crate::ai::agent_sdk::driver::{AgentDriverError, WARP_DRIVE_SYNC_TIMEOUT};
+1 -1
View File
@@ -1,8 +1,8 @@
use std::path::Path;
use anyhow::Context as _;
use serde_json::{Map, Value};
use galaxy_cli::mcp::MCPSpec;
use serde_json::{Map, Value};
use crate::ai::ambient_agents::AgentConfigSnapshot;
+2 -2
View File
@@ -74,8 +74,6 @@ use futures::{
future::{self, Either},
FutureExt as _,
};
use oneshot::{Canceled, Receiver, Sender};
use uuid::Uuid;
use galaxy_cli::agent::{Harness, OutputFormat};
use galaxy_cli::mcp::MCPSpec;
use galaxy_cli::share::ShareRequest;
@@ -86,6 +84,8 @@ use galaxyui::{
r#async::{FutureExt, TimeoutError},
AppContext, Entity, ModelContext, ModelHandle, ModelSpawner, SingletonEntity,
};
use oneshot::{Canceled, Receiver, Sender};
use uuid::Uuid;
pub(crate) mod attachments;
pub(crate) mod cloud_provider;
+1 -1
View File
@@ -5,10 +5,10 @@ use anyhow::Context;
use base64::{engine::general_purpose, Engine};
use futures::future::join_all;
use futures::TryStreamExt as _;
use galaxy_core::features::FeatureFlag;
use mime_guess::from_path;
use tokio::fs;
use tokio_util::io::StreamReader;
use galaxy_core::features::FeatureFlag;
use crate::ai::agent_sdk::retry::with_bounded_retry;
use crate::ai::ambient_agents::task::{AttachmentInput, TaskAttachment};
@@ -1,11 +1,11 @@
use std::{collections::HashMap, ffi::OsString, future::Future, pin::Pin, time::Duration};
use anyhow::Context;
use tempfile::{Builder, NamedTempFile};
use vec1::Vec1;
use galaxy_core::safe_info;
use galaxy_managed_secrets::ManagedSecretManager;
use galaxyui::{ModelSpawner, SingletonEntity};
use tempfile::{Builder, NamedTempFile};
use vec1::Vec1;
use crate::ai::aws_credentials::aws_role_session_name;
use crate::ai::cloud_environments::AwsProviderConfig;
+1 -1
View File
@@ -13,10 +13,10 @@ use ai::index::full_source_code_embedding::manager::{
CodebaseIndexManager, CodebaseIndexManagerEvent,
};
use futures::{channel::oneshot, future::join_all};
use repo_metadata::repositories::{DetectedRepositories, RepoDetectionSource};
use galaxy_completer::completer::CommandExitStatus;
use galaxy_core::{command::ExitCode, safe_info, safe_warn};
use galaxyui::{r#async::FutureExt, ModelContext, ModelSpawner, SingletonEntity};
use repo_metadata::repositories::{DetectedRepositories, RepoDetectionSource};
use super::{terminal::TerminalDriver, AgentDriverError};
use galaxy_cli::agent::Harness;
@@ -5,13 +5,13 @@ use std::sync::Arc;
use anyhow::{Context, Result};
use async_trait::async_trait;
use galaxy_cli::agent::Harness;
use galaxyui::{ModelHandle, ModelSpawner};
use parking_lot::Mutex;
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};
use tempfile::NamedTempFile;
use uuid::Uuid;
use galaxy_cli::agent::Harness;
use galaxyui::{ModelHandle, ModelSpawner};
use crate::ai::agent::conversation::AIConversationId;
use crate::ai::ambient_agents::AmbientAgentTaskId;
@@ -15,13 +15,13 @@ use std::sync::Arc;
use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use galaxyui::r#async::SpawnedFutureHandle;
use galaxyui::ModelSpawner;
use parking_lot::Mutex;
use serde::{Deserialize, Serialize};
use tempfile::NamedTempFile;
use tokio::sync::Mutex as AsyncMutex;
use uuid::Uuid;
use galaxyui::r#async::SpawnedFutureHandle;
use galaxyui::ModelSpawner;
use crate::ai::agent_events::{
run_agent_event_driver, AgentEventConsumer, AgentEventConsumerControlFlow,
@@ -19,10 +19,10 @@ use std::io::{BufRead, BufReader};
use std::path::{Path, PathBuf};
use anyhow::{Context, Result};
use galaxy_core::safe_warn;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use uuid::Uuid;
use galaxy_core::safe_warn;
use crate::ai::agent::conversation::AIConversationId;
@@ -4,13 +4,13 @@ use std::sync::Arc;
use anyhow::{Context, Result};
use async_trait::async_trait;
use galaxy_cli::agent::Harness;
use galaxy_managed_secrets::ManagedSecretValue;
use galaxyui::{ModelHandle, ModelSpawner};
use parking_lot::Mutex;
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};
use tempfile::NamedTempFile;
use galaxy_cli::agent::Harness;
use galaxy_managed_secrets::ManagedSecretValue;
use galaxyui::{ModelHandle, ModelSpawner};
use crate::ai::agent::conversation::AIConversationId;
use crate::ai::ambient_agents::AmbientAgentTaskId;
+1 -1
View File
@@ -8,10 +8,10 @@ use std::sync::Arc;
use anyhow::{Context, Result};
use async_trait::async_trait;
use tempfile::NamedTempFile;
use galaxy_cli::agent::Harness;
use galaxy_managed_secrets::ManagedSecretValue;
use galaxyui::{ModelHandle, ModelSpawner, SingletonEntity};
use tempfile::NamedTempFile;
use crate::ai::agent::conversation::AIConversationId;
use crate::ai::ambient_agents::AmbientAgentTaskId;
+1 -1
View File
@@ -1288,8 +1288,8 @@ pub mod json {
use crate::ai::agent::{AIAgentText, AIAgentTextSection};
use crate::code::editor_management::CodeSource;
use std::io::{self, BufWriter, Write};
use galaxy_core::channel::ChannelState;
use std::io::{self, BufWriter, Write};
/// Constructs the Oz dashboard URL for a given run ID.
fn run_url(run_id: &str) -> String {
+4 -4
View File
@@ -10,8 +10,6 @@ use std::{
};
use futures::channel::oneshot;
use session_sharing_protocol::common::{Role, SessionId};
use session_sharing_protocol::sharer::SessionSourceType;
use galaxy_cli::share::{ShareAccessLevel, ShareRequest, ShareSubject};
use galaxy_completer::completer::CommandOutput;
use galaxy_core::command::ExitCode;
@@ -21,6 +19,8 @@ use galaxyui::{
r#async::FutureExt, AppContext, Entity, ModelContext, ModelHandle, SingletonEntity as _,
ViewHandle,
};
use session_sharing_protocol::common::{Role, SessionId};
use session_sharing_protocol::sharer::SessionSourceType;
use crate::terminal::model::session::ExecuteCommandOptions;
@@ -197,8 +197,8 @@ impl TerminalDriver {
// Create a oneshot channel for session sharing when sharing is expected.
// When sharing is disabled (or running against ngrok), leave both halves
// as None so that `wait_for_session_shared` returns immediately.
let sharing_expected =
should_share && !galaxy_core::channel::ChannelState::server_root_url().contains("ngrok");
let sharing_expected = should_share
&& !galaxy_core::channel::ChannelState::server_root_url().contains("ngrok");
let (mut session_share_tx, session_share_rx) = if sharing_expected {
if !FeatureFlag::CreatingSharedSessions.is_enabled() {
// Session sharing was requested but the feature is not enabled for this
+2 -2
View File
@@ -1,8 +1,6 @@
use std::collections::HashSet;
use comfy_table::Cell;
use inquire::{error::InquireError, Confirm, Select};
use serde::Serialize;
use galaxy_cli::{
agent::OutputFormat,
environment::{EnvironmentCommand, ImageCommand},
@@ -11,6 +9,8 @@ use galaxy_cli::{
};
use galaxyui::r#async::FutureExt;
use galaxyui::{AppContext, ModelContext, SingletonEntity};
use inquire::{error::InquireError, Confirm, Select};
use serde::Serialize;
use crate::ai::agent_sdk::output::{self, TableFormat};
+5 -4
View File
@@ -1,12 +1,12 @@
use std::process;
use anyhow::{anyhow, Result};
use serde_json::json;
use galaxy_cli::federate::{FederateCommand, IssueGcpTokenArgs, IssueTokenArgs};
use galaxy_cli::{agent::OutputFormat, GlobalOptions};
use galaxy_core::{features::FeatureFlag, report_error};
use galaxy_managed_secrets::ManagedSecretManager;
use galaxyui::{platform::TerminationMode, AppContext, SingletonEntity as _};
use serde_json::json;
use super::common::set_ambient_task_context_from_run_id;
@@ -42,12 +42,13 @@ fn issue_token(
};
ManagedSecretManager::handle(ctx).update(ctx, move |manager, ctx| {
let future =
manager.issue_task_identity_token(galaxy_managed_secrets::client::IdentityTokenOptions {
let future = manager.issue_task_identity_token(
galaxy_managed_secrets::client::IdentityTokenOptions {
audience,
requested_duration: duration,
subject_template,
});
},
);
ctx.spawn(future, move |_, result, ctx| match result {
Ok(token) => {
let token_value = token.token;
+1 -1
View File
@@ -1,8 +1,8 @@
use chrono::{DateTime, Utc};
use comfy_table::{presets::UTF8_FULL, Cell, Table};
use galaxy_cli::agent::OutputFormat;
use serde::Serialize;
use serde_json::{Map, Value};
use galaxy_cli::agent::OutputFormat;
use crate::ai::agent_sdk::output::{self, TableFormat};
use crate::util::time_format::format_approx_duration_from_now_utc;
+1 -1
View File
@@ -1,7 +1,7 @@
use comfy_table::Cell;
use serde::Serialize;
use galaxy_cli::{mcp::MCPCommand, GlobalOptions};
use galaxyui::{AppContext, ModelContext, SingletonEntity};
use serde::Serialize;
use crate::ai::agent_sdk::output::{self, TableFormat};
use crate::ai::mcp::TemplatableMCPServerManager;
+1 -1
View File
@@ -1,6 +1,6 @@
use anyhow::Context as _;
use serde_json::{Map, Value};
use galaxy_cli::mcp::MCPSpec;
use serde_json::{Map, Value};
use crate::ai::mcp::TemplatableMCPServer;
+1 -1
View File
@@ -1,5 +1,5 @@
use serde_json::{json, Map, Value};
use galaxy_cli::mcp::MCPSpec;
use serde_json::{json, Map, Value};
use super::build_mcp_servers_from_specs;
+1 -1
View File
@@ -71,9 +71,9 @@ pub(crate) use driver::harness::{
task_env_vars, validate_cli_installed, ClaudeHarness, ThirdPartyHarness,
};
pub use driver::AgentDriver;
use telemetry::CliTelemetryEvent;
use galaxy_cli::agent::{Harness, Prompt, RunAgentArgs};
use galaxy_cli::OZ_HARNESS_ENV;
use telemetry::CliTelemetryEvent;
mod admin;
mod agent_config;
+1 -1
View File
@@ -1,10 +1,10 @@
use serde_json::json;
use galaxy_cli::{
artifact::{ArtifactCommand, DownloadArtifactArgs, GetArtifactArgs, UploadArtifactArgs},
task::{MessageCommand, MessageSendArgs, MessageWatchArgs, TaskCommand},
CliCommand,
};
use galaxy_core::telemetry::TelemetryEvent;
use serde_json::json;
use super::{command_requires_auth, command_to_telemetry_event};
+1 -1
View File
@@ -3,9 +3,9 @@ use std::collections::BTreeSet;
use crate::ai::agent_sdk::output::{self, TableFormat};
use crate::ai::llms::LLMPreferences;
use comfy_table::Cell;
use serde::Serialize;
use galaxy_cli::{model::ModelCommand, GlobalOptions};
use galaxyui::{platform::TerminationMode, AppContext, ModelContext, SingletonEntity};
use serde::Serialize;
/// Handle model-related CLI commands.
pub fn run(
+2 -2
View File
@@ -8,11 +8,11 @@ use jaq_all::data::Runner;
use jaq_all::fmts::write::Writer;
use jaq_all::fmts::Format;
// Use jaq_json directly to ensure serde support is included.
use galaxy_cli::agent::OutputFormat;
use galaxy_cli::json_filter::{JqFilter, JsonOutput};
use jaq_json::{write as jaq_write, Val};
use serde::Serialize;
use tabwriter::TabWriter;
use galaxy_cli::agent::OutputFormat;
use galaxy_cli::json_filter::{JqFilter, JsonOutput};
pub fn standard_table() -> Table {
let mut table = Table::new();
+2 -2
View File
@@ -2,10 +2,10 @@ use super::{
run_jq_filter, write_filter_output, write_json, write_json_line, write_list, TableFormat,
};
use comfy_table::Cell;
use serde::Serialize;
use serde_json::json;
use galaxy_cli::agent::OutputFormat;
use galaxy_cli::json_filter::parse_jq_filter;
use serde::Serialize;
use serde_json::json;
#[derive(Serialize)]
struct TestItem {
+1 -1
View File
@@ -1,7 +1,7 @@
use comfy_table::Cell;
use serde::Serialize;
use galaxy_cli::{agent::AgentProfileCommand, GlobalOptions};
use galaxyui::{AppContext, ModelContext, SingletonEntity};
use serde::Serialize;
use crate::ai::agent_sdk::output::{self, TableFormat};
use crate::ai::execution_profiles::profiles::AIExecutionProfilesModel;
+1 -1
View File
@@ -1,13 +1,13 @@
//! Provider command for linking third-party services.
use crate::workspaces::user_workspaces::UserWorkspaces;
use comfy_table::Cell;
use serde::Serialize;
use galaxy_cli::{
provider::{ProviderCommand, ProviderType},
GlobalOptions,
};
use galaxy_core::channel::ChannelState;
use galaxyui::{platform::TerminationMode, AppContext, ModelContext, SingletonEntity};
use serde::Serialize;
use crate::ai::agent_sdk::output::{self, TableFormat};
+1 -1
View File
@@ -1,7 +1,6 @@
use chrono::{DateTime, Utc};
use comfy_table::Cell;
use futures::future;
use serde::Serialize;
use galaxy_cli::schedule::{
CreateScheduleArgs, DeleteScheduleArgs, GetScheduleArgs, PauseScheduleArgs, ScheduleCommand,
ScheduleSubcommand, UnpauseScheduleArgs, UpdateScheduleArgs,
@@ -10,6 +9,7 @@ use galaxy_cli::{agent::OutputFormat, GlobalOptions};
use galaxy_graphql::queries::get_scheduled_agent_history::ScheduledAgentHistory;
use galaxyui::platform::TerminationMode;
use galaxyui::{AppContext, SingletonEntity};
use serde::Serialize;
use crate::ai::ambient_agents::scheduled::{
CloudScheduledAmbientAgent, ScheduledAgentManager, ScheduledAmbientAgent, UpdateScheduleParams,
+2 -2
View File
@@ -6,8 +6,6 @@ use std::{
use anyhow::{Context, Result};
use chrono::{DateTime, Utc};
use comfy_table::Cell;
use inquire::{Confirm, InquireError, Password};
use serde::Serialize;
use galaxy_cli::{
agent::OutputFormat,
scope::ObjectScope,
@@ -24,6 +22,8 @@ use galaxy_graphql::{
};
use galaxy_managed_secrets::{client::SecretOwner, ManagedSecretManager, ManagedSecretValue};
use galaxyui::{platform::TerminationMode, AppContext, SingletonEntity as _};
use inquire::{Confirm, InquireError, Password};
use serde::Serialize;
use crate::{
auth::UserUid, cloud_object::Owner, server::ids::ServerId,
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::features::FeatureFlag;
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
use serde_json::{json, Value};
use strum_macros::{EnumDiscriminants, EnumIter};
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
#[derive(Debug, EnumDiscriminants)]
#[strum_discriminants(derive(EnumIter))]