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

Function resolveMemoryWorkspace

internal/api/core/memory.go:2539–2550  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

2537}
2538
2539func resolveMemoryWorkspace(raw string) (string, error) {
2540 trimmed := strings.TrimSpace(raw)
2541 if trimmed == "" {
2542 return "", NewMemoryValidationError(errors.New("workspace is required for workspace scope"))
2543 }
2544
2545 workspace, err := filepath.Abs(filepath.Clean(trimmed))
2546 if err != nil {
2547 return "", fmt.Errorf("resolve workspace %q: %w", trimmed, err)
2548 }
2549 return workspace, nil
2550}
2551
2552func resolveMemoryScopeAndWorkspace(rawScope string, rawWorkspace string) (memcontract.Scope, string, error) {
2553 scope, err := parseOptionalMemoryScope(rawScope)

Callers 5

resolveMemoryWriteScopeFunction · 0.70
ResolveMemoryWorkspaceFunction · 0.70

Calls 1

NewMemoryValidationErrorFunction · 0.85

Tested by

no test coverage detected