fix: keep the audit follow-ups inside the domain boundaries

The field-to-column map of shared place details moves to @trek/shared,
where places and place-contrib both read it without depending on each
other, and the assistant reads a recorded call's arguments with a helper
of its own instead of reaching into the AI providers. The catch-up's
country from the address is taken back out: it made place-contrib depend
on atlas, which already depends on it, and it waits for a shared country
lookup both can use.
This commit is contained in:
Maurice
2026-11-05 15:18:56 +01:00
parent 4bc764eb6a
commit d2002cc913
8 changed files with 40 additions and 46 deletions
+15
View File
@@ -19,6 +19,21 @@ export const PLACE_CONTRIB_FIELDS = ['website', 'phone', 'email', 'opening_hours
export const placeContribFieldSchema = z.enum(PLACE_CONTRIB_FIELDS);
export type PlaceContribField = z.infer<typeof placeContribFieldSchema>;
/**
* The places column each field is stored in. The origin hash, the catch-up
* and the sender all read a field through this one map: a value is shared
* only while the column's hash matches the origin, so two copies drifting
* apart would skip a field without a word.
*/
export const PLACE_CONTRIB_COLUMN = {
website: 'website',
phone: 'phone',
email: 'email',
opening_hours: 'opening_hours',
description: 'description',
image: 'image_url',
} as const satisfies Record<PlaceContribField, string>;
/**
* Where the current value of a field came from. Only `user` is ever shared, and
* only while the stored hash still matches the value. The server decides