Compare commits

...
Author SHA1 Message Date
waozi 6e58768825 Save Arcade's unfinished reminder and pin work 2026-11-02 11:12:09 -03:00
24 changed files with 987 additions and 269 deletions

No files matched your search

+4
View File
@@ -2,6 +2,10 @@
## [Unreleased]
- Support evening chest reminders from compatible games on Android, with the device's notification permission and only the selected game counted as opened.
- Password fields start empty and show one star per character, including long passwords.
- Use Entity's reviewed account authorization and shared Apps controller.
- Keep the full game collection within the host payload limit by packing opaque pictures without redundant alpha data; decoded pixels stay identical.
- On Android, Continue as can use the account from another signed-in Waozi app, once you approve it there.
+7
View File
@@ -36,6 +36,11 @@ collection: games $(APPS_BUNDLE)
collection-test:
python3 tests/collection_test.py
.PHONY: collection-notifications-test
collection-notifications-test:
python3 tests/game_host_compatibility_test.py
python3 tests/collection_notifications_test.py
src/catalog.zi: games
build/entity.zx: ziran.lock $(wildcard $(ENTITY_DIR)/src/*.zi)
@@ -54,6 +59,8 @@ run: all
./build/arcade
test: all
python3 tests/game_host_compatibility_test.py
python3 tests/collection_notifications_test.py
python3 tests/game_module_paths_test.py
python3 tests/game_resource_packing_test.py
python3 tests/game_translation_keys_test.py
+1 -1
View File
@@ -1 +1 @@
4bed077eacf6879f44fd581d59cfff20b15a813cfbe6c4eecd16535693b99329
367e6e4a787467e0c2d3dc428749eb700031cc1cb0db16f730d2639bb8bcd33d
+4 -4
View File
@@ -1,5 +1,5 @@
{
"host_api": 41,
"host_api": 42,
"oldest_host_api": 41,
"module_api": 2,
"node_apps": {
@@ -41,9 +41,9 @@
"wurm": {
"id": "xyz.waozi.wurm",
"title": "Apfelwurm",
"version": "0.2.28",
"sequence": 23,
"host_api": 41
"version": "0.2.29",
"sequence": 24,
"host_api": 42
},
"wurm-editor": {
"id": "xyz.waozi.wurm-editor",
+11 -2
View File
@@ -18,6 +18,13 @@ def translation_keys(code, prefix):
return set(re.findall(r'"(' + re.escape(prefix) + r'[a-z0-9_]+)"', code))
def compatible(game, standard):
for field in ('contract_version', 'module_api'):
assert game[field] == standard[field], f'{game["name"]}: incompatible {field}'
assert type(game['host_api']) is int and standard['oldest_host_api'] <= game['host_api'] <= standard['host_api'], \
f'{game["name"]}: incompatible host_api'
def check(ziran, lock_flags):
standard = json.loads((ROOT / 'standards/game-v1.json').read_text())
ledger = json.loads((ROOT / 'apps/versions.json').read_text())
@@ -26,10 +33,12 @@ def check(ziran, lock_flags):
player = re.search(r'^GAME_HOST_API :: (\d+)$', (ROOT / 'src/game_contract.zi').read_text(), re.M)
assert player and int(player[1]) == standard['host_api'] == ledger['host_api'], \
'src/game_contract.zi GAME_HOST_API, standards/game-v1.json and apps/versions.json must name the same host interface'
oldest = re.search(r'^GAME_OLDEST_HOST_API :: (\d+)$', (ROOT / 'src/game_contract.zi').read_text(), re.M)
assert oldest and int(oldest[1]) == standard['oldest_host_api'] == ledger['oldest_host_api'], \
'The player, standard and ledger must agree on the oldest supported host interface'
for app in declared_apps(ROOT, ziran, lock_flags):
source, manifest, game = app['source'], app['manifest'], app['descriptor']
for field in ['contract_version', 'module_api', 'host_api']:
assert game[field] == standard[field], f'{game["name"]}: incompatible {field}'
compatible(game, standard)
component = ledger['node_apps'][game['name']]
assert game['id'] == component['id'] and game['host_api'] == component['host_api']
assert game['kind'] == 'game' and 'arcade' in game['harnesses']
+40 -38
View File
@@ -26,6 +26,8 @@
#import "kryon/app_files"
#import "kryon/app_protocol"
#import "kryon/app_context_host"
#import "kryon/notification_schedule_host"
#import "collection_notification_platform"
#if !#defined(PLATFORM_DESKTOP) && !#defined(ANDROID_BUILD) && !#defined(PLATFORM_WEB) {
CollectionHost :: #import "kryon/app_context";
}
@@ -56,7 +58,7 @@ Codec :: #import "apps/node_codec";
#import "apps/connection"
#import "apps/remote_catalog"
Labels :: #import "apps/words";
#import "shovey/shovey_theme"
#import "profile_palette"
ProfileIcon :: #import "mingcute/mingcute_regular_user_4";
DewIcon :: #import "mingcute/mingcute_filled_drop";
collection_dew_text: [32]u8;
@@ -98,6 +100,24 @@ collection_leave_to_library: bool;
// covers and passed to the games as arcade.updates. -1 unread, 0 off, 1 on,
// 2 not answered yet.
collection_updates: s32 = -1;
collection_notification_node: *AppNode;
collection_notification_requested: bool;
// Called by Apps only after its verified identity/frame checks. Native focus
// alone is insufficient: Profile, library and other games own no opened marker.
CollectionNotificationFocused :: (context: *void, node: *AppNode) -> bool {
return node != null && node == collection_notification_node && !node.collection &&
!entity_visible && AppTreeNode(*collection_host.tree, collection_host.tree.active) == node &&
CollectionNotificationsForeground()
}
CollectionRunFrame :: () -> bool {
runtime := AppHostActiveRuntime(*collection_host)
if runtime == null { return false }
collection_notification_node = runtime.node
defer { collection_notification_node = null }
return AppHostRun(*collection_host, APP_FRAME)
}
// Whether the device's main input is a keyboard and mouse. A native build
// knows its platform; the collection running as a bundle inside Breeze asks
@@ -146,6 +166,16 @@ CollectionRecordsFor :: (id: string) -> *CollectionRecords {
}
CollectionAllows :: (context: *void, node: *AppNode, name: string) -> bool {
if name == KRYON_NOTIFICATION_SCHEDULE {
if node == null || node.collection { return false }
// Ask only when a game actually uses reminders in its native focused
// frame. Loading an older game or opening the library never prompts.
if CollectionNotificationFocused(context, node) && !collection_notification_requested {
collection_notification_requested = true
if !CollectionNotificationsAllowed() { CollectionNotificationsRequest() }
}
return CollectionNotificationsAllowed()
}
return name == "AppRecordHost" || name == "SaveAppRecordHost" ||
name == "AppFriendHost" || name == "AppSharedHost" || name == "AppSharedItemHost" ||
name == "AppInvitationHost" || name == "RefreshAppSharedHost" || name == "SendAppSharedHost" ||
@@ -509,6 +539,7 @@ CollectionOpen :: (bundle: string, digest: string, harness_digest: string,
CollectionStart :: (bundle: string, digest: string, harness_digest: string,
locale: string, packed: bool) -> bool {
platform := AppPlatform.{.allows = CollectionAllows, .call = CollectionCall,
.focused = CollectionNotificationFocused,
.widgets = CollectionWidgets, .save = CollectionSave, .state = CollectionState,
.effect = CollectionEffect, .host_api = GAME_HOST_API,
// Covers show only the art; the download dialog names the size.
@@ -619,6 +650,7 @@ CollectionOpenShoveyBytes :: (bytes: string, metadata: string, data: string) ->
locale := EnvironmentText("LANG")
language := ifx locale.count >= 2 then locale[:2] else "en"
platform := AppPlatform.{.allows = CollectionAllows, .call = CollectionCall,
.focused = CollectionNotificationFocused,
.widgets = CollectionWidgets, .save = CollectionSave, .state = CollectionState,
.effect = CollectionEffect, .host_api = GAME_HOST_API}
collection_ready = AppHostStart(*collection_host, bytes, "arcade.local", "arcade.shovey-player",
@@ -834,7 +866,7 @@ CollectionFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers:
}
WidgetHostBegin(session, CollectionAssetAllowed, CollectionAssetPath)
collection_pictures_missing = false
drawn := AppHostRun(*collection_host, APP_FRAME)
drawn := CollectionRunFrame()
WidgetHostEnd()
if !drawn {
Report("collection frame failed\n")
@@ -856,7 +888,7 @@ CollectionFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers:
collection_host.tree.active.generation, pictures_ready) {
collection_toolbar_visible = false
Box(session, BoxProps.{.key = cast(u64)49400, .bounds = viewport,
.fill = ColorFromPacked(ifx entity_shovey then ShoveyPalette().background else AppCoversPalette().background)})
.fill = ColorFromPacked(ifx entity_shovey then ShoveyHostPalette().background else AppCoversPalette().background)})
unused Button(session, ButtonProps.{.key = cast(u64)49401, .id = 49401,
.bounds = viewport, .invisible = true})
LoadingIndicator(session, LoadingIndicatorProps.{.key = cast(u64)49402,
@@ -865,10 +897,9 @@ CollectionFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers:
}
} else if runtime.node.collection {
collection_loading = .{}
CollectionNodeToolbar(session, viewport)
}
if asking {
unused WidgetPaletteUse(session, ifx entity_shovey then ShoveyPalette() else AppCoversPalette())
unused WidgetPaletteUse(session, ifx entity_shovey then ShoveyHostPalette() else AppCoversPalette())
CollectionUpdatesQuestion(session, viewport)
unused WidgetPaletteRestore(session)
return true
@@ -894,7 +925,7 @@ CollectionFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers:
CollectionToolbar :: (session: Session, viewport: Rectangle) {
if !entity_ready || !collection_toolbar_visible { return }
unused WidgetPaletteUse(session, ifx entity_shovey then ShoveyPalette() else AppCoversPalette())
unused WidgetPaletteUse(session, ifx entity_shovey then ShoveyHostPalette() else AppCoversPalette())
defer { unused WidgetPaletteRestore(session) }
// The account's Dew beside the Profile: a drop and the number, 0 until an
// account is connected; it opens the Profile too.
@@ -941,7 +972,7 @@ CollectionVerifyRelease :: (signature: *u8, public_key: *u8, message: *u8,
CollectionNodeOpen :: (metadata: string, data: string, seed: string,
digest: string, harness: string, locale: string) -> bool {
source: AppRemoteSource
source.oldest_host_api = 1
source.oldest_host_api = GAME_OLDEST_HOST_API
source.host_api = GAME_HOST_API
source.module_api = 2
at := FieldAt(metadata, 0, "node")
@@ -1022,7 +1053,8 @@ CollectionNodeActivate :: () -> bool {
CollectionNodePump :: () {
if collection_node.files == null { return }
AppRemoteCatalogPump(*collection_node)
if collection_node_apply && collection_node.stage == 0 {
// A newer library applies on its own once the background fetch finishes.
if (collection_node_apply || collection_node_choice == APP_CONNECTION_ALLOWED) && collection_node.stage == 0 {
if collection_node.changed && !CollectionNodeActivate() { return }
collection_node_apply = false
collection_node_initial = false
@@ -1053,36 +1085,6 @@ CollectionNodeScreen :: (session: Session, viewport: Rectangle) -> bool {
return false
}
CollectionNodeToolbar :: (session: Session, viewport: Rectangle) {
if collection_node.files == null { return }
unused WidgetPaletteUse(session, AppCoversPalette())
defer { unused WidgetPaletteRestore(session) }
Box(session, BoxProps.{.key = cast(u64)49519,
.bounds = Rectangle.{viewport.x, viewport.y, viewport.width, 88.0},
.fill = Color.{17, 18, 35, 255}})
locale := TextUntilNul(collection_node_locale[:])
allowed := collection_node_choice == APP_CONNECTION_ALLOWED
status := ifx !allowed then "offline_library" else ifx collection_node.stage != 0 then "loading_library" else ifx collection_node.failed then "library_unavailable" else "saved_library"
width := ifx viewport.width - 180.0 < 320.0 then viewport.width - 180.0 else 320.0
if Button(session, ButtonProps.{.key = cast(u64)49520, .id = 49520,
.label = Labels.AppsLabel(locale, ifx allowed then "refresh_library" else "connect_node"),
.bounds = Rectangle.{viewport.x + 8.0, viewport.y + 6.0, width, 44.0},
.tone = ButtonTone.ButtonToneNeutral, .emphasis = ButtonEmphasis.ButtonEmphasisSoft}) != 0 {
if !allowed { collection_node_notice = true }
else if collection_node.changed { collection_node_apply = true }
else { collection_node_apply = true; unused AppRemoteCatalogRefresh(*collection_node) }
}
// A separate connection control keeps revocation available after consent.
if Button(session, ButtonProps.{.key = cast(u64)49521, .id = 49521,
.label = Labels.AppsLabel(locale, "node_connection"),
.bounds = Rectangle.{viewport.x + viewport.width - 170.0, viewport.y + 52.0, 158.0, 28.0},
.tone = ButtonTone.ButtonToneNeutral, .emphasis = ButtonEmphasis.ButtonEmphasisSoft}) != 0 {
collection_node_notice = true
}
Text(session, TextProps.{.key = cast(u64)49522, .text = Labels.AppsLabel(locale, status), .font = 12, .wrap = TextWrap.TextWrapAuto,
.bounds = Rectangle.{viewport.x + 16.0, viewport.y + 58.0, viewport.width - 196.0, 26.0}})
}
CollectionNodeClose :: () {
CollectionDownloadsAllow(false)
AppFileFree(collection_package_origin)
+26
View File
@@ -0,0 +1,26 @@
// Native facts only. Portable games never request OS permission themselves.
// Persistent alarms currently have an Android provider; other hosts fail closed.
#if #defined(ANDROID_BUILD) {
#import "kryon/notification_android"
}
CollectionNotificationsAllowed :: () -> bool {
#if #defined(ANDROID_BUILD) {
return AndroidNotificationAllowedHost()
}
return false
}
CollectionNotificationsForeground :: () -> bool {
#if #defined(ANDROID_BUILD) {
return AndroidNotificationWindowFocusedHost()
}
return false
}
CollectionNotificationsRequest :: () {
#if #defined(ANDROID_BUILD) {
// Kryon's native permission flow remembers refusal across launches.
unused AndroidNotificationRequestHost()
}
}
+2 -2
View File
@@ -12,7 +12,7 @@
#import "kryon/button_props"
#import "kryon/button_widget"
#import "platform"
#import "shovey/shovey_theme"
#import "profile_palette"
#import "kryon/widget_palette"
#import "apps/appearance"
#import "kryon/drawing_props"
@@ -85,7 +85,7 @@ EntityBack :: () -> bool {
}
EntityFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers: s32) -> bool {
unused WidgetPaletteUse(session, ifx entity_shovey then ShoveyPalette() else AppCoversPalette())
unused WidgetPaletteUse(session, ifx entity_shovey then ShoveyHostPalette() else AppCoversPalette())
defer { unused WidgetPaletteRestore(session) }
Box(session, BoxProps.{.key = cast(u64)49010, .bounds = viewport,
.fill = StyleTokenColorOr("canvas", Color.{239, 246, 244, 255})})
+5 -1
View File
@@ -3,4 +3,8 @@
// that declares a newer one is refused. scripts/check-games.py fails while it
// differs from the standard and the ledger.
GAME_CONTRACT_VERSION :: 1
GAME_HOST_API :: 41
GAME_OLDEST_HOST_API :: 41
GAME_HOST_API :: 42
// The older direct loader has no verified reminder dispatch. Products use
// CollectionHost; do not advertise its API42 authority from the direct loader.
GAME_DIRECT_HOST_API :: 41
+1 -1
View File
@@ -245,7 +245,7 @@ GameAssetsValid :: () -> bool {
if !id.valid || manifest.data[id.start:id.end] != GameAt(host.index).id ||
!contract.valid || contract.value != GAME_CONTRACT_VERSION ||
!module_api.valid || module_api.value != MODULE_ABI ||
!host_api.valid || host_api.value < 1 || host_api.value > GAME_HOST_API ||
!host_api.valid || host_api.value < 1 || host_api.value > GAME_DIRECT_HOST_API ||
!save_schema.valid || save_schema.value < 1 { return false }
read: bool
write: bool
+13
View File
@@ -0,0 +1,13 @@
GameTheme :: #import "shovey/shovey_theme";
HostPalette :: #import "kryon/widget_palette";
// A separately pinned game owns its colours; the native host owns the
// widget types used to draw them.
ShoveyHostPalette :: () -> HostPalette.WidgetPalette {
game := GameTheme.ShoveyPalette()
return HostPalette.WidgetPalette.{
.background = game.background, .base = game.base, .text = game.text,
.selected = game.selected, .selected_text = game.selected_text,
.border = game.border, .danger = game.danger, .warning = game.warning,
.success = game.success, .material = game.material}
}
+3 -2
View File
@@ -2,7 +2,8 @@
"name": "kryon-node-app",
"contract_version": 1,
"module_api": 2,
"host_api": 41,
"host_api": 42,
"oldest_host_api": 41,
"identity": "Stable signed package ID; moving source must not rename installed games",
"frames": {
"matching": "Fields match by name",
@@ -11,7 +12,7 @@
"input": "Only the supervised game receives its frame and input"
},
"required_host_calls": ["ReadAppHost", "WriteAppHost", "ReadAppUiHost", "AppLocaleHost", "AppRecordHost", "SaveAppRecordHost"],
"optional_features": {"friends": "Explicitly unavailable without a connected account; never report an unsent action as sent"},
"optional_features": {"friends": "Explicitly unavailable without a connected account; never report an unsent action as sent", "notifications": "API42: kryon.notification.schedule uses the verified active game's identity, an explicit native permission grant and native selected-game focus; unsupported or denied returns false. Guests cannot request OS permission or address another game's reminders."},
"resources": {"root": "assets/<game>/", "locales": "assets/<game>/locales/<locale>.txt", "preview": "Required real game preview; no host files or texture handles"},
"records": {"scope": "Game and account", "name_bytes_less_than": 64, "value_bytes_less_than": 65536, "save_schema": "Versioned by the game; upgrades preserve older saves"},
"updates": {"signature": "Existing Ed25519 publisher", "identity": "Preserve package ID and publisher pins", "order": "Increasing version and sequence; immutable payload hashes", "gate": "Check the exact bundle in Arcade and an intended Inbe host, including its VM format, before node publication"}
+2 -4
View File
@@ -119,11 +119,9 @@ with tempfile.TemporaryDirectory(prefix='host-', dir=output) as temporary, packa
driver.wait(label='Account', role='text')
driver.press(label='Back', role='button')
driver.key('escape')
driver.wait(label='Node connection', role='button')
driver.press(label='Node connection', role='button')
driver.wait(label='Stay offline', role='button')
driver.press(label='Stay offline', role='button')
driver.wait(label='Shovey', role='button')
assert not driver.find(label='Node connection', role='button'), 'The library has no node controls'
assert not driver.find(label='Refresh library', role='button'), 'The library refreshes by itself'
saved = record.read_bytes()
for name in ('shovey', 'shovey-editor', 'wurm'):
entry = entries[name]
@@ -0,0 +1,7 @@
// Recording OS boundary only; CollectionAllows/Focused/RunFrame stay production.
allowed: bool = true;
foreground: bool;
requests: s32;
CollectionNotificationsAllowed :: () -> bool { return allowed }
CollectionNotificationsForeground :: () -> bool { return foreground }
CollectionNotificationsRequest :: () { requests += 1 }
+185
View File
@@ -0,0 +1,185 @@
#import, file "../src/collection_host.zi";
#import "kryon/Frame"
#import "kryon/tree"
#import "kryon/session"
#import "kryon/geometry"
#import "kryon/widget_host"
#import "kryon/hosted_values"
#import "kryon/app_files"
#import "kryon/app_protocol"
#import "apps/host"
#import "apps/tree"
#import "apps/protocol"
#import "kryon/notification_schedule_host"
#import "std/file"
#import "std/bundle_host"
#import "std/c_string"
#import "std/vec"
#import "std/text_buffer"
#import "game_contract"
#import "entity_host"
Node :: #import "apps/node_types";
using HostValueKind;
Provider :: #import "kryon/notification_schedule";
OS :: #import "collection_notification_platform";
test_session: Session;
Open :: (game: string, protocol: s32, wrong: bool = false, api: s32 = GAME_HOST_API) -> bool {
path: Vec(u8); hash: Vec(u8)
BuilderPrint(*path, "work/notification-api42/%-%.zx", game, protocol)
BuilderPrint(*hash, "work/notification-api42/%-%.sha256", game, protocol)
key := BuilderFinish(path); hash_key := BuilderFinish(hash)
bytes, found := ReadEntireFile(key); digest, hash_found := ReadEntireFile(hash_key)
AppFileFree(key); AppFileFree(hash_key)
if !found || !hash_found { return false }
defer { AppFileFree(bytes); AppFileFree(digest) }
id := ifx game == "wurm" then "xyz.waozi.wurm" else "arcade.shovey"
if wrong { id = "other.game" }
platform := AppPlatform.{.host_api = api, .allows = CollectionAllows,
.call = CollectionCall, .focused = CollectionNotificationFocused}
return AppHostStart(*collection_host, bytes, "fixture.arcade", id, "notification", digest,
"account-a", platform, "", "en", protocol)
}
Draw :: (scenario: s32) -> bool {
runtime := AppHostActiveRuntime(*collection_host)
runtime.app.session = test_session
runtime.app.bounds = Rectangle.{0.0, 0.0, cast(float32)(100 + scenario), 100.0}
runtime.legacy.frame.session = test_session
runtime.legacy.frame.width = 100 + scenario
runtime.legacy.frame.height = 100
runtime.legacy.message.screen = scenario
BeginFrame(test_session, cast(u64)1, runtime.app.bounds)
WidgetHostBegin(test_session, CollectionAssetAllowed)
ran := CollectionRunFrame()
WidgetHostEnd()
return EndFrame(test_session) == FrameStatus.FrameOk && ran && collection_notification_node == null
}
Denied :: (runtime: *AppRuntime) -> bool {
answer: HostValue
unused AppHostNotifications(cast(*void)runtime, HostTextData("notification_schedule"),
HostTextData("DailyNotificationsSupportedHost"), null, 0, *answer)
return answer.kind == cast(s32)HostInteger && answer.integer == 0
}
Boundaries :: () -> bool {
runtime := AppHostActiveRuntime(*collection_host)
if !Denied(runtime) { return false } // out of run
if !AppTreeBegin(*collection_host.tree, collection_host.tree.active) { return false }
runtime.busy = true
runtime.app.mode = APP_FRAME
runtime.legacy.message.action = Node.APP_FRAME
forged: AppRuntime
forged.host = *collection_host; forged.node = runtime.node; forged.busy = true
if !Denied(*forged) { return false }
runtime.controller = true
if !Denied(runtime) { return false }
runtime.controller = false; runtime.retired = true
if !Denied(runtime) { return false }
runtime.retired = false
if runtime.protocol == APPS_NODE_PROTOCOL {
saved := runtime.legacy.id
unused CopyCString("forged.game", runtime.legacy.id[:])
refused := Denied(runtime)
runtime.legacy.id = saved
if !refused { return false }
} else {
saved := runtime.app.expected_id
runtime.app.expected_id = "forged.game"
refused := Denied(runtime)
runtime.app.expected_id = saved
if !refused { return false }
}
runtime.app.mode = APP_BACK; runtime.legacy.message.action = Node.APP_BACK
if !Denied(runtime) { return false }
runtime.app.mode = APP_FRAME; runtime.legacy.message.action = Node.APP_FRAME
active := collection_host.tree.active; collection_host.tree.active = AppHandle.{}
refused := Denied(runtime)
collection_host.tree.active = active
if !refused { return false }
runtime.busy = false
return AppTreeEnd(*collection_host.tree, collection_host.tree.active)
}
#if #defined(ARCADE_API41_GAMES) {
OldGame :: (name: string, id: string) -> bool {
path: Vec(u8); hash: Vec(u8)
BuilderPrint(*path, "build/games/%.zx", name)
BuilderPrint(*hash, "work/notification-api42/%-41.sha256", name)
key := BuilderFinish(path); hash_key := BuilderFinish(hash)
bytes, found := ReadEntireFile(key); digest, hash_found := ReadEntireFile(hash_key)
AppFileFree(key); AppFileFree(hash_key)
if !found || !hash_found { return false }
defer { AppFileFree(bytes); AppFileFree(digest) }
platform := AppPlatform.{.host_api = GAME_HOST_API, .allows = CollectionAllows,
.call = CollectionCall, .focused = CollectionNotificationFocused}
opened := AppHostStart(*collection_host, bytes, "fixture.arcade", id, name, digest,
"account-a", platform, "", "en", APPS_NODE_PROTOCOL)
AppHostStop(*collection_host); AppHostCollect(*collection_host)
return opened
}
}
#program_export
Check :: () -> s32 {
test_session = SessionOpen()
if !SessionValid(test_session) { return 1 }
for protocol: cast(s32)1..2 {
for game: cast(s32)0..1 {
key := ifx game == 0 then "wurm" else "shovey"
OS.allowed = true; OS.foreground = false
if !Open(key, protocol) { return 10 + protocol }
runtime := AppHostActiveRuntime(*collection_host)
Provider.expected_tag = ifx game == 0 then "hosted:xyz.waozi.wurm:wurm.daily_chest" else "hosted:arcade.shovey:shovey.daily-chest"
if !Boundaries() { return 20 + protocol }
collection_notification_requested = false
OS.allowed = false
requests := OS.requests
if !Draw(1) || OS.requests != requests { return 25 + protocol }
OS.foreground = true
if !Draw(1) || !Draw(1) || OS.requests != requests + 1 { return 27 + protocol }
OS.allowed = true; OS.foreground = false
// Real production frame grants permission and forwards typed schedules.
if !Draw(0) { return 30 + protocol }
before := Provider.opened
if !Draw(3) || Provider.opened != before { return 40 + protocol }
OS.foreground = true
if !Draw(2) || Provider.opened != before + 1 { return 50 + protocol }
// Native focus alone, or another selected node, cannot mark opened.
collection_notification_node = runtime.node
other: AppNode
if CollectionNotificationFocused(null, *other) { return 60 + protocol }
entity_visible = true
if CollectionNotificationFocused(null, runtime.node) { return 70 + protocol }
entity_visible = false; collection_notification_node = null
if CollectionNotificationFocused(null, runtime.node) { return 80 + protocol }
no_focus: AppPlatform
collection_host.platform.focused = no_focus.focused
if !Draw(3) || Provider.opened != before + 1 { return 90 + protocol }
collection_host.platform.focused = CollectionNotificationFocused
OS.allowed = false
if !Draw(1) || !Draw(3) || !Draw(4) { return 100 + protocol }
Provider.expected_tag = ifx game == 0 then "hosted:xyz.waozi.wurm:hosted:arcade.shovey:shovey.daily-chest" else "hosted:arcade.shovey:hosted:arcade.shovey:shovey.daily-chest"
if !Draw(5) { return 110 + protocol }
AppHostStop(*collection_host); AppHostCollect(*collection_host)
if protocol == APPS_NODE_PROTOCOL {
if Open(key, protocol, true) { return 120 }
AppHostStop(*collection_host); AppHostCollect(*collection_host)
if Open(key, protocol, false, 41) { return 121 }
AppHostStop(*collection_host); AppHostCollect(*collection_host)
}
}
}
if CollectionAllows(null, null, KRYON_NOTIFICATION_SCHEDULE) { return 122 }
controller: AppNode; controller.collection = true; OS.allowed = true
if CollectionAllows(null, *controller, KRYON_NOTIFICATION_SCHEDULE) { return 123 }
#if #defined(ARCADE_API41_GAMES) {
if !OldGame("chess", "inbe.chess") || !OldGame("shovey", "arcade.shovey") { return 125 }
}
unused SessionClose(test_session)
if Provider.failures != 0 || Provider.daily != 4 || Provider.dated != 4 || Provider.queued != 4 ||
Provider.cancelled != 8 || Provider.opened != 4 { return 124 }
return 0
}
+52
View File
@@ -0,0 +1,52 @@
// A real portable guest; only the native fixture substitutes OS effects.
#import "kryon/notification"
#import "kryon/notification_schedule"
#import "kryon/app_context"
#import "kryon/app_protocol"
#if #defined(APPS_NOTIFICATION_NODE) {
#import "apps/node_types"
#import "apps/node_app"
host_api :: #system_library "host_api";
ReadAppUiHost :: () -> AppUiFrame #foreign host_api;
}
Exercise :: (scenario: s32) -> bool {
tag := "wurm.daily_chest"
#if #defined(APPS_NOTIFICATION_SHOVEY) {
tag = "shovey.daily-chest"
}
props := NotificationProps.{.title = "Chest", .body = "Ready", .tag = tag, .id = 1}
if scenario == 0 || scenario == 1 {
allowed := scenario == 0
dates: [2]s32 = .[20280229, 20300101]
return DailyNotificationsSupported() == allowed &&
ScheduleDailyNotification(props, 19, 0, true, 1793700000000, 127, 20261102) == allowed &&
ScheduleNotificationAt(props, 2028, 2, 29, 19) == allowed &&
ScheduleNotificationDates(props, dates[:], 19) == allowed
}
if scenario == 2 || scenario == 3 { return NotificationAppOpened(tag, 1) == (scenario == 2) }
if scenario == 4 { return CancelDailyNotification(tag, 1) }
return scenario == 5 && CancelDailyNotification("hosted:arcade.shovey:shovey.daily-chest", 1)
}
#if #defined(APPS_NOTIFICATION_NODE) {
Draw :: (message: AppMessage) -> bool {
unused ReadAppUiHost()
return Exercise(message.screen)
}
}
#program_export
Main :: () -> s32 {
#if #defined(APPS_NOTIFICATION_NODE) {
return RunNodeApp(Draw)
} else {
if AppMode() == APP_IDENTIFY {
AppIdentity("notification")
AppDescribe("Arcade notification fixture", "")
return APP_PROTOCOL
}
if AppMode() == APP_FRAME { return ifx Exercise(cast(s32)AppBounds().width - 100) then 0 else -1 }
return 0
}
}
+130
View File
@@ -0,0 +1,130 @@
#!/usr/bin/env python3
"""Portable guests through Arcade's production Collection notification boundary."""
import hashlib
import argparse
import json
import os
from pathlib import Path
import subprocess
ROOT = Path(__file__).resolve().parents[1]
WORK = ROOT / 'work/notification-api42'
ZIRAN = ROOT / 'scripts/ziran.sh'
LOCK = ['--locked']
def run(*args):
subprocess.run(list(map(str, args)), cwd=ROOT, check=True)
def package(name):
return Path(subprocess.check_output([ZIRAN, 'pkg', 'path', name, *LOCK],
cwd=ROOT, text=True).strip())
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--api41-games', action='store_true', help='Also identify the built API41 Chess and Shovey games')
args = parser.parse_args()
for key in ('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY', 'DBUS_SESSION_BUS_ADDRESS',
'SESSION_MANAGER', 'DESKTOP_SESSION', 'XDG_SESSION_ID', 'XDG_SESSION_TYPE'):
os.environ.pop(key, None)
os.environ.update(YUE_DESKTOP_RECOVERY='0', SDL_AUDIODRIVER='dummy', ZIRAN_JOBS='1')
run('git', 'check-ignore', '-q', 'work/')
WORK.mkdir(parents=True, exist_ok=True)
if args.api41_games:
for name in ('chess', 'shovey'):
path = ROOT / 'build/games' / (name + '.zx')
(WORK / (name + '-41.sha256')).write_text(hashlib.sha256(path.read_bytes()).hexdigest())
apps = package('apps')
toolchain = package('ziran')
compiler = toolchain / 'build/bin/zi2c'
if not compiler.is_file():
compiler = ROOT / 'build/toolchain/bin/zi2c'
zx = compiler.with_name('zi2zx')
# Reuse the locked package's maintained recording scheduler provider.
# No package source or cache is modified; only OS effects are substituted.
source = ROOT / 'tests/collection_notifications_guest.zi'
for game, identifier in [('wurm', 'xyz.waozi.wurm'), ('shovey', 'arcade.shovey')]:
assets = WORK / game / 'assets/notification'
assets.mkdir(parents=True, exist_ok=True)
(assets / 'catalog.json').write_text(json.dumps(dict(id=identifier, name='notification',
contract_version=1, module_api=2, host_api=42, save_schema=1)))
for protocol in (1, 2):
defines = ['--define', 'KRYON_HOSTED_UI']
if protocol == 2:
defines += ['--define', 'APPS_NOTIFICATION_NODE']
if game == 'shovey':
defines += ['--define', 'APPS_NOTIFICATION_SHOVEY']
common = ['--project', *LOCK, '--root', ROOT / 'tests',
'--entry', 'collection_notifications_guest:Main', *defines]
path = WORK / f'{game}-{protocol}.zx'
run(ZIRAN, 'bundle', *common, '--asset-dir', 'assets=' + str(assets.parent),
'-o', path, source)
(WORK / f'{game}-{protocol}.sha256').write_text(hashlib.sha256(path.read_bytes()).hexdigest())
ir = WORK / f'ir-{game}-{protocol}'
run(ZIRAN, 'ir', *common, '-o', ir, source)
saved = WORK / f'{game}-{protocol}-saved.zx'
run(zx, 'bundle', '--root', ir, '--module-path', ir,
'--entry', 'collection_notifications_guest:Main', '--asset-dir', 'assets=' + str(assets.parent),
'-o', saved, ir / 'collection_notifications_guest.zir')
if path.read_bytes() != saved.read_bytes():
raise RuntimeError(f'Source/saved guest differs: {game} protocol {protocol}')
lines = (ROOT / 'build/.ziran/module-map.tsv').read_text().splitlines()
replacements = {'notification_schedule': apps / 'tests/notification_provider.zi',
'collection_notification_platform': ROOT / 'tests/collection_notification_native_fixture.zi'}
kryon_id = json.loads((ROOT / 'ziran.lock').read_text())['root']['dependencies']['kryon']
replaced = dict.fromkeys(replacements, 0)
for index, line in enumerate(lines):
fields = line.split('\t')
if len(fields) == 4 and fields[0] == 'M' and fields[2] in replacements:
# Replace only Arcade's own OS facts and its resolved Kryon provider.
if fields[2] == 'collection_notification_platform' and fields[1] != 'root':
continue
if fields[2] == 'notification_schedule' and fields[1] != kryon_id:
continue
fields[3] = str(replacements[fields[2]])
replaced[fields[2]] += 1
lines[index] = '\t'.join(fields)
if any(count != 1 for count in replaced.values()):
raise RuntimeError(f'Expected unique OS providers: {replaced}')
mapping = WORK / 'module-map.tsv'
mapping.write_text('\n'.join(lines) + '\n')
os.environ['ZIRAN_PACKAGE_MAP'] = str(mapping)
output = WORK / 'c'
run(compiler, '--prune-stale', '--module-path', toolchain / 'std', '--no-main',
'--define', 'PLATFORM_DESKTOP', *(['--define', 'ARCADE_API41_GAMES'] if args.api41_games else []),
'--entry', 'collection_notifications_behavior:Check',
'--root', ROOT / 'tests', '-o', output, ROOT / 'tests/collection_notifications_behavior.zi')
(output / 'entry.c').write_text('#include <stdio.h>\n#include "collection_notifications_behavior.h"\n'
'int main(void) { int r=Check(); if(r) fprintf(stderr,"Arcade notification test %d failed\\n",r); return r; }\n')
runtime = ROOT / 'build/ziran/libziran.a'
run('make', '-j1', 'build/ziran/libziran.a')
oqs_source = package('liboqs')
oqs = ROOT / 'build' / ('entity-oqs-' + oqs_source.name)
if not (oqs / 'lib/liboqs.a').is_file():
run('cmake', '-S', oqs_source, '-B', oqs, '-DCMAKE_BUILD_TYPE=MinSizeRel',
'-DBUILD_SHARED_LIBS=OFF', '-DOQS_BUILD_ONLY_LIB=ON', '-DOQS_USE_OPENSSL=OFF',
'-DOQS_DIST_BUILD=OFF', '-DOQS_OPT_TARGET=generic',
'-DOQS_MINIMAL_BUILD=SIG_ml_dsa_44;KEM_ml_kem_768')
run('cmake', '--build', oqs, '--target', 'oqs', '--', '-j1')
libraries = subprocess.check_output(['pkg-config', '--libs', 'sdl2', 'cairo', 'freetype2',
'fontconfig', 'pangocairo', 'gtk+-3.0'], text=True).split()
monocypher = package('monocypher')
includes = [arg for p in [output, *sorted(output.rglob('*'))] if p.is_dir()
for arg in ('-iquote', str(p))]
temporary = WORK / 'test.new'
run(os.environ.get('CC', 'cc'), '-std=c11', '-O1', '-ffunction-sections', '-fdata-sections',
'-I' + str(toolchain / 'include'), *includes, *sorted(output.rglob('*.c')),
runtime, '-I' + str(monocypher / 'src'), monocypher / 'src/monocypher.c',
monocypher / 'src/optional/monocypher-ed25519.c', oqs / 'lib/liboqs.a',
'-Wl,--gc-sections', *libraries, '-lX11', '-l:libcurl.so.4', '-lz', '-lm', '-lpthread', '-o', temporary)
temporary.replace(WORK / 'test')
run(WORK / 'test')
print('Arcade Collection API42: source/saved node/2 + app/1 guests, native schedules, verified identity, permission, focus and tag isolation passed')
if args.api41_games:
print('Arcade API42 host also identified the built API41 Chess and Shovey games')
if __name__ == '__main__':
main()
+4 -3
View File
@@ -288,6 +288,8 @@ class CollectionTests(unittest.TestCase):
(library / "sources.json").write_text(json.dumps(sources))
def stage_four_leaf_wurm_fixture(self):
ledger_path = self.root / "apps/versions.json"
ledger = json.loads(ledger_path.read_text())
registration = self.root / 'games.json'
value = json.loads(registration.read_text())
value.pop('artwork', None)
@@ -303,7 +305,8 @@ class CollectionTests(unittest.TestCase):
(source / "catalog.json").write_text(json.dumps({
"id": "xyz.waozi.wurm", "name": "wurm", "title": "Apfelwurm",
"kind": "game", "contract_version": 1, "module_api": 2, "host_api": 41,
"kind": "game", "contract_version": 1, "module_api": 2,
"host_api": ledger["node_apps"]["wurm"]["host_api"],
"harnesses": ["arcade"], "preview": "assets/wurm-preview.png",
}))
(source / "editor/catalog.json").write_text(json.dumps({
@@ -340,8 +343,6 @@ class CollectionTests(unittest.TestCase):
for name, key in (("wurm", "preview"), ("wurm", "portrait"),
("wurm-editor", "preview"), ("wurm-editor", "portrait")):
self.add_library_copy(name, key, images[f"{name}-{key}"])
ledger_path = self.root / "apps/versions.json"
ledger = json.loads(ledger_path.read_text())
ledger["node_apps"]["wurm-editor"] = {
"id": "xyz.waozi.wurm-editor", "title": "Apfelwurm Editor", "version": "0.1.0",
"sequence": 1, "host_api": 41,
+51 -23
View File
@@ -19,14 +19,12 @@ LEVEL_UPDATES = 'Download new levels when they come out?'
def answer_library_question(driver):
"""Consent to the loopback library, keeping bundled game levels."""
deadline = time.monotonic() + 60
while time.monotonic() < deadline:
if driver.find(label='Connect', role='button', visible=True):
driver.press(label='Connect', role='button')
break
if driver.find(label='Shovey', role='button', visible=True):
break
driver.wait_idle(frames=3)
question = 'Allow fetching content and automatic app updates?'
driver.wait(label=question, role='text')
driver.wait(label='The app library, previews and the apps you’ve downloaded stay up to date automatically.', role='text')
driver.wait(label='Stay offline', role='button')
driver.press(label='Allow', role='button')
driver.wait_gone(label=question, role='text')
driver.wait(label='Shovey', role='button', timeout=60)
if driver.find(label=LEVEL_UPDATES, role='text'):
driver.press(label='Not now', role='button')
@@ -98,7 +96,7 @@ def main():
def size_text(size):
return f"{(size * 10 + 500000) // 1000000 / 10:.1f} MB"
sizes = {name: size_text(entry['bytes']) for name, entry in by_name.items()}
output = root / "build/collection-ui-test"
output = root / "work/collection-ui-test"
# The Classic heading counts its levels, which Shovey's level file lists.
shovey = Path(subprocess.check_output([str(root / "scripts/ziran.sh"), "pkg", "path", "shovey"], text=True).strip())
classic = len(json.loads((shovey / "levels/approved.json").read_text())["levels"])
@@ -114,12 +112,20 @@ def main():
child = subprocess.Popen([str(args.binary.resolve()), *arguments], cwd=root,
env=os.environ | driver.environment() |
{"ARCADE_DATA": str(profile), "ENTITY_DATA": str(profile / "entity"),
"XDG_DATA_HOME": str(profile / "share"),
"XDG_CONFIG_HOME": str(profile / "config"),
"XDG_CACHE_HOME": str(profile / "cache"),
"LANG": "en_US.UTF-8", "ARCADE_PACKAGE_ORIGIN": origin},
stdout=log, stderr=subprocess.STDOUT)
driver.attach(child, log_path)
try:
driver.tree()
yield child
except Exception:
driver.tree()
(output / (name + '-failure-tree.json')).write_text(json.dumps(driver.last, indent=2) + '\n')
capture(child, name + '-failure')
raise
finally:
if child.poll() is None:
child.terminate()
@@ -155,13 +161,14 @@ def main():
assert wurm_card['y'] == classic_card['y'], 'A phone row holds all three covers'
assert 100 <= classic_card['width'] < 200, 'Phone covers must be small cards'
else:
assert classic_card['width'] >= 200 and classic_card['height'] >= 350
# Short landscape windows use wide artwork above the title.
assert classic_card['width'] >= 200 and classic_card['height'] >= 156
assert not driver.find(label='Play', role='button')
assert not driver.find(label='Open', role='button')
for label in ('Shovey', 'Shovey Editor', 'Apfelwurm'):
assert driver.find(label=label, role='text'), 'Every library cover shows its declared title'
driver.wait(label='Apfelwurm', role='button', visible=False)
smallest = (100, 140) if phone else (180, 200)
smallest = (100, 140) if phone else (180, 120)
covers = [node for node in driver.find(role='image', visible=True)
if node['width'] >= smallest[0] and node['height'] >= smallest[1]]
assert len(covers) >= 2, "Apps must use large title-screen artwork"
@@ -233,8 +240,12 @@ def main():
driver.wait(label='Account', role='text')
capture(child, 'arcade-profile')
driver.press(label='Leaderboard', role='button')
driver.wait(label='Leaderboard', role='text')
driver.wait(label='No leaderboard data yet.', role='text')
driver.wait_idle(frames=3)
# Entity uses the native host's navigation. With no installed
# boards its page contains no duplicate heading or empty rows.
assert not driver.find(role='scroll', visible=True), 'An undownloaded game has a board'
assert not driver.find(label='Account', role='text', visible=True)
driver.wait(label='Back', role='button')
capture(child, 'leaderboard-empty')
driver.press(label='Back', role='button')
driver.wait(label='Account', role='text')
@@ -249,9 +260,12 @@ def main():
primary_download()
driver.wait(label=f"Level 1 / {classic}")
answer_level_updates(driver)
driver.wait(label="How do you want to move?", role="text")
driver.press(label="Swipe and tap")
driver.wait_gone(label="How do you want to move?", role="text")
# Desktop input already chooses keyboard controls; touch hosts
# still ask before the first level.
if driver.find(label="How do you want to move?", role="text"):
driver.press(label="Swipe and tap")
driver.wait_gone(label="How do you want to move?", role="text")
driver.wait(label='Restart', role='button')
assert not driver.find(label="Play", role="button"), "Arcade must skip the second title screen"
assert len(driver.find(label="Back", role="button", visible=True)) == 1
driver.press(label="Levels", role="button")
@@ -277,17 +291,22 @@ def main():
driver.wait(label="Shovey Editor", role="button")
driver.press(label='Profile', role='button')
driver.press(label='Leaderboard', role='button')
driver.wait(label='Shovey', role='button')
# A single installed board needs no app selector. Its metric and
# local row still appear, and disappear when that game is removed.
driver.wait(label='Levels solved', role='text')
driver.wait(label='local', role='text')
assert not driver.find(label='Apfelwurm', role='button'), 'An undownloaded game has a board'
assert not driver.find(label='Shovey Editor', role='button'), 'An unranked editor has a board'
capture(child, 'leaderboard-installed')
state = profile / 'resources/state/arcade.shovey.json'
state.parent.mkdir(parents=True, exist_ok=True)
state.write_text('{"v":1,"installed":0,"favorite":0}')
driver.wait(label='No leaderboard data yet.', role='text')
driver.wait_gone(label='Levels solved', role='text')
assert not driver.find(role='scroll', visible=True), 'An uninstalled board kept its rows'
assert not driver.find(label='Shovey', role='button'), 'A retained score kept an uninstalled board visible'
state.write_text('{"v":1,"installed":1,"favorite":0}')
driver.wait(label='Shovey', role='button')
driver.wait(label='Levels solved', role='text')
driver.wait(label='local', role='text')
driver.press(label='Back', role='button')
driver.wait(label='Account', role='text')
driver.press(label='Back', role='button')
@@ -321,8 +340,10 @@ def main():
# The hosted player opens its title before its first steering choice.
driver.wait(label='Play', role='button', timeout=60)
driver.press(label='Play', role='button')
driver.wait(label='How do you want to move?', role='text')
driver.press(label='Swipe', role='button')
wait(lambda: driver.find(label='How do you want to move?', role='text') or
driver.find(label='Pause', role='button'), 'Apfelwurm did not open play or its controls choice')
if driver.find(label='How do you want to move?', role='text'):
driver.press(label='Swipe', role='button')
driver.wait(label='Pause', role='button')
capture(child, 'wurm-playing')
driver.press(label='Pause', role='button')
@@ -332,7 +353,11 @@ def main():
capture(child, 'wurm-title')
driver.key('escape')
driver.wait(label='Shovey', role='button')
for entry in json.loads((root / 'build/arcade.json').read_text())['children']:
exercised = [by_name[name] for name in ('shovey', 'shovey-editor', 'wurm')]
expected_downloads = {entry['sha256'] for entry in exercised}
actual_downloads = {path.stem for path in (profile / 'resources/downloads').glob('*.zx') if path.stem in games}
assert actual_downloads == expected_downloads, 'Only the games opened with consent may download'
for entry in exercised:
path = profile / 'resources/downloads' / (entry['sha256'] + '.zx')
assert hashlib.sha256(path.read_bytes()).hexdigest() == entry['sha256']
requested = list(server['requests'])
@@ -340,7 +365,10 @@ def main():
with application(profile, "restore", "--app", "arcade.shovey"):
driver.wait(label=f"Level 1 / {classic}")
assert progress(record.read_bytes()) == progress(saved), "Classic progress changed on restart"
assert server['requests'] == requested, 'A cached game must reopen offline without downloading'
# Allowed automatic library refresh may retry its metadata while
# offline. Cached game/art bytes must never be requested again.
cached_payloads = games | {json.loads((root / 'build/arcade.json').read_text())['art']['sha256']}
assert not cached_payloads & set(server['requests'][len(requested):]), 'A cached game must reopen offline without downloading'
assert chess.read_bytes() == b"existing private Chess save"
assert not (profile / "inbe.db").exists()
refused = subprocess.run([str(args.binary.resolve()), "--app", "chess"], env=os.environ | {"ARCADE_DATA": str(profile)}, capture_output=True, timeout=10)
+99
View File
@@ -0,0 +1,99 @@
"""Standalone Shovey's editor keeps custom levels as the account's entity
records: levels in the editor's old records are copied over once and stay
in place, new levels are saved as records, and a restart lists each one
once. Runs privately with a throwaway profile and no account."""
import argparse
import contextlib
import json
import os
from pathlib import Path
import subprocess
import sys
def board():
cells = []
for y in range(20):
for x in range(12):
cells.append(12 if x in (0, 11) or y in (0, 19) else 0)
cells[4 * 12 + 6], cells[15 * 12 + 6] = 10, 7
return ''.join(f'{value:02x}' for value in cells)
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--binary', type=Path, required=True)
parser.add_argument('--inbe-source', type=Path, required=True)
args = parser.parse_args()
assert int(os.environ['DISPLAY'].split(':')[-1].split('.')[0]) >= 400
assert os.environ['YUE_DESKTOP_RECOVERY'] == '0'
root = Path(__file__).resolve().parents[1]
output = root / 'build/editor-records-ui-test'
output.mkdir(parents=True, exist_ok=True)
sys.path.insert(0, str(args.inbe_source / 'tests'))
from ui_driver import UiDriver
driver = UiDriver(output / 'driver')
profile = output / 'profile'
subprocess.run(['rm', '-rf', str(profile)], check=True)
old = profile / 'games/arcade.shovey-editor/records'
old.mkdir(parents=True, mode=0o700)
index = 'I1\nnext 2\nlevel 1 0 - 0 - Kept garden\n'
level = f'E1\nboard {board()}\nroute \n'
(old / 'classic-levels').write_text(index)
(old / 'classic-1').write_text(level)
records = profile / 'entity/records/local/levels'
def documents():
return {path.stem: json.loads(path.read_text()) for path in records.glob('*.json')}
@contextlib.contextmanager
def editor(name):
log_path = output / (name + '.log')
with log_path.open('w') as log:
child = subprocess.Popen([str(args.binary.resolve())], cwd=args.binary.resolve().parent,
env=os.environ | driver.environment() |
{'ARCADE_DATA': str(profile), 'LANG': 'en_US.UTF-8'},
stdout=log, stderr=subprocess.STDOUT)
driver.attach(child, log_path)
try:
driver.wait(label='Play', role='button')
driver.press(label='Next', role='button')
driver.press(label='Open', role='button')
driver.wait(label='Explore', role='button')
driver.press(label='Classic', role='button')
driver.wait(label='Story levels', role='text')
yield child
finally:
if child.poll() is None:
child.terminate()
child.wait(timeout=10)
with editor('first'):
driver.wait(label='Kept garden', role='button')
saved = documents()
assert len(saved) == 1, saved
document = next(iter(saved.values()))
assert document['format'] == 'shovey-levels-1' and document['edition'] == 'classic', document
assert document['title'] == 'Kept garden' and document['proof'] == '-', document
assert ''.join(document['levels'][0]['cells']) == board(), 'The copied board changed'
assert isinstance(document['updated_at'], int) and document['updated_at'] > 1700000000
assert (old / 'entity-moved').read_text() == 'M1\nclassic 1\n'
assert (old / 'classic-levels').read_text() == index and (old / 'classic-1').read_text() == level, \
'The old records must stay for older editors'
driver.press(label='New level', role='button')
driver.wait(label='Play', role='button')
driver.key('escape')
driver.wait(label='Kept garden', role='button')
assert len(documents()) == 2, documents()
for path in [profile / 'entity', *(profile / 'entity').rglob('*')]:
assert path.stat().st_mode & 0o077 == 0, f'Non-private record path: {path}'
with editor('again'):
driver.wait(label='Kept garden', role='button')
assert len(driver.find(label='Kept garden', role='button')) == 1, 'The old level was copied twice'
assert len(documents()) == 2, documents()
print("Standalone Shovey's editor: old custom levels copied once into private entity records, kept in place, "
'new levels saved as records and listed once after a restart passed')
if __name__ == '__main__':
main()
+123 -6
View File
@@ -1,4 +1,4 @@
"""Verify standalone Shovey reuses Entity without losing the game."""
"""Verify native Arcade and standalone Shovey reuse the shared Entity profile."""
import argparse
import json
import os
@@ -6,23 +6,140 @@ from pathlib import Path
import subprocess
import sys
import tempfile
from PIL import Image
from PIL import Image, ImageChops
def arcade_profile(binary, inbe_source, root):
"""Exercise the production Arcade entry without accounts or public services."""
sys.path.insert(0, str(inbe_source / 'tests'))
from ui_driver import UiDriver
out = root / 'work/entity-ui-test'
out.mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory(dir=out) as temporary:
data = Path(temporary)
driver = UiDriver(data / 'driver')
env = os.environ | driver.environment() | {
'ARCADE_DATA': str(data / 'arcade'), 'ENTITY_DATA': str(data / 'entity'),
'HOME': str(data), 'XDG_DATA_HOME': str(data / 'share'),
'XDG_CONFIG_HOME': str(data / 'config'), 'XDG_CACHE_HOME': str(data / 'cache'),
'LANG': 'en_US.UTF-8', 'APP_NO_TRAY': '1',
'ARCADE_PACKAGE_ORIGIN': 'http://127.0.0.1:9'}
log_path = out / 'app.log'
with log_path.open('w') as log:
child = subprocess.Popen([str(binary.resolve())], cwd=binary.resolve().parent,
env=env, stdout=log, stderr=subprocess.STDOUT)
driver.attach(child, log_path)
try:
driver.wait(label='Stay offline', role='button')
driver.press(label='Stay offline', role='button')
driver.wait(label='Profile', role='button')
driver.press(label='Profile', role='button')
driver.press(label='Sign in', role='button')
# The native sign-in page includes file recovery before the
# online password. Scroll only this test's private window.
for _ in range(20):
if driver.find(label='Password', role='text_field', visible=True):
break
driver.pointer(500, 650, wheel=-3)
field = driver.wait(label='Password', role='text_field')
assert field['secure'] and field['value'] == '' and field['cursor'] == 0
windows = subprocess.check_output(
['xdotool', 'search', '--onlyvisible', '--pid', str(child.pid)],
env=env, text=True).split()
assert len(windows) == 1
window = windows[0]
assert subprocess.check_output(['xdotool', 'getwindowpid', window],
env=env, text=True).strip() == str(child.pid)
subprocess.run(['xdotool', 'windowfocus', '--sync', window], env=env, check=True)
def keyboard(*keys):
subprocess.run(['xdotool', 'key', '--clearmodifiers', *keys], env=env, check=True)
driver.wait_idle(frames=3)
def field_image(name):
driver.press(label='Username or public ID', role='text_field')
driver.wait_idle(frames=3)
node = driver.wait(label='Password', role='text_field')
path = out / (name + '.png')
subprocess.run(['import', '-window', window, str(path)], env=env, check=True)
with Image.open(path) as picture:
return picture.convert('RGB').crop((round(node['x'] + 14), round(node['y'] + 12),
round(node['x'] + node['width'] - 14), round(node['y'] + node['height'] - 12)))
def star_count(image):
# Bright text stands above the muted placeholder. Each
# ASCII star occupies one separate run of pixel columns.
background = image.getpixel((image.width - 1, image.height // 2))
columns = [any(max(abs(a - b) for a, b in zip(image.getpixel((x, y)), background)) > 90
for y in range(image.height)) for x in range(image.width)]
return sum(lit and (x == 0 or not columns[x - 1]) for x, lit in enumerate(columns))
empty = field_image('empty')
assert star_count(empty) == 0, 'An empty password must not prefill stars'
counts = []
for name, text in [('twelve', 'Ab3defghijkl'), ('thirty-two', 'Ab3' + 'x' * 29),
('unicode', 'Ab3é中🙂')]:
driver.press(label='Password', role='text_field')
assert driver.wait(label='Password', role='text_field')['focused'], 'Password must take focus'
keyboard('ctrl+a')
# Arcade forwards the physical SDL text/modifier path;
# its entry does not consume UiDriver's typed-text queue.
subprocess.run(['xdotool', 'type', '--clearmodifiers', '--delay', '20', text],
env=env, check=True)
image = field_image(name)
groups = star_count(image)
assert groups == len(text), (name, groups, len(text))
counts.append(groups)
assert driver.wait(label='Password', role='text_field')['value'] == ''
driver.press(label='Password', role='text_field')
keyboard('BackSpace')
assert star_count(field_image('backspace')) == 5, 'Backspace removes one Unicode symbol'
driver.press(label='Password', role='text_field')
keyboard('ctrl+a', 'BackSpace')
cleared = field_image('cleared')
assert ImageChops.difference(empty, cleared).getbbox() is None, 'Clearing must restore the empty field'
driver.press(label='Password', role='text_field')
subprocess.run(['xdotool', 'type', '--clearmodifiers', 'Ab3-not-retained'], env=env, check=True)
driver.press(label='Back', role='button')
driver.press(label='Back', role='button')
driver.wait(label='Profile', role='button')
driver.press(label='Profile', role='button')
driver.press(label='Sign in', role='button')
assert driver.wait(label='Password', role='text_field')['cursor'] == 0
assert star_count(field_image('reopened')) == 0, 'Returning must not prefill the old password'
driver.press(label='Back', role='button')
driver.press(label='Back', role='button')
driver.wait(label='Profile', role='button')
(out / 'result.json').write_text(json.dumps({'rendered_stars': counts,
'empty_initially': True, 'empty_after_clear': True,
'empty_after_reopen': True, 'returned_to_library': True}) + '\n')
finally:
if child.poll() is None:
child.terminate()
child.wait(timeout=10)
print('Arcade native Profile: empty password, 12/32/Unicode stars, editing and return navigation passed')
parser = argparse.ArgumentParser()
parser.add_argument('--binary', type=Path, required=True)
parser.add_argument('--inbe-source', type=Path, required=True)
parser.add_argument('--product', choices=('arcade', 'shovey'), default='shovey')
args = parser.parse_args()
assert int(os.environ['DISPLAY'].split(':')[-1].split('.')[0]) >= 400
assert os.environ['YUE_DESKTOP_RECOVERY'] == '0'
root = Path(__file__).resolve().parents[1]
out = root / 'build/entity-ui-test'
if args.product == 'arcade':
arcade_profile(args.binary, args.inbe_source, root)
sys.exit(0)
out = root / 'work/entity-ui-test-shovey'
out.mkdir(parents=True, exist_ok=True)
sys.path.insert(0, str(args.inbe_source / 'tests'))
from ui_driver import UiDriver
with tempfile.TemporaryDirectory(dir=out) as temporary:
data = Path(temporary)
driver = UiDriver(out / 'driver')
env = os.environ | driver.environment() | {'ARCADE_DATA': str(data), 'ENTITY_DATA': str(data / 'shared'), 'LANG': 'en_US.UTF-8'}
env = os.environ | driver.environment() | {'ARCADE_DATA': str(data), 'ENTITY_DATA': str(data / 'shared'),
'XDG_DATA_HOME': str(data / 'share'), 'XDG_CONFIG_HOME': str(data / 'config'),
'XDG_CACHE_HOME': str(data / 'cache'), 'LANG': 'en_US.UTF-8'}
log_path = out / 'app.log'
with log_path.open('w') as log:
child = subprocess.Popen([str(args.binary.resolve())], cwd=args.binary.resolve().parent,
@@ -51,7 +168,7 @@ with tempfile.TemporaryDirectory(dir=out) as temporary:
title.crop((round(profile_button['x']), round(profile_button['y']),
round(profile_button['x'] + profile_button['width']), round(profile_button['y'] + profile_button['height']))).save(out / 'profile-icon.png')
driver.press(label='Profile', role='button')
driver.wait(label='Connect an account', role='button')
driver.wait(label='Sign in', role='button')
driver.wait(label='Profile', role='text')
driver.wait_idle(frames=3)
subprocess.run(['import', '-window', window, str(out / 'profile.png')], env=env, check=True)
@@ -71,7 +188,7 @@ with tempfile.TemporaryDirectory(dir=out) as temporary:
driver.wait(label='Profile', role='button')
before = record.read_bytes() if record.exists() else b''
driver.press(label='Profile', role='button')
driver.wait(label='Connect an account', role='button')
driver.wait(label='Sign in', role='button')
driver.press(label='Back', role='button')
driver.wait(label='Play', role='button')
assert (record.read_bytes() if record.exists() else b'') == before
+26 -15
View File
@@ -210,7 +210,17 @@ def main():
time.sleep(0.05)
driver.wait_idle(frames=20)
with application('consent-refresh') as child:
consent = profile / 'node/node-connection'
def assert_plain_library():
# Players never see node or refresh controls; the library loads by itself.
forbidden = ('refresh library', 'node connection', 'saved library', 'connect node', 'offline_library')
for node in driver.tree():
text = ' '.join(str(node.get(key) or '') for key in ('label', 'text')).lower()
assert not any(word in text for word in forbidden), \
'Node language must not reach players: ' + text
with application('consent-offline') as child:
driver.wait(label='Connect', role='button')
driver.wait_idle(frames=20)
assert not state['requests'], 'No node traffic before consent'
@@ -222,7 +232,9 @@ def main():
driver.wait(label='Shovey', role='button')
driver.wait_idle(frames=20)
assert not state['requests'], 'Offline choice must prevent preview downloads'
driver.press(label='Node connection', role='button')
assert_plain_library()
consent.unlink()
with application('consent-refresh') as child:
driver.wait(label='Connect', role='button')
driver.press(label='Connect', role='button')
driver.wait(label='Node Shovey', role='button', timeout=60)
@@ -231,41 +243,40 @@ def main():
assert any(path.endswith(catalog['art']['sha256'] + '.zx') for path in state['requests']), 'Node previews must be fetched'
assert driver.find(role='image', visible=True), 'Verified previews must draw'
card = driver.wait(label='Node Shovey', role='button')
assert card['y'] >= 88, 'The library must leave room for its connection controls'
assert card['y'] < 88, 'The library must not reserve room for removed controls'
assert_plain_library()
with Image.open(capture(child, 'node-library')) as image:
crop = image.crop((card['x'], card['y'], card['x'] + card['width'], card['y'] + card['height']))
assert len(crop.convert('RGB').getcolors(1000000) or []) > 500, 'The preview must paint actual image pixels'
game_hashes = {entry['sha256'] for entry in catalog['children']}
assert not any(any(digest in path for digest in game_hashes) for path in state['requests']), 'No game payload before Download'
state['revision'] = 1
driver.press(label='Refresh library', role='button')
state['revision'] = 1
with application('automatic-refresh') as child:
# A newer signed library appears without any refresh control.
driver.wait(label='Choano', role='button', timeout=60)
driver.wait(label='Apfelwurm Editor', role='button')
driver.wait_idle(frames=20)
assert_plain_library()
capture(child, 'refreshed-library')
resize(child, 360, 740)
capture(child, 'phone-library')
resize(child, 1000, 820)
assert save.read_bytes() == b'prior saved game'
driver.press(label='Node connection', role='button')
driver.wait(label='Stay offline', role='button')
driver.press(label='Stay offline', role='button')
driver.wait(label='Choano', role='button')
driver.wait_idle(frames=10)
count = len(state['requests'])
driver.wait_idle(frames=40)
assert len(state['requests']) == count, 'Revocation must stop node traffic'
consent.write_text('off\n' + origin)
with application('cached-offline'):
driver.wait(label='Choano', role='button', timeout=60)
driver.wait(label='Apfelwurm Editor', role='button')
driver.wait_idle(frames=40)
assert len(state['requests']) == count, 'Saved offline choice and signed catalog must survive restart'
count = len(state['requests'])
driver.wait_idle(frames=40)
assert len(state['requests']) == count, 'Saved offline choice must stop node traffic'
assert_plain_library()
assert save.read_bytes() == b'prior saved game'
finally:
server.shutdown()
server.server_close()
thread.join()
print('Arcade node consent, signed membership refresh, preview rendering, game download consent and offline restart passed')
print('Arcade node consent, automatic signed membership refresh, preview rendering, game download consent and offline restart passed')
if __name__ == '__main__':
+184 -160
View File
@@ -4,12 +4,21 @@
{
"commit": "907e90ddd4c78f02e0d49e90384e4197f7dcdf26",
"dependencies": {},
"id": "p002f6ed23e3a3576",
"id": "p0002f862b297522d",
"name": "monocypher",
"ref": "master",
"source": true,
"url": "https://github.com/LoupVaillant/Monocypher.git"
},
{
"commit": "b31299434c785d0f2bd82f36b5bfd2fd36ba1216",
"dependencies": {},
"id": "p09fa77e94b0dfc6c",
"name": "rini",
"ref": "main",
"source": true,
"url": "https://github.com/raysan5/rini.git"
},
{
"commit": "2944b2e668e735438d8ce24e47a39be3f5c36af5",
"dependencies": {},
@@ -20,8 +29,7 @@
},
{
"commit": "d74348c2e288ac55740461f7e106cda365b4db4a",
"dependencies": {"apps": "pdea1492d0d16298f", "crypto": "pc23fbf455e97614d", "curl": "p8da229d15597ab5c", "daochi_client": "p89503086b39ba0fb", "entity": "p53f5eefa1f190fe5", "game2d": "pf2f54c7603f6e861", "kryon": "p1f27ccd7e2463271", "kss": "p1b13dda539ed2a39", "liboqs": "p60ff905f3a963886", "mingcute": "pe1027b9d16704793", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "practices": "p71f489a3ce887de0", "qrcode": "p0dfa70137405b096", "rini": "p8ea355e8cb04093e", "sqlite": "p810dc0509cd1b75d"},
"dependency_refs": {"apps": "master", "crypto": "master", "curl": "master", "daochi_client": "master", "entity": "master", "game2d": "master", "kryon": "master", "kss": "master", "liboqs": "main", "mingcute": "master", "monocypher": "master", "oqs": "master", "plot": "master", "practices": "master", "qrcode": "master", "rini": "main", "sqlite": "master"},
"dependencies": {"apps": "pdea1492d0d16298f", "crypto": "pc23fbf455e97614d", "curl": "p1ca0e8d3c19dbe4c", "daochi_client": "p89503086b39ba0fb", "entity": "p53f5eefa1f190fe5", "game2d": "pf2f54c7603f6e861", "kryon": "p1f27ccd7e2463271", "kss": "p1b13dda539ed2a39", "liboqs": "p7bc48564c6b606fe", "mingcute": "pe1027b9d16704793", "monocypher": "p0002f862b297522d", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "practices": "p9079dde0fcc11248", "qrcode": "p0dfa70137405b096", "rini": "p09fa77e94b0dfc6c", "sqlite": "p1d80baafaa5fa18a"},
"id": "p183b01bccc6424e7",
"name": "Inbe",
"ref": "master",
@@ -30,115 +38,24 @@
{
"commit": "1cb9df183089a77c8a16448a556186f30b261a98",
"dependencies": {"kryon": "p1f27ccd7e2463271"},
"dependency_refs": {"kryon": "master"},
"id": "p1b13dda539ed2a39",
"name": "Kss",
"ref": "master",
"url": "https://github.com/kryonlabs/kss.git"
},
{
"commit": "3152a6e501bcc6ed05e9ec2e8ce1f4eb59cc74a2",
"dependencies": {"libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f"},
"dependency_refs": {"libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e"},
"id": "p1f27ccd7e2463271",
"name": "kryon",
"ref": "master",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "2fa52f64eb0c29e8351b437176e896b938ece8e8",
"commit": "19b299005fbe2d895f4ad525cfdae62a2220c3ea",
"dependencies": {},
"id": "p276ae0189cfc10bc",
"name": "wurm_art",
"ref": "2fa52f64eb0c29e8351b437176e896b938ece8e8",
"source": true,
"url": "https://github.com/waozixyz/wurm.git"
},
{
"commit": "4204ef694f54aff644ac6627e74a9fb9bcc6b643",
"dependencies": {"apps": "pdea1492d0d16298f", "entity": "p53f5eefa1f190fe5", "kryon": "pcd450c600194cee7", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "master", "entity": "master", "kryon": "e373b8a7f8821256b86de12dd5ee05a32d373e87", "mingcute": "master"},
"id": "p352b02504698188c",
"name": "Shovey",
"ref": "4204ef694f54aff644ac6627e74a9fb9bcc6b643",
"url": "https://github.com/waozixyz/shovey.git"
},
{
"commit": "6a29dfde2742a5081d477bebefcddf3a733383c5",
"dependencies": {"apps": "p9b5024e78127fbee", "entity": "pca086a043cf8d1f9", "game2d": "p9d83dc63fcae6cd0", "kryon": "pfa65f8437b3d3740", "kss": "paedcd9d605ed94a1", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "5d1541025b33a4b19c6ec73bea19dc314e0ef5cb", "entity": "b8f959234e41a597bde5c3d8508e9c3052897349", "game2d": "fd4541da5ba2b4da9d0489f20ac463c6e6576253", "kryon": "f6299fa1c71a6d9930df7a9a725d1a571adcbc68", "kss": "7b125ad80a1398bd122f9c8e2017ebdb66b9e141", "mingcute": "master"},
"id": "p36c2bd12ffeea1c8",
"name": "Choano",
"ref": "6a29dfde2742a5081d477bebefcddf3a733383c5",
"url": "https://github.com/waozixyz/choano.git"
},
{
"commit": "1844042d1ca751e62e61df7617dba19c98588339",
"dependencies": {},
"id": "p3b3c785a0e17e605",
"name": "libwebp",
"ref": "1844042d1ca751e62e61df7617dba19c98588339",
"source": true,
"url": "https://github.com/webmproject/libwebp.git"
},
{
"commit": "925ceb810d9b6e3b2fcb3e95adb3dd9c35ecb41f",
"dependencies": {"curl": "p8da229d15597ab5c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pb9d1c52c45ad3f51", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "bd34ddbe3b169f3fdec1a93cea1aba9fc3c62bbf", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"id": "p53f5eefa1f190fe5",
"name": "Entity",
"ref": "master",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "619888d404e7d7e441921702c41a5838a8981408",
"dependencies": {},
"id": "p60ff905f3a963886",
"name": "liboqs",
"ref": "main",
"source": true,
"url": "https://github.com/open-quantum-safe/liboqs.git"
},
{
"commit": "970d5e44b1702158cb16469892da6ff50f142427",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"dependency_refs": {"crypto": "master", "oqs": "master"},
"id": "p6af0b5bd9fd0cd31",
"name": "DaochiClient",
"ref": "970d5e44b1702158cb16469892da6ff50f142427",
"url": "https://github.com/ziranlang/daochi-client.git"
},
{
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
"dependencies": {"liboqs": "p60ff905f3a963886"},
"dependency_refs": {"liboqs": "main"},
"id": "p7098ac9cd92f7e5f",
"name": "Oqs",
"ref": "master",
"url": "https://github.com/ziranlang/oqs.git"
},
{
"commit": "8b81994303400255ddb0ee2da49044dbaef4397f",
"dependencies": {},
"id": "p71f489a3ce887de0",
"name": "practices",
"id": "p1ca0e8d3c19dbe4c",
"name": "curl",
"ref": "master",
"source": true,
"url": "https://github.com/waozixyz/practices.git"
},
{
"commit": "f39508361f79a10a57643e97b613b34e434b9834",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pcd450c600194cee7"},
"dependency_refs": {"crypto": "master", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "e373b8a7f8821256b86de12dd5ee05a32d373e87"},
"id": "p7c0e095f496911cc",
"name": "Apps",
"ref": "f39508361f79a10a57643e97b613b34e434b9834",
"url": "https://github.com/waozixyz/apps.git"
"url": "https://github.com/curl/curl.git"
},
{
"commit": "5d1ee888094efc63d1fb25a58af93478b103d441",
"dependencies": {},
"id": "p810dc0509cd1b75d",
"id": "p1d80baafaa5fa18a",
"name": "sqlite",
"ref": "master",
"source": true,
@@ -147,52 +64,131 @@
{
"commit": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf",
"dependencies": {},
"id": "p82dbc05081cd4d96",
"id": "p1dff88558141400b",
"name": "zlib",
"ref": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf",
"source": true,
"url": "https://github.com/madler/zlib.git"
},
{
"commit": "3152a6e501bcc6ed05e9ec2e8ce1f4eb59cc74a2",
"dependencies": {"libwebp": "p651a2c7a393977c0", "raylib": "p5a77c9c35110e925"},
"id": "p1f27ccd7e2463271",
"name": "kryon",
"ref": "master",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "f7ff3e546657a0f90de16802fc9fc4a700412481",
"dependencies": {"libwebp": "p651a2c7a393977c0", "raylib": "p5a77c9c35110e925"},
"id": "p2a656232910109dd",
"name": "kryon",
"ref": "f7ff3e546657a0f90de16802fc9fc4a700412481",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "43701aaf0da1e114df7793bf9876a044b96572e1",
"dependencies": {"curl": "p1ca0e8d3c19dbe4c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "p2a656232910109dd", "monocypher": "p0002f862b297522d", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p1dff88558141400b"},
"id": "p300040f426184cc0",
"name": "Entity",
"ref": "43701aaf0da1e114df7793bf9876a044b96572e1",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "4204ef694f54aff644ac6627e74a9fb9bcc6b643",
"dependencies": {"apps": "pdea1492d0d16298f", "entity": "p53f5eefa1f190fe5", "kryon": "pcd450c600194cee7", "mingcute": "pe1027b9d16704793"},
"id": "p352b02504698188c",
"name": "Shovey",
"ref": "4204ef694f54aff644ac6627e74a9fb9bcc6b643",
"url": "https://github.com/waozixyz/shovey.git"
},
{
"commit": "6a29dfde2742a5081d477bebefcddf3a733383c5",
"dependencies": {"apps": "p9b5024e78127fbee", "entity": "pca086a043cf8d1f9", "game2d": "p9d83dc63fcae6cd0", "kryon": "pfa65f8437b3d3740", "kss": "paedcd9d605ed94a1", "mingcute": "pe1027b9d16704793"},
"id": "p36c2bd12ffeea1c8",
"name": "Choano",
"ref": "6a29dfde2742a5081d477bebefcddf3a733383c5",
"url": "https://github.com/waozixyz/choano.git"
},
{
"commit": "d208dc030fe068ff8a40ed49444536736b4b45d6",
"dependencies": {"kryon": "pcec085fc76d6fd7b"},
"id": "p415d809184a859cd",
"name": "Kss",
"ref": "d208dc030fe068ff8a40ed49444536736b4b45d6",
"url": "https://github.com/kryonlabs/kss.git"
},
{
"commit": "925ceb810d9b6e3b2fcb3e95adb3dd9c35ecb41f",
"dependencies": {"curl": "p1ca0e8d3c19dbe4c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pb9d1c52c45ad3f51", "monocypher": "p0002f862b297522d", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p1dff88558141400b"},
"id": "p53f5eefa1f190fe5",
"name": "Entity",
"ref": "master",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"dependencies": {},
"id": "p5a77c9c35110e925",
"name": "raylib",
"ref": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"source": true,
"url": "https://github.com/raysan5/raylib.git"
},
{
"commit": "1844042d1ca751e62e61df7617dba19c98588339",
"dependencies": {},
"id": "p651a2c7a393977c0",
"name": "libwebp",
"ref": "1844042d1ca751e62e61df7617dba19c98588339",
"source": true,
"url": "https://github.com/webmproject/libwebp.git"
},
{
"commit": "970d5e44b1702158cb16469892da6ff50f142427",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"id": "p6af0b5bd9fd0cd31",
"name": "DaochiClient",
"ref": "970d5e44b1702158cb16469892da6ff50f142427",
"url": "https://github.com/ziranlang/daochi-client.git"
},
{
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
"dependencies": {"liboqs": "p7bc48564c6b606fe"},
"id": "p7098ac9cd92f7e5f",
"name": "Oqs",
"ref": "master",
"url": "https://github.com/ziranlang/oqs.git"
},
{
"commit": "619888d404e7d7e441921702c41a5838a8981408",
"dependencies": {},
"id": "p7bc48564c6b606fe",
"name": "liboqs",
"ref": "main",
"source": true,
"url": "https://github.com/open-quantum-safe/liboqs.git"
},
{
"commit": "256fe6ff049d48a25dfe2a8b0db7ad84477fd282",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"dependency_refs": {"crypto": "master", "oqs": "master"},
"id": "p89503086b39ba0fb",
"name": "DaochiClient",
"ref": "master",
"url": "https://github.com/ziranlang/daochi-client.git"
},
{
"commit": "19b299005fbe2d895f4ad525cfdae62a2220c3ea",
"commit": "8b81994303400255ddb0ee2da49044dbaef4397f",
"dependencies": {},
"id": "p8da229d15597ab5c",
"name": "curl",
"id": "p9079dde0fcc11248",
"name": "practices",
"ref": "master",
"source": true,
"url": "https://github.com/curl/curl.git"
},
{
"commit": "b31299434c785d0f2bd82f36b5bfd2fd36ba1216",
"dependencies": {},
"id": "p8ea355e8cb04093e",
"name": "rini",
"ref": "main",
"source": true,
"url": "https://github.com/raysan5/rini.git"
},
{
"commit": "908884c669ec05421373f3077d4bf5517af21bcd",
"dependencies": {"curl": "p8da229d15597ab5c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pcd450c600194cee7", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "e373b8a7f8821256b86de12dd5ee05a32d373e87", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"id": "p9711cd0a40465e97",
"name": "Entity",
"ref": "908884c669ec05421373f3077d4bf5517af21bcd",
"url": "https://github.com/waozixyz/entity.git"
"url": "https://github.com/waozixyz/practices.git"
},
{
"commit": "5d1541025b33a4b19c6ec73bea19dc314e0ef5cb",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pfa65f8437b3d3740"},
"dependency_refs": {"crypto": "master", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "f6299fa1c71a6d9930df7a9a725d1a571adcbc68"},
"id": "p9b5024e78127fbee",
"name": "Apps",
"ref": "5d1541025b33a4b19c6ec73bea19dc314e0ef5cb",
@@ -201,16 +197,22 @@
{
"commit": "fd4541da5ba2b4da9d0489f20ac463c6e6576253",
"dependencies": {"kryon": "pfa65f8437b3d3740"},
"dependency_refs": {"kryon": "f6299fa1c71a6d9930df7a9a725d1a571adcbc68"},
"id": "p9d83dc63fcae6cd0",
"name": "Game2D",
"ref": "fd4541da5ba2b4da9d0489f20ac463c6e6576253",
"url": "https://github.com/kryonlabs/game2d.git"
},
{
"commit": "5157b63b703981c1e637c78c71b4c475d9699932",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "p2a656232910109dd"},
"id": "pa53467b904293b28",
"name": "Apps",
"ref": "5157b63b703981c1e637c78c71b4c475d9699932",
"url": "https://github.com/waozixyz/apps.git"
},
{
"commit": "3f888653b6b97010163d824c4cc72476be3214f3",
"dependencies": {"kryon": "p1f27ccd7e2463271"},
"dependency_refs": {"kryon": "master"},
"id": "pab5377a2950368a2",
"name": "plot",
"ref": "master",
@@ -219,7 +221,6 @@
{
"commit": "7b125ad80a1398bd122f9c8e2017ebdb66b9e141",
"dependencies": {"kryon": "pfa65f8437b3d3740"},
"dependency_refs": {"kryon": "f6299fa1c71a6d9930df7a9a725d1a571adcbc68"},
"id": "paedcd9d605ed94a1",
"name": "Kss",
"ref": "7b125ad80a1398bd122f9c8e2017ebdb66b9e141",
@@ -227,13 +228,20 @@
},
{
"commit": "bd34ddbe3b169f3fdec1a93cea1aba9fc3c62bbf",
"dependencies": {"libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f"},
"dependency_refs": {"libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e"},
"dependencies": {"libwebp": "p651a2c7a393977c0", "raylib": "p5a77c9c35110e925"},
"id": "pb9d1c52c45ad3f51",
"name": "kryon",
"ref": "bd34ddbe3b169f3fdec1a93cea1aba9fc3c62bbf",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "42db0b20e0fd431f254ea8a06e553accda7d2e84",
"dependencies": {"kryon": "p1f27ccd7e2463271"},
"id": "pbebe1f485bbc1a48",
"name": "Game2D",
"ref": "42db0b20e0fd431f254ea8a06e553accda7d2e84",
"url": "https://github.com/kryonlabs/game2d.git"
},
{
"commit": "944826f70779a6b6cd53f6b06a75b36f4d8a2558",
"dependencies": {},
@@ -242,37 +250,49 @@
"ref": "master",
"url": "https://github.com/ziranlang/crypto.git"
},
{
"commit": "139f299d00f3921b386e07ee1fc5e9fad5216b9b",
"dependencies": {"libwebp": "p651a2c7a393977c0", "raylib": "p5a77c9c35110e925"},
"id": "pc9ddbcb0ebcff235",
"name": "kryon",
"ref": "139f299d00f3921b386e07ee1fc5e9fad5216b9b",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "b8f959234e41a597bde5c3d8508e9c3052897349",
"dependencies": {"curl": "p8da229d15597ab5c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pfa65f8437b3d3740", "monocypher": "p002f6ed23e3a3576", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "f6299fa1c71a6d9930df7a9a725d1a571adcbc68", "monocypher": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"dependencies": {"curl": "p1ca0e8d3c19dbe4c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pfa65f8437b3d3740", "monocypher": "p0002f862b297522d", "qrcode": "p0dfa70137405b096", "zlib": "p1dff88558141400b"},
"id": "pca086a043cf8d1f9",
"name": "Entity",
"ref": "b8f959234e41a597bde5c3d8508e9c3052897349",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"dependencies": {},
"id": "pcc7aa76725f2fb2f",
"name": "raylib",
"ref": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"source": true,
"url": "https://github.com/raysan5/raylib.git"
},
{
"commit": "e373b8a7f8821256b86de12dd5ee05a32d373e87",
"dependencies": {"raylib": "pcc7aa76725f2fb2f"},
"dependency_refs": {"raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e"},
"dependencies": {"raylib": "p5a77c9c35110e925"},
"id": "pcd450c600194cee7",
"name": "kryon",
"ref": "e373b8a7f8821256b86de12dd5ee05a32d373e87",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "7dc62902389544bf8d1fb3a159152cbd3b889c78",
"dependencies": {"libwebp": "p651a2c7a393977c0", "raylib": "p5a77c9c35110e925"},
"id": "pcec085fc76d6fd7b",
"name": "kryon",
"ref": "7dc62902389544bf8d1fb3a159152cbd3b889c78",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "1b7d5c8472e52eecd4de0faa7c94a422a1ade4a3",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pc9ddbcb0ebcff235"},
"id": "pd6fdf2b1210fe2cb",
"name": "Apps",
"ref": "1b7d5c8472e52eecd4de0faa7c94a422a1ade4a3",
"url": "https://github.com/waozixyz/apps.git"
},
{
"commit": "0dd054932180a8e8cda4550af7030b527ee3c285",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pb9d1c52c45ad3f51"},
"dependency_refs": {"crypto": "master", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "bd34ddbe3b169f3fdec1a93cea1aba9fc3c62bbf"},
"id": "pdea1492d0d16298f",
"name": "Apps",
"ref": "master",
@@ -287,36 +307,41 @@
"url": "https://github.com/kryonlabs/mingcute.git"
},
{
"commit": "d32e4b606ece83e8869c954f66c334f44f7b4838",
"dependencies": {"kryon": "p1f27ccd7e2463271"},
"dependency_refs": {"kryon": "master"},
"id": "pe878ed78ee9f8300",
"name": "Game2D",
"ref": "d32e4b606ece83e8869c954f66c334f44f7b4838",
"url": "https://github.com/kryonlabs/game2d.git"
"commit": "a9e6431c8c4d688e9395f7f68d30a6ee726528f9",
"dependencies": {"apps": "pd6fdf2b1210fe2cb", "crypto": "pc23fbf455e97614d", "entity": "pf5085d0b43200dc5", "game2d": "pbebe1f485bbc1a48", "kryon": "pc9ddbcb0ebcff235", "mingcute": "pe1027b9d16704793"},
"id": "pe22548296a8e67a7",
"name": "Apfelwurm",
"ref": "a9e6431c8c4d688e9395f7f68d30a6ee726528f9",
"url": "https://github.com/waozixyz/wurm.git"
},
{
"commit": "2fa52f64eb0c29e8351b437176e896b938ece8e8",
"dependencies": {"apps": "pdea1492d0d16298f", "crypto": "pc23fbf455e97614d", "entity": "p53f5eefa1f190fe5", "kryon": "p1f27ccd7e2463271", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "master", "crypto": "master", "entity": "master", "kryon": "master", "mingcute": "master"},
"dependencies": {},
"id": "pef8c9ab30363ef38",
"name": "Apfelwurm",
"name": "wurm_art",
"ref": "2fa52f64eb0c29e8351b437176e896b938ece8e8",
"source": true,
"url": "https://github.com/waozixyz/wurm.git"
},
{
"commit": "cee04692f3461dcb098833472f071c434980debb",
"dependencies": {"kryon": "p1f27ccd7e2463271"},
"dependency_refs": {"kryon": "master"},
"id": "pf2f54c7603f6e861",
"name": "Game2D",
"ref": "master",
"url": "https://github.com/kryonlabs/game2d.git"
},
{
"commit": "463f3bd4ea7ea8a3ace207cc21d72b3a56287c3b",
"dependencies": {"curl": "p1ca0e8d3c19dbe4c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pc9ddbcb0ebcff235", "monocypher": "p0002f862b297522d", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p1dff88558141400b"},
"id": "pf5085d0b43200dc5",
"name": "Entity",
"ref": "463f3bd4ea7ea8a3ace207cc21d72b3a56287c3b",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "f6299fa1c71a6d9930df7a9a725d1a571adcbc68",
"dependencies": {"raylib": "pcc7aa76725f2fb2f"},
"dependency_refs": {"raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e"},
"dependencies": {"raylib": "p5a77c9c35110e925"},
"id": "pfa65f8437b3d3740",
"name": "kryon",
"ref": "f6299fa1c71a6d9930df7a9a725d1a571adcbc68",
@@ -324,13 +349,12 @@
}
],
"root": {
"dependencies": {"apps": "p7c0e095f496911cc", "choano": "p36c2bd12ffeea1c8", "daochi_client": "p6af0b5bd9fd0cd31", "entity": "p9711cd0a40465e97", "game2d": "pe878ed78ee9f8300", "inbe": "p183b01bccc6424e7", "kryon": "pcd450c600194cee7", "kss": "p1b13dda539ed2a39", "mingcute": "pe1027b9d16704793", "shovey": "p352b02504698188c", "wurm": "pef8c9ab30363ef38", "wurm_art": "p276ae0189cfc10bc"},
"dependency_refs": {"apps": "f39508361f79a10a57643e97b613b34e434b9834", "choano": "6a29dfde2742a5081d477bebefcddf3a733383c5", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "entity": "908884c669ec05421373f3077d4bf5517af21bcd", "game2d": "d32e4b606ece83e8869c954f66c334f44f7b4838", "inbe": "master", "kryon": "e373b8a7f8821256b86de12dd5ee05a32d373e87", "kss": "1cb9df183089a77c8a16448a556186f30b261a98", "mingcute": "master", "shovey": "4204ef694f54aff644ac6627e74a9fb9bcc6b643", "wurm": "2fa52f64eb0c29e8351b437176e896b938ece8e8", "wurm_art": "2fa52f64eb0c29e8351b437176e896b938ece8e8"},
"dependencies": {"apps": "pa53467b904293b28", "choano": "p36c2bd12ffeea1c8", "daochi_client": "p6af0b5bd9fd0cd31", "entity": "p300040f426184cc0", "game2d": "pbebe1f485bbc1a48", "inbe": "p183b01bccc6424e7", "kryon": "p2a656232910109dd", "kss": "p415d809184a859cd", "mingcute": "pe1027b9d16704793", "shovey": "p352b02504698188c", "wurm": "pe22548296a8e67a7", "wurm_art": "pef8c9ab30363ef38"},
"name": "Arcade"
},
"toolchain": {
"commit": "c47f927ca316a0494dff4f2389de3333bc8e08b4",
"ref": "c47f927ca316a0494dff4f2389de3333bc8e08b4",
"commit": "93af347a2a7af4a5a6a88906dbf7808189438b9b",
"ref": "93af347a2a7af4a5a6a88906dbf7808189438b9b",
"url": "https://github.com/ziranlang/ziran.git"
}
}
+7 -7
View File
@@ -7,7 +7,7 @@ bridge_modules = ["app"]
[toolchain]
git = "https://github.com/ziranlang/ziran.git"
ref = "c47f927ca316a0494dff4f2389de3333bc8e08b4"
ref = "93af347a2a7af4a5a6a88906dbf7808189438b9b"
[install]
bin = "arcade"
@@ -29,12 +29,12 @@ abis = "arm64-v8a,x86_64"
[dependencies.kryon]
git = "https://github.com/kryonlabs/kryon.git"
ref = "e373b8a7f8821256b86de12dd5ee05a32d373e87"
ref = "f7ff3e546657a0f90de16802fc9fc4a700412481"
[dependencies.apps]
git = "https://github.com/waozixyz/apps.git"
# Use the shared controller reviewed with the supported collection host.
ref = "f39508361f79a10a57643e97b613b34e434b9834"
ref = "5157b63b703981c1e637c78c71b4c475d9699932"
# Shovey's editions and editor are available as separate downloads.
[dependencies.shovey]
@@ -48,7 +48,7 @@ ref = "master"
[dependencies.entity]
git = "https://github.com/waozixyz/entity.git"
ref = "908884c669ec05421373f3077d4bf5517af21bcd"
ref = "43701aaf0da1e114df7793bf9876a044b96572e1"
[dependencies.mingcute]
git = "https://github.com/kryonlabs/mingcute.git"
@@ -56,11 +56,11 @@ ref = "master"
[dependencies.wurm]
git = "https://github.com/waozixyz/wurm.git"
ref = "2fa52f64eb0c29e8351b437176e896b938ece8e8"
ref = "a9e6431c8c4d688e9395f7f68d30a6ee726528f9"
[dependencies.game2d]
git = "https://github.com/kryonlabs/game2d.git"
ref = "d32e4b606ece83e8869c954f66c334f44f7b4838"
ref = "42db0b20e0fd431f254ea8a06e553accda7d2e84"
[dependencies.choano]
git = "https://github.com/waozixyz/choano.git"
@@ -78,4 +78,4 @@ ref = "970d5e44b1702158cb16469892da6ff50f142427"
[dependencies.kss]
git = "https://github.com/kryonlabs/kss.git"
ref = "1cb9df183089a77c8a16448a556186f30b261a98"
ref = "d208dc030fe068ff8a40ed49444536736b4b45d6"