5. Arcade Host Store (fleetmesh_protocols.arcade)#

fleetmesh_protocols.arcade implements the host-side storage layer and /api/arcade* HTTP route handlers for ROMs, nsite bundles, game engines, and per-user console desktop state. Its browser counterpart is @fleetmesh/arcade.

5.1. Ownership and Legacy Records#

Item metadata mutations are restricted to the item’s owner. Legacy records persisted prior to ownership enforcement (carrying placeholder owners such as user-local or legacy-arcade) are included in listings only when marked public, and all modification, deletion, and annotation requests through the HTTP API are rejected. Host administrators MAY assign ownership to legacy records through StandaloneArcadeStore.assign_legacy_owner(record_ids, owner), which also relocates the associated stored binary assets.

5.2. Store#

Standalone Arcade ROMs, NIP-5A nsites, Game Engines & Console Desktop Store (node.protocols.arcade.store).

Persists and proliferates uploaded ROM cartridges (.gb, .gbc, .wasm, .rom), NIP-5A nsite web application bundles, modular GraspGameEngineEntry records, 1,024-byte RhioBaoTree-verified binary payloads, and per-account ConsoleDesktopState across Desktop and Mobile devices on the mesh.

class fleetmesh_protocols.arcade.store.StandaloneArcadeStore[source]#

Bases: object

In-memory + SQLite-backed store for Arcade items, engines, and Console Desktop state.

__init__(db_path=None, fiber_store=None)[source]#
Parameters:
Return type:

None

list_items(principal=None)[source]#
Parameters:

principal (Mapping[str, Any] | None)

Return type:

List[MutableMapping[str, Any]]

list_deleted_ids()[source]#
Return type:

List[str]

save_item(item, data_b64='', principal=None)[source]#
Parameters:
Return type:

MutableMapping[str, Any]

delete_item(item_id, principal=None)[source]#
Parameters:
Return type:

bool

get_item_binary(item_id, principal=None)[source]#
Parameters:
Return type:

Tuple[bytes, MutableMapping[str, Any]] | None

list_engines(principal=None)[source]#
Parameters:

principal (Mapping[str, Any] | None)

Return type:

List[MutableMapping[str, Any]]

save_engine(engine, principal=None, *, data_b64='')[source]#
Parameters:
Return type:

MutableMapping[str, Any]

delete_engine(engine_id, principal=None)[source]#
Parameters:
Return type:

bool

get_desktop_state(principal=None)[source]#
Parameters:

principal (Mapping[str, Any] | None)

Return type:

MutableMapping[str, Any] | None

save_desktop_state(desktop_state, principal=None)[source]#
Parameters:
Return type:

MutableMapping[str, Any]

list_metadata_map(principal=None)[source]#
Parameters:

principal (Mapping[str, Any] | None)

Return type:

Dict[str, MutableMapping[str, Any]]

save_metadata_record(record, principal=None)[source]#
Parameters:
Return type:

MutableMapping[str, Any]

list_scores()[source]#
Return type:

List[MutableMapping[str, Any]]

save_score(score, principal=None)[source]#
Parameters:
Return type:

MutableMapping[str, Any]

list_repos(principal=None)[source]#
Parameters:

principal (Mapping[str, Any] | None)

Return type:

List[MutableMapping[str, Any]]

save_repo(repo, principal=None)[source]#
Parameters:
Return type:

MutableMapping[str, Any]

assign_legacy_owner(record_ids, owner)[source]#

Give records that carry a legacy placeholder owner to owner, with their stored bytes.

For the host’s own admin code; there is no HTTP route. Every id must name an item, engine or repo with a legacy owner (404 / 409 otherwise, and nothing is assigned).

Parameters:
Return type:

List[str]

snapshot(principal=None)[source]#
Parameters:

principal (Mapping[str, Any] | None)

Return type:

MutableMapping[str, Any]

5.3. Routes#

/api/arcade* HTTP routing for StandaloneArcadeStore (node.protocols.arcade.routes).

fleetmesh_protocols.arcade.routes.handle_arcade_http(store, method, route, query='', body=None, principal=None)[source]#

Route /api/arcade*. principal must come from the server’s own session resolution.

Parameters:
Return type:

Tuple[int, Any, str, Dict[str, str]] | None