Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions agent-sidecar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub mod llm_http;
pub mod mcp_approvals;
pub mod mcp_probe;
pub mod metering;
pub mod projects;
pub mod resources;
pub mod retrieval_http;
pub mod search;
Expand Down Expand Up @@ -1859,6 +1860,25 @@ pub fn production_sessions_with(
let mgr = mgr.with_self_review(self_review_from_env_var(
std::env::var("CITRATE_HERMES_SELF_REVIEW").ok().as_deref(),
));
// HGW-3: project_create (off by default; every project needs the member's approval).
let mgr = match projects::ProjectsConfig::from_env_vars(
|k| std::env::var(k).ok(),
projects::production_render_sandbox(),
) {
Ok(Some(cfg)) => {
eprintln!(
"citrate-agent-sidecar: project_create on for sessions with folder grants; projects go in {}{}",
cfg.root.display(),
if cfg.renderer.is_some() { ", with templates" } else { "" }
);
mgr.with_projects(Arc::new(cfg))
}
Ok(None) => mgr,
Err(e) => {
eprintln!("citrate-agent-sidecar: project_create stays off: {e}");
mgr
}
};
// US-2.2 AC2: shell_run (off by default; always inside the OS sandbox).
let mgr = match shell_run::ShellRunConfig::from_env() {
Some(cfg) => {
Expand Down Expand Up @@ -2364,6 +2384,8 @@ mod deploy_guard_session_tests;
mod hgw_support;
#[cfg(all(test, unix))]
mod project_policy_tests;
#[cfg(all(test, unix))]
mod projects_tests;
#[cfg(test)]
mod search_session_tests;
#[cfg(test)]
Expand Down
7 changes: 7 additions & 0 deletions agent-sidecar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
//! approves, run in the OS sandbox, never without it) in every
//! session opened with folder grants; anything else = off (optional)
//! CITRATE_HERMES_SHELL_PATH shell_run search path override, a path list (optional)
//! CITRATE_HERMES_PROJECTS HGW-3: `1` offers project_create (a new project folder, after the
//! member approves it) in sessions opened with folder grants (optional)
//! CITRATE_HERMES_PROJECTS_ROOT absolute folder new projects go in; default ~/Citrate/Projects
//! CITRATE_HERMES_TEMPLATE_RENDERER / CITRATE_HERMES_TEMPLATES_ROOT absolute paths of core's
//! citrate-templates program and the bundled templates folder; both
//! set = project_create can start from a template (optional)
//! CITRATE_HERMES_TEMPLATE_TIER T0 (default), T1 or T2: the tier passed to the renderer
//! CITRATE_HERMES_MCP HUP-S4.1: path to the MCP server allowlist (TOML, or JSON by
//! `.json` extension); unset = no MCP (optional)
//! CITRATE_HERMES_MCP_REGISTRY HUP-S4.4: core's owner-only saved MCP server list
Expand Down
Loading
Loading