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

Function workspaceObservabilityFilter

internal/memory/observability.go:78–96  ·  view source on GitHub ↗
(ctx context.Context, workspace string)

Source from the content-addressed store, hash-verified

76}
77
78func workspaceObservabilityFilter(ctx context.Context, workspace string) (catalogFilter, bool, error) {
79 workspaceRoot := canonicalWorkspaceRoot(workspace)
80 if workspaceRoot == "" {
81 return catalogFilter{}, false, nil
82 }
83 identity, err := aghworkspace.EnsureIdentity(ctx, workspaceRoot)
84 if err != nil {
85 return catalogFilter{}, false, fmt.Errorf(
86 "memory: resolve workspace identity for %q: %w",
87 workspaceRoot,
88 err,
89 )
90 }
91 return catalogFilter{
92 scope: memcontract.ScopeWorkspace,
93 workspaceRoot: workspaceRoot,
94 workspaceID: identity.WorkspaceID,
95 }, true, nil
96}
97
98func (s *Store) healthSources(ctx context.Context, workspaces []string) ([]observabilitySource, error) {
99 sources, err := s.observabilitySources(ctx, workspaces)

Callers 1

observabilitySourcesMethod · 0.85

Calls 1

canonicalWorkspaceRootFunction · 0.85

Tested by

no test coverage detected