package persona import "gitea.stevedudenhoeffer.com/steve/executus/run" // ToRunnable lowers an Agent persona into the kernel's run.RunnableAgent DTO — // the bridge that lets run.Executor run a persona WITHOUT importing this // battery (the inversion of mort's agentexec.Run(*agents.Agent)). It maps the // static shape only; per-run personalization, palette resolution, the critic, // audit, etc. are supplied separately via run.Ports. func (a *Agent) ToRunnable() run.RunnableAgent { ra := run.RunnableAgent{ ID: a.ID, Name: a.Name, SystemPrompt: a.SystemPrompt, ModelTier: a.ModelTier, MaxIterations: a.MaxIterations, MaxRuntime: a.MaxRuntime, LowLevelTools: a.LowLevelTools, SkillPalette: a.SkillPalette, SubAgentPalette: a.SubAgentPalette, Critic: run.CriticConfig{ Enabled: a.CriticEnabled, BackstopMultiplier: a.CriticBackstopMultiplier, }, } for _, p := range a.Phases { ra.Phases = append(ra.Phases, run.Phase{ Name: p.Name, SystemPrompt: p.SystemPrompt, ModelTier: p.ModelTier, MaxIterations: p.MaxIter, Tools: p.Tools, Optional: p.Optional, }) } return ra }