This repository has been archived on 2026-09-17. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nixos-config/hosts/globalServices/herdr-self-close.nix
pijukka 5407a1d235 Atomare Self-Close-Sessions, Eskalationskette und Reviewer-Schwelle für Herdr-Rollen
Self-Close: Pane-Wrapper (herdr-self-close.nix), Rollenverträge und
Claude-Settings für graphics/administrator/agent-manager/orga, mit
Regressionstests in agents/tests/roles.sh. Reviewer bleibt bewusst
ausgeschlossen (read-only, keine Aktivierungsfreigabe).

Eskalationsentwurf (docs/herdr-eskalation-review-entwurf.md) freigegeben:
Reviewer-Pflicht ab Risikoschwelle statt bei jedem Diff, Agent-Manager
zusätzlich zum Administrator als Fixer für Rollenvertrags-Blocker
(agent-manager.md 2.0.0 -> 2.1.0), Rückfrage-Kanal zunächst nur als
Pilot bei Orga (orga.md 2.0.0 -> 2.1.0). Details in
docs/herdr-orchestration.md.

Begleitende Infrastruktur: agent-codex/orga-agent/finance-agent-Worker,
orga-agent-Client und hdm.0ff.space-Klon-Doku. graphify-out/, .agents/
und nvim.log neu gitignored (lokale Tool-Ausgabe/Debris, kein Repo-Inhalt).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011uSxdbo8zykSeH5WCMmbvp
2026-09-01 19:33:39 +02:00

28 lines
801 B
Nix

{ config, lib, ... }:
{
config = lib.mkIf (config.networking.hostName == "blunix") {
environment.etc."codex/rules/herdr-self-close.rules".text = ''
prefix_rule(
pattern = ["/etc/scripts/close-my-pane.sh"],
decision = "allow",
justification = "Allow a completed Herdr specialist to close only its own pane via HERDR_PANE_ID",
match = [
"/etc/scripts/close-my-pane.sh",
"/etc/scripts/close-my-pane.sh ignored-argument",
],
)
'';
environment.etc."scripts/close-my-pane.sh" = {
mode = "0755";
text = ''
#!/usr/bin/env bash
set -euo pipefail
: "''${HERDR_PANE_ID:?HERDR_PANE_ID must be set}"
exec herdr pane close "$HERDR_PANE_ID"
'';
};
};
}