#![forbid(unsafe_code)]
#![cfg_attr(not(test), deny(clippy::print_stdout, clippy::print_stderr))]
pub mod artifact;
pub mod artifact_index;
pub mod artifact_name;
pub mod artifact_ref;
pub mod build;
pub mod build_info;
pub mod build_lints;
pub mod docs_url;
pub mod dotenv;
pub mod fit;
pub mod install_pattern;
pub mod lockfile;
pub mod manifest;
pub mod manifest_path;
pub mod payload_shape;
pub mod platform;
pub mod registry;
pub mod registry_warnings;
pub mod roster;
pub mod roster_warnings;
pub mod runtime_manifest;
pub mod runtime_warnings;
pub mod secrets;
pub mod security_warnings;
pub mod trace_capture;
pub mod unknown_manifest_keys;
pub mod wit_contract;
pub mod wit_level;
pub mod zip_guard;
pub(crate) fn warn_line(line: std::fmt::Arguments<'_>) {
use std::io::Write;
let _ = writeln!(std::io::stderr().lock(), "{line}");
}
pub use artifact::{
declared_runtime_from_artifact_bytes, load_manifest_from_artifact,
load_manifest_from_artifact_bytes, load_manifest_yaml_from_artifact,
load_manifest_yaml_from_artifact_bytes, ArtifactError, DeclaredRuntime,
};
pub use artifact_index::{
asset_file_name, compare_versions, derived_built_at_level, derived_tags, description_summary,
index_directory, index_scope_error, merge_indexes, metadata_file_name, murmur_interfaces,
release_tag_error, sha256_file_name, ArtifactIndex, ArtifactIndexError, IndexBuildError,
IndexedArtifact, IndexedAsset, IndexedVersion, MergeReport, ARTIFACT_FILE_SUFFIX,
ARTIFACT_INDEX_FILE_NAME, ARTIFACT_INDEX_SCHEMA_VERSION, MURMUR_INTERFACE_PREFIX,
};
pub use artifact_name::{
prefix_part_error, unscoped_name_hint, ArtifactName, ArtifactNameError, LOCAL_SCOPE,
MURMUR_SCOPE, RESERVED_SCOPES,
};
pub use artifact_ref::{ArtifactRef, ArtifactRefError};
pub use build::{
artifact_name_format_error, build_artifact, validate_artifact_name, BuildError, BuiltArtifact,
MAX_ARTIFACT_NAME_LEN, PACKED_MANIFEST_ENTRY,
};
pub use build_info::{build_info_from_artifact_bytes, BuildInfo, BuildInfoError, BUILD_INFO_FILE};
pub use build_lints::{
build_warning_link, lint_build_warnings, BuildWarning, RESERVED_ROOT_ENTRIES, W_BLD_001,
W_BLD_002, W_BLD_003,
};
pub use docs_url::{diagnostic_link, DOCS_REFERENCE_URL};
pub use dotenv::{dotenv_variable_names, load_dotenv_non_override, DotenvError};
pub use fit::{newest_fitting_level, version_fit, FitSubject, VersionFit};
pub use lockfile::{
read_lockfile, write_lockfile_atomic, LockOrigin, LockedArtifact, LockedSha256, LockfileError,
MurmurLock, LOCK_VERSION,
};
pub use manifest::{
describe_yaml_shape, load_manifest, parse_upstream_auth, refuse_retired_auth_block, Manifest,
ManifestError, UpstreamAuth, REGISTRY_BLOCK_HINT, REGISTRY_BLOCK_KEY, REGISTRY_BLOCK_MESSAGE,
RETIRED_AUTH_BLOCK, UPSTREAM_AUTH_KEY_PLACEHOLDER,
};
pub use manifest_path::{resolve_manifest_path, MANIFEST_FILENAME};
pub use payload_shape::{
is_root_wasm_candidate, native_binary_entry, root_wasm_candidates, select_root_wasm,
select_root_wasm_from_entries, select_root_wasm_in_archive, PayloadShapeError,
CAPSULE_WASM_ENTRY, NATIVE_BIN_DIR, SKILL_MD_ENTRY, WASM_EXTENSION,
};
pub use platform::{
binary_platform, current_platform, native_binary_verdict, split_platform_suffix,
split_platform_tag, NativeBinaryVerdict, DARWIN_ANY_ARCH, SUPPORTED_PLATFORMS,
};
pub use registry::{
is_reserved_version, sha256_hex, sha256_hex_of_reader, verify_sha256, ArtifactMeta,
LocalRegistry, Platform, PlatformMatch, PublishResult, Registry, RegistryError,
ResolvedArtifact, RuntimeType, RESERVED_VERSIONS,
};
pub use registry_warnings::{registry_warning_link, W_REG_001, W_REG_002, W_REG_003};
pub use roster::{
load_roster, member_name_format_error, resolve_roster_path, ReachabilityRule, Roster,
RosterError, RosterMember, RosterReachability, MAX_MEMBER_NAME_LEN, REACHABILITY_ALL,
ROSTER_FILENAME, ROSTER_VERSION,
};
pub use roster_warnings::{roster_warning_link, W_ROS_001};
pub use runtime_manifest::{
commit_policy_for_binding, effective_containment_floor, load_runtime_manifest, parse_byte_size,
parse_duration_secs, parse_hook_config_from_yaml, parse_tool_implementation_from_yaml,
read_hook_config, read_runtime_manifest_text, read_tool_implementation,
referenced_env_variables, tool_name_of, AfterTask, ApiKeyReference, ArtifactGateway,
ArtifactImplementation, ArtifactRuntime, AuthenticationScheme, Capabilities, CompactionConfig,
ContainmentClass, ContextConfig, ContextRetainConfig, ControlConfig, ControllableSetting,
ConversationCapabilities, ConversationMode, DeployConfig, DoorCredential, EnvCapabilities,
EvalConfig, ExportMode, Exports, FileExport, FilesystemCapabilities, HookBinding,
HookCommitPolicy, HookConfig, HookExecutionMode, HookOverflowPolicy, InferenceAlternate,
InferenceConfig, InferenceDriver, InstallCapabilities, InstallFrom, InterpreterRuntimeDir,
InterpreterRuntimeGrant, LifecycleConfig, LifecycleOverride, NetworkAuthentication,
NetworkCapabilities, NetworkConfig, ObservabilityConfig, ParseContainmentClassError,
PeerFetchCapabilities, PeerFilesExport, PeerTasksExport, PlanCapabilities,
ReferencedEnvVariable, ResourceCapabilities, ResourceLimits, RuntimeArtifact, RuntimeManifest,
RuntimeManifestError, ScorerConfig, ShellCapabilities, StagedRuntimeGrant, StateCapabilities,
TaskAcceptance, TaskIoCapabilities, ToolRefresh, TraceConfig, TraceRetainConfig,
BYTE_SIZE_ACCEPTED_FORM, DEFAULT_EXPORT_MAX_BYTES, DEFAULT_PEER_FILES_MAX_BYTES,
DEFAULT_PEER_HANDLE_TTL_SECS, DEFAULT_SEED_BUDGET, DEFAULT_SEED_OVERFLOW_MARGIN, DOOR_SCOPES,
DURATION_ACCEPTED_FORM, OPERATOR_CREDENTIAL, PEER_FETCH_ALLOW_ACCEPTED_FORM,
PERSISTENT_PEER_HANDLE_TTL_CEILING_SECS, PRIMARY_DRIVER_CHOICE, RETIRED_DOOR_SCOPES,
};
pub use runtime_warnings::{
runtime_warning_link, W_RUN_001, W_RUN_002, W_RUN_003, W_RUN_004, W_RUN_007, W_RUN_008,
};
pub use secrets::{
is_credential_shaped_env_name, is_secret_shaped_name, scan_yaml_secrets, SecretWarning,
};
pub use security_warnings::{
security_warning_link, W_SEC_001, W_SEC_002, W_SEC_003, W_SEC_004, W_SEC_005, W_SEC_006,
W_SEC_007, W_SEC_008, W_SEC_009, W_SEC_010, W_SEC_011, W_SEC_012, W_SEC_013, W_SEC_014,
W_SEC_015, W_SEC_016, W_SEC_017, W_SEC_018, W_SEC_019, W_SEC_021, W_SEC_022, W_SEC_023,
W_SEC_024, W_SEC_025, W_SEC_027, W_SEC_028, W_SEC_029, W_SEC_030, W_SEC_031, W_SEC_032,
W_SEC_033,
};
pub use trace_capture::{
resolve_trace_capture, ParseTraceCaptureError, TraceCapture, TRACE_CAPTURE_ACCEPTED_VALUES,
};
pub use unknown_manifest_keys::{
nearest_known_key, suggestion_threshold, unknown_manifest_key_warnings,
warn_on_unknown_manifest_keys, UnknownManifestKey,
};
pub use wit_contract::{
extract_wit_contracts, read_component_contracts, wit_contracts_from_artifact_bytes,
wit_contracts_from_artifact_reader, wit_package_declarations, ComponentReadError,
ContractDirection, UnservedInterface, WitContractError, WitContracts,
};
pub use wit_level::{level_has_phrase, parse_wit_levels, WitLevel, WitLevelsError};
pub use zip_guard::{
max_artifact_decompressed_bytes, read_zip_entry_capped, read_zip_entry_to_string_capped,
resolve_within, sanitize_entry_path, ZipGuardError, DEFAULT_MAX_ARTIFACT_DECOMPRESSED_BYTES,
MAX_ARTIFACT_DECOMPRESSED_BYTES_ENV,
};