first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -14,6 +14,18 @@ pub struct HarnessSupportArgs {
|
||||
pub command: HarnessSupportCommand,
|
||||
}
|
||||
|
||||
impl HarnessSupportCommand {
|
||||
pub(crate) fn as_str_for_tracing(&self) -> &'static str {
|
||||
match self {
|
||||
HarnessSupportCommand::Ping => "harness-support ping",
|
||||
HarnessSupportCommand::ReportArtifact(_) => "harness-support report-artifact",
|
||||
HarnessSupportCommand::NotifyUser(_) => "harness-support notify-user",
|
||||
HarnessSupportCommand::FinishTask(_) => "harness-support finish-task",
|
||||
HarnessSupportCommand::ReportShutdown(_) => "harness-support report-shutdown",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Subcommand)]
|
||||
pub enum HarnessSupportCommand {
|
||||
/// Verify connectivity by fetching and displaying the current run.
|
||||
@@ -28,6 +40,9 @@ pub enum HarnessSupportCommand {
|
||||
|
||||
/// Report task completion or failure, as well as a summary of the task.
|
||||
FinishTask(FinishTaskArgs),
|
||||
|
||||
/// Report that the agent process is shutting down.
|
||||
ReportShutdown(ReportShutdownArgs),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Args)]
|
||||
@@ -76,3 +91,16 @@ pub struct FinishTaskArgs {
|
||||
#[arg(long)]
|
||||
pub summary: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct ReportShutdownArgs {
|
||||
/// Error category for abnormal shutdown (e.g. "oom", "timeout").
|
||||
/// Omit for clean shutdown.
|
||||
#[arg(long)]
|
||||
pub error_category: Option<String>,
|
||||
|
||||
/// Human-readable error message for abnormal shutdown.
|
||||
/// Omit for clean shutdown.
|
||||
#[arg(long)]
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user