murmur-artifact 0.11.0

The shared artifact model for Murmur capsules: manifest schema, .mur.zip packing and unpacking, the registry trait, refs, lockfile, and inference config.
Documentation
#![forbid(unsafe_code)]
// Warnings go through `warn_line`: a bare print panics when its reader has closed the stream.
#![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 program_download;
pub mod program_needs;
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 shell_words;
pub mod skill_folder;
pub mod trace_capture;
pub mod unknown_manifest_keys;
pub mod wit_contract;
pub mod wit_level;
pub mod zip_guard;

/// Write one warning line to standard error. A refused write is dropped: a reader that closed
/// the stream does not want the warning, and must not abort the command that raised it.
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, attestation_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,
    ATTESTATION_FILE_SUFFIX, 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, refuse_skill_manifest, 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, native_tool_message, parse_model_limits,
    parse_provider_tool, parse_upstream_auth, refuse_native_payload, refuse_native_tool,
    refuse_retired_auth_block, Manifest, ManifestError, ModelLimits, ProviderTool,
    ProviderToolKind, UpstreamAuth, PROVIDER_TOOL_KEY, 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::{
    check_skill_payload_entries, is_root_wasm_candidate, root_wasm_candidates, select_root_wasm,
    select_root_wasm_from_entries, select_root_wasm_in_archive, PayloadShapeError,
    SkillPayloadError, CAPSULE_WASM_ENTRY, SKILL_MD_ENTRY, WASM_EXTENSION,
};
pub use program_download::{
    host_download_platform, is_sha256_hex, parse_program_downloads, PinnedDownload,
    ProgramDownloads, DOWNLOAD_KEY, PINNED_DOWNLOAD_PLATFORMS,
};
pub use program_needs::{
    parse_program_needs, DeclaredNeed, NeedForm, ProgramNeeds, SystemLocation,
    ETC_CREDENTIAL_LOCATIONS, PROGRAMS_KEY,
};
pub use registry::{
    is_reserved_version, sha256_hex, sha256_hex_of_reader, verify_sha256, ArtifactMeta,
    LocalRegistry, PublishResult, Registry, RegistryError, ResolvedArtifact, RuntimeType,
    RESERVED_VERSIONS,
};
pub use registry_warnings::{
    registry_warning_link, W_REG_002, W_REG_003, W_REG_004, W_REG_005, W_REG_006,
};
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, harness_path_shape_error,
    load_runtime_manifest, parse_byte_size, parse_duration_secs, parse_hook_config_from_yaml,
    read_hook_config, read_runtime_manifest_text, referenced_env_variables, tool_name_of,
    AfterTask, ApiKeyReference, ArtifactGateway, ArtifactRuntime, AuthenticationScheme,
    Capabilities, CompactionConfig, ContainmentClass, ContextConfig, ContextImagesConfig,
    ContextRetainConfig, ControlConfig, ControllableSetting, ConversationCapabilities,
    ConversationMode, DeployConfig, DoneCheck, DoorCredential, EnvCapabilities, EvalConfig,
    ExportMode, Exports, FileExport, FilesystemCapabilities, HarnessCapabilities,
    HarnessPathAccess, HarnessPathEntry, HookBinding, HookCommitPolicy, HookConfig,
    HookExecutionMode, HookOverflowPolicy, InferenceAlternate, InferenceConfig, InferenceDriver,
    InferenceRetry, InstallCapabilities, InstallFrom, InterpreterRuntimeDir,
    InterpreterRuntimeGrant, KeepWorking, 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_IMAGES_KEEP,
    DEFAULT_IMAGES_MAX_BYTES, DEFAULT_IMAGES_MAX_PER_TURN, 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,
    W_RUN_009, W_RUN_010, W_RUN_011, W_RUN_012, W_RUN_013,
};
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_016, W_SEC_017, W_SEC_018, W_SEC_019, W_SEC_021, 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, W_SEC_034,
    W_SEC_035, W_SEC_036,
};
pub use shell_words::split_shell_words;
pub use skill_folder::{
    check_skill_front_block, check_skill_md, classify_skill_folder_root_file, collect_skill_folder,
    is_skill_md_spelling, skill_folder_root_refusal, skill_folder_skips, skill_md_body,
    SkillFolder, SkillFolderError, SkillFolderRootFile, SkillFrontBlock, SkillFrontBlockError,
    SkillVersionRule, SKILL_DESCRIPTION_MAX_CHARS, SKILL_NAME_MAX_LEN,
};
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,
};