Skip to main content

a3s_code_core/release/
mod.rs

1//! Immutable, bounded Agent release manifests.
2//!
3//! This module owns admission and identity for `.a3s/asset.acl`. It does not
4//! start an Agent daemon or claim that a Runtime Service is ready.
5
6mod error;
7mod manifest;
8mod schema;
9mod types;
10mod validation;
11
12pub use error::{AgentReleaseError, AgentReleaseField};
13pub use manifest::AgentReleaseManifest;
14pub use types::{
15    AgentReleaseArtifact, AgentReleaseCacheMode, AgentReleaseCapability, AgentReleaseCompatibility,
16    AgentReleaseEntrypoint, AgentReleaseHealth, AgentReleasePersistentDataMode,
17    AgentReleaseProvenance, AgentReleaseSecretRequirement, AgentReleaseSecretTarget,
18    AgentReleaseStorage, AgentReleaseWorkspaceMode,
19};
20
21use a3s_acl::ParseLimits;
22
23/// Versioned ACL schema identifier accepted by this release contract.
24pub const AGENT_RELEASE_CONTRACT_V1: &str = "a3s.code.agent-release.v1";
25
26/// Version-one headless Agent request protocol identifier.
27pub const AGENT_PROTOCOL_V1: &str = "a3s.code.agent.v1";
28
29/// OCI image-manifest media type accepted by the version-one artifact contract.
30pub const AGENT_RELEASE_OCI_MEDIA_TYPE: &str = "application/vnd.oci.image.manifest.v1+json";
31
32/// Limits applied before an untrusted Agent release manifest is admitted.
33pub const AGENT_RELEASE_LIMITS: ParseLimits = ParseLimits {
34    max_document_bytes: 64 * 1024,
35    max_nesting_depth: 8,
36    max_collection_items: 256,
37    max_token_bytes: 8 * 1024,
38    max_diagnostics: 20,
39};
40
41pub(crate) const MAX_CAPABILITY_LEVEL: u32 = 65_535;
42pub(crate) const MAX_ENTRYPOINT_ARGS: usize = 64;
43pub(crate) const MAX_SHUTDOWN_GRACE_SECONDS: u32 = 3_600;