pub(crate) mod assumptions;
pub(crate) mod document;
pub(crate) mod engine;
pub(crate) mod holders;
pub(crate) mod live;
pub(crate) mod paths;
pub(crate) mod run;
#[cfg(test)]
pub(crate) fn program_for_a_test(home: &std::path::Path) -> std::path::PathBuf {
let program = home
.join("bin")
.join(format!("agy{}", std::env::consts::EXE_SUFFIX));
crate::host::fs::create_private_dir(crate::permit::Permit::for_a_test(), &home.join("bin"))
.expect("bin");
crate::atomic::write(
crate::permit::Permit::for_a_test(),
&program,
b"#!/bin/sh\nexit 99\n",
crate::atomic::Perms::Secret,
)
.expect("a program");
crate::host::fs::testing::make_runnable(&program).expect("runnable");
program
}
#[cfg(any(test, feature = "test-support"))]
pub(crate) fn login_for_a_test(email: &str, access: &str, refresh: &str) -> serde_json::Value {
serde_json::json!({
"token": {
"access_token": access,
"token_type": "Bearer",
"refresh_token": refresh,
"expiry": "2026-11-28T12:00:00Z",
},
"auth_method": "consumer",
"id_token_email": email,
"project_id": "a-project",
"user_tier": "g1-pro-tier",
"tier_display_name": "Google AI Pro",
})
}