From 7d49b8d94ba1e11576f7178f88cc3e10ff0e967f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Bene=C5=A1?= Date: Wed, 18 Nov 2026 21:00:24 +0000 Subject: [PATCH] The contract is pinned to the server's dev at 59bebe2 The files routes, model_ref and GET /mcp are not in a server release yet: contract/ is the server's tests/fixtures/api_v2 at its dev commit 59bebe2, fetched by scripts/fetch-contract.py as always. The release moves the pin to its tag. The schedules frame's version, a hash of the list, moved with the list's new model_ref. Co-Authored-By: Claude Fable 5.2 --- .../llembas/android/ScheduleContractTest.kt | 2 +- contract/chat.json | 1 + contract/chat_agent.json | 1 + contract/chat_report.json | 1 + contract/chats_listed.json | 1 + contract/event_done.json | 1 + contract/event_done_title_pending.json | 1 + contract/event_schedules.json | 4 +- contract/file_content.json | 5 +- contract/file_content_withheld.json | 3 + contract/file_save_conflict.json | 6 ++ contract/file_versions.json | 24 +++++++ contract/files_batch.json | 19 ++++++ contract/files_copied.json | 51 +++++++++++++++ contract/files_listing.json | 11 ++++ contract/files_restored.json | 4 ++ contract/files_trash.json | 12 ++++ contract/files_trash_emptied.json | 4 ++ contract/lock.json | 6 +- contract/mcp_servers.json | 64 +++++++++++++++++++ contract/message_assistant.json | 1 + contract/message_failed.json | 1 + contract/message_queued.json | 1 + contract/message_stopped.json | 1 + contract/message_user.json | 1 + contract/schedule.json | 2 + contract/schedule_on_device.json | 2 + contract/schedule_run.json | 1 + contract/schedule_run_agentic.json | 1 + contract/schedule_runs.json | 2 + contract/schedule_watching.json | 2 + contract/schedules.json | 2 + 32 files changed, 232 insertions(+), 6 deletions(-) create mode 100644 contract/file_save_conflict.json create mode 100644 contract/file_versions.json create mode 100644 contract/files_batch.json create mode 100644 contract/files_copied.json create mode 100644 contract/files_restored.json create mode 100644 contract/files_trash.json create mode 100644 contract/files_trash_emptied.json create mode 100644 contract/mcp_servers.json diff --git a/app/src/test/java/eu/llembas/android/ScheduleContractTest.kt b/app/src/test/java/eu/llembas/android/ScheduleContractTest.kt index e1186f2..f6896ae 100644 --- a/app/src/test/java/eu/llembas/android/ScheduleContractTest.kt +++ b/app/src/test/java/eu/llembas/android/ScheduleContractTest.kt @@ -93,7 +93,7 @@ class ScheduleContractTest { assertWaybread(read("schedules", ScheduleList.serializer()).schedules.single()) assertWaybread(read("schedule", ScheduleEnvelope.serializer()).schedule) val frame = read("event_schedules", SchedulesFrame.serializer()) - assertEquals("31f4ad7e7995d215", frame.version) + assertEquals("3968a502db186b62", frame.version) assertWaybread(frame.schedules.single()) } diff --git a/contract/chat.json b/contract/chat.json index 1895ede..dc5dce9 100644 --- a/contract/chat.json +++ b/contract/chat.json @@ -3,6 +3,7 @@ "kind": "chat", "title": "Waybread", "model": "qwen", + "model_ref": "local/qwen", "folder_id": null, "pinned": false, "archived": false, diff --git a/contract/chat_agent.json b/contract/chat_agent.json index bc8752c..5cfa615 100644 --- a/contract/chat_agent.json +++ b/contract/chat_agent.json @@ -3,6 +3,7 @@ "kind": "agent", "title": "Waybread", "model": "qwen", + "model_ref": "local/qwen", "folder_id": null, "pinned": false, "archived": false, diff --git a/contract/chat_report.json b/contract/chat_report.json index 4e5e8d1..4186352 100644 --- a/contract/chat_report.json +++ b/contract/chat_report.json @@ -3,6 +3,7 @@ "kind": "report", "title": "Two cakes are unwrapped", "model": "qwen", + "model_ref": "local/qwen", "folder_id": null, "pinned": false, "archived": false, diff --git a/contract/chats_listed.json b/contract/chats_listed.json index 7033a2f..c08dc30 100644 --- a/contract/chats_listed.json +++ b/contract/chats_listed.json @@ -5,6 +5,7 @@ "kind": "chat", "title": "Waybread", "model": "qwen", + "model_ref": "local/qwen", "folder_id": null, "pinned": false, "archived": false, diff --git a/contract/event_done.json b/contract/event_done.json index ab2f235..50dabfc 100644 --- a/contract/event_done.json +++ b/contract/event_done.json @@ -10,6 +10,7 @@ "machine": false, "origin": "", "model": "qwen", + "model_ref": "local/qwen", "attachments": [], "end": null, "steps": [ diff --git a/contract/event_done_title_pending.json b/contract/event_done_title_pending.json index 25f78f9..5f01b17 100644 --- a/contract/event_done_title_pending.json +++ b/contract/event_done_title_pending.json @@ -10,6 +10,7 @@ "machine": false, "origin": "", "model": "qwen", + "model_ref": "local/qwen", "attachments": [], "end": null, "steps": [ diff --git a/contract/event_schedules.json b/contract/event_schedules.json index a9b81d7..ec8d74c 100644 --- a/contract/event_schedules.json +++ b/contract/event_schedules.json @@ -1,5 +1,5 @@ { - "version": "31f4ad7e7995d215", + "version": "3968a502db186b62", "schedules": [ { "id": "sched1", @@ -39,6 +39,7 @@ "catch_up": "one", "grace_minutes": null, "model": "qwen", + "model_ref": "local/qwen", "effort": "high", "agents": null, "tools": [ @@ -72,6 +73,7 @@ "attempts": 1, "model": { "id": "gpt-oss", + "ref": "local/gpt-oss", "name": "GPT-OSS", "reason": "switched", "switched_from": "Qwen" diff --git a/contract/file_content.json b/contract/file_content.json index b4fa951..94c13c6 100644 --- a/contract/file_content.json +++ b/contract/file_content.json @@ -4,7 +4,10 @@ "size": 27, "mime": "text/markdown", "kind": "markdown", - "language": "markdown", + "file_kind": "markdown", + "level": "commit", + "writable": true, + "language": "", "sha": "abababababababababababababababababababababababababababababababab", "text": "# Lembas\n\nWrap it in a leaf.\n" } diff --git a/contract/file_content_withheld.json b/contract/file_content_withheld.json index 698abd1..ebefcfb 100644 --- a/contract/file_content_withheld.json +++ b/contract/file_content_withheld.json @@ -4,6 +4,9 @@ "size": 2048, "mime": "image/png", "kind": "image", + "file_kind": "image", + "level": "ro", + "writable": false, "language": "", "sha": "abababababababababababababababababababababababababababababababab", "text": "", diff --git a/contract/file_save_conflict.json b/contract/file_save_conflict.json new file mode 100644 index 0000000..c7b8322 --- /dev/null +++ b/contract/file_save_conflict.json @@ -0,0 +1,6 @@ +{ + "detail": "This file changed since you opened it. Reload it, or save anyway.", + "conflict": true, + "sha": "abababababababababababababababababababababababababababababababab", + "version": "ver2" +} diff --git a/contract/file_versions.json b/contract/file_versions.json new file mode 100644 index 0000000..35b9d41 --- /dev/null +++ b/contract/file_versions.json @@ -0,0 +1,24 @@ +{ + "path": "/home/frodo/lembas.md", + "sha": "abababababababababababababababababababababababababababababababab", + "versions": [ + { + "id": "ver2", + "sha": "abababababababababababababababababababababababababababababababab", + "size": 27, + "at": "2026-01-02T03:04:05+00:00", + "by": "Frodo", + "chat_id": "chat1", + "current": true + }, + { + "id": "ver1", + "sha": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd", + "size": 20, + "at": "2026-01-02T03:04:05+00:00", + "by": "Frodo", + "chat_id": null, + "current": false + } + ] +} diff --git a/contract/files_batch.json b/contract/files_batch.json new file mode 100644 index 0000000..c036b62 --- /dev/null +++ b/contract/files_batch.json @@ -0,0 +1,19 @@ +{ + "op": "move", + "to": "/home/frodo/recipes", + "atomic": false, + "results": [ + { + "path": "/home/frodo/lembas.md", + "ok": true, + "to": "/home/frodo/recipes/lembas.md" + }, + { + "path": "/home/frodo/map.png", + "ok": false, + "error": "Read-only: /home/frodo/map.png can be read in this session but not changed." + } + ], + "done": 1, + "failed": 1 +} diff --git a/contract/files_copied.json b/contract/files_copied.json new file mode 100644 index 0000000..90c3891 --- /dev/null +++ b/contract/files_copied.json @@ -0,0 +1,51 @@ +{ + "path": "/home/frodo", + "parent": "/home", + "entries": [ + { + "name": "recipes", + "path": "/home/frodo/recipes", + "kind": "dir", + "file_kind": null, + "size": 0, + "mime": "", + "updated_at": "2026-01-02T03:04:05+00:00" + }, + { + "name": "lembas.md", + "path": "/home/frodo/lembas.md", + "kind": "file", + "file_kind": "markdown", + "size": 27, + "mime": "text/markdown", + "updated_at": "2026-01-02T03:04:05+00:00" + }, + { + "name": "map.png", + "path": "/home/frodo/map.png", + "kind": "file", + "file_kind": "image", + "size": 2048, + "mime": "image/png", + "updated_at": "2026-01-02T03:04:05+00:00" + }, + { + "name": "lembas (2).md", + "path": "/home/frodo/lembas (2).md", + "kind": "file", + "file_kind": "markdown", + "size": 27, + "mime": "text/markdown", + "updated_at": "2026-01-02T03:04:05+00:00" + } + ], + "copied": { + "name": "lembas (2).md", + "path": "/home/frodo/lembas (2).md", + "kind": "file", + "file_kind": "markdown", + "size": 27, + "mime": "text/markdown", + "updated_at": "2026-01-02T03:04:05+00:00" + } +} diff --git a/contract/files_listing.json b/contract/files_listing.json index c9f0f7d..264c098 100644 --- a/contract/files_listing.json +++ b/contract/files_listing.json @@ -6,6 +6,7 @@ "name": "recipes", "path": "/home/frodo/recipes", "kind": "dir", + "file_kind": null, "size": 0, "mime": "", "updated_at": "2026-01-02T03:04:05+00:00" @@ -14,9 +15,19 @@ "name": "lembas.md", "path": "/home/frodo/lembas.md", "kind": "file", + "file_kind": "markdown", "size": 27, "mime": "text/markdown", "updated_at": "2026-01-02T03:04:05+00:00" + }, + { + "name": "map.png", + "path": "/home/frodo/map.png", + "kind": "file", + "file_kind": "image", + "size": 2048, + "mime": "image/png", + "updated_at": "2026-01-02T03:04:05+00:00" } ] } diff --git a/contract/files_restored.json b/contract/files_restored.json new file mode 100644 index 0000000..3631cc7 --- /dev/null +++ b/contract/files_restored.json @@ -0,0 +1,4 @@ +{ + "restored": "/home/frodo/old.md", + "items": [] +} diff --git a/contract/files_trash.json b/contract/files_trash.json new file mode 100644 index 0000000..e30b9c2 --- /dev/null +++ b/contract/files_trash.json @@ -0,0 +1,12 @@ +{ + "items": [ + { + "id": "node5", + "name": "old.md", + "path": "/home/frodo/old.md", + "kind": "file", + "size": 12, + "trashed_at": "2026-01-02T03:04:05+00:00" + } + ] +} diff --git a/contract/files_trash_emptied.json b/contract/files_trash_emptied.json new file mode 100644 index 0000000..7de8dbf --- /dev/null +++ b/contract/files_trash_emptied.json @@ -0,0 +1,4 @@ +{ + "removed": 1, + "items": [] +} diff --git a/contract/lock.json b/contract/lock.json index 7d14f47..d44c277 100644 --- a/contract/lock.json +++ b/contract/lock.json @@ -1,5 +1,5 @@ { - "ref": "v2.0.0-beta.15", - "commit": "e38cec75b3685d09ba8ff28c859bd25e5b3a294c", - "sha256": "208111001ffd502f13d7f6fbc24a232e5ddc0d63c6789afe1636e34f1c737834" + "ref": "59bebe2", + "commit": "59bebe234cae114309e40d3f96e6074bd91db46a", + "sha256": "e0e4bba98c130740c1e4c3727e86ef7e0672772789b7e85cac3a674aae91d163" } diff --git a/contract/mcp_servers.json b/contract/mcp_servers.json new file mode 100644 index 0000000..24594e4 --- /dev/null +++ b/contract/mcp_servers.json @@ -0,0 +1,64 @@ +{ + "servers": [ + { + "id": "mcp1", + "slug": "tracker", + "name": "Tracker", + "tools": 4, + "auth": { + "kind": "secret", + "state": "ready", + "shared": false, + "account": "", + "expires_at": null, + "renews": false, + "signin_url": null + } + }, + { + "id": "mcp2", + "slug": "mail", + "name": "Mail", + "tools": 7, + "auth": { + "kind": "oauth", + "state": "signed_in", + "shared": false, + "account": "frodo@example.org", + "expires_at": null, + "renews": true, + "signin_url": null + } + }, + { + "id": "mcp3", + "slug": "notes", + "name": "Notes", + "tools": 3, + "auth": { + "kind": "oauth", + "state": "signed_out", + "shared": false, + "account": "", + "expires_at": null, + "renews": false, + "signin_url": "https://lembas.example.org/settings/mcp/mcp3/sign-in" + } + }, + { + "id": "mcp4", + "slug": "wiki", + "name": "Wiki", + "tools": 2, + "auth": { + "kind": "oauth", + "state": "needs_signin", + "shared": true, + "account": "", + "expires_at": null, + "renews": false, + "signin_url": null + } + } + ] +} diff --git a/contract/message_assistant.json b/contract/message_assistant.json index 1ebefae..65229b4 100644 --- a/contract/message_assistant.json +++ b/contract/message_assistant.json @@ -9,6 +9,7 @@ "machine": false, "origin": "", "model": "qwen", + "model_ref": "local/qwen", "attachments": [], "end": null, "steps": [ diff --git a/contract/message_failed.json b/contract/message_failed.json index c8a0ca9..7415596 100644 --- a/contract/message_failed.json +++ b/contract/message_failed.json @@ -9,6 +9,7 @@ "machine": false, "origin": "", "model": "qwen", + "model_ref": null, "attachments": [], "end": { "phase": "failed", diff --git a/contract/message_queued.json b/contract/message_queued.json index bcdc255..61487c5 100644 --- a/contract/message_queued.json +++ b/contract/message_queued.json @@ -9,6 +9,7 @@ "machine": false, "origin": "", "model": null, + "model_ref": null, "attachments": [], "text": "And the leaves?", "progress": { diff --git a/contract/message_stopped.json b/contract/message_stopped.json index dd85f79..698f432 100644 --- a/contract/message_stopped.json +++ b/contract/message_stopped.json @@ -9,6 +9,7 @@ "machine": false, "origin": "", "model": "qwen", + "model_ref": null, "attachments": [], "end": { "phase": "stopped", diff --git a/contract/message_user.json b/contract/message_user.json index 5457dc4..79c6e97 100644 --- a/contract/message_user.json +++ b/contract/message_user.json @@ -9,6 +9,7 @@ "machine": false, "origin": "", "model": null, + "model_ref": null, "attachments": [], "text": "How is lembas made?", "progress": null diff --git a/contract/schedule.json b/contract/schedule.json index 1e92515..b3700f9 100644 --- a/contract/schedule.json +++ b/contract/schedule.json @@ -37,6 +37,7 @@ "catch_up": "one", "grace_minutes": null, "model": "qwen", + "model_ref": "local/qwen", "effort": "high", "agents": null, "tools": [ @@ -70,6 +71,7 @@ "attempts": 1, "model": { "id": "gpt-oss", + "ref": "local/gpt-oss", "name": "GPT-OSS", "reason": "switched", "switched_from": "Qwen" diff --git a/contract/schedule_on_device.json b/contract/schedule_on_device.json index 36ca1ab..b2fe5bd 100644 --- a/contract/schedule_on_device.json +++ b/contract/schedule_on_device.json @@ -23,6 +23,7 @@ "catch_up": "one", "grace_minutes": null, "model": null, + "model_ref": null, "effort": null, "agents": null, "tools": [ @@ -74,6 +75,7 @@ "attempts": 1, "model": { "id": null, + "ref": null, "name": null, "reason": null, "switched_from": null diff --git a/contract/schedule_run.json b/contract/schedule_run.json index f03019c..daeb6d4 100644 --- a/contract/schedule_run.json +++ b/contract/schedule_run.json @@ -14,6 +14,7 @@ "attempts": 1, "model": { "id": "gpt-oss", + "ref": "local/gpt-oss", "name": "GPT-OSS", "reason": "switched", "switched_from": "Qwen" diff --git a/contract/schedule_run_agentic.json b/contract/schedule_run_agentic.json index 2f1935c..f1a9b61 100644 --- a/contract/schedule_run_agentic.json +++ b/contract/schedule_run_agentic.json @@ -14,6 +14,7 @@ "attempts": 1, "model": { "id": "qwen", + "ref": "local/qwen", "name": "Qwen", "reason": "directory", "switched_from": null diff --git a/contract/schedule_runs.json b/contract/schedule_runs.json index c85dd96..b1db3de 100644 --- a/contract/schedule_runs.json +++ b/contract/schedule_runs.json @@ -20,6 +20,7 @@ "attempts": 2, "model": { "id": null, + "ref": null, "name": null, "reason": null, "switched_from": null @@ -60,6 +61,7 @@ "attempts": 1, "model": { "id": "gpt-oss", + "ref": "local/gpt-oss", "name": "GPT-OSS", "reason": "switched", "switched_from": "Qwen" diff --git a/contract/schedule_watching.json b/contract/schedule_watching.json index 0124b45..aff66ef 100644 --- a/contract/schedule_watching.json +++ b/contract/schedule_watching.json @@ -23,6 +23,7 @@ "catch_up": "one", "grace_minutes": null, "model": null, + "model_ref": null, "effort": null, "agents": null, "tools": [ @@ -61,6 +62,7 @@ "attempts": 1, "model": { "id": null, + "ref": null, "name": null, "reason": null, "switched_from": null diff --git a/contract/schedules.json b/contract/schedules.json index efdbcdd..7227641 100644 --- a/contract/schedules.json +++ b/contract/schedules.json @@ -38,6 +38,7 @@ "catch_up": "one", "grace_minutes": null, "model": "qwen", + "model_ref": "local/qwen", "effort": "high", "agents": null, "tools": [ @@ -71,6 +72,7 @@ "attempts": 1, "model": { "id": "gpt-oss", + "ref": "local/gpt-oss", "name": "GPT-OSS", "reason": "switched", "switched_from": "Qwen"