Skip to main content

pakx_core/
lib.rs

1//! Manifest, lockfile, resolver, and installer logic for `pakx`.
2//!
3//! This crate is the functional core: parsing, validation, and pure logic.
4//! Filesystem and network side effects live in `pakx-agents` and
5//! `pakx-registry-client`, respectively.
6
7pub mod atomic_write;
8pub mod credentials;
9pub mod errors;
10pub mod http_client;
11pub mod install;
12pub mod lockfile;
13pub mod manifest;
14pub mod validation;
15
16pub const VERSION: &str = env!("CARGO_PKG_VERSION");
17
18pub use atomic_write::atomic_write;
19pub use credentials::{
20    Credentials, CredentialsError, Entry as CredentialEntry, DEFAULT_REGISTRY_URL,
21};
22pub use errors::{LockfileError, ManifestError};
23pub use http_client::{
24    http_client, http_client_with_timeout, DEFAULT_CONNECT_TIMEOUT, DEFAULT_REQUEST_TIMEOUT,
25    UPLOAD_REQUEST_TIMEOUT,
26};
27pub use install::{
28    compute_integrity, Command, Hook, McpServer, McpTransport, Prompt, Skill, SkillFile, Subagent,
29};
30pub use lockfile::{
31    parse_lockfile, read_from as read_lockfile_from, write_lockfile, write_to as write_lockfile_to,
32    Integrity, LockEntry, Lockfile, RegistrySource, LOCKFILE_VERSION, REGISTRY_SOURCES,
33};
34pub use manifest::{
35    add_dep, add_shorthand, delete_value as manifest_delete_value, get_value as manifest_get_value,
36    get_value_json as manifest_get_value_json, parse_manifest, parse_path as manifest_parse_path,
37    read_from as read_manifest_from, remove_shorthand, sections_containing, sections_containing_id,
38    set_value as manifest_set_value, split_shorthand, update_shorthand, validate_sponsors,
39    write_manifest, write_to as write_manifest_to, AddOutcome, AgentId, DeleteOutcome, DepSpec,
40    Dependencies, GitSpec, Manifest, PackageType, PathError as ManifestPathError,
41    PathSeg as ManifestPathSeg, RegistrySpec, RemoveOutcome, Sponsor, SponsorError, SponsorKind,
42    StringSpec, UpdateOutcome, KNOWN_AGENT_IDS, MAX_SPONSORS, PACKAGE_TYPES,
43};
44pub use validation::{validate_package_name, validate_version, ValidationError, MAX_VERSION_LEN};