gunn.cli package¶
Submodules¶
gunn.cli.config module¶
Configuration management CLI commands.
- gunn.cli.config.config_validate_command(args)[ソース]¶
Validate configuration file or environment variables.
- Args:
args: Command line arguments
- Returns:
Exit code (0 for success, 1 for error)
- gunn.cli.config.config_show_command(args)[ソース]¶
Show current configuration.
- Args:
args: Command line arguments
- Returns:
Exit code (0 for success, 1 for error)
- gunn.cli.config.config_init_command(args)[ソース]¶
Initialize configuration file with defaults.
- Args:
args: Command line arguments
- Returns:
Exit code (0 for success, 1 for error)
- gunn.cli.config.config_env_command(args)[ソース]¶
Show environment variable configuration.
- Args:
args: Command line arguments
- Returns:
Exit code (0 for success, 1 for error)
gunn.cli.replay module¶
CLI utility for replaying event logs with determinism validation.
- class gunn.cli.replay.ReplayEngine(world_seed=None, verbose=False)[ソース]¶
ベースクラス:
object
Engine for replaying event logs with deterministic behavior.
Supports replay from specified ranges with fixed random seeds for deterministic behavior and integrity validation.
- async replay_from_log(log, from_seq=0, to_seq=None, validate_integrity=True, output_file=None)[ソース]¶
Replay events from log within specified range.
- 戻り値の型:
- パラメータ:
- Args:
log: EventLog to replay from from_seq: Starting sequence number (inclusive) to_seq: Ending sequence number (inclusive), None for latest validate_integrity: Whether to validate log integrity first output_file: Optional file to write replay results
- Returns:
Dictionary with replay results and statistics
- async gunn.cli.replay.create_sample_log(num_entries=10, world_seed=None)[ソース]¶
Create a sample event log for testing replay functionality.
- Args:
num_entries: Number of entries to create world_seed: Random seed for deterministic generation
- Returns:
EventLog with sample data
- gunn.cli.replay.parse_replay_args(args)[ソース]¶
Parse replay command arguments.
- Args:
args: Command line arguments
- Returns:
Parsed arguments namespace