pkg:clod/com.clodhub/windows-desktop 0.13.0 Turns the web application into an installable Windows program with its own window, locked down by default. Turns a web application into a Windows program that people install and open like any other, with its own window and icon, using Electron. The window shows the application's own web build, packed inside the program and loaded from a private address (such as `ourpoker://app/`), so it works without a web host and nothing on the internet can pose as the application. It is built to be safe by default. The page inside the window gets no access to the computer's files or programs. It may talk to one server, the application's own. Links go to the system browser only when they point to an approved address and the person has just clicked. Downloads, screen recording and opening other pages inside the window are refused. The camera and microphone can be used only after the person has interacted with the window, and never while the window is a shared board (see the display-mode component). The component also builds the desktop version of the web client and packages it, and includes the checks a Windows release runs on the finished program. Examples A family installs the game on the living-room computer. It opens in its own window, connects to the game's server and plays like the web version. A link to the store's page opens in the browser after a click; a link to anywhere else does nothing. When the computer is turned into the shared table view, its camera and microphone stop and stay off until it becomes a player again. If someone copies the program folder elsewhere, it still finds its pages. Package URL: pkg:clod/com.clodhub/windows-desktop@0.13.0 Class: Windows desktop (pkg:clod/com.clodhub/windows-desktop-class@1.1.0): The web client packaged as a Windows desktop application. Any component of this class can fill a recipe slot that asks for it. Category devices-and-hosts/desktop; https://clodhub.com/classes/windows-desktop-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fwindows-desktop-class Provides (1) - desktop-host (com.clodhub/desktop-host 1.0.0): Configured Electron host with local assets and capture and navigation policies (CommonJS modules desktop/src/main.cjs, policy.cjs, shell.cjs, desktop/scripts/build.cjs and verification/desktop.cjs). Call start once before Electron is ready so the scheme and sandbox are registered, with an absolute packaged webRoot. Display mode is read from document.documentElement.dataset.mode and modeEvent refreshes the page marker; only an interacted player main frame may capture; leaving the player page invalidates pending permission checks; closing every window quits the application. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fdesktop-host Requires (1) - windows-desktop-configuration (com.clodhub/windows-desktop-configuration 1.0.0, optional): The application's settings for windows-desktop: the DesktopSettings passed to start and the paths passed to build. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Fwindows-desktop-configuration Settings (0) There are no installer settings. The application gives these values in code to `start` and `build` (or through the optional `windows-desktop-configuration` port); all are required: - `appName`: the program and window title, for example `OurPoker`. - `scheme`: the private address scheme the window loads from: lower-case letters, digits and hyphens, starting with a letter, and not `http`, `https`, `file`, `data` or `javascript`. For example `ourpoker`. - `serverOrigin`: the exact address of the application's server, such as `https://ourpoker-server.example.workers.dev`, with no path, user name or trailing slash. It must be https, except `http://localhost`, `http://127.0.0.1` or `http://[::1]` for a server on the same computer. - `externalOrigins`: the addresses the program may open in the system browser, each https with no path (for example `["https://ourapps.app"]`); an empty list allows none. - `partition`: the name under which the window keeps its storage (preferences, sign-in token), for example `persist:ourpoker`. A name starting `persist:` keeps it between runs. - `modeEvent`: the browser event display-mode sends when the window switches between player and board, for example `app:mode`; the same name as display-mode's. - `webRoot`: for `start`, the folder holding the packaged web build (inside the program, `resources/web`); for `build`, the web project to build. An absolute path. - `outputRoot`: where `build` writes the desktop web build (`desktop/build/web`), an absolute path outside `webRoot`. Depends on components: none How to use in a recipe A recipe uses it through a slot of class Windows desktop (pkg:clod/com.clodhub/windows-desktop-class 1.1.0), naming pkg:clod/com.clodhub/windows-desktop as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (desktop-host) to the slots that use it. What it can use (windows-desktop-configuration) may stay unconnected. It has no settings. - as a slot in recipe.json components: {"id":"windows-desktop","class":{"name":"pkg:clod/com.clodhub/windows-desktop-class","version":"1.1.0","digest":"98e692c42a4389c95477f50a55705b16649f185044a3eb7481bc8efeb371c9c4"},"preferred":{"name":"pkg:clod/com.clodhub/windows-desktop","version":"0.13.0"}} - in place of another component of the class: clod fetch windows-desktop@0.13.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=windows-desktop@0.13.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot windows-desktop) For developers: how an application uses it 1. Build the desktop web client: `build({ webRoot: , outputRoot: })` runs the web project's `npm run build:desktop` with `VITE_DESKTOP=1`. Set `APP_VERSION` and `VITE_APP_VERSION` for the version the program shows. 2. Package that output with electron-builder as `resources/web`, together with the `components/windows-desktop/desktop` sources, so Electron can be found from there. 3. In the program's main file, call `start({ appName, scheme, serverOrigin, externalOrigins, partition, modeEvent, webRoot })` with `webRoot` the packaged `resources/web`. 4. In the web client, publish the mode with display-mode before anything uses the camera or microphone; a window whose mode is unknown is refused capture. `examples/consumer.cjs` shows the calls. Accounts and services None: no accounts and no services. Building the installer needs Node and npm; it can be done on a Mac or on Windows. The installer is not code-signed by this component. How it is checked The required check (`node --test tests/policy.test.cjs tests/result.test.cjs tests/runtime.test.cjs tests/package-staging.test.cjs`) runs without Electron. It checks that the page has no access to the computer, that only the player's own window can use the camera and microphone and only after an interaction, that a switch to board mode cancels a pending request, that downloads, screen capture, redirects and pages opened inside the window are refused, that only the exact configured addresses are allowed, that packaged files cannot be read from outside the web folder, that the web build is made and served after the program is moved, and that packaging copies exactly the right files and refuses links and changed files. Two Windows checks run on the finished program: `node scripts/platform-check.cjs package` builds the unsigned installer from `examples/desktop` and checks its contents, and `node scripts/platform-check.cjs runtime` (Windows x64 only) starts the program, loads the page, and checks navigation, the mode switch and camera access with test devices before and after a switch to board mode. Updates Updates replace the component's files. The window's stored data lives in the `partition` on the person's computer and is not deleted when the program is updated or the component removed; uninstalling the program follows the installer's own rules. Tags: desktop, devices-and-hosts, windows Targets: client windows; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/windows-desktop release v0.13.0; digest sha256:ee3944dbea929250c091f4f0b59634e1c27e7640da5ee263e61930aebc85f16d Release: features Line 0.13: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/windows-desktop/0.13.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/windows-desktop/0.13.0 Bundle download: GET https://clodhub.com/api/components/windows-desktop/0.13.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/windows-desktop-class@1.1.0 98e692c42a4389c95477f50a55705b16649f185044a3eb7481bc8efeb371c9c4 com.clodhub/desktop-host 1.0.0 entry modules: windows desktop/index.cjs shared behaviour suites: shared Platforms: windows Toolchains: node >=26.5.0 <27.0.0 Frameworks: none Styles: scope none; 0 namespaces; 0 conflicts Licence: Apache-2.0; 270 upstream sources, 241 exact dependencies, 324 files (listed on the details page) Suitable for jobs: windows-desktop profile any: cost none; load none; regions any; compliance none Notes: Local Electron host library; runs on the end user's Windows machine. No hosted service, account or measured load. Windows runtime is unverified. Data migration: this component keeps no data Maintainers: Level N Ltd; https://github.com/clodhub/windows-desktop/issues; updates https://github.com/clodhub/windows-desktop/releases (manual) What you download windows-desktop-0.13.0.tar, from release v0.13.0 of clodhub/windows-desktop: 324 files - Documents and manifests (11): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.json, ... - Source code (7): desktop/ (5), verification/ (2) - Tests (5): fixtures/ (1), package-staging.test.cjs, policy.test.cjs, result.test.cjs, runtime.test.cjs - Interface documents (2): desktop-host.json, required-windows-desktop-configuration.json - Class files: the class's interfaces and shared checks (3): windows-desktop-class/ (3) - Examples (8): consumer.cjs, desktop/ (7) - Diagrams (5): definition.json, examples/ (1), output/ (3) - Scripts (4): check-package-rejection.cjs, check-package.cjs, package-consumer.cjs, platform-check.cjs - Licence notices of upstream code (279): npm/ (279) Installing copies 7 of them into the application under components/windows-desktop/: desktop 5, verification 2 Not included: the components that provide what it requires (com.clodhub/windows-desktop-configuration), each a separate download; the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.13.0 features (2026-11-26T11:37:13.864Z) sha256:ee3944dbea929250c091f4f0b59634e1c27e7640da5ee263e61930aebc85f16d Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/windows-desktop/details.txt?version=0.13.0 Page: https://clodhub.com/components/windows-desktop; JSON: https://clodhub.com/api/components/windows-desktop/0.13.0; connections diagram: https://clodhub.com/api/components/windows-desktop/0.13.0/connections.svg Copyright Level N Ltd 2026