Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions examples/canonical.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@
}
}
],
"app_check": [
{
"title": "Ask a model on this machine whether a claim holds in a recording",
"cli": "mobium check \"After card 3 was tapped, it was shown face up as the Blue Morpho.\" --input card.zip --model openai:qwen2.5:14b",
"args": {
"claim": "After card 3 was tapped, it was shown face up as the Blue Morpho.",
"record": "card.zip",
"model": "openai:qwen2.5:14b"
}
}
],
"app_clear_data": [
{
"title": "Delete an app's data, and keep it installed",
Expand Down Expand Up @@ -577,6 +588,25 @@
}
}
],
"app_recording": [
{
"title": "See what a recording holds",
"cli": "mobium recording summary --input card.zip",
"args": {
"read": "summary",
"record": "card.zip"
}
},
{
"title": "Find the calls that mention something",
"cli": "mobium recording search \"Blue Morpho\" --input card.zip",
"args": {
"read": "search",
"query": "Blue Morpho",
"record": "card.zip"
}
}
],
"app_reset_permissions": [
{
"title": "Put one app's permissions back to their defaults",
Expand Down Expand Up @@ -849,6 +879,24 @@
}
}
],
"app_verdict": [
{
"title": "Judge a claim yourself, citing the call it rests on",
"cli": "mobium verdict \"After card 3 was tapped, it was shown face up as the Blue Morpho.\" --input card.zip --status passed --summary \"Card 3 reads Blue Morpho after the tap\" --evidence \"call@7: the screen after the tap shows Card 3, Blue Morpho\"",
"args": {
"claim": "After card 3 was tapped, it was shown face up as the Blue Morpho.",
"record": "card.zip",
"status": "passed",
"summary": "Card 3 reads Blue Morpho after the tap",
"evidence": [
{
"type": "observation",
"summary": "call@7: the screen after the tap shows Card 3, Blue Morpho"
}
]
}
}
],
"app_wait_for": [
{
"title": "Wait for text to appear",
Expand Down
18 changes: 18 additions & 0 deletions examples/dotnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"code": "device.Unset(\"@e4\");"
}
],
"app_check": [
{
"code": "var v = device.Check(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\", \"openai:qwen2.5:14b\");\nConsole.WriteLine($\"{v[\"status\"]} {v[\"summary\"]}\");"
}
],
"app_clear_data": [
{
"code": "device.ClearData(\"com.example.shop\");"
Expand Down Expand Up @@ -287,6 +292,14 @@
"code": "var video = device.Record(\"stop\", \"flow.mp4\");"
}
],
"app_recording": [
{
"code": "var sum = device.Recording(\"card.zip\", \"summary\");\nConsole.WriteLine(sum[\"title\"]);"
},
{
"code": "var hits = device.Recording(\"card.zip\", \"search\", \"Blue Morpho\");\nConsole.WriteLine(hits[\"calls\"]);"
}
],
"app_reset_permissions": [
{
"code": "device.ResetPermissions(\"com.example.shop\");"
Expand Down Expand Up @@ -427,6 +440,11 @@
"code": "var sent = device.PushPath(\"seed\", \"/sdcard/seed\");\nConsole.WriteLine($\"{sent[\"files\"]} {sent[\"checked\"]}\");"
}
],
"app_verdict": [
{
"code": "device.Verdict(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\", \"passed\",\n \"Card 3 reads Blue Morpho after the tap\",\n \"call@7: the screen after the tap shows Card 3, Blue Morpho\");"
}
],
"app_wait_for": [
{
"code": "var welcome = device.WaitFor(\"text=Welcome back\");"
Expand Down
18 changes: 18 additions & 0 deletions examples/go.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"code": "if err := dev.Unset(ctx, \"@e4\"); err != nil {\n\treturn err\n}"
}
],
"app_check": [
{
"code": "v, err := dev.Check(ctx, \"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\",\n\t&mobium.CheckOptions{Model: \"openai:qwen2.5:14b\"})\nif err != nil {\n\treturn err\n}\nfmt.Println(v.Status, v.Summary)"
}
],
"app_clear_data": [
{
"code": "cleared, err := dev.ClearData(ctx, \"com.example.shop\")\nif err != nil {\n\treturn err\n}\nfmt.Println(\"emptied:\", cleared.Emptied, \"still granted:\", cleared.StillGranted)"
Expand Down Expand Up @@ -287,6 +292,14 @@
"code": "rec, err := dev.Record(ctx, \"stop\", \"flow.mp4\")\nif err != nil {\n\treturn err\n}\nfmt.Println(rec.Path, rec.Frames, \"frames\")"
}
],
"app_recording": [
{
"code": "sum, err := dev.Recording(ctx, \"card.zip\", \"summary\", nil)\nif err != nil {\n\treturn err\n}\nfmt.Println(sum[\"calls\"], sum[\"title\"])"
},
{
"code": "hits, err := dev.Recording(ctx, \"card.zip\", \"search\", map[string]any{\"query\": \"Blue Morpho\"})\nif err != nil {\n\treturn err\n}\nfmt.Println(hits[\"calls\"])"
}
],
"app_reset_permissions": [
{
"code": "if err := dev.ResetPermissions(ctx, \"com.example.shop\"); err != nil {\n\treturn err\n}"
Expand Down Expand Up @@ -427,6 +440,11 @@
"code": "sent, err := dev.PushPath(ctx, \"seed\", \"/sdcard/seed\", \"\")\nif err != nil {\n\treturn err\n}\nfmt.Println(sent.Files, sent.Checked)"
}
],
"app_verdict": [
{
"code": "if _, err := dev.Verdict(ctx, \"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\", \"passed\",\n\t\"Card 3 reads Blue Morpho after the tap\",\n\t\"call@7: the screen after the tap shows Card 3, Blue Morpho\"); err != nil {\n\treturn err\n}"
}
],
"app_wait_for": [
{
"code": "el, err := dev.WaitFor(ctx, \"text=Welcome back\", nil)\nif err != nil {\n\treturn err\n}\nfmt.Println(el.Ref)"
Expand Down
18 changes: 18 additions & 0 deletions examples/java.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"code": "device.unset(\"@e4\");"
}
],
"app_check": [
{
"code": "Map<String, Object> v = device.check(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\", \"openai:qwen2.5:14b\");\nSystem.out.println(v.get(\"status\") + \" \" + v.get(\"summary\"));"
}
],
"app_clear_data": [
{
"code": "Map<String, Object> result = device.clearData(\"com.example.shop\");\nSystem.out.println(result.get(\"emptied\"));"
Expand Down Expand Up @@ -287,6 +292,14 @@
"code": "Map<String, Object> video = device.record(\"stop\", \"flow.mp4\");\nSystem.out.println(video.get(\"frames\") + \" frames\");"
}
],
"app_recording": [
{
"code": "System.out.println(device.recording(\"card.zip\", \"summary\", null));"
},
{
"code": "Map<String, Object> hits = device.recording(\"card.zip\", \"search\", \"Blue Morpho\");\nSystem.out.println(hits.get(\"calls\"));"
}
],
"app_reset_permissions": [
{
"code": "device.resetPermissions(\"com.example.shop\");"
Expand Down Expand Up @@ -427,6 +440,11 @@
"code": "Map<String, Object> sent = device.pushPath(\"seed\", \"/sdcard/seed\");\nSystem.out.println(sent.get(\"files\") + \" \" + sent.get(\"checked\"));"
}
],
"app_verdict": [
{
"code": "device.verdict(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\", \"passed\",\n \"Card 3 reads Blue Morpho after the tap\",\n \"call@7: the screen after the tap shows Card 3, Blue Morpho\");"
}
],
"app_wait_for": [
{
"code": "Element welcome = device.waitFor(\"text=Welcome back\");\ndevice.tap(welcome.ref());"
Expand Down
18 changes: 18 additions & 0 deletions examples/javascript.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"code": "await device.unset('@e4')"
}
],
"app_check": [
{
"code": "const v = await device.check(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", 'card.zip', { model: 'openai:qwen2.5:14b' })\nconsole.log(v.status, v.summary)"
}
],
"app_clear_data": [
{
"code": "const cleared = await device.clearData('com.example.shop')\nconsole.log(cleared.emptied, cleared.kept)"
Expand Down Expand Up @@ -287,6 +292,14 @@
"code": "const video = await device.record({ action: 'stop', path: 'flow.mp4' })\nconsole.log(video.frames, video.duration)"
}
],
"app_recording": [
{
"code": "console.log(await device.recording('card.zip', 'summary'))"
},
{
"code": "const hits = await device.recording('card.zip', 'search', { query: 'Blue Morpho' })\nconsole.log(hits.calls)"
}
],
"app_reset_permissions": [
{
"code": "await device.resetPermissions('com.example.shop')"
Expand Down Expand Up @@ -427,6 +440,11 @@
"code": "const sent = await device.pushPath('seed', '/sdcard/seed')\nconsole.log(sent.files, sent.checked)"
}
],
"app_verdict": [
{
"code": "await device.verdict(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", 'card.zip', 'passed',\n 'Card 3 reads Blue Morpho after the tap',\n [\"call@7: the screen after the tap shows Card 3, Blue Morpho\"])"
}
],
"app_wait_for": [
{
"code": "const welcome = await device.waitFor('text=Welcome back')\nconsole.log(welcome?.ref)"
Expand Down
5 changes: 4 additions & 1 deletion examples/no-picture.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"background": "the app is off the screen for the seconds it is away, and back in front when the command returns.",
"biometric": "what it presents goes to a prompt the app put up, and the app's own screen says what it made of it.",
"boot": "it starts a device, which has no screen of its own until it is up.",
"check": "it reads a recording, not a device, and needs no screen at all.",
"clear-data": "it deletes an app's data, which shows only the next time the app starts.",
"crashes": "it reads the device's crash reports, and nothing on the screen changes.",
"current": "it names the app in front, and nothing on the screen changes.",
Expand All @@ -21,6 +22,7 @@
"lock": "a locked emulator's screen is off, so its screenshot is black.",
"logs": "it reads a log, and nothing on the screen changes.",
"record": "what it keeps is a video of the screen.",
"recording": "it reads a recording, not a device, and needs no screen at all.",
"reset-permissions": "it changes what an app may do, not what is on the screen.",
"revoke": "it changes what an app may do, not what is on the screen.",
"session": "a session is the connection to the device, and the screen shows nothing of it.",
Expand All @@ -30,5 +32,6 @@
"state": "it reads whether an app is running, and nothing on the screen changes.",
"time": "it reads the device's clock, and nothing on the screen changes.",
"trace": "what it keeps is a zip in Vibium's record format, which opens in Vibium's player at player.vibium.dev: every step, and the screen after each with the map drawn over it.",
"uninstall": "it removes an app, which shows nowhere on the screen in front."
"uninstall": "it removes an app, which shows nowhere on the screen in front.",
"verdict": "it judges a recording, not a device, and needs no screen at all."
}
18 changes: 18 additions & 0 deletions examples/python.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"code": "device.unset(\"@e4\")"
}
],
"app_check": [
{
"code": "v = device.check(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\", model=\"openai:qwen2.5:14b\")\nprint(v[\"status\"], v[\"summary\"])"
}
],
"app_clear_data": [
{
"code": "result = device.clear_data(\"com.example.shop\")\nprint(result[\"emptied\"])"
Expand Down Expand Up @@ -287,6 +292,14 @@
"code": "video = device.record(\"stop\", path=\"flow.mp4\")\nprint(video[\"frames\"], video[\"duration\"])"
}
],
"app_recording": [
{
"code": "print(device.recording(\"card.zip\", \"summary\"))"
},
{
"code": "hits = device.recording(\"card.zip\", \"search\", query=\"Blue Morpho\")\nfor c in hits[\"calls\"]:\n print(c[\"id\"], c[\"title\"])"
}
],
"app_reset_permissions": [
{
"code": "device.reset_permissions(\"com.example.shop\")"
Expand Down Expand Up @@ -427,6 +440,11 @@
"code": "sent = device.push_path(\"seed\", \"/sdcard/seed\")\nprint(sent[\"files\"], sent[\"checked\"])"
}
],
"app_verdict": [
{
"code": "device.verdict(\"After card 3 was tapped, it was shown face up as the Blue Morpho.\", \"card.zip\", \"passed\",\n \"Card 3 reads Blue Morpho after the tap\",\n \"call@7: the screen after the tap shows Card 3, Blue Morpho\")"
}
],
"app_wait_for": [
{
"code": "el = device.wait_for(\"text=Welcome back\")\ndevice.tap(el.ref)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def doc_text(doc, lang):
SYNC = {
"quickstart": ["README.md", "cli.md", "mcp.md", "python.md", "javascript.md", "go.md", "java.md", "dotnet.md"],
"guides": ["README.md", "autowait.md", "graybox.md", "graybox-tutorial.md", "cli.md", "test-runner.md", "grid.md",
"network.md", "inspector.md", "mcp.md"],
"network.md", "inspector.md", "mcp.md", "verifier.md"],
}


Expand Down
Loading