MCPcopy Create free account
hub / github.com/compozy/agh / List

Method List

internal/daemon/memory_runtime.go:897–914  ·  view source on GitHub ↗
(
	ctx context.Context,
	workspaceID string,
)

Source from the content-addressed store, hash-verified

895}
896
897func (s daemonMemoryProviderService) List(
898 ctx context.Context,
899 workspaceID string,
900) ([]contract.MemoryProviderPayload, error) {
901 if s.registry == nil {
902 return nil, errors.New("daemon: memory provider registry is not configured")
903 }
904 active, activeErr := s.registry.Select(ctx, workspaceID, "")
905 if activeErr != nil && !isMemoryProviderNotFound(activeErr) {
906 return nil, activeErr
907 }
908 registrations := s.registry.List()
909 payloads := make([]contract.MemoryProviderPayload, 0, len(registrations))
910 for _, registration := range registrations {
911 payloads = append(payloads, memoryProviderPayload(registration, registration.Name == active.Name))
912 }
913 return payloads, nil
914}
915
916func (s daemonMemoryProviderService) Get(
917 ctx context.Context,

Callers

nothing calls this directly

Calls 5

isMemoryProviderNotFoundFunction · 0.85
appendFunction · 0.85
memoryProviderPayloadFunction · 0.85
SelectMethod · 0.65
ListMethod · 0.65

Tested by

no test coverage detected