Files
Sycun cfaa95d7bd refactor(runtime): remove Eino and make Pi the sole agent engine
Delete the Eino model adapters, callbacks, middleware, orchestration,
summarization and single-agent runner together with their dependencies.
Chat, batch tasks, workflow Agent nodes and sub-agents now share the Pi
runtime, and dispatch is a single code path instead of an engine switch.

Configuration migrates eino_middleware/eino_skills to runtime/skills and
drops the retired callback settings while old files still load. Settings,
i18n and docs describe Pi only. Also carry the Pi follow-up fixes: empty
required lists are omitted from tool schemas, historical tool results stay
with their call batch, model proxies work over HTTP/1.1, single-query
retrieval skips query expansion, and finalization docs match Pi lifecycle
events.
2026-11-12 17:55:36 +08:00

38 lines
972 B
Go

package config
import "gopkg.in/yaml.v3"
// Read old configuration keys as data migration only; there is no legacy runner.
// Saving this configuration emits only skills/runtime, never the retired keys.
func (m *MultiAgentConfig) UnmarshalYAML(node *yaml.Node) error {
type current MultiAgentConfig
var decoded current
if err := node.Decode(&decoded); err != nil {
return err
}
var legacy struct {
Skills *AgentSkillsConfig `yaml:"eino_skills"`
Runtime *AgentTuningConfig `yaml:"eino_middleware"`
}
if err := node.Decode(&legacy); err != nil {
return err
}
hasSkills, hasRuntime := false, false
for i := 0; i+1 < len(node.Content); i += 2 {
switch node.Content[i].Value {
case "skills":
hasSkills = true
case "runtime":
hasRuntime = true
}
}
*m = MultiAgentConfig(decoded)
if !hasSkills && legacy.Skills != nil {
m.Skills = *legacy.Skills
}
if !hasRuntime && legacy.Runtime != nil {
m.Runtime = *legacy.Runtime
}
return nil
}