Documentation
¶
Index ¶
- Constants
- func AdaptImage(ctx context.Context, repository oras.Target, descriptor ocispec.Descriptor, ...) (ocispec.Descriptor, error)
- func AdaptRuntime(ctx context.Context, repository oras.Target, image *Image, ...) error
- func Copy(ctx context.Context, source oras.ReadOnlyTarget, destination oras.Target, ...) (ocispec.Descriptor, error)
- func Edit(ctx context.Context, source content.Fetcher, destination oras.Target, ...) (ocispec.Descriptor, error)
- func FetchJSON(ctx context.Context, source content.Fetcher, descriptor ocispec.Descriptor, ...) error
- func Parse(image string) (reference.Named, error)
- func Rewrite(ctx context.Context, repository oras.Target, descriptor ocispec.Descriptor, ...) (ocispec.Descriptor, error)
- func SupportedPlatform(platform ocispec.Platform) bool
- type AdaptOptions
- type Bridges
- type Image
Constants ¶
const BridgePath = "/mcp-bridge"
BridgePath is where an adapted stdio image holds the mcp-bridge binary that serves it over HTTP.
Variables ¶
This section is empty.
Functions ¶
func AdaptImage ¶
func AdaptImage(ctx context.Context, repository oras.Target, descriptor ocispec.Descriptor, options AdaptOptions) (ocispec.Descriptor, error)
func AdaptRuntime ¶
func AdaptRuntime(ctx context.Context, repository oras.Target, image *Image, options AdaptOptions) error
AdaptRuntime starts a stdio image's entrypoint and command under mcp-bridge, which serves them over HTTP on port 3000.
func FetchJSON ¶
func FetchJSON(ctx context.Context, source content.Fetcher, descriptor ocispec.Descriptor, value any) error
FetchJSON decodes registry metadata, refusing documents larger than 4 MiB.
func SupportedPlatform ¶
Types ¶
type AdaptOptions ¶
type Image ¶
type Image struct {
OS string `json:"os"`
Architecture string `json:"architecture"`
Config ocispec.ImageConfig `json:"config"`
RootFS ocispec.RootFS `json:"rootfs"`
History []ocispec.History `json:"history"`
Layers []ocispec.Descriptor `json:"-"`
Runtime map[string]json.RawMessage `json:"-"`
// contains filtered or unexported fields
}