pub mod args_parser;
pub mod args_parser_queries;
mod atomic_write;
pub mod attached_diagnostics;
pub mod cgroup_memory;
pub mod cpu_penalty;
pub mod cpu_penalty_monitor;
pub mod detached_finalize;
pub mod detached_output;
pub(crate) mod docker_cleanup;
pub mod docker_command_handoff;
mod docker_network_lifecycle;
pub mod docker_post_mortem;
pub mod docker_recovery_options;
pub mod docker_resource_limits;
pub mod docker_resource_options;
pub mod docker_snapshot_safety;
pub mod execution_attach;
pub mod execution_attempt;
pub mod execution_control;
pub mod execution_recovery;
pub mod execution_resume;
pub mod execution_resume_all;
pub mod execution_store;
pub mod exit_evidence;
pub mod exit_reason;
pub mod failure_handler;
pub mod isolation;
pub mod isolation_metadata;
pub mod launch_owner;
pub mod log_sanitizer;
pub mod log_uploader;
pub mod output_blocks;
pub mod query_commands;
pub mod recovery_delay;
pub mod resume_resources;
pub mod sequence_parser;
pub mod session_probe;
pub mod signal_handler;
pub mod status_footer;
pub mod status_formatter;
pub mod status_probe;
pub mod store_lock;
pub mod substitution;
pub mod usage;
pub mod user_manager;
mod lino_value_json;
mod local_hostname;
pub use args_parser::{
generate_session_name, generate_uuid, get_effective_mode, has_isolation, is_valid_uuid,
parse_args, validate_options, ParsedArgs, WrapperOptions, VALID_BACKENDS, VALID_OUTPUT_FORMATS,
VALID_SHELLS,
};
pub use detached_finalize::{
build_detached_finalize_snippet, finalize_detached_execution, reconcile_finalized_record,
run_internal_finalize, DetachedFinalizeFacts, FinalizeOutcome,
END_TIME_SOURCE_DOCKER_FINISHED_AT, END_TIME_SOURCE_LOG_FOOTER, END_TIME_SOURCE_OBSERVED_AT,
INTERNAL_FINALIZE_FLAG, WATCHER_LOST_CONTAINER,
};
pub use docker_cleanup::{
build_detached_docker_completion_script, build_detached_docker_completion_script_with,
docker_command, DockerContainerCleanupPolicy, DockerWatcherOptions,
};
pub use docker_post_mortem::{
build_docker_post_mortem_snippet, build_docker_removal_note_snippet,
build_docker_running_condition, build_docker_state_snippet,
build_docker_still_running_note_snippet, build_docker_wait_for_exit_snippet,
format_container_post_mortem, format_container_removal_note, format_lifetime,
normalize_docker_timestamp, ContainerPostMortem, DOCKER_RUNNING_INSPECT_FORMAT,
DOCKER_STATE_INSPECT_FORMAT, DOCKER_ZERO_TIME, LOG_CAPTURE_STOPPED_NOTE, POST_MORTEM_HEADER,
STILL_RUNNING_NOTE,
};
pub use execution_attach::{
attach_execution, attach_execution_with_runners, build_attach_plan,
format_attach_result_as_links_notation, AttachPlan, AttachResultFields, ExecutionAttachResult,
InteractiveRunner, SystemInteractiveRunner,
};
pub use execution_control::{
collect_descendant_pids, collect_descendant_pids_with_runner, collect_process_ids,
collect_process_ids_with_runner, control_execution, control_execution_with_runner,
format_control_result_as_links_notation, get_control_command, parse_screen_pid,
CommandRunOutput, CommandRunner, ControlAction, ControlCommand, ExecutionControlResult,
SystemCommandRunner,
};
pub use execution_resume::{
build_resume_plan, build_resumed_session_name, build_snapshot_image_name, resume_execution,
resume_execution_with, ExecutionResumeResult, ResumeHooks, ResumeMode, ResumePlan,
ResumeResultFields, SystemResumeHooks,
};
pub use execution_resume_all::{
format_resume_all, resume_all_executions, resume_all_executions_with, ExecutionResumeAllResult,
ResumeAllAction, ResumeAllEntry,
};
pub use execution_store::{
is_clink_installed, CleanupOptions, CleanupResult, ExecutionRecord, ExecutionRecordOptions,
ExecutionStats, ExecutionStatus, ExecutionStore, ExecutionStoreOptions,
};
pub use exit_reason::{
describe_exit_code, describe_exit_code_str, detect_exit_reason, resolve_exit_reason,
signal_name_for_exit_code, ExitCodeDescription,
};
pub use failure_handler::{handle_failure, Config as FailureConfig};
pub use isolation::{
append_log_file, build_command_string, build_command_string_with, build_display_command,
build_shell_with_args_cmd_args, command_name, create_log_footer, create_log_header,
create_log_path, create_log_path_for_execution, docker_image_exists, docker_pull_image,
get_default_docker_image, get_timestamp, is_command_available, is_interactive_shell_command,
is_shell_invocation_with_args, quote_shell_arg, quote_shell_arg_with, run_as_isolated_user,
run_isolated, split_shell_words, split_shell_words_with, to_shell_words, write_log_file,
IsolationOptions, IsolationResult, LogHeaderParams, ShellQuotingStyle,
};
pub use isolation_metadata::{
build_isolation_options_map, docker_runtime_metadata, docker_runtime_status_lines,
docker_runtime_status_lines_for_options,
};
pub use log_uploader::upload_execution_log;
#[allow(deprecated)]
pub use output_blocks::{
create_command_line,
create_empty_spine_line, create_empty_timeline_line,
create_finish_block,
create_spine_line, create_start_block,
create_timeline_line,
create_timeline_separator,
create_virtual_command_block,
create_virtual_command_result,
escape_for_links_notation,
format_duration,
format_value_for_links_notation,
generate_isolation_lines,
get_result_marker,
parse_isolation_metadata,
FinishBlockOptions,
IsolationMetadata,
StartBlockOptions,
FAILURE_MARKER,
SPINE, SUCCESS_MARKER,
TIMELINE_MARKER,
};
pub use query_commands::{dispatch_query_command, handle_cleanup, report_result, QueryOutcome};
pub use session_probe::{probe_session, SessionProbe, SessionState};
pub use signal_handler::{
clear_current_execution, get_signal_exit_code, set_current_execution, setup_signal_handlers,
was_signal_received,
};
pub use status_footer::{
parse_footer_from_tail, parse_footer_timestamp, read_footer_from_log, LogFooter,
};
pub use status_formatter::{
attach_current_time, enrich_detached_status, format_record, format_record_as_links_notation,
format_record_as_links_notation_with_current_time, format_record_as_text,
format_record_as_text_with_current_time, format_record_list,
format_record_list_as_links_notation, format_record_list_as_text,
format_record_with_current_time, list_executions, list_executions_filtered, query_status,
read_exit_code_from_log, StatusQueryResult,
};
pub use status_probe::is_detached_session_alive;
pub use substitution::{process_command, ProcessOptions, SubstitutionResult};
pub use usage::print_usage;
pub use user_manager::{
create_isolated_user, delete_user, get_current_user, get_current_user_groups, has_sudo_access,
CreateIsolatedUserOptions, DeleteUserOptions, UserOperationResult,
};