P1 (part 1): move skilltools core -> tool/ (clean, verbatim)
executus CI / test (push) Successful in 36s

The tool registry core (registry, permission model, Invocation, gated-tool
wrapper, ssrf guard, hmac, encryption, argcoerce, helpers, rootrun,
session_tools, webhook_rate_limit) had zero mort coupling — it imports only
majordomo/llm + x/crypto/hkdf — so it moves verbatim with a package rename
(skilltools -> tool). All same-package tests came along and pass; the SSRF,
gated-wrapper, encryption and output-pattern invariants are re-anchored here.

majordomo re-enters the module graph (now pinned to the latest, incl. the
front-loaded-output fix). model/ + llmmeta + structured follow next.

Docs: CLAUDE.md now requires README/examples to stay in sync with changes in
the same commit; CI skips docs/example-only pushes via paths-ignore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-26 19:31:47 -04:00
parent d2c18ad5bb
commit dc28b63ad8
24 changed files with 3461 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
package tool
import "testing"
type fakeAccessor struct{ s RunState }
func (f fakeAccessor) RunState() RunState { return f.s }
func TestInvocationRunState_NilSafe(t *testing.T) {
var inv Invocation
if inv.RunState != nil {
t.Fatal("RunState should default nil")
}
inv.RunState = fakeAccessor{s: RunState{Iteration: 3, MaxIterations: 10}}
if got := inv.RunState.RunState(); got.Iteration != 3 || got.MaxIterations != 10 {
t.Fatalf("unexpected RunState: %+v", got)
}
}