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