mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-02 18:13:27 +02:00
Reuse the existing `composio_mcp_apps` feature flag instead of the separate `agent_access_picker` flag introduced in #4879. The MUL-3963 permission_mode + invocation_targets model exists to gate Composio sharing, so the create-flow access picker ships on the same switch as the rest of the Composio rollout — environments that already enable Composio (`FF_COMPOSIO_MCP_APPS=true`) now also see the aligned Private / Public-to picker in Create / Duplicate. - Drop `AGENT_ACCESS_PICKER_FLAG` (frontend keys.ts + index re-export). - Drop `AgentAccessPicker` (server featureflags list). - `CreateAgentDialog` reads `COMPOSIO_MCP_APPS_FLAG` instead. - Tests updated to set the composio flag. All 10 create-agent-dialog tests + Composio-related tabs tests pass. Co-authored-by: Eve <eve@multica-ai.local> Co-authored-by: multica-agent <github@multica.ai>
33 lines
938 B
Go
33 lines
938 B
Go
package featureflags
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/multica-ai/multica/server/pkg/featureflag"
|
|
)
|
|
|
|
const (
|
|
// ComposioMCPApps gates the Composio app management UI and — together with
|
|
// the MUL-3963 permission_mode / invocation_targets access model it depends
|
|
// on — the aligned Private / Public-to picker in the agent create flow.
|
|
// The access model exists to gate Composio sharing, so the two ship on the
|
|
// same switch.
|
|
ComposioMCPApps = "composio_mcp_apps"
|
|
)
|
|
|
|
var frontendPublicFlags = []string{
|
|
ComposioMCPApps,
|
|
}
|
|
|
|
func ComposioMCPAppsEnabled(ctx context.Context, flags *featureflag.Service) bool {
|
|
return flags.IsEnabled(ctx, ComposioMCPApps, false)
|
|
}
|
|
|
|
func EvaluateFrontendPublicFlags(ctx context.Context, flags *featureflag.Service) map[string]bool {
|
|
out := make(map[string]bool, len(frontendPublicFlags))
|
|
for _, key := range frontendPublicFlags {
|
|
out[key] = flags.IsEnabled(ctx, key, false)
|
|
}
|
|
return out
|
|
}
|