Documentation
¶
Index ¶
- func DocumentLocatorForPackage(address source.ManagedPackageAddress) (basespec.Locator, error)
- func EncodeAttachmentData(value AttachmentData) (json.RawMessage, error)
- func EncodeCollectionData(value CollectionData) (json.RawMessage, error)
- func IsBundleDocumentLocator(value basespec.Locator) bool
- func NewBundleCodec() providerapi.SchemaCodec
- func NewCollectionBehavior() providerapi.CollectionBehavior
- func PackageAddressForBundle(logicalName basespec.LogicalName, logicalVersion basespec.LogicalVersion) (source.ManagedPackageAddress, error)
- func ServerFromCanonicalBundle(bundle BundleDocument, name string) (mcpStoreServer.ServerDocument, error)
- func ValidateBundle(value BundleDocument) error
- func ValidateDocumentLocator(value basespec.Locator) error
- type API
- func (a *API) Create(ctx context.Context, request CreateRequest) (Bundle, error)
- func (a *API) EnsureBuiltIn(ctx context.Context, request EnsureBuiltInRequest) (Bundle, error)
- func (a *API) EnsureBuiltInCurrent(ctx context.Context, ref collection.CollectionRef) error
- func (a *API) Get(ctx context.Context, ref collection.CollectionRef) (Bundle, error)
- func (a *API) GetBundleInstallation(ctx context.Context, ref collection.CollectionRef) (BundleInstallationView, error)
- func (a *API) GetDocument(ctx context.Context, ref collection.CollectionRef) (BundleDocument, error)
- func (a *API) GetServerInstallation(ctx context.Context, ref artifact.ArtifactRef) (ServerInstallationView, error)
- func (a *API) InspectMCPPolicy(ctx context.Context, ref artifact.ArtifactRef) (PolicyView, error)
- func (a *API) InspectMCPServer(ctx context.Context, ref artifact.ArtifactRef) (mcpStoreServer.Resolved, error)
- func (a *API) List(ctx context.Context, rootID basespec.RootID) ([]Bundle, error)
- func (a *API) ListPolicies(ctx context.Context, ref collection.CollectionRef) ([]artifact.Artifact, error)
- func (a *API) ListServers(ctx context.Context, ref collection.CollectionRef) ([]artifact.Artifact, error)
- func (a *API) Purge(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64) error
- func (a *API) Refresh(ctx context.Context, ref collection.CollectionRef, allowProtected bool) (Bundle, error)
- func (a *API) ReplaceDocument(ctx context.Context, request ReplaceDocumentRequest) (Bundle, error)
- func (a *API) ResolveMCPServer(ctx context.Context, ref artifact.ArtifactRef) (mcpStoreServer.Resolved, error)
- func (a *API) Retire(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64) (collection.Collection, error)
- func (a *API) UpdateBundleEnabled(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ...) (Bundle, error)
- func (a *API) UpdateProtectedBundleInstallation(ctx context.Context, ref collection.CollectionRef, ...) error
- func (a *API) UpdateProtectedServerInstallation(ctx context.Context, ref artifact.ArtifactRef, expectedOverlayRevision uint64, ...) error
- func (a *API) UpdateServerInstallation(ctx context.Context, ref artifact.ArtifactRef, expectedArtifactRevision uint64, ...) (artifact.Artifact, error)
- type AttachmentData
- type Bundle
- type BundleCodec
- type BundleDocument
- type BundleExtension
- type BundleInstallationView
- type CollectionData
- type CreateRequest
- type Dependencies
- type EnsureBuiltInRequest
- type PolicyView
- type Registration
- type ReplaceDocumentRequest
- type ServerInstallationView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DocumentLocatorForPackage ¶ added in v0.2.20
func DocumentLocatorForPackage( address source.ManagedPackageAddress, ) (basespec.Locator, error)
func EncodeAttachmentData ¶ added in v0.2.20
func EncodeAttachmentData( value AttachmentData, ) (json.RawMessage, error)
func EncodeCollectionData ¶ added in v0.2.20
func EncodeCollectionData( value CollectionData, ) (json.RawMessage, error)
func IsBundleDocumentLocator ¶ added in v0.2.20
func NewBundleCodec ¶ added in v0.2.20
func NewBundleCodec() providerapi.SchemaCodec
func NewCollectionBehavior ¶ added in v0.2.20
func NewCollectionBehavior() providerapi.CollectionBehavior
func PackageAddressForBundle ¶ added in v0.2.20
func PackageAddressForBundle( logicalName basespec.LogicalName, logicalVersion basespec.LogicalVersion, ) (source.ManagedPackageAddress, error)
func ServerFromCanonicalBundle ¶ added in v0.2.20
func ServerFromCanonicalBundle( bundle BundleDocument, name string, ) (mcpStoreServer.ServerDocument, error)
ServerFromCanonicalBundle projects one server from a Bundle that has already been accepted and canonicalized by the Artifact Store shareable schema registry.
It deliberately does not call CanonicalizeServer. MCP lifecycle code must not create a second portable-document validation path after registry canonicalization.
func ValidateBundle ¶ added in v0.2.20
func ValidateBundle(value BundleDocument) error
func ValidateDocumentLocator ¶ added in v0.2.20
Types ¶
type API ¶ added in v0.2.20
type API struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.2.20
func New(dependencies Dependencies) (*API, error)
func (*API) EnsureBuiltIn ¶ added in v0.2.20
EnsureBuiltIn creates or verifies one protected MCP Bundle topology and installs its complete canonical document through the protected managed source path. It is only callable from trusted hydration composition.
func (*API) EnsureBuiltInCurrent ¶ added in v0.2.20
func (a *API) EnsureBuiltInCurrent( ctx context.Context, ref collection.CollectionRef, ) error
EnsureBuiltInCurrent avoids managed package republishing for a current protected Bundle, but repairs a missing or stale Catalog after startup, decoder changes, or interrupted prior work.
func (*API) Get ¶ added in v0.2.20
func (a *API) Get( ctx context.Context, ref collection.CollectionRef, ) (Bundle, error)
func (*API) GetBundleInstallation ¶ added in v0.2.20
func (a *API) GetBundleInstallation( ctx context.Context, ref collection.CollectionRef, ) (BundleInstallationView, error)
func (*API) GetDocument ¶ added in v0.2.20
func (a *API) GetDocument( ctx context.Context, ref collection.CollectionRef, ) (BundleDocument, error)
GetDocument returns the current canonical source-owned MCP Bundle document.
Source access remains inside Artifact Store. This method verifies current Catalog inputs, Source revision, Source generation, stable source bytes, canonical schema identity, Collection metadata, and all current valid subresource Definitions.
func (*API) GetServerInstallation ¶ added in v0.2.20
func (a *API) GetServerInstallation( ctx context.Context, ref artifact.ArtifactRef, ) (ServerInstallationView, error)
func (*API) InspectMCPPolicy ¶ added in v0.2.20
func (a *API) InspectMCPPolicy( ctx context.Context, ref artifact.ArtifactRef, ) (PolicyView, error)
func (*API) InspectMCPServer ¶ added in v0.2.20
func (a *API) InspectMCPServer( ctx context.Context, ref artifact.ArtifactRef, ) (mcpStoreServer.Resolved, error)
InspectMCPServer establishes Artifact, Collection, Catalog, Definition, installation, and policy validity without opening a Source snapshot or resolving a secret. It is deliberately for read-only status and setup projections. Connection and explicit runtime refresh must use ResolveMCPServer, which verifies exact current source bytes.
func (*API) ListPolicies ¶ added in v0.2.20
func (a *API) ListPolicies( ctx context.Context, ref collection.CollectionRef, ) ([]artifact.Artifact, error)
func (*API) ListServers ¶ added in v0.2.20
func (a *API) ListServers( ctx context.Context, ref collection.CollectionRef, ) ([]artifact.Artifact, error)
func (*API) Purge ¶ added in v0.2.20
func (a *API) Purge( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ) error
func (*API) Refresh ¶ added in v0.2.20
func (a *API) Refresh( ctx context.Context, ref collection.CollectionRef, allowProtected bool, ) (Bundle, error)
Refresh performs an explicit MCP configuration refresh. The runtime session is invalidated before publication so a live client cannot continue using configuration that the caller explicitly asked to re-evaluate.
func (*API) ReplaceDocument ¶ added in v0.2.20
func (a *API) ReplaceDocument( ctx context.Context, request ReplaceDocumentRequest, ) (Bundle, error)
ReplaceDocument publishes the canonical document-only package used by user-managed MCP Bundles.
func (*API) ResolveMCPServer ¶ added in v0.2.20
func (a *API) ResolveMCPServer( ctx context.Context, ref artifact.ArtifactRef, ) (mcpStoreServer.Resolved, error)
func (*API) Retire ¶ added in v0.2.20
func (a *API) Retire( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ) (collection.Collection, error)
func (*API) UpdateBundleEnabled ¶ added in v0.2.20
func (a *API) UpdateBundleEnabled( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, enabled bool, ) (Bundle, error)
func (*API) UpdateProtectedBundleInstallation ¶ added in v0.2.20
func (a *API) UpdateProtectedBundleInstallation( ctx context.Context, ref collection.CollectionRef, expectedOverlayRevision uint64, runtimeEnabled bool, ) error
func (*API) UpdateProtectedServerInstallation ¶ added in v0.2.20
func (a *API) UpdateProtectedServerInstallation( ctx context.Context, ref artifact.ArtifactRef, expectedOverlayRevision uint64, runtimeEnabled bool, data mcpStoreServer.ServerData, ) error
func (*API) UpdateServerInstallation ¶ added in v0.2.20
func (a *API) UpdateServerInstallation( ctx context.Context, ref artifact.ArtifactRef, expectedArtifactRevision uint64, data mcpStoreServer.ServerData, ) (artifact.Artifact, error)
type AttachmentData ¶ added in v0.2.20
type AttachmentData struct {
SchemaVersion string `json:"schemaVersion"`
PackageAddress source.ManagedPackageAddress `json:"packageAddress"`
}
func DecodeAttachmentData ¶ added in v0.2.20
func DecodeAttachmentData( raw json.RawMessage, ) (AttachmentData, error)
func (AttachmentData) DocumentLocator ¶ added in v0.2.20
func (d AttachmentData) DocumentLocator() (basespec.Locator, error)
type Bundle ¶ added in v0.2.20
type Bundle struct {
Collection collection.Collection `json:"collection"`
Data CollectionData `json:"data"`
Attachment collection.Attachment `json:"attachment"`
Source source.Summary `json:"source"`
PackageAddress source.ManagedPackageAddress `json:"packageAddress"`
DocumentLocator basespec.Locator `json:"documentLocator"`
}
type BundleCodec ¶ added in v0.2.20
type BundleCodec struct{}
func (BundleCodec) Canonicalize ¶ added in v0.2.20
func (BundleCodec) Canonicalize( ctx context.Context, raw []byte, ) (providerapi.ParsedDocument, error)
func (BundleCodec) JSONSchema ¶ added in v0.2.20
func (BundleCodec) JSONSchema() []byte
func (BundleCodec) Key ¶ added in v0.2.20
func (BundleCodec) Key() providerapi.SchemaKey
type BundleDocument ¶ added in v0.2.20
type BundleDocument struct {
Kind basespec.CollectionKind `json:"kind"`
SchemaID basespec.SchemaID `json:"schemaID"`
SchemaVersion string `json:"schemaVersion"`
Digest cryptoutil.Digest `json:"digest,omitempty"`
LogicalName basespec.LogicalName `json:"logicalName"`
LogicalVersion basespec.LogicalVersion `json:"logicalVersion,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
MCPServers map[string]mcpStoreServer.CoreServer `json:"mcpServers"`
BundleExtension BundleExtension `json:"bundleExtension"`
}
func BundleFromParsedDocument ¶ added in v0.2.20
func BundleFromParsedDocument( input providerapi.ParsedDocument, ) (BundleDocument, error)
BundleFromParsedDocument projects an Artifact Store-validated canonical MCP Bundle document into the MCP domain model.
It is intentionally not a second schema-validation entry point. Untrusted bytes must first pass through shareable.ExpectedCanonicalizer with BundleCodec{}.Key(). This helper verifies the registry output identity, canonical-byte invariant, and document digest before MCP lifecycle code consumes the typed projection.
func CanonicalizeBundle ¶ added in v0.2.20
func CanonicalizeBundle( input BundleDocument, ) (BundleDocument, json.RawMessage, error)
type BundleExtension ¶ added in v0.2.20
type BundleExtension struct {
Servers map[string]mcpStoreServer.ServerExtension `json:"servers,omitempty"`
Policies map[string]mcpStorePolicy.PolicyDocument `json:"policies,omitempty"`
}
type BundleInstallationView ¶ added in v0.2.20
type BundleInstallationView struct {
Bundle collection.CollectionRef `json:"bundle"`
BuiltIn bool `json:"builtIn"`
CollectionRevision uint64 `json:"collectionRevision"`
OverlayRevision uint64 `json:"overlayRevision"`
RuntimeEnabled bool `json:"runtimeEnabled"`
}
type CollectionData ¶ added in v0.2.20
type CollectionData struct {
SchemaVersion string `json:"schemaVersion"`
DiscoveryPolicyRevision string `json:"discoveryPolicyRevision"`
LogicalName basespec.LogicalName `json:"logicalName"`
LogicalVersion basespec.LogicalVersion `json:"logicalVersion,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
ManagedSourceID basespec.SourceID `json:"managedSourceID,omitempty"`
}
func DecodeCollectionData ¶ added in v0.2.20
func DecodeCollectionData( raw json.RawMessage, ) (CollectionData, error)
type CreateRequest ¶ added in v0.2.20
type CreateRequest struct {
RootID basespec.RootID
CollectionID basespec.CollectionID
SourceID basespec.SourceID
SourceStorageKey basespec.StorageKey
// Document is raw portable JSON. It remains raw until the Artifact Store
// expected-schema registry validates and canonicalizes it.
Document json.RawMessage
Registrations []Registration
}
type Dependencies ¶ added in v0.2.20
type Dependencies struct {
Store artifactAPI.ConsumerAPI
UserRootID basespec.RootID
Overlays mcpOverlay.OverlayRepository
SecretCleaner mcpStoreServer.SecretCleaner
BaselinePolicy mcpPolicy.MCPPolicy
}
type EnsureBuiltInRequest ¶ added in v0.2.20
type EnsureBuiltInRequest struct {
RootID basespec.RootID
CollectionID basespec.CollectionID
SourceID basespec.SourceID
PackageAddress source.ManagedPackageAddress
PackageFiles []source.ManagedPackageFile
Document providerapi.ParsedDocument
Registrations []Registration
}
type PolicyView ¶ added in v0.2.20
type PolicyView struct {
Artifact artifact.Artifact `json:"artifact"`
Collection collection.CollectionRef `json:"collection"`
CatalogRevision uint64 `json:"catalogRevision"`
Definition providerapi.Definition `json:"definition"`
Body mcpPolicy.MCPPolicy `json:"body"`
EffectiveEnabled bool `json:"effectiveEnabled"`
BuiltIn bool `json:"builtIn"`
}
type Registration ¶ added in v0.2.20
type Registration struct {
ArtifactID basespec.ArtifactID
Subresource basespec.SubresourceLocator
Kind basespec.ArtifactKind
Enabled bool
Data json.RawMessage
}
type ReplaceDocumentRequest ¶ added in v0.2.20
type ReplaceDocumentRequest struct {
Bundle collection.CollectionRef
ExpectedCollectionRevision uint64
Document json.RawMessage
Registrations []Registration
AllowProtected bool
}
type ServerInstallationView ¶ added in v0.2.20
type ServerInstallationView struct {
Artifact artifact.Artifact `json:"artifact"`
Collection collection.CollectionRef `json:"collection"`
CatalogRevision uint64 `json:"catalogRevision"`
Document mcpStoreServer.ServerDocument `json:"document"`
Installation mcpStoreServer.ServerData `json:"installation"`
InstallationRevision uint64 `json:"installationRevision"`
InstallationEnabled bool `json:"installationEnabled"`
RuntimeEnabled bool `json:"runtimeEnabled"`
BuiltIn bool `json:"builtIn"`
}