Documentation
¶
Index ¶
- func AllowedTools(u kuser.Info, profiles []types.VMCPProfile, ...) []types.VMCPToolReference
- func ComponentConfig(component types.VMCPComponent) []types.MCPConfig
- func ComponentOAuthCredentialReference(component types.VMCPComponent) string
- func ComponentsForInstance(vmcp v1.VMCP, instance v1.VMCPInstance) []types.VMCPComponent
- func ConfigurationCredentialName() string
- func ConfigurationKey(componentID, key string) string
- func ExtractStaticConfiguration(manifest *types.VMCPManifest, existingConfig map[string]string) map[string]string
- func FindInstance(ctx context.Context, client kclient.Client, namespace, vmcpID, userID string) (*v1.VMCPInstance, error)
- func InitializeComponentIDs(manifest *types.VMCPManifest) error
- func InstanceConfigurationCredentialContext(instanceID string) string
- func IsMultiUser(component types.VMCPComponent) bool
- func MatchingProfiles(u kuser.Info, profiles []types.VMCPProfile) []types.VMCPProfile
- func MissingRequiredConfiguration(component types.VMCPComponent, values map[string]string, userInputs bool) []string
- func OAuthCredentialCheckHash(req router.Request, namespace, reference, sourceID string) (string, error)
- func ParseConfigurationKey(key string) (componentID, configurationKey string, ok bool)
- func PruneRemovedComponentProfiles(previous []types.VMCPComponent, manifest *types.VMCPManifest)
- func ReconcileComponentIDs(existing types.VMCPManifest, desired *types.VMCPManifest) error
- func ResolveConnectID(ctx context.Context, client kclient.Client, id, userID string) (*v1.VMCP, *v1.VMCPInstance, error)
- func ServerInstanceComponent(ctx context.Context, client kclient.Client, connection v1.MCPServerInstance, ...) (types.VMCPComponent, error)
- func ServerOAuthCredentialReference(ctx context.Context, client kclient.Reader, server v1.MCPServer) (reference, sourceID string, err error)
- func SetStaticConfigurationHashes(vmcp *v1.VMCP, configuration map[string]string)
- func StaticConfigurationCredentialContext(vmcpID string) string
- func StaticOAuthCredentialReference(manifest types.MCPServerCatalogEntryManifest, entryID string) string
- func ToolGranted(grant []types.VMCPToolReference, tool types.VMCPToolReference) bool
- func ValidateAndEncodeUserConfiguration(manifest types.VMCPManifest, configuration types.VMCPConfiguration) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedTools ¶
func AllowedTools(u kuser.Info, profiles []types.VMCPProfile, selection map[string]types.VMCPComponentSet) []types.VMCPToolReference
AllowedTools returns component-scoped original names. Nil means unrestricted, while an empty non-nil slice grants no tools. Instance selections can only narrow grants. A name of "*" grants all tools enabled on that component.
func ComponentConfig ¶
func ComponentConfig(component types.VMCPComponent) []types.MCPConfig
ComponentConfig applies vMCP policy rather than the source catalog's sharing flags.
func ComponentOAuthCredentialReference ¶
func ComponentOAuthCredentialReference(component types.VMCPComponent) string
func ComponentsForInstance ¶
func ComponentsForInstance(vmcp v1.VMCP, instance v1.VMCPInstance) []types.VMCPComponent
ComponentsForInstance retains a migrated connection's snapshots until the administrator explicitly upgrades the corresponding vMCP component.
func ConfigurationCredentialName ¶
func ConfigurationCredentialName() string
ConfigurationCredentialName is the name used for VMCP configuration credentials.
func ConfigurationKey ¶
ConfigurationKey qualifies a configuration key with its VMCP component ID. Component IDs cannot contain periods, so configuration keys may contain them without making the encoded key ambiguous.
func ExtractStaticConfiguration ¶
func ExtractStaticConfiguration(manifest *types.VMCPManifest, existingConfig map[string]string) map[string]string
ExtractStaticConfiguration removes fixed values from a manifest and returns them in the flat representation used by the credential store. Empty values are omitted because they represent missing configuration.
func FindInstance ¶
func FindInstance(ctx context.Context, client kclient.Client, namespace, vmcpID, userID string) (*v1.VMCPInstance, error)
FindInstance chooses the oldest connection for a canonical vMCP URL. Migrated users may have several connections; their legacy URLs still select each one.
func InitializeComponentIDs ¶
func InitializeComponentIDs(manifest *types.VMCPManifest) error
InitializeComponentIDs assigns new IDs to every component during VMCP creation. Clients cannot choose IDs because they form part of the credential namespace.
func InstanceConfigurationCredentialContext ¶
InstanceConfigurationCredentialContext scopes user configuration to a VMCP instance.
func IsMultiUser ¶
func IsMultiUser(component types.VMCPComponent) bool
IsMultiUser permits a shared runtime only when user inputs are headers.
func MatchingProfiles ¶
func MatchingProfiles(u kuser.Info, profiles []types.VMCPProfile) []types.VMCPProfile
MatchingProfiles uses both Obot and authentication-provider groups.
func MissingRequiredConfiguration ¶
func MissingRequiredConfiguration(component types.VMCPComponent, values map[string]string, userInputs bool) []string
MissingRequiredConfiguration checks either administrator inputs or user inputs. Catalog literals and secret bindings are already supplied by the definition. Returned keys are component-scoped, so identical keys never become ambiguous.
func OAuthCredentialCheckHash ¶
func OAuthCredentialCheckHash(req router.Request, namespace, reference, sourceID string) (string, error)
OAuthCredentialCheckHash watches the source and identifies the credential version to check. The revision survives the catalog controller clearing its sync annotation.
func ParseConfigurationKey ¶
ParseConfigurationKey parses a key produced by ConfigurationKey.
func PruneRemovedComponentProfiles ¶
func PruneRemovedComponentProfiles(previous []types.VMCPComponent, manifest *types.VMCPManifest)
PruneRemovedComponentProfiles removes grants only for components that were actually removed, leaving unrelated invalid references for validation.
func ReconcileComponentIDs ¶
func ReconcileComponentIDs(existing types.VMCPManifest, desired *types.VMCPManifest) error
ReconcileComponentIDs preserves IDs during update and assigns IDs to newly added components. A supplied ID must already belong to the VMCP.
func ResolveConnectID ¶
func ResolveConnectID(ctx context.Context, client kclient.Client, id, userID string) (*v1.VMCP, *v1.VMCPInstance, error)
ResolveConnectID resolves both current IDs and migrated composite aliases. A nil VMCP means the ID still belongs to the legacy resource model. Instance aliases always identify one connection, never another user's connection.
func ServerInstanceComponent ¶
func ServerInstanceComponent(ctx context.Context, client kclient.Client, connection v1.MCPServerInstance, server v1.MCPServer) (types.VMCPComponent, error)
ServerInstanceComponent validates the connection's ownership and current sharing mode.
func ServerOAuthCredentialReference ¶
func ServerOAuthCredentialReference(ctx context.Context, client kclient.Reader, server v1.MCPServer) (reference, sourceID string, err error)
ServerOAuthCredentialReference resolves shared and dedicated component servers without depending on the continued existence of the source catalog entry.
func SetStaticConfigurationHashes ¶
SetStaticConfigurationHashes records both the deployment-wide synchronization hash and the component hashes used to retain unrelated migrated overrides.
func StaticConfigurationCredentialContext ¶
StaticConfigurationCredentialContext scopes fixed configuration to a VMCP.
func StaticOAuthCredentialReference ¶
func StaticOAuthCredentialReference(manifest types.MCPServerCatalogEntryManifest, entryID string) string
StaticOAuthCredentialReference returns the catalog-owned credential context. The credential name within that context is always StaticOAuthCredentialName.
func ToolGranted ¶
func ToolGranted(grant []types.VMCPToolReference, tool types.VMCPToolReference) bool
ToolGranted checks an exact name or wildcard within the same component. A nil grant is unrestricted; an empty grant permits nothing.
func ValidateAndEncodeUserConfiguration ¶
func ValidateAndEncodeUserConfiguration(manifest types.VMCPManifest, configuration types.VMCPConfiguration) (map[string]string, error)
ValidateAndEncodeUserConfiguration validates that every supplied value is user-allowed by the VMCP and returns the credential-store representation.
Types ¶
This section is empty.