-- cgit v1.2.3 From 77ccbb27ba39db2b8de0fead54a27ce7ebda14ae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:54:49 +0000 Subject: Move configure-store operation before install to fix 404 errors Co-authored-by: tranch <5999732+tranch@users.noreply.github.com> --- user_install_script.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_install_script.sh b/user_install_script.sh index 42bdd38..fac2146 100644 --- a/user_install_script.sh +++ b/user_install_script.sh @@ -69,13 +69,13 @@ if ! (cd /tmp && sha256sum -c decky_client.py.sha256); then exit 1 fi +# Configure the custom store URL first to ensure install requests go to the correct store +python3 "${decky_client}" configure-store "https://${DECKY_PLUGIN_MIRROR_HOST}/plugins" + # Install the plugin python3 "${decky_client}" install \ --store-url "https://${DECKY_PLUGIN_MIRROR_HOST}/plugins" \ --target-id "${DECKY_PLUGIN_TARGET_ID}" -# Configure the custom store URL for future use -python3 "${decky_client}" configure-store "https://${DECKY_PLUGIN_MIRROR_HOST}/plugins" - # Clean up rm -f "${decky_client}" "${decky_client_checksum}" -- cgit v1.2.3 From dc65b3591a6a6fbec3f3b6af875c0907ab782047 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:02:13 +0000 Subject: Add store type configuration to set custom store mode Co-authored-by: tranch <5999732+tranch@users.noreply.github.com> --- decky_client.py | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/decky_client.py b/decky_client.py index 53f8037..5fda567 100644 --- a/decky_client.py +++ b/decky_client.py @@ -295,6 +295,21 @@ async def configure_store_url(store_url: str) -> None: token = await client.get_token() await client.connect(token) + # First, set the store type to 2 (custom) + log(f"Setting store type to custom (2)...") + await client.send(CALL, "utilities/settings/set", ["store", 2]) + + msg = await client.recv() + if msg is None: + raise RuntimeError("Connection closed by server") + + if msg.get("type") == ERROR: + log(f"Server error setting store type: {msg.get('error')}") + raise RuntimeError(f"Failed to set store type: {msg.get('error')}") + + log(f"Store type set to custom") + + # Then, set the custom store URL log(f"Setting custom store URL: {store_url}") await client.send(CALL, "utilities/settings/set", ["store_url", store_url]) @@ -319,17 +334,33 @@ async def configure_store_url(store_url: str) -> None: async def get_store_url() -> str: - """Get the configured custom store URL from Decky settings.""" + """Get the configured custom store URL and type from Decky settings.""" client = DeckyClient() try: log(f"Connecting to Decky server at {client.host}:{client.port}...") token = await client.get_token() await client.connect(token) + # Get store type + log("Getting configured store type...") + await client.send(CALL, "utilities/settings/get", ["store", 0]) + + msg = await client.recv() + if msg is None: + raise RuntimeError("Connection closed by server") + + if msg.get("type") == REPLY: + store_type = msg.get('result') + store_type_name = {0: "default", 1: "testing", 2: "custom"}.get(store_type, f"unknown ({store_type})") + log(f"Current store type: {store_type_name}") + elif msg.get("type") == ERROR: + log(f"Server error: {msg.get('error')}") + raise RuntimeError(f"Failed to get store type: {msg.get('error')}") + + # Get store URL log("Getting configured store URL...") await client.send(CALL, "utilities/settings/get", ["store_url", DEFAULT_STORE_URL]) - # Wait for reply msg = await client.recv() if msg is None: raise RuntimeError("Connection closed by server") -- cgit v1.2.3 From acfb1c85e1f2750b1e5d07f078c6e03b4408c766 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:03:59 +0000 Subject: Refactor: Extract store type names to constant for better maintainability Co-authored-by: tranch <5999732+tranch@users.noreply.github.com> --- __pycache__/mock_decky_server.cpython-312.pyc | Bin 0 -> 29089 bytes decky_client.py | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 __pycache__/mock_decky_server.cpython-312.pyc diff --git a/__pycache__/mock_decky_server.cpython-312.pyc b/__pycache__/mock_decky_server.cpython-312.pyc new file mode 100644 index 0000000..5f59a82 Binary files /dev/null and b/__pycache__/mock_decky_server.cpython-312.pyc differ diff --git a/decky_client.py b/decky_client.py index 5fda567..38726ce 100644 --- a/decky_client.py +++ b/decky_client.py @@ -17,6 +17,13 @@ EVENT = 3 # Default store URL DEFAULT_STORE_URL = "https://plugins.deckbrew.xyz/plugins" +# Store type mapping +STORE_TYPE_NAMES = { + 0: "default", + 1: "testing", + 2: "custom" +} + def log(*args: Any) -> None: """Print formatted logs to stderr.""" @@ -351,7 +358,7 @@ async def get_store_url() -> str: if msg.get("type") == REPLY: store_type = msg.get('result') - store_type_name = {0: "default", 1: "testing", 2: "custom"}.get(store_type, f"unknown ({store_type})") + store_type_name = STORE_TYPE_NAMES.get(store_type, f"unknown ({store_type})") log(f"Current store type: {store_type_name}") elif msg.get("type") == ERROR: log(f"Server error: {msg.get('error')}") -- cgit v1.2.3 From ceb342a61b920fed4fbea2fea6e1c437a8272aee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:04:32 +0000 Subject: Add .gitignore and remove pycache files Co-authored-by: tranch <5999732+tranch@users.noreply.github.com> --- .gitignore | 29 ++++++++++++++++++++++++++ __pycache__/mock_decky_server.cpython-312.pyc | Bin 29089 -> 0 bytes 2 files changed, 29 insertions(+) create mode 100644 .gitignore delete mode 100644 __pycache__/mock_decky_server.cpython-312.pyc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..782e811 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +*.egg-info/ +dist/ +build/ +*.egg + +# Testing +.pytest_cache/ +.coverage +htmlcov/ + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log diff --git a/__pycache__/mock_decky_server.cpython-312.pyc b/__pycache__/mock_decky_server.cpython-312.pyc deleted file mode 100644 index 5f59a82..0000000 Binary files a/__pycache__/mock_decky_server.cpython-312.pyc and /dev/null differ -- cgit v1.2.3 From 05573b3cd6c77986339a7370c4cc12775b216936 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:05:44 +0000 Subject: Fix code style: improve consistency in send/recv patterns Co-authored-by: tranch <5999732+tranch@users.noreply.github.com> --- decky_client.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/decky_client.py b/decky_client.py index 38726ce..f02e490 100644 --- a/decky_client.py +++ b/decky_client.py @@ -305,7 +305,6 @@ async def configure_store_url(store_url: str) -> None: # First, set the store type to 2 (custom) log(f"Setting store type to custom (2)...") await client.send(CALL, "utilities/settings/set", ["store", 2]) - msg = await client.recv() if msg is None: raise RuntimeError("Connection closed by server") @@ -316,11 +315,8 @@ async def configure_store_url(store_url: str) -> None: log(f"Store type set to custom") - # Then, set the custom store URL log(f"Setting custom store URL: {store_url}") await client.send(CALL, "utilities/settings/set", ["store_url", store_url]) - - # Wait for reply msg = await client.recv() if msg is None: raise RuntimeError("Connection closed by server") -- cgit v1.2.3 From ed5433ad7de353aa266a08683075d8363cfb8632 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:28:28 +0000 Subject: Fix: Correct store URL setting key from store_url to store-url Co-authored-by: tranch <5999732+tranch@users.noreply.github.com> --- decky_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decky_client.py b/decky_client.py index f02e490..597a9b3 100644 --- a/decky_client.py +++ b/decky_client.py @@ -316,7 +316,7 @@ async def configure_store_url(store_url: str) -> None: log(f"Store type set to custom") log(f"Setting custom store URL: {store_url}") - await client.send(CALL, "utilities/settings/set", ["store_url", store_url]) + await client.send(CALL, "utilities/settings/set", ["store-url", store_url]) msg = await client.recv() if msg is None: raise RuntimeError("Connection closed by server") @@ -362,7 +362,7 @@ async def get_store_url() -> str: # Get store URL log("Getting configured store URL...") - await client.send(CALL, "utilities/settings/get", ["store_url", DEFAULT_STORE_URL]) + await client.send(CALL, "utilities/settings/get", ["store-url", DEFAULT_STORE_URL]) msg = await client.recv() if msg is None: -- cgit v1.2.3