1pub mod args_parser;
6pub mod args_parser_queries;
7pub mod cgroup_memory;
8pub mod detached_finalize;
9pub(crate) mod docker_cleanup;
10mod docker_network_lifecycle;
11pub mod docker_post_mortem;
12pub mod docker_recovery_options;
13pub mod docker_resource_limits;
14pub mod execution_attach;
15pub mod execution_control;
16pub mod execution_recovery;
17pub mod execution_resume;
18pub mod execution_resume_all;
19pub mod execution_store;
20pub mod exit_reason;
21pub mod failure_handler;
22pub mod isolation;
23pub mod isolation_metadata;
24pub mod log_uploader;
25pub mod output_blocks;
26pub mod query_commands;
27pub mod recovery_delay;
28pub mod sequence_parser;
29pub mod session_probe;
30pub mod signal_handler;
31pub mod status_footer;
32pub mod status_formatter;
33pub mod status_probe;
34pub mod substitution;
35pub mod usage;
36pub mod user_manager;
37
38mod lino_value_json;
39mod local_hostname;
40
41pub use args_parser::{
43 generate_session_name, generate_uuid, get_effective_mode, has_isolation, is_valid_uuid,
44 parse_args, validate_options, ParsedArgs, WrapperOptions, VALID_BACKENDS, VALID_OUTPUT_FORMATS,
45 VALID_SHELLS,
46};
47pub use detached_finalize::{
48 build_detached_finalize_snippet, finalize_detached_execution, reconcile_finalized_record,
49 run_internal_finalize, DetachedFinalizeFacts, FinalizeOutcome,
50 END_TIME_SOURCE_DOCKER_FINISHED_AT, END_TIME_SOURCE_LOG_FOOTER, END_TIME_SOURCE_OBSERVED_AT,
51 INTERNAL_FINALIZE_FLAG, WATCHER_LOST_CONTAINER,
52};
53pub use docker_cleanup::{
54 build_detached_docker_completion_script, build_detached_docker_completion_script_with,
55 DockerContainerCleanupPolicy, DockerWatcherOptions,
56};
57pub use docker_post_mortem::{
58 build_docker_post_mortem_snippet, build_docker_removal_note_snippet,
59 build_docker_running_condition, build_docker_state_snippet,
60 build_docker_still_running_note_snippet, build_docker_wait_for_exit_snippet,
61 format_container_post_mortem, format_container_removal_note, format_lifetime,
62 normalize_docker_timestamp, ContainerPostMortem, DOCKER_RUNNING_INSPECT_FORMAT,
63 DOCKER_STATE_INSPECT_FORMAT, DOCKER_ZERO_TIME, LOG_CAPTURE_STOPPED_NOTE, POST_MORTEM_HEADER,
64 STILL_RUNNING_NOTE,
65};
66pub use execution_attach::{
67 attach_execution, attach_execution_with_runners, build_attach_plan,
68 format_attach_result_as_links_notation, AttachPlan, AttachResultFields, ExecutionAttachResult,
69 InteractiveRunner, SystemInteractiveRunner,
70};
71pub use execution_control::{
72 collect_descendant_pids, collect_descendant_pids_with_runner, collect_process_ids,
73 collect_process_ids_with_runner, control_execution, control_execution_with_runner,
74 format_control_result_as_links_notation, get_control_command, parse_screen_pid,
75 CommandRunOutput, CommandRunner, ControlAction, ControlCommand, ExecutionControlResult,
76 SystemCommandRunner,
77};
78pub use execution_resume::{
79 build_resume_plan, build_resumed_session_name, build_snapshot_image_name, resume_execution,
80 resume_execution_with, ExecutionResumeResult, ResumeHooks, ResumeMode, ResumePlan,
81 ResumeResultFields, SystemResumeHooks,
82};
83pub use execution_resume_all::{
84 format_resume_all, resume_all_executions, resume_all_executions_with, ExecutionResumeAllResult,
85 ResumeAllAction, ResumeAllEntry,
86};
87pub use execution_store::{
88 is_clink_installed, CleanupOptions, CleanupResult, ExecutionRecord, ExecutionRecordOptions,
89 ExecutionStats, ExecutionStatus, ExecutionStore, ExecutionStoreOptions,
90};
91pub use exit_reason::{
92 describe_exit_code, describe_exit_code_str, detect_exit_reason, resolve_exit_reason,
93 signal_name_for_exit_code, ExitCodeDescription,
94};
95pub use failure_handler::{handle_failure, Config as FailureConfig};
96pub use isolation::{
97 append_log_file, build_command_string, build_command_string_with, build_display_command,
98 build_shell_with_args_cmd_args, command_name, create_log_footer, create_log_header,
99 create_log_path, create_log_path_for_execution, docker_image_exists, docker_pull_image,
100 get_default_docker_image, get_timestamp, is_command_available, is_interactive_shell_command,
101 is_shell_invocation_with_args, quote_shell_arg, quote_shell_arg_with, run_as_isolated_user,
102 run_isolated, split_shell_words, split_shell_words_with, to_shell_words, write_log_file,
103 IsolationOptions, IsolationResult, LogHeaderParams, ShellQuotingStyle,
104};
105pub use isolation_metadata::{
106 build_isolation_options_map, docker_runtime_metadata, docker_runtime_status_lines,
107 docker_runtime_status_lines_for_options,
108};
109pub use log_uploader::upload_execution_log;
110#[allow(deprecated)]
111pub use output_blocks::{
112 create_command_line,
114 create_empty_spine_line, create_empty_timeline_line,
116 create_finish_block,
117 create_spine_line, create_start_block,
119 create_timeline_line,
120 create_timeline_separator,
121 create_virtual_command_block,
122 create_virtual_command_result,
123 escape_for_links_notation,
124 format_duration,
125 format_value_for_links_notation,
126 generate_isolation_lines,
127 get_result_marker,
128 parse_isolation_metadata,
129 FinishBlockOptions,
130 IsolationMetadata,
131 StartBlockOptions,
132 FAILURE_MARKER,
133 SPINE, SUCCESS_MARKER,
135 TIMELINE_MARKER,
136};
137pub use query_commands::{dispatch_query_command, handle_cleanup, report_result, QueryOutcome};
138pub use session_probe::{probe_session, SessionProbe, SessionState};
139pub use signal_handler::{
140 clear_current_execution, get_signal_exit_code, set_current_execution, setup_signal_handlers,
141 was_signal_received,
142};
143pub use status_footer::{
144 parse_footer_from_tail, parse_footer_timestamp, read_footer_from_log, LogFooter,
145};
146pub use status_formatter::{
147 attach_current_time, enrich_detached_status, format_record, format_record_as_links_notation,
148 format_record_as_links_notation_with_current_time, format_record_as_text,
149 format_record_as_text_with_current_time, format_record_list,
150 format_record_list_as_links_notation, format_record_list_as_text,
151 format_record_with_current_time, list_executions, list_executions_filtered, query_status,
152 read_exit_code_from_log, StatusQueryResult,
153};
154pub use status_probe::is_detached_session_alive;
155pub use substitution::{process_command, ProcessOptions, SubstitutionResult};
156pub use usage::print_usage;
157pub use user_manager::{
158 create_isolated_user, delete_user, get_current_user, get_current_user_groups, has_sudo_access,
159 CreateIsolatedUserOptions, DeleteUserOptions, UserOperationResult,
160};