1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Bundle and Replay command arguments.
use std::path::PathBuf;
use clap::{Args, Parser, Subcommand};
#[derive(Parser, Debug)]
pub struct BundleArgs {
#[command(subcommand)]
pub cmd: BundleSub,
}
#[derive(Subcommand, Debug)]
pub enum BundleSub {
/// Create replay bundle from run artifacts
Create(BundleCreateArgs),
/// Verify replay bundle integrity and safety
Verify(BundleVerifyArgs),
}
#[derive(Args, Debug, Clone)]
pub struct BundleCreateArgs {
/// Source run path (directory or run.json)
#[arg(long)]
pub from: Option<PathBuf>,
/// Source run id (used for selection and default output naming)
#[arg(long, conflicts_with = "from")]
pub run_id: Option<String>,
/// Output replay bundle path (default: .assay/bundles/<run_id>.tar.gz)
#[arg(long)]
pub output: Option<PathBuf>,
/// Optional config file to include in bundle
#[arg(long)]
pub config: Option<PathBuf>,
/// Optional trace file to include in bundle
#[arg(long)]
pub trace_file: Option<PathBuf>,
}
#[derive(Args, Debug, Clone)]
pub struct BundleVerifyArgs {
/// Replay bundle archive (.tar.gz)
#[arg(long)]
pub bundle: PathBuf,
}
#[derive(Args, Debug, Clone)]
pub struct ReplayArgs {
/// Replay bundle archive (.tar.gz)
#[arg(long)]
pub bundle: PathBuf,
/// Allow live provider calls during replay (default: offline hermetic)
#[arg(long)]
pub live: bool,
/// Override replay seed (order seed)
#[arg(long)]
pub seed: Option<u64>,
/// Exit code compatibility mode
#[arg(long, value_enum, default_value_t, env = "ASSAY_EXIT_CODES")]
pub exit_codes: crate::exit_codes::ExitCodeVersion,
}