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)
| 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). |
| 204 | func 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). |