// `people.fillCities` — Cotton filling in a person's city from their zone.//// | method | takes | answers |// |---|---|---|// | `people.fillCities` | nothing | `{filled: [{id, city, timezone}]}` |// | `people.unfillCities` | `{at}` | `{cleared: [id]}` |//// **A method, not a tool.** Nobody asks for it: the app runs it on each// foreground, and it fills the city of every person who has a time zone and// has never had a city (Europe/London → London). Every fill inside it is the// `update_person` tool an assistant would have called, through this device's// outbox, so it syncs. It never overwrites a city, never fills a person twice,// and never asks the network — `crates/cotton-ffi/src/phone/people_city.rs`// says how each of those holds. Each pass is stamped, Home's Done for you lists// it, and `people.unfillCities` takes one pass back from there.importFoundationextensionCottonMethod {/// `people.fillCities` — fill in the city of every person owed one.publicstaticlet peopleFillCities = "people.fillCities"/// `people.unfillCities` — take one pass of the fill back.publicstaticlet peopleUnfillCities = "people.unfillCities"}/// `people.unfillCities`' request: the pass's instant, as Done for you named it.structUnfillCitiesRequest: Encodable, Sendable {let at: String}extensionCottonCalling {/// One pass of the fill. Answers what it filled — usually nothing. @discardableResultpublicfunc fillPersonCities() asyncthrows -> JSONValue {tryawait callJSON(CottonMethod.peopleFillCities) }/// Clear the cities of the pass at `at` that still stand. Answers the/// people it cleared. @discardableResultpublicfunc unfillPersonCities(at: String) asyncthrows -> JSONValue {tryawait callJSON(CottonMethod.peopleUnfillCities, UnfillCitiesRequest(at: at)) }}