Contract at server dev e0c2332; the update check asks the instance first (GET /api/v2/apps)
CI / check (push) Canceled after 0s

Re-pinned at e0c2332 (after 2a2b24f /apps, 57d06ee schedules on a computer, e0c2332
force_tool on POST /chats): apps.json, apps_stable.json, schedule_on_device.json; `runs_on`
on schedules (parsed by the rest, not drawn yet); the schedules frame's version hash.

ReleaseCheck: the instance's recommendation first (it knows which release speaks its
/api/v2); a beta only with Include betas; a null android means no offer. A server without the
route, none signed in or none reachable falls back to GitHub's list as before. The About line
says so (8 translations). UpdateCheckTest reads both fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Opus 5.5 committed 2026-11-10 14:05:38 +00:00
1 parent 9b1bf688a1
commit a5c4fdc128
26 files changed
+237 -27

No files matched your search

@@ -171,6 +171,9 @@ class ApiClient(val base: String, private val token: String, val http: OkHttpCli
/** The folder and the folders inside it; their chats fall back to no folder. */
suspend fun deleteFolder(id: String) = empty(authed("$v2/folders/${segment(id)}").delete().build())
/** The app releases this server recommends; 404 from a server older than the route. */
suspend fun apps(): AppsInfo = get("/apps")
/** The web's search in JSON: chats by their words (and meaning, where indexed), files, memories. */
suspend fun search(q: String, within: String = "all", limit: Int = 20): SearchResults = get("/search?q=${segment(q)}&in=${segment(within)}&limit=$limit")
@@ -220,6 +220,22 @@ data class SearchResults(
fun hits(kind: String): List<SearchHit> = results.firstOrNull { it.kind == kind }?.hits.orEmpty()
}
/** One app release the server recommends (`GET /api/v2/apps`), with the page its files are on. */
@Serializable
data class AppRelease(val version: String = "", val tag: String = "", val channel: String = "", val page: String = "")
@Serializable
data class ServerChannel(val version: String = "", val channel: String = "")
/**
* Which release of each app goes with this server: a stable server names only a stable app, a
* beta server the newer of the app's stable and beta. Null for an app it recommends none of.
*/
@Serializable
data class AppsInfo(val server: ServerChannel = ServerChannel(), val apps: Map<String, AppRelease?> = emptyMap()) {
val android: AppRelease? get() = apps["android"]
}
/** A data group: whose records a memory is kept among. */
@Serializable
data class DataGroup(val id: String = "", val name: String = "")