1#![deny(unsafe_code)]
5
6#[cfg(all(feature = "escape-probe", not(debug_assertions)))]
9compile_error!(
10 "the `escape-probe` feature is test-only: it lets a guest run host syscalls in its worker, \
11 and a build without debug assertions (every release profile) must not carry it"
12);
13
14pub(crate) mod a2a;
15#[cfg(test)]
16mod a2a_conformance;
17#[cfg(test)]
18mod a2a_conformance_tests;
19pub(crate) mod agent;
20#[cfg(feature = "alloc-bench")]
21pub mod alloc_bench;
22pub mod artifact;
23pub mod artifact_config;
24pub(crate) mod artifact_removal;
25pub mod artifact_supply;
26pub mod background_command;
27pub mod bindings;
28pub(crate) mod cancel;
29pub(crate) mod capsule_facts;
30pub(crate) mod cgroup;
31pub mod child_launch;
32pub(crate) mod compiled_forms;
33pub mod containment;
34pub(crate) mod control_plane;
35pub(crate) mod conversation;
36pub(crate) mod conversation_import;
37pub mod declared_needs;
38pub mod delegation;
39pub mod delegation_plane;
40pub mod detached;
41pub(crate) mod detached_reconcile;
42pub mod door_auth;
43pub(crate) mod driver_choice;
44pub(crate) mod credential_gateway;
47pub mod diagnostic;
48pub(crate) mod dns_resolver;
49pub(crate) mod done_check;
50pub(crate) mod egress_proxy;
51pub mod errors;
52pub(crate) mod fence;
53pub mod formation;
54pub mod formation_credentials;
55pub mod formation_launch;
56pub(crate) mod gateway_credential;
57pub mod guest_roots;
58pub mod guest_worker;
59pub mod harness_check;
60pub mod harness_needs;
61pub(crate) mod harness_session;
62pub(crate) mod held_ports;
63pub(crate) mod hooks;
64mod host_facts;
65pub mod host_paths;
66pub mod host_warnings;
67pub(crate) mod http_client;
68pub(crate) mod identity;
69pub(crate) mod images;
70pub(crate) mod inference_import;
71pub(crate) mod inference_retry;
72pub(crate) mod install_grant;
73pub(crate) mod instruction_files;
74pub(crate) mod interpreter_runtime;
75pub(crate) mod keep_working;
76pub mod lanes;
77pub mod lifeline;
78pub mod limits;
79pub mod mac_token;
80pub mod manifest_files;
81pub(crate) mod member_call;
82pub(crate) mod member_request;
83pub mod model_limits;
84pub mod murmur_home;
85pub(crate) mod murmur_md;
86pub mod namespace_probe;
87pub mod network_namespace;
88pub(crate) mod network_policy;
89pub mod origin;
90pub(crate) mod otel;
91pub(crate) mod outgoing;
92pub mod peer_handoff;
93pub(crate) mod peer_tasks;
94#[cfg(test)]
95mod pinned_port;
96pub mod pinned_programs;
97pub mod plan;
98pub mod precompile;
99pub mod proc_view;
100pub mod process_driver;
101pub(crate) mod protected_paths;
102pub mod provider_tool;
103pub(crate) mod reachability;
104pub(crate) mod recipes;
105pub mod record_seal;
106pub mod records_dir;
107pub mod registration;
108pub(crate) mod required_fields;
109pub mod resource_plane;
110pub mod resources;
111pub mod retention;
112pub mod roster;
113pub mod running;
114pub mod runtime;
115pub mod runtime_dir;
116pub(crate) mod sandbox;
117pub mod sealed;
118pub mod security;
119pub mod session_check;
120pub(crate) mod session_process;
121pub mod session_status;
122pub(crate) mod shell;
123#[cfg(test)]
124mod source_scan;
125pub mod spawn_credential;
126pub mod spawn_envelope;
127pub(crate) mod spend;
128pub mod staged_runtime;
129pub mod state_store;
130pub(crate) mod stream_events;
131pub(crate) mod streaming;
132pub(crate) mod task_io_import;
133pub mod temp_dir;
134pub(crate) mod tokens_import;
135pub(crate) mod tool_annotations;
136pub(crate) mod tool_call_progress;
137pub mod tool_names;
138pub(crate) mod trace;
139pub(crate) mod trace_blobs;
140pub(crate) mod trust_store;
141pub mod types;
142pub(crate) mod wit_versions;
143pub mod workdir_fs;
144pub mod workdir_snapshot;
145pub mod workdir_writes;
146
147pub use artifact_config::{
148 configured_artifact_names, lower_artifact_config, ARTIFACT_CONFIG_ENV,
149 MAX_ARTIFACT_CONFIG_BYTES,
150};
151pub use artifact_supply::{SourceSupply, SourcedArtifact};
152pub use containment::{
153 applied_mechanism, attach_extra_roots, check_containment_floor, containment_shortfall_reason,
154 detect_containment_decision, detect_sealed_shortfall, detect_userns_grant, doctor_runtime_dir,
155 explain_scope, install_from_places, read_only_advisory_for, render_install, render_read_only,
156 render_records_dir, render_routes, render_runtime_dir, render_temp_dir, route_table,
157 uncovered_route_warning, warn_on_uncovered_routes, ContainmentDecision, DoctorDirReports,
158 ExportsFilesReport, ExtraRootReport, FilesystemBoundaryReport, FilesystemRestriction,
159 ImagesReport, PreopenReport, PreopenSurface, Route, RouteInputs, RouteReport, RuntimeDirReach,
160 RuntimeDirReport, ScopeReport, ShortfallCause, StateStoreReport, TempDirReport,
161 UnconfinedReport, HOST_PROCESS_MECHANISM, UNCONFINED_APPLIES_TO,
162};
163pub use diagnostic::{diagnostic_workdir, set_diagnostic_workdir, Emitted};
164pub use manifest_files::{
165 manifest_file_reports, InstalledCapsule, ManifestFileReport, ManifestFiles,
166};
167pub use interpreter_runtime::{
171 capsule_writable_roots, derive_interpreter_runtimes, keep_host_facts,
172 DerivedInterpreterRuntime, HostFactsKept, InterpreterRuntimes,
173};
174pub use host_facts::{HostFactsCache, HostFactsReason, HostFactsSource, HostFactsUse};
176pub use murmur_home::{usable_murmur_home, HomeUnusable, HOME_UNUSABLE_HINT};
177pub use namespace_probe::{MountAttempt, MountAttemptError, MountStep, NamespaceReading};
178pub use network_namespace::{
179 check_egress_namespace, detect_egress_namespace_failure, skip_without_egress_namespace,
180 CreationStep, EgressNamespaceBlocker, EgressNamespaceFailure, NamespaceAttemptError,
181};
182pub use records_dir::{
183 records_dir_root, records_group, records_group_under, RecordsDir, HOME_SUBDIR, HOOKS_SUBDIR,
184 RECORDS_DIR_ENV, RECORDS_DIR_NAME, RESULTS_SUBDIR, RESULT_FILE,
185};
186pub use runtime_dir::{
187 runtime_dir_inside_warning, runtime_dir_placement, RuntimeDirPlacement, RUNTIME_DIR_ENV,
188 RUNTIME_DIR_GUEST_PATH,
189};
190pub use session_check::{
191 copy_tree_into, walk_tree, CheckOutcome, CheckResult, CheckRunner, SessionCheck, TreeEntry,
192};
193pub use trust_store::{derive_trust_store, TrustStorePath};
196pub use network_policy::preopen_reports;
200pub use sandbox::{detect_landlock_abi, find_on_path, landlock_doctor_lines, HostProbe};
205pub use sealed::{
206 classify_installed_profile, classify_profile_attachment, classify_profile_gap,
207 inspect_installed_profile, inspect_profile_attachment, inspect_profile_gap,
208 loaded_apparmor_profiles, profile_gap_remedy, profile_gap_remedy_parts, profiled_path_for,
209 InstalledProfileState, ProfileAttachment, ProfileFile, ProfileGap, ProfileGapReadings,
210 ProfiledPath, SealedBlocker, SealedShortfall, UsernsGrant, SEALED_APPARMOR_ATTACHMENT_PATHS,
211 SEALED_APPARMOR_PROFILE_PATH, SEALED_APPARMOR_PROFILE_SHA256,
212};
213pub use streaming::STREAM_EXTENSION_URI;
214pub use cgroup::{
220 active_swap_areas, cgroup_delegation_available, explain_scope_probe, io_max_device_available,
221 probe_scope, probe_swap_control, render_cgroup_scope, requires_process_bounding,
222 skip_without_host_support, CgroupScopeReport, CgroupScopeStatus, IoMaxReport, IoMaxStatus,
223 ScopeProbe, SwapControl, SCOPE_SWAP_MAX,
224};
225pub use a2a::{
228 murmur_state_name, A2aError, MurmurError, A2A_EXTENSIONS_HEADER, A2A_PROTOCOL_VERSION,
229 A2A_VERSION_HEADER,
230};
231pub use child_launch::{
232 child_workdir_for, format_workdir_identity, launch_child_capsule, parse_workdir_identity,
233 ChildLaunchRequest, LaunchedChild, ParentWorkdirSource, MUR_BINARY_ENV,
234 PARENT_WORKDIR_SNAPSHOT_FLAG, READINESS_TOKENS_FLAG, WORKDIR_IDENTITY_FLAG,
235};
236pub use delegation::{CompletionAddress, Spawner, SpawnerHandle};
240pub use delegation_plane::{
244 DelegationLaunch, DelegationOrigin, DelegationPlane, DelegationRequest, DelegationResult,
245 StartedDelegation, DELEGATION_RESULT_TIMEOUT, DELEGATION_TIMEOUT_ENV,
246};
247pub use door_auth::{
252 bearer_header, door_posture, is_loopback_bind, public_door_bind_warning, public_door_warning,
253 render_public_door_warning, AuthRefusal, DoorAuth, DoorExposure, DoorGrant, DoorToken,
254 PublicDoorDisclosure, DOOR_TOKEN_ENV,
255};
256pub use errors::{RuntimeError, UnreachableEntrypoint};
257pub use formation::{FormationId, FormationPeer, FormationPeers};
258pub use formation_credentials::{
259 FormationAuthority, FormationBundle, FormationMember, FormationToken, FormationVerifier,
260 FormationVerifyKey, FORMATION_CALL_SCOPES, FORMATION_CHANNEL_ENV,
261};
262pub use host_warnings::{
263 host_warnings_reported, host_warnings_reported_in, HOST_WARNINGS_REPORTED_ENV,
264};
265pub use lanes::TaskLane;
266#[cfg(unix)]
267pub use lifeline::{ChildLifeline, FormationLifeline, MemberLifeline, SpawnerLifeline};
268pub use lifeline::{FORMATION_LIFELINE_ENV, SPAWNER_LIFELINE_ENV};
269pub use limits::ExecutionLimits;
270pub use murmur_artifact::{
271 AfterTask, DoneCheck, KeepWorking, LifecycleConfig, LifecycleOverride, TaskAcceptance,
272};
273pub use origin::{TaskOrigin, TaskProvenance, TrustClass, PEER_ORIGIN_HEADER, PEER_TRUST_HEADER};
276pub use peer_handoff::{
277 audience_from_card, handle_id, handle_peer_request, is_peer_path, mint, stored_path_for,
278 verify, HandleError, HandlePayload, MintedHandle, PeerError, PeerMintKey, PeerPlane,
279 AUDIENCE_HEADER, HANDLE_ID_HEADER, PEER_INBOX_DIR, PEER_PATH_PREFIX,
280};
281pub use reachability::{
282 check_interpreted_entrypoints_reachable, warn_on_unreachable_toolchain_helpers,
283 ToolchainHelperReport, ToolchainHelperWarning, UnprobedToolchainDriver,
284};
285pub use registration::{check_roost_health, deregister_session, register_session, SessionOutcome};
286pub use resource_plane::{
287 check_export_root, check_peer_files_root, handle_resource_request, reason_phrase,
288 symlink_policy, DeclaredExport, ListEntry, ListResponse, ReadResponse, ResourceError,
289 ResourcePlane, ResourceResponse, SymlinkPolicy, RESOURCE_PATH_PREFIX,
290};
291pub use resources::HostResourceLimits;
292pub use retention::{
296 find_context_dirs, list_records, locate_message, prune_records, prune_sessions,
297 read_context_dir, remove_record, truncate_record, ContextContents, ContextDir,
298 HarnessSessionEntry, MessageLocation, MessageStatus, PrunedRecord, PrunedSession, RecordHeader,
299 RecordSummary, RemovedRecord, TruncationMarker, TruncationOutcome,
300};
301pub use roster::{
302 admit_roster, admit_roster_file, caller_overflow_fix, caller_overflow_warning, AdmittedMember,
303 AdmittedRoster, CallerOverflow, RosterEdge, RosterRefusal,
304};
305pub use running::{Liveness, ProcessState, RunningGuard, RunningRecord, SignalOutcome};
309pub use runtime::{
310 check_env_allow_reaches_guests, check_no_reserved_tool_names, has_subprocess_route_at_staging,
311 launch_session, launch_session_handling_sigterm, secret_shaped_env_grants, stage_session,
312 stripped_env_allow_entries, undeclarable_runtime_pin_role,
313 warn_on_gateway_endpoint_in_network_allow, warn_on_interpreter_runtime_grants,
314 warn_on_launch_only_gateway_credential, warn_on_secret_shaped_env_grants,
315 warn_on_unmetered_gateways, warn_on_userns_restriction_disabled_host_wide,
316 warn_on_workdir_exec, SecretShapedEnvGrant, StrippedEnvAllowEntry,
317};
318pub use shell::{
323 credential_backstop_drops, credential_backstop_match, BackstopMatch, BackstopPatternSource,
324};
325pub use spawn_credential::{
326 SpawnApproval, SpawnCredential, SPAWN_APPROVAL_HEADER, SPAWN_CREDENTIAL_HEADER,
327};
328pub use spawn_envelope::{EnvelopeAxis, EnvelopeViolation, SpawnEnvelope};
329pub use staged_runtime::check_staged_runtime_floor;
330pub use state_store::{
331 ensure_state_store, state_store_reports, validate_store_name, STATE_PREOPEN_NAME,
332};
333pub use trace::{PlanTraceAppender, ResourceTraceAppender};
334pub use types::{
335 capability_policy_from_runtime_manifest, ArtifactRequest, CapabilityPolicy,
336 InstalledArtifactSummary, LaunchEnding, LaunchResult, LockExpectation, ResolvedLockArtifact,
337 ResumeMode, ResumeRequest, StageRequest, StagedSession,
338};
339pub use workdir_fs::{
342 EntryKind, RefusalReason, WorkdirError, WorkdirOperation, WorkdirRefusal, WorkdirRoot,
343};
344pub use runtime_dir::SESSION_ID_PLACEHOLDER;
348pub use workdir_snapshot::{
352 copy_workdir, ParentWorkdirReport, SkipReason, SkippedEntry, SnapshotError, SnapshotLimits,
353 WorkdirSnapshot,
354};
355pub use workdir_writes::{
356 render_runtime_writes, RuntimeWriteCondition, RuntimeWriteKind, RuntimeWriteReport,
357};
358pub use harness_check::{
361 check_process_harness, harness_needs_report, HarnessBinary, HarnessCheck, HarnessLogin,
362 HarnessVersion,
363};
364pub use harness_needs::HarnessReport;
365pub use wit_versions::{served_wit_level, wit_levels, SERVED_WIT_PACKAGES, WIT_LEVELS_FILE};