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

Function parseOptionalCLIAgentTier

internal/cli/memory.go:1312–1322  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

1310}
1311
1312func parseOptionalCLIAgentTier(raw string) (memcontract.AgentTier, error) {
1313 tier := memcontract.AgentTier(strings.TrimSpace(raw)).Normalize()
1314 switch tier {
1315 case "":
1316 return "", nil
1317 case memcontract.AgentTierWorkspace, memcontract.AgentTierGlobal:
1318 return tier, nil
1319 default:
1320 return "", errors.New("memory.scope.agent_tier_invalid: agent-tier must be one of workspace or global")
1321 }
1322}
1323
1324func parseRequiredMemoryType(raw string) (memcontract.Type, error) {
1325 typ, err := parseOptionalMemoryType(raw)

Callers 2

TestMemoryBundleHelpersFunction · 0.85

Calls 1

NormalizeMethod · 0.45

Tested by 1

TestMemoryBundleHelpersFunction · 0.68