Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
use clap::{Args, Subcommand, ValueEnum};
|
||||
|
||||
/// Commands to support third-party agent harnesses running within Oz.
|
||||
///
|
||||
/// These commands are invoked by external agent harnesses (e.g. Claude Code)
|
||||
/// during a cloud agent run to interact with Oz platform APIs.
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct HarnessSupportArgs {
|
||||
/// The run ID to associate with harness-support API calls.
|
||||
#[arg(long = "run-id", env = "OZ_RUN_ID")]
|
||||
pub run_id: String,
|
||||
|
||||
#[command(subcommand)]
|
||||
pub command: HarnessSupportCommand,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Subcommand)]
|
||||
pub enum HarnessSupportCommand {
|
||||
/// Verify connectivity by fetching and displaying the current run.
|
||||
#[command(hide = true)]
|
||||
Ping,
|
||||
|
||||
/// Report an artifact back to the Oz platform.
|
||||
ReportArtifact(ReportArtifactArgs),
|
||||
|
||||
/// Send a progress notification to the task's originating platform (Slack, Linear, etc.).
|
||||
NotifyUser(NotifyUserArgs),
|
||||
|
||||
/// Report task completion or failure, as well as a summary of the task.
|
||||
FinishTask(FinishTaskArgs),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct ReportArtifactArgs {
|
||||
#[command(subcommand)]
|
||||
pub command: ReportArtifactCommand,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Subcommand)]
|
||||
pub enum ReportArtifactCommand {
|
||||
/// Report a pull request artifact.
|
||||
PullRequest(PullRequestArtifactArgs),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct PullRequestArtifactArgs {
|
||||
/// URL of the pull request.
|
||||
#[arg(long)]
|
||||
pub url: String,
|
||||
|
||||
/// Branch name associated with the pull request.
|
||||
#[arg(long)]
|
||||
pub branch: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct NotifyUserArgs {
|
||||
/// The message to send as a progress update.
|
||||
#[arg(long)]
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
|
||||
pub enum TaskStatus {
|
||||
Success,
|
||||
Failure,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct FinishTaskArgs {
|
||||
/// Whether the task succeeded or failed.
|
||||
#[arg(long)]
|
||||
pub status: TaskStatus,
|
||||
|
||||
/// A summary of the task outcome.
|
||||
#[arg(long)]
|
||||
pub summary: String,
|
||||
}
|
||||
Reference in New Issue
Block a user