claude-code: remove the guard on the agent's shell

The operator asked for the shell guard to go (2026-11-20): the plugin no
longer carries a PreToolUse hook or guard.json, the binary no longer has
a guard verb, and the claude_code_guard tool, its record and the
refusal-ranked order of the instead-of table are gone. The SessionStart
and Stop hooks of the wait list stay, run by the same binary at the same
path, which is also the home-fs helper's. The rendered rule against ssh
to a mesh machine stays as the session's own and no longer claims a
guard enforces it; claude-agent no longer passes the guard's override.
This commit is contained in:
2026-11-20 13:06:55 +01:00
parent 8b91552f59
commit f57ae96e55
18 changed files with 66 additions and 1737 deletions
@@ -192,14 +192,11 @@ func TestTheInsteadOfTableIsGeneratedFromTheRecords(t *testing.T) {
strings.Index(table, "docker.") > strings.Index(table, "`mesh-module-assigner.`") {
t.Errorf("not the machines' seats, then modules, then the mesh's:\n%s", table)
}
// What the guard here named most comes first: its row, and in its row its verb.
m.Refused = map[string]int{"node-service-manager.journal": 3, "mesh-module-assigner.assignments": 1}
ranked := InsteadOf(&m)
if !strings.Contains(ranked, "| `<node>/node-service-manager.` | `journal` — `journalctl` · `status`") ||
strings.Index(ranked, "`mesh-module-assigner.`") > strings.Index(ranked, "`<node>/docker.`") {
t.Errorf("not ranked by the guard's record:\n%s", ranked)
// No guard on the session's shell: the rule is the session's own, and the text claims no guard (the operator,
// 2026-11-20).
if strings.Contains(table, "guard") || !strings.Contains(table, "call the tool the table names instead") {
t.Errorf("the rule names a guard, or not the tool to call:\n%s", table)
}
m.Refused = nil
if InsteadOf(nil) != "" || InsteadOf(&MeshTools{}) != "" {
t.Error("a table from nothing")
}
@@ -237,10 +234,6 @@ func TestTheMeshsToolsAreKeptOnlyWhenTheyChange(t *testing.T) {
if !KeepMeshTools(p, m) || len(ReadMeshTools(p).Machines) != 1 {
t.Fatal("a changed answer was not kept")
}
d := GuardDataOf(Paths{State: p.State, Node: "laptop"}, ReadMeshTools(p))
if d.Node != "laptop" || len(d.Replacements) != 4 || !strings.HasSuffix(d.Log, "guard.log") {
t.Errorf("the guard's data: %+v", d)
}
}
// Where a module runs is read from the seat mesh-module-assigner's assignments (issue 1126 B13), never the controller's answer.