package pi import ( "encoding/json" "strings" "amadan.net/oficina/equipo/internal/runner/provider" ) // Extension is Equipo's own Pi extension (provider.PiExtensionSource), whose // digest every Pi policy pins. func Extension() []byte { return provider.PiExtensionSource() } // ExtensionSHA256 is its digest. func ExtensionSHA256() string { return provider.PiExtensionSHA256() } // Models is models.json for one provider behind Pi (provider.PiModels). func Models(providerName, model string) json.RawMessage { return provider.PiModels(providerName, model) } // Settings and MCP are settings.json and mcp.json (the policy accepts // exactly these). var ( Settings = provider.PiSettings MCP = provider.PiMCP ) // Tools are the tools a role pins: Review and a question read only // (read, grep, find, ls), Engineering also writes and runs commands // inside the namespace; then the step's own Equipo tools, each by name. func Tools(action string, equipo []string) []string { tools := []string{"read", "grep", "find", "ls"} if action == "implement" { tools = []string{"read", "bash", "edit", "write", "grep", "find", "ls"} } for _, name := range equipo { tools = append(tools, "mcp__equipo__"+name) } return tools } // EquipoTool is the step tool a Pi tool name stands for ("" if none). func EquipoTool(name string) string { t, _ := strings.CutPrefix(name, "mcp__equipo__") if t == name { return "" } return t }