Documentation
¶
Index ¶
- func NewObjectFromURI(mcpURL string) storage.Object
- func ResolveSnapshotPath(ctx context.Context, template string) string
- type Composite
- type Option
- type Service
- func (s *Service) Download(ctx context.Context, object storage.Object) ([]byte, error)
- func (s *Service) DownloadDirect(ctx context.Context, object storage.Object) ([]byte, error)
- func (s *Service) List(ctx context.Context, location string) ([]storage.Object, error)
- func (s *Service) SetSnapshotManifestResolver(resolver SnapshotManifestResolver)
- func (s *Service) SetSnapshotResolver(resolver SnapshotResolver)
- func (s *Service) SnapshotUpToDate(ctx context.Context, location string) (bool, error)
- type SnapshotManifestResolver
- type SnapshotResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewObjectFromURI ¶
NewObjectFromURI builds a minimal storage.Object for a given mcp URL. It is useful for direct downloads when a full Resource descriptor is not available.
Types ¶
type Composite ¶
type Composite struct {
// contains filtered or unexported fields
}
Composite implements embedius fs.Service delegating to MCP or AFS depending on the URI scheme.
func NewComposite ¶
NewComposite constructs a composite fs service.
type Option ¶
type Option func(*Service)
Option configures an MCP fs service.
func WithSnapshotCacheRoot ¶
WithSnapshotCacheRoot overrides the snapshot cache root template.
func WithSnapshotManifestResolver ¶
func WithSnapshotManifestResolver(resolver SnapshotManifestResolver) Option
WithSnapshotManifestResolver instructs the MCP fs to use snapshot MD5 manifests when enabled.
func WithSnapshotResolver ¶
func WithSnapshotResolver(resolver SnapshotResolver) Option
WithSnapshotResolver instructs the MCP fs to prefer snapshot reads when available.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements embedius fs.Service for MCP resources. It lists and downloads resources via a per-conversation MCP client manager.
func (*Service) DownloadDirect ¶
DownloadDirect bypasses snapshot resolution and fetches the resource directly.
func (*Service) List ¶
List returns MCP resources under the given location prefix. Accepts formats: mcp://server/path or mcp:server:/path
func (*Service) SetSnapshotManifestResolver ¶
func (s *Service) SetSnapshotManifestResolver(resolver SnapshotManifestResolver)
SetSnapshotManifestResolver updates the snapshot manifest resolver for an existing MCP fs service.
func (*Service) SetSnapshotResolver ¶
func (s *Service) SetSnapshotResolver(resolver SnapshotResolver)
SetSnapshotResolver updates the snapshot resolver for an existing MCP fs service.
type SnapshotManifestResolver ¶
SnapshotManifestResolver reports whether a location should use snapshot MD5 manifests.
type SnapshotResolver ¶
SnapshotResolver maps a location to an MCP snapshot URI and its root.