GetSpec 获取子 Agent 规格
(name string)
| 175 | |
| 176 | // GetSpec 获取子 Agent 规格 |
| 177 | func (m *SubAgentManager) GetSpec(name string) (*types.SubAgentSpec, error) { |
| 178 | m.mu.RLock() |
| 179 | defer m.mu.RUnlock() |
| 180 | |
| 181 | spec, ok := m.specs[name] |
| 182 | if !ok { |
| 183 | return nil, fmt.Errorf("subagent spec not found: %s", name) |
| 184 | } |
| 185 | return spec, nil |
| 186 | } |
| 187 | |
| 188 | // ListSpecs 列出所有子 Agent 规格 |
| 189 | func (m *SubAgentManager) ListSpecs() []*types.SubAgentSpec { |
no outgoing calls