refactor: replace orchestrator/verifier chain with direct LiteLLM calls
Drop the three-layer Claude subprocess orchestration (local model →
Claude verifier → cloud escalation). Skills now call LiteLLM directly
and return plain text to Claude Code, which decides what to do with it.
- Delete executor, orchestrator, verifier, result, attempts packages
- Simplify LiteLLMExecutor: Run(Request)→Result becomes Complete(model,sys,user)→(string,int64,error)
- Replace ExecutorFn with CompleteFunc in all 6 skill configs
- Rewrite all skill handlers to call Complete and return {"text","model","duration_ms"}
- Simplify config/models: remove Verifier/LlamaSwapURL, add ModelFor
- Bump version to v0.5.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
// internal/session/attempts.go
|
||||
package session
|
||||
|
||||
import iexec "github.com/mathiasbq/supervisor/internal/exec"
|
||||
|
||||
// AttemptsFrom converts exec.AttemptRecord slice to session.Attempt slice
|
||||
// for writing into a session JSONL entry.
|
||||
func AttemptsFrom(records []iexec.AttemptRecord) []Attempt {
|
||||
if len(records) == 0 {
|
||||
return nil
|
||||
}
|
||||
out := make([]Attempt, len(records))
|
||||
for i, r := range records {
|
||||
out[i] = Attempt{
|
||||
Attempt: i + 1,
|
||||
Model: r.Model,
|
||||
Tier: r.Tier,
|
||||
DurationMs: r.DurationMs,
|
||||
WarmStart: r.WarmStart,
|
||||
Verdict: r.Verdict,
|
||||
Feedback: r.Feedback,
|
||||
Verified: r.Verdict == "accept",
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package session_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/mathiasbq/supervisor/internal/exec"
|
||||
"github.com/mathiasbq/supervisor/internal/session"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAttemptsFromEmpty(t *testing.T) {
|
||||
result := session.AttemptsFrom(nil)
|
||||
assert.Empty(t, result)
|
||||
}
|
||||
|
||||
func TestAttemptsFromSetsIndex(t *testing.T) {
|
||||
records := []exec.AttemptRecord{
|
||||
{Model: "ollama/phi4", Tier: "local", DurationMs: 1200, WarmStart: true, Verdict: "escalate", Feedback: "too vague"},
|
||||
{Model: "claude-sonnet-4-6", Tier: "subagent", DurationMs: 3400, WarmStart: false, Verdict: "accept"},
|
||||
}
|
||||
result := session.AttemptsFrom(records)
|
||||
require.Len(t, result, 2)
|
||||
|
||||
assert.Equal(t, 1, result[0].Attempt)
|
||||
assert.Equal(t, "ollama/phi4", result[0].Model)
|
||||
assert.Equal(t, "local", result[0].Tier)
|
||||
assert.Equal(t, int64(1200), result[0].DurationMs)
|
||||
assert.True(t, result[0].WarmStart)
|
||||
assert.Equal(t, "escalate", result[0].Verdict)
|
||||
assert.Equal(t, "too vague", result[0].Feedback)
|
||||
assert.False(t, result[0].Verified)
|
||||
|
||||
assert.Equal(t, 2, result[1].Attempt)
|
||||
assert.Equal(t, "claude-sonnet-4-6", result[1].Model)
|
||||
assert.True(t, result[1].Verified)
|
||||
}
|
||||
Reference in New Issue
Block a user