From 660ff90b3a64bb07e634abf5987c9bbaa8de268c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Bene=C5=A1?= Date: Tue, 24 Nov 2026 13:31:22 +0000 Subject: [PATCH] Pinned to the server's dev at 809b87b: shown files, an edit's diff, a computer's files Seventeen new contract files: tool_media_shown, event_ask_edit, editor, editor_unset, message_editor and the twelve device_fs_* shapes. devices.json gained files, files_writable and files_that_run_code per device. Tokens are read at the same commit (the colours did not move, only the commit they name). Co-Authored-By: Claude Fable 5.2 --- .../eu/llembas/android/ui/theme/Tokens.kt | 2 +- app/src/main/res/values-night/tokens.xml | 2 +- app/src/main/res/values/tokens.xml | 2 +- contract/device_fs_batch.json | 20 ++++ contract/device_fs_conflict.json | 7 ++ contract/device_fs_content.json | 13 +++ contract/device_fs_content_withheld.json | 17 ++++ contract/device_fs_deleted.json | 4 + contract/device_fs_listing.json | 93 +++++++++++++++++++ contract/device_fs_no_trash.json | 4 + contract/device_fs_roots.json | 23 +++++ contract/device_fs_search.json | 14 +++ contract/device_fs_search_content.json | 11 +++ contract/device_fs_stat.json | 15 +++ contract/device_fs_written.json | 6 ++ contract/devices.json | 10 +- contract/editor.json | 13 +++ contract/editor_unset.json | 10 ++ contract/event_ask_edit.json | 51 ++++++++++ contract/lock.json | 6 +- contract/message_editor.json | 24 +++++ contract/tool_media_shown.json | 85 +++++++++++++++++ tokens.lock.json | 10 +- 23 files changed, 429 insertions(+), 13 deletions(-) create mode 100644 contract/device_fs_batch.json create mode 100644 contract/device_fs_conflict.json create mode 100644 contract/device_fs_content.json create mode 100644 contract/device_fs_content_withheld.json create mode 100644 contract/device_fs_deleted.json create mode 100644 contract/device_fs_listing.json create mode 100644 contract/device_fs_no_trash.json create mode 100644 contract/device_fs_roots.json create mode 100644 contract/device_fs_search.json create mode 100644 contract/device_fs_search_content.json create mode 100644 contract/device_fs_stat.json create mode 100644 contract/device_fs_written.json create mode 100644 contract/editor.json create mode 100644 contract/editor_unset.json create mode 100644 contract/event_ask_edit.json create mode 100644 contract/message_editor.json create mode 100644 contract/tool_media_shown.json diff --git a/app/src/main/java/eu/llembas/android/ui/theme/Tokens.kt b/app/src/main/java/eu/llembas/android/ui/theme/Tokens.kt index e7021ca..efc49b1 100644 --- a/app/src/main/java/eu/llembas/android/ui/theme/Tokens.kt +++ b/app/src/main/java/eu/llembas/android/ui/theme/Tokens.kt @@ -1,4 +1,4 @@ -// Generated by scripts/fetch-tokens.py from the LLeMbas server's tokens.css at v2.0.0-beta.18. Do not edit. +// Generated by scripts/fetch-tokens.py from the LLeMbas server's tokens.css at 809b87b. Do not edit. package eu.llembas.android.ui.theme import androidx.compose.ui.graphics.Color diff --git a/app/src/main/res/values-night/tokens.xml b/app/src/main/res/values-night/tokens.xml index b5eddaf..6bfbf0e 100644 --- a/app/src/main/res/values-night/tokens.xml +++ b/app/src/main/res/values-night/tokens.xml @@ -1,5 +1,5 @@ - + #FF0B0D10 #FF11151A diff --git a/app/src/main/res/values/tokens.xml b/app/src/main/res/values/tokens.xml index 20d7d7c..1d5405b 100644 --- a/app/src/main/res/values/tokens.xml +++ b/app/src/main/res/values/tokens.xml @@ -1,5 +1,5 @@ - + #FFF1EAD6 #FFF8F3E5 diff --git a/contract/device_fs_batch.json b/contract/device_fs_batch.json new file mode 100644 index 0000000..db2365e --- /dev/null +++ b/contract/device_fs_batch.json @@ -0,0 +1,20 @@ +{ + "op": "delete", + "to": null, + "atomic": false, + "done": 1, + "failed": 1, + "results": [ + { + "path": "/home/dev/project/old.md", + "ok": true, + "trash": true + }, + { + "path": "/mnt/usb/old.bin", + "ok": false, + "error": "This computer has no trash for /mnt/usb/old.bin: deleting it cannot be undone.", + "reason": "no_trash" + } + ] +} diff --git a/contract/device_fs_conflict.json b/contract/device_fs_conflict.json new file mode 100644 index 0000000..30fd1d5 --- /dev/null +++ b/contract/device_fs_conflict.json @@ -0,0 +1,7 @@ +{ + "detail": "/home/dev/project/oven.py changed on the computer since you opened it.", + "reason": "changed", + "conflict": true, + "sha": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "mtime": 1767323050000 +} diff --git a/contract/device_fs_content.json b/contract/device_fs_content.json new file mode 100644 index 0000000..1b03236 --- /dev/null +++ b/contract/device_fs_content.json @@ -0,0 +1,13 @@ +{ + "path": "/home/dev/project/oven.py", + "name": "oven.py", + "size": 412, + "mtime": 1767323045000, + "mime": "text/x-python", + "kind": "code", + "file_kind": "code", + "writable": true, + "language": "python", + "sha": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "text": "def bake():\n return 'lembas'\n" +} diff --git a/contract/device_fs_content_withheld.json b/contract/device_fs_content_withheld.json new file mode 100644 index 0000000..fe5f1aa --- /dev/null +++ b/contract/device_fs_content_withheld.json @@ -0,0 +1,17 @@ +{ + "path": "/home/dev/project/loaf.png", + "name": "loaf.png", + "size": 48211, + "mtime": 1767323045000, + "mime": "image/png", + "kind": "image", + "file_kind": "image", + "writable": true, + "language": "", + "sha": "", + "text": "", + "withheld": { + "reason": "not_text", + "message": "This is not a text file, so it is not shown here." + } +} diff --git a/contract/device_fs_deleted.json b/contract/device_fs_deleted.json new file mode 100644 index 0000000..fcd5a17 --- /dev/null +++ b/contract/device_fs_deleted.json @@ -0,0 +1,4 @@ +{ + "deleted": true, + "trash": true +} diff --git a/contract/device_fs_listing.json b/contract/device_fs_listing.json new file mode 100644 index 0000000..add1216 --- /dev/null +++ b/contract/device_fs_listing.json @@ -0,0 +1,93 @@ +{ + "device": "", + "path": "/home/dev/project", + "parent": "", + "writable": false, + "entries": [ + { + "name": "src", + "path": "/home/dev/project/src", + "kind": "dir", + "size": 0, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": null, + "link": null, + "outside": false, + "protected": false, + "runs_code": false, + "writable": false + }, + { + "name": "shared", + "path": "/home/dev/project/shared", + "kind": "dir", + "size": 0, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": null, + "link": "/srv/shared", + "outside": true, + "protected": false, + "runs_code": false, + "writable": false + }, + { + "name": ".env", + "path": "/home/dev/project/.env", + "kind": "file", + "size": 0, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": "text", + "link": null, + "outside": false, + "protected": true, + "runs_code": false, + "writable": false + }, + { + "name": "oven.py", + "path": "/home/dev/project/oven.py", + "kind": "file", + "size": 412, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": "code", + "link": null, + "outside": false, + "protected": false, + "runs_code": false, + "writable": false + }, + { + "name": "loaf.png", + "path": "/home/dev/project/loaf.png", + "kind": "file", + "size": 48211, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": "binary", + "link": null, + "outside": false, + "protected": false, + "runs_code": false, + "writable": false + }, + { + "name": ".git", + "path": "/home/dev/project/.git", + "kind": "dir", + "size": 0, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": null, + "link": null, + "outside": false, + "protected": false, + "runs_code": true, + "writable": false + } + ], + "truncated": false +} diff --git a/contract/device_fs_no_trash.json b/contract/device_fs_no_trash.json new file mode 100644 index 0000000..a532d11 --- /dev/null +++ b/contract/device_fs_no_trash.json @@ -0,0 +1,4 @@ +{ + "detail": "This computer has no trash for /mnt/usb/old.bin: deleting it cannot be undone.", + "reason": "no_trash" +} diff --git a/contract/device_fs_roots.json b/contract/device_fs_roots.json new file mode 100644 index 0000000..3f00490 --- /dev/null +++ b/contract/device_fs_roots.json @@ -0,0 +1,23 @@ +{ + "device": "", + "path": "", + "parent": "", + "writable": false, + "entries": [ + { + "name": "project", + "path": "/home/dev/project", + "kind": "dir", + "size": 0, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": null, + "link": null, + "outside": false, + "protected": false, + "runs_code": false, + "writable": false + } + ], + "truncated": false +} diff --git a/contract/device_fs_search.json b/contract/device_fs_search.json new file mode 100644 index 0000000..3a64f77 --- /dev/null +++ b/contract/device_fs_search.json @@ -0,0 +1,14 @@ +{ + "root": "/home/dev/project", + "truncated": false, + "files": [ + { + "path": "src/oven.py", + "kind": "file" + }, + { + "path": "src", + "kind": "dir" + } + ] +} diff --git a/contract/device_fs_search_content.json b/contract/device_fs_search_content.json new file mode 100644 index 0000000..34b8c94 --- /dev/null +++ b/contract/device_fs_search_content.json @@ -0,0 +1,11 @@ +{ + "root": "/home/dev/project", + "truncated": true, + "matches": [ + { + "path": "src/oven.py", + "line": 2, + "text": " return 'lembas'" + } + ] +} diff --git a/contract/device_fs_stat.json b/contract/device_fs_stat.json new file mode 100644 index 0000000..26445ca --- /dev/null +++ b/contract/device_fs_stat.json @@ -0,0 +1,15 @@ +{ + "name": "oven.py", + "path": "/home/dev/project/oven.py", + "kind": "file", + "size": 412, + "mtime": 1767323045000, + "updated_at": "2026-01-02T03:04:05+00:00", + "file_kind": "code", + "link": null, + "outside": false, + "protected": false, + "runs_code": false, + "writable": false, + "sha": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +} diff --git a/contract/device_fs_written.json b/contract/device_fs_written.json new file mode 100644 index 0000000..a575703 --- /dev/null +++ b/contract/device_fs_written.json @@ -0,0 +1,6 @@ +{ + "path": "/home/dev/project/oven.py", + "size": 430, + "mtime": 1767323054000, + "sha": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" +} diff --git a/contract/devices.json b/contract/devices.json index aab3f4b..7b13949 100644 --- a/contract/devices.json +++ b/contract/devices.json @@ -10,7 +10,10 @@ "terminal_hint": "", "scheduled": true, "max_mode": "edit", - "directory_model": true + "directory_model": true, + "files": true, + "files_writable": true, + "files_that_run_code": false }, { "id": "token2", @@ -22,7 +25,10 @@ "terminal_hint": "laptop does not open terminals. Switch it on there: in LLeMbas Desktop's settings, or with the LLeMbas CLI's remote.terminal setting.", "scheduled": false, "max_mode": "", - "directory_model": false + "directory_model": false, + "files": false, + "files_writable": false, + "files_that_run_code": false } ] } diff --git a/contract/editor.json b/contract/editor.json new file mode 100644 index 0000000..162c598 --- /dev/null +++ b/contract/editor.json @@ -0,0 +1,13 @@ +{ + "autocomplete": { + "model": "local/qwen", + "source": "person", + "allowed": [ + "local/qwen", + "local/vision-small" + ] + }, + "main": { + "model": "local/gpt-oss" + } +} diff --git a/contract/editor_unset.json b/contract/editor_unset.json new file mode 100644 index 0000000..4853c64 --- /dev/null +++ b/contract/editor_unset.json @@ -0,0 +1,10 @@ +{ + "autocomplete": { + "model": null, + "source": null, + "allowed": null + }, + "main": { + "model": null + } +} diff --git a/contract/event_ask_edit.json b/contract/event_ask_edit.json new file mode 100644 index 0000000..638f06a --- /dev/null +++ b/contract/event_ask_edit.json @@ -0,0 +1,51 @@ +{ + "cards": [ + { + "id": "card9", + "kind": "approval", + "why": "", + "dismissable": false, + "expires_in": 1800, + "items": [ + { + "index": 0, + "key": "0", + "kind": "approval", + "tool": "edit", + "title": "Edit a file", + "header": "", + "detail": "{\"path\": \"src/oven.py\"}", + "reason": "Manual mode asks before every edit.", + "purpose": "Bake hotter", + "options": [], + "multiple": false, + "free_text": false, + "always": true, + "editable": false, + "plan": null, + "mode_choice": true, + "job": "", + "subagent": null, + "diffs": [ + { + "path": "src/oven.py", + "old_text": "def bake(loaf):\n return loaf.heat(220)\n", + "new_text": "def bake(loaf):\n # \n return loaf.heat(240)\n" + }, + { + "path": "src/timer.py", + "old_text": null, + "new_text": "MINUTES = 40\n" + }, + { + "path": "src/old.py", + "old_text": "x = 1\n", + "new_text": "", + "deleted": true + } + ] + } + ] + } + ] +} diff --git a/contract/lock.json b/contract/lock.json index 70a3995..3e223e9 100644 --- a/contract/lock.json +++ b/contract/lock.json @@ -1,5 +1,5 @@ { - "ref": "v2.0.0-beta.18", - "commit": "4c0573f1e68b068b1382ae00c918babb37c91293", - "sha256": "ac22d0333a131982ff2906be7d25bedb1ff730cd8d86e68b71b6e907de634220" + "ref": "809b87b", + "commit": "809b87bde8e01f81ec84282af1117da5d4ef0cfb", + "sha256": "d1ae16aa1ee34c34a960bc2343a40e89cd5d836e8c3106af475d5bdad2d00bd3" } diff --git a/contract/message_editor.json b/contract/message_editor.json new file mode 100644 index 0000000..bfc08dc --- /dev/null +++ b/contract/message_editor.json @@ -0,0 +1,24 @@ +{ + "path": "/home/dev/project/src/oven.py", + "cursor": { + "line": 2 + }, + "selection": { + "start": 2, + "end": 2, + "path": "/home/dev/project/src/oven.py", + "text": " return loaf.heat(220)" + }, + "diagnostics": [ + { + "message": "220 is cool for waybread.", + "path": "/home/dev/project/src/oven.py", + "line": 2, + "severity": "warning", + "source": "baker" + } + ], + "open": [ + "/home/dev/project/README.md" + ] +} diff --git a/contract/tool_media_shown.json b/contract/tool_media_shown.json new file mode 100644 index 0000000..cc21251 --- /dev/null +++ b/contract/tool_media_shown.json @@ -0,0 +1,85 @@ +{ + "calls": [ + { + "id": "call8", + "name": "show", + "status": "ok", + "query": "/home/frodo/oven/chart.png", + "path": "/home/frodo/oven/chart.png", + "media": { + "kind": "image", + "path": "/home/frodo/oven/chart.png", + "node_id": "node8", + "version_id": "ver8", + "name": "chart.png", + "mime": "image/png", + "size": 48211, + "shown": true, + "width": 1280, + "height": 720 + }, + "block": { + "kind": "tool", + "title": "/home/frodo/oven/chart.png", + "chips": [], + "added": 0, + "removed": 0, + "state": "done", + "duration": "", + "label": "Shown" + } + }, + { + "id": "call9", + "name": "show", + "status": "ok", + "path": "out/report.pdf", + "media": { + "kind": "pdf", + "path": "/home/frodo/Generated/report-20260102-030405.pdf", + "node_id": "node9", + "version_id": "ver9", + "name": "report-20260102-030405.pdf", + "mime": "application/pdf", + "size": 90000, + "shown": true + }, + "block": { + "kind": "tool", + "title": "", + "chips": [], + "added": 0, + "removed": 0, + "state": "done", + "duration": "", + "label": "Shown" + } + }, + { + "id": "call10", + "name": "show", + "status": "ok", + "path": "out/bundle.zip", + "media": { + "kind": "archive", + "path": "/home/frodo/Generated/bundle-20260102-030405.zip", + "node_id": "node10", + "version_id": "ver10", + "name": "bundle-20260102-030405.zip", + "mime": "application/zip", + "size": 1200000, + "shown": true + }, + "block": { + "kind": "tool", + "title": "", + "chips": [], + "added": 0, + "removed": 0, + "state": "done", + "duration": "", + "label": "Shown" + } + } + ] +} diff --git a/tokens.lock.json b/tokens.lock.json index 3209494..9f53b17 100644 --- a/tokens.lock.json +++ b/tokens.lock.json @@ -1,9 +1,9 @@ { - "tag": "v2.0.0-beta.18", - "commit": "4c0573f1e68b068b1382ae00c918babb37c91293", - "sha256": "b5cb5ca7a03fad9fa0f9f9a84f89a71f1ef5f0166eb510e522fac5966910447f", + "tag": "809b87b", + "commit": "809b87bde8e01f81ec84282af1117da5d4ef0cfb", + "sha256": "c38f72695dc82aecc478af5c93700aded84dbeda03e97ac4f07d54ea2ce500c9", "res": { - "values": "d4d0387b6d963d6c3cd1b82dfb745117dfeb38502acd957d4f4e305309ab8d4e", - "values-night": "2d22b872202970c14efbbbc2f25bc0fba60ba25f67e504eb75159c6f85c15e9b" + "values": "4f68cb920d3b882426372e38cf081971d272d7eaa97bd9d58f85a14ae9f840aa", + "values-night": "c431c3e8b9973abe6f51d4bc8fb052c2dd77a1ffea3493195a306e4c4ec1d43b" } }