a3s_code_core/release/
mod.rs1mod 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
23pub const AGENT_RELEASE_CONTRACT_V1: &str = "a3s.code.agent-release.v1";
25
26pub const AGENT_PROTOCOL_V1: &str = "a3s.code.agent.v1";
28
29pub const AGENT_HARNESS_CAPABILITIES_V1: [(&str, u32); 3] = [
31 ("runtime.service", 1),
32 ("secrets.external", 1),
33 ("workspace.local", 1),
34];
35
36pub const AGENT_RELEASE_ENTRYPOINT_COMMAND_V1: &str = "/usr/bin/a3s";
38
39pub const AGENT_RELEASE_ENTRYPOINT_ARGS_V1: [&str; 4] =
41 ["code", "harness", "--manifest", "/app/.a3s/asset.acl"];
42
43pub fn agent_harness_compatibility_v1() -> AgentReleaseCompatibility {
48 AgentReleaseCompatibility {
49 protocol: AGENT_PROTOCOL_V1.to_string(),
50 capabilities: AGENT_HARNESS_CAPABILITIES_V1
51 .into_iter()
52 .map(|(name, level)| AgentReleaseCapability {
53 name: name.to_string(),
54 level,
55 })
56 .collect(),
57 }
58}
59
60pub const AGENT_RELEASE_OCI_MEDIA_TYPE: &str = "application/vnd.oci.image.manifest.v1+json";
62
63pub const AGENT_RELEASE_LIMITS: ParseLimits = ParseLimits {
65 max_document_bytes: 64 * 1024,
66 max_nesting_depth: 8,
67 max_collection_items: 256,
68 max_token_bytes: 8 * 1024,
69 max_diagnostics: 20,
70};
71
72pub(crate) const MAX_CAPABILITY_LEVEL: u32 = 65_535;
73pub(crate) const MAX_ENTRYPOINT_ARGS: usize = 64;
74pub(crate) const MAX_SHUTDOWN_GRACE_SECONDS: u32 = 3_600;