feat(orchestrator): modèle de désignation d'orchestrateur + sink de diagnostic
Introduit le modèle AgentManifest { version, entries, orchestrator } et la
garde d'écriture directe may_write_directly(..., &OrchestratorDesignation) :
seul l'orchestrateur désigné peut écrire directement, les autres passent par
le rendez-vous médié. Câble la désignation à travers domain → application →
infrastructure → app-tauri (context_guard, service, lifecycle, ports).
Ajoute crates/application/src/diag.rs : sink de diagnostic best-effort, sans
dépendance, qui miroite les traces du rendez-vous inter-agents de
l'orchestrateur vers un fichier de log persistant (utile au lancement via
AppImage où stderr est jeté), avec la même discipline « zéro dépendance,
ne casse jamais le rendez-vous ».
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -894,8 +894,11 @@ pub trait PermissionProjector: Send + Sync {
|
||||
///
|
||||
/// `eff == None` ⇒ the **empty** projection ([`PermissionProjection::empty`]):
|
||||
/// we keep the CLI's native prompting (the product invariant of [`resolve`]).
|
||||
fn project(&self, eff: Option<&EffectivePermissions>, ctx: &ProjectionContext)
|
||||
-> PermissionProjection;
|
||||
fn project(
|
||||
&self,
|
||||
eff: Option<&EffectivePermissions>,
|
||||
ctx: &ProjectionContext,
|
||||
) -> PermissionProjection;
|
||||
|
||||
/// Run-dir-relative paths of the [`ProjectedFile::Replace`] files this
|
||||
/// projector owns, so the swap path can clean them up when an agent moves
|
||||
@ -1448,7 +1451,10 @@ mod tests {
|
||||
let md = render_permission_summary(Some(&eff)).expect("a posed policy renders a summary");
|
||||
|
||||
// Files: OS-enforced / Landlock when supported.
|
||||
assert!(md.contains("OS-enforced"), "files block must say OS-enforced");
|
||||
assert!(
|
||||
md.contains("OS-enforced"),
|
||||
"files block must say OS-enforced"
|
||||
);
|
||||
assert!(md.contains("Landlock"), "files block must name Landlock");
|
||||
// Commands: advisory, NOT OS-locked, and the why (ExecuteBash).
|
||||
assert!(md.contains("advisory"), "commands must be called advisory");
|
||||
@ -1462,7 +1468,10 @@ mod tests {
|
||||
);
|
||||
// The actual rules surface in their respective sections.
|
||||
assert!(md.contains("`src/**`"), "the file scope is shown");
|
||||
assert!(md.contains("`rm *` (prefix)"), "the command matcher is shown");
|
||||
assert!(
|
||||
md.contains("`rm *` (prefix)"),
|
||||
"the command matcher is shown"
|
||||
);
|
||||
// Resolved posture is surfaced.
|
||||
assert!(md.contains("**Default posture:** Ask"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user