MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / ValidCollectionSource

Function ValidCollectionSource

internal/models/collection.go:204–210  ·  view source on GitHub ↗

ValidCollectionSource returns source when it is one the server writes ('web' | 'cli' | 'mcp') and ” (provenance unknown, never agent) otherwise: the gate a bundle import's value passes before it is stored (BUG-3447).

(source string)

Source from the content-addressed store, hash-verified

202// ('web' | 'cli' | 'mcp') and ” (provenance unknown, never agent) otherwise:
203// the gate a bundle import's value passes before it is stored (BUG-3447).
204func ValidCollectionSource(source string) string {
205 switch source {
206 case "web", "cli", "mcp":
207 return source
208 }
209 return ""
210}
211
212// FieldMigration describes a bulk update to apply to existing items when
213// a collection schema changes (e.g. renaming select options).

Callers 1

importWorkspaceMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected