OpenProgram installation, packaging, release, and upgrade design
Official releases: v0.9.8
This is the normative source for OpenProgram installation and distribution. It defines user categories and platform support separately, covering macOS/Windows desktop packages, macOS/Linux/Windows CLI and server installations, browser access, Python runtime ownership, Program extension environments, versions, upgrades, and uninstallation. Official-release checking, downloading, platform installation boundaries, and current implementation evidence are detailed inOfficial-release automatic update design.
1. Established design constraints
- Python is the core runtime for the OpenProgram backend, CLI, Runtime, and Program execution. Installation must not be simplified by removing Python.
- macOS Desktop is distributed as DMG/ZIP explicitly labeled
Unsigned. Windows Desktop is distributed only as an Authenticode-signed x64 NSIS installer. Linux publishes only the complete CLI/server runtime. - Every nondeveloper installation uses the same complete product runtime built for its platform and architecture. Desktop adds only the Electron shell; CLI/server adds only command launchers. They must not install different sets of Web, Provider, Channel, Browser, model assets, or first-party Program capabilities.
- The complete product runtime includes pinned CPython, OpenProgram, precompiled Web, Channels, Search, GUI/Research/Wiki first-party Programs, Playwright Chromium, GPA detector weights, Research PDF support, and other manifest dependencies. The GUI Program is installed with
--no-deps. The product runtime explicitly excludes PyTorch, torchvision, OpenCV, EasyOCR, sentence-transformers, triton, and NVIDIA/CUDA distributions. - Ordinary users need no preinstalled Python or Node.js. Session and Memory Git history requires system Git on PATH; the product runtime does not bundle Git. Installers may download the complete runtime archive for the current platform, but cannot label an artifact missing manifest capabilities as a complete installation.
- Desktop packages and CLI runtimes remain read-only during execution. Configuration, sessions, caches, and user-added third-party Programs go into
~/.openprogram. - Development installations add editable source, debugging tools, local Web/Ink builds, test tools, and explicitly configured backend overlays for GUI perception, OCR, Browser, and other components on top of full product capabilities. GUI perception paths requiring PyTorch, OpenCV, or EasyOCR exist only in these overlays, outside ordinary-installation manifest capabilities.
stabledenotes a published, verified version, notorigin/main.mainbelongs only to development installations.- Official installations use no editable checkout, do not build Web or Ink on user machines, depend on no repository directory, and do not resolve product dependencies through PyPI.
pip install openprogram,pipx install openprogramanduv tool install openprogramare not supported product installation entries. Public indexes, introductory documentation, and runtime repair messages must point only to official installers or complete packages. Wheels are used only for release runtime assembly, source development, and testing.- PyInstaller, Briefcase, and py2app are references only and do not replace the existing Electron desktop application.
- The default CLI/server entry for ordinary users is
curl -fsSL https://openprogram.io/install | sh. The site script only resolves the latest stable release, validates its version format, and downloads the installer from that immutable tag. Runtime checksums, capability manifests, and cold-start validation remain the versioned installer’s responsibility. - The only installed macOS App location is the fixed path
/Applications/OpenProgram.app. Local desktop builds generate and validate an App in an unregistered temporary directory, then replace that fixed path. Temporary Apps are neither launched nor retained, and App directory names never contain versions or task names. - Windows x86_64 CLI/server uses the complete ZIP runtime and PowerShell installer. Windows Desktop uses the same runtime archive, a per-user NSIS installer, ConPTY, and mandatory signed-release gates. Windows sandboxing remains a separate layer.
2. Current implementation and verified gaps
| Scope | Current implementation | Difference from this design |
|---|---|---|
| Installation scripts | scripts/install.sh clones the repository, creates or reuses a Python environment, performs an editable install, and runs npm builds locally. | This is development installation behavior, not an official release installer. |
| Python wheel | pyproject.toml defines CLI entry points and package data. Release staging writes precompiled Web assets into the wheel and places a standalone Ink bundle in the platform runtime. | Clean-wheel acceptance of Web assets is complete. Ink runs on the runtime’s platform Node.js and requires no user-installed npm dependencies. |
| Web UI | frontend.py prefers the Server package’s _frontend in release wheels; source checkouts still use apps/web/out. | The current source version baseline is v0.9.8. Retained v0.7.0 clean-wheel/runtime acceptance is historical evidence. Ordinary user machines do not run npm build. |
| TUI | openprogram_cli/_impl/ink.py locates apps/cli/dist in source checkouts, and assets/tui/index.cjs and bin/node in official runtimes. Startup depends on raw-input capability rather than disabling by operating system. | The official CLI provides both the full Ink interface with bundled Node.js and a Rich fallback independent of Node.js raw mode. Windows Terminal / ConPTY is included in local acceptance. |
| Program installation | product-runtime.json pins GUI, Research, and Wiki commits, capability IDs, and the GPA detector source. The runtime builder installs all three Programs at build time; GUI uses --no-deps, Research uses [pdf], and Wiki installs its declared dependencies. | Ordinary users no longer select or add first-party Programs. GUI perception dependencies such as PyTorch, OpenCV, and EasyOCR stay outside the product runtime and require explicit overlays. |
| Electron | apps/desktop/main.js validates the schema 2 capability manifest in packaged mode, resolves bundled CPython and Browser/OCR/model paths from resources, and starts the worker in isolated mode;apps/desktop/package.json declares macOS DMG/ZIP and Windows x64 NSIS, including Windows PowerShell/ConPTY integration points. | macOS arm64/x64 DMG and ZIP have passed release acceptance. Windows assembles the same complete runtime on a native runner, requires application and installer signatures, and runs packaged smoke tests. Linux AppImage has been removed from release configuration. |
| Version | pyproject.toml is the normative version source; Electron metadata retains the copy required by build tools. | The release gate must reject any mismatch among tag, Python metadata, and Electron metadata. |
| Release | The tag workflow first builds complete runtime archives for each platform and architecture. Desktop and CLI installer jobs then download the same-named archive. Publication uses GitHub Release only, without PyPI or macOS notarization jobs. Windows Desktop jobs require signing credentials. | Windows Desktop code and local package/runtime smoke tests are implemented. Public releases must still pass Authenticode gates with real certificates. |
| Upgrade | The CLI release installer downloads a new runtime archive and verifies checksums, capabilities, Browser, Programs, and worker cold-start in a separate directory before switching current. Source-checkout upgrades remain part of the development channel. | The four native CLI installer jobs and isolated macOS arm64 installation for v0.7.0 are historical acceptance evidence. Current source/packaging baseline is v0.9.8; remote latest-release state and installed-client interaction require separate verification. |
3. Official specifications and tool comparison
This design assembles the macOS desktop shell with Electron and electron-builder, the internal product runtime with uv and standard wheels, and distributes complete platform/architecture-specific runtime archives for macOS/Linux/Windows through GitHub Release. Apple, Linux desktop packaging, and PyPA specifications explain distribution options explicitly rejected or restricted here.
| Reference | Provided capability | Missing or inapplicable capability | OpenProgram usage |
|---|---|---|---|
| Apple distribution | DMG, PKG, and ZIP boundaries; Developer ID signing; nested code signing; notarization. | Developer ID requires a paid account and does not assemble Python or Electron at the project level. | Signing service currently rejected: retain DMG structure, but artifacts and installation documentation must say unsigned and describe manual Gatekeeper approval. Never claim Apple verification. |
| Apple app icon guidance / Icon Composer guidance | The current layered format uses a 1024×1024 unmasked canvas, with platform shapes generated by Icon Composer and Xcode. Legacy ICNS requires full 16–1024 px representations. | The currently supported macOS 15 build machine has only Command Line Tools, without full Xcode’s actool, so it cannot directly compile .icon into an Electron-consumable artifact. Electron packages .icns unchanged. | Adopt a compatible implementation: AppIcon.icon stores the maintained Apple layered source; reviewed icon.icns is the version-controlled Electron packaging input. Gates validate layered source, ICNS representations, and final system contour together. No fallback to hand-drawn outer-frame SVGs. |
| Electron distribution / electron-builder signing | Electron resource packaging, macOS signing, publishing, and automatic updates. | Does not provide Python runtimes, Programs, models, or Python dependency resolution. | Adopt and extend: Electron supplies only the Desktop shell and reads exactly the same product runtime archive as CLI. |
| electron-builder Linux targets / AppImage | Linux artifacts including AppImage, deb, rpm, Snap, and Flatpak. AppImage is a single-file artifact requiring no root. | Does not solve Python runtimes, glibc baseline differences, or OpenProgram capability acceptance. The current complete AppImage fails at electron-builder’s block-map stage and has no acceptable artifact. | Publication currently rejected: do not publish reduced packages or claim support for AppImages that have not passed public-entry acceptance. Linux provides product capabilities through the complete CLI/server runtime. |
| BeeWare Briefcase | Python applications, CPython support packages, signed apps, DMG/PKG/ZIP, and notarization. | Generates its own application container, duplicating the existing Electron application’s responsibility. | Adopt the structural principle: Python and dependencies belong in the app bundle; do not adopt Briefcase as the top-level builder. |
| PyInstaller | Assembles interpreter, application, and dependencies into an artifact requiring no preinstalled Python. | Standalone executable packaging does not suit OpenProgram’s Python library entry, dynamic Program discovery, and mutable extension dependencies. | Reject: do not use PyInstaller; retain standard CPython and wheel semantics. |
| py2app | Creates a standalone macOS app containing Python.framework and Mach-O dependencies. | Would also introduce a second app build layer and cannot replace the Electron shell. | Reference: use to check Python.framework, Mach-O, and app bundle layout, without direct adoption. |
| uv environments | A standalone binary independent of Python, virtual environments, fixed interpreter installation targets, Python downloads, and dependency synchronization. | uv tool environments should not be modified directly by pip, conflicting with current Program installation behavior. | Adopt with restrictions: CLI installation and Program environments use controlled uv; do not use uv tool install openprogram as an official installation method. |
| PyPA packaging / PyPI Trusted Publishing | wheel/sdist, entry points, build isolation, and OIDC-based publication. | Wheels lack CPython, browsers, models, and complete first-party Programs, so cannot meet the unified ordinary-user installation contract. | Restrict to developer artifacts: builds continue to use wheels as internal Python source inputs. Ordinary users do not install the product through pip install or PyPI. |
4. User categories and platform support
Three user categories describe installation purpose; the platform matrix describes product commitments. Maintain them separately rather than substituting user categories for platform coverage.
macOS and Windows desktop users
macOS downloads unsigned DMGs; Windows installs signed EXEs only. Desktop bundles the complete product runtime without reading system Python, Node.js, or Git. Linux currently publishes no desktop package.
macOS, Linux, and Windows command-line users
Run a pinned release installer and download the complete runtime archive. Its capabilities match supported Desktop, without an Electron window.
Developers
Clone the repository, adding editable source, tests, debugging, local frontend builds, and replaceable OCR/Browser backends on top of complete product capabilities. Developer wheels are not an ordinary-user installation method.
| Property | Desktop | CLI / Server | Development |
|---|---|---|---|
| Version source | GitHub Release | Same GitHub Release | Git checkout |
| Product Runtime | Platform runtime archive + Electron | Same platform runtime archive | Equivalent product capabilities + development overlay |
| System Python / Node.js | Not required | Not required | Development toolchain required |
| System Git | Required for Session/Memory history | Required for Session/Memory history | Required for development and history |
| Capabilities | Complete capability manifest | Same capability manifest | Same product capabilities, permitting explicit backend overlays |
| Upgrade target | Published complete runtime | Same published complete runtime | Explicit Git ref |
| Default channel | stable | stable | dev |
4.1 Platform support matrix
| Platform | Native desktop | CLI / Server | Browser access | Development |
|---|---|---|---|---|
| macOS arm64 / x64 | Official support: DMG | Officially supported | Local or remote | Officially supported |
| Linux x86_64 | No desktop package | Complete runtime verified | Local or remote | Officially supported |
| Linux arm64 | No desktop package | Complete runtime verified | Local or remote | Verified by Python/Linux gates |
| Windows x86_64 | Signed EXE; release gate | Complete ZIP runtime + PowerShell installer | Local or remote access | Sandbox deferred |
| iOS / Android / iPadOS | No native application | Not applicable | Access supported hosts only; no mobile layout commitment | Not applicable |
Browser access does not make the client operating system a natively supported platform. Servers must use supported macOS, Linux, or Windows installations. Only combinations passing browser and responsive-layout acceptance may be labeled officially supported.
5. One version and one release artifact set
pyproject.toml ’s project version is normative. Electron metadata retains a copy required by build tools. Release gates verify exact equality with runtime manifest, release manifest, and tag. The tag must point to the commit being built.
vX.Y.ZPin source, lockfile, first-party Program commits, models, CPython, and uv
Web + Browser + OCR/models
GUI/Research/Wiki Programs
Windows Desktop: signed EXE
macOS/Linux CLI: tar.gz + launcher
Windows CLI: ZIP + PowerShell launcher
Each release generates at least:
- Complete runtime archives for macOS arm64/x64, Linux x86_64/arm64, and Windows x86_64;
- macOS arm64/x64 unsigned DMG/ZIP and Windows x64 signed EXE;
- Developer wheel/sdist, not ordinary-user installation entries;
- A release manifest with version, capability IDs, first-party Program commits, model identifiers, file sizes, and SHA-256.
The first official release builds arm64 and x64 separately, without universal2. Native Python wheels, Browser, OCR, models, and Electron helpers vary by platform or architecture. Each platform has its own runtime, but every entry in the shared capability manifest must be present and verified, or the entire platform is withheld from release.
OpenProgram.app. Intermediate Apps from local builds are deleted after the installation transaction, not kept as historical versions.6. macOS and Windows desktop packages
6.1 Icon assets
apps/desktop/build/AppIcon.iconis the maintained Apple layered source. Four SVG layers use a 1024×1024 unmasked canvas;apps/desktop/build/icon.icnsis the version-controlled compatibility artifact packaged by Electron.- Legacy ICNS retains the visible extent, rounded contour, transparent corners, and controlled shadow accepted against system Apps. The layered
.iconitself must not pre-draw the system frame. - The lavender cell and its three flat discs stay centered within the safe area, without text, question marks, or embedded rasters. The App icon specification defines the mark.
- Build gates verify layered source structure, brand-graphic constraints, ICNS representations, 256 px contours and solid area, transparent corners, and ICNS round trips. Final Dock, Finder, and Launchpad display is checked only through the installed
/Applications/OpenProgram.app.
6.2 Logical contents
OpenProgram.dmg → OpenProgram.app/Contents/
macOS desktop resource directory
├── MacOS/
│ └── OpenProgram # Electron launcher
├── Frameworks/
│ ├── Electron Framework.framework
│ └── Electron helpers
└── Resources/
├── app.asar # Electron main/preload
└── runtime/
├── python/ # Pinned portable CPython + complete product dependencies
├── bin/uv # Pinned uv
├── wheel/ # Build-time wheel evidence
├── assets/playwright/ # Pinned Playwright Chromium
├── assets/gpa/model.pt # GPA detector weights
└── runtime-manifest.json
Portable CPython for macOS and Linux comes from python-build-standalone artifacts indexed by the pinned uv version. The runtime manifest records OpenProgram, Python, uv, capability results, first-party Program commits, asset paths, and product manifest SHA-256;product-runtime.json records model sources and revisions; the release manifest records final artifact hashes. Never copy arbitrary runtimes from the packaging machine’s system Python.
6.3 Startup
- Electron reads the in-app runtime manifest and verifies the complete capability manifest and required files.
- Electron uses the in-app Python worker launcher through an explicit absolute path, without searching PATH.
- Python starts with
-I -B, ignoring systemPYTHONPATH, user site-packages, and system Python configuration, and prohibiting bytecode writes into the app. - The launcher sets bundled Playwright Chromium and GPA detector asset paths and imports the pinned first-party Programs.
- The worker listens on a local port and returns runtime status and the capability manifest hash through
/healthz. - Electron obtains the authenticated URL and loads Web UI. Startup failures show the error category, log location, and repair action.
6.4 Prohibited behavior
- Do not invoke PATH’s
openprogram,python,nodeorgit. - The running App and automatic updater do not modify their own bundle directly. Only a local installation transaction or verified official-update transaction may replace the fixed
/Applications/OpenProgram.app. - After acquiring the fixed-path installation lock, the local installer copies and validates the candidate App, then rereads and compares the current App against the immutable transaction copy’s version. A lower candidate version must be rejected before stopping the worker or moving files. Version segments use arbitrary-precision decimal integer comparison. An existing fixed path that cannot be verified must be preserved and cause failure; comparison cannot be skipped.
- Same-version development refresh must synchronize Electron main/preload, the official updater implementation, and runtime dependencies. It must not generate an
app.asarreferencing current source while retaining old modules. After the refresh build, verify wheel metadata and recheck source, wheel, and current App inside the fixed-path lock shared with the full installer before stopping the worker or writing Python/asar. - Do not download Python, Web, default Browser, default OCR, detector weights, or first-party Programs on first use.
- Do not read
apps/web/out, Program checkouts, or development configuration from repository directories. - Do not run npm build, pip dependency resolution, or git clone on user machines.
6.5 Windows packaging and signing
- Electron-builder produces an x64 per-user NSIS installer with a selectable directory, running as
asInvoker. - The packaging input is the official Windows runtime ZIP. First use the PowerShell release installer to verify archive, manifest, capabilities, and worker cold-start, then move it into Desktop resources.
- Both application executable and installer must pass Authenticode. Missing certificates or invalid signatures fail the release job; unsigned Windows Desktop must never be uploaded.
- Local unsigned builds are only for development package smoke tests, not public installation entries.
- Terminal uses Windows PowerShell/ConPTY. Browser profile import uses normal Windows installation and Local AppData locations; these paths do not change user ACLs.
7. Complete product runtime and development extensions
Read-only complete product
The platform runtime archive contains CPython, OpenProgram, Web, Channels, Search, Playwright Chromium, GPA detector, Research PDF support, and GUI/Research/Wiki first-party Programs. GUI is installed with --no-deps . The runtime excludes PyTorch, torchvision, OpenCV, EasyOCR, sentence-transformers, triton, and NVIDIA/CUDA distributions. Desktop and CLI reuse this directory without entry-specific capability removal.
Developer and user additions
~/.openprogram contains configuration, sessions, and caches. Developers may explicitly configure GUI perception, OCR, or Browser backend overlays and enable debugging. Users may explicitly install third-party Programs outside the product manifest.
~/.openprogram/ ├── programs/ │ ├── src/<program-id>/ │ ├── manifests/<program-id>.json │ └── environments/ │ └── <runtime-id>/ │ ├── releases/<generation>/ │ └── current -> releases/<generation> ├── config/ ├── sessions/ ├── logs/ └── cache/
runtime-id includes at least CPython minor version, CPU architecture, dependency lock, first-party Program commits, and model identifiers. Desktop and CLI on the same platform/architecture must share runtime IDs and capability manifest hashes.
Third-party Program install, upgrade, and remove use the same transaction:
- Resolve the Program source and declarations and write a temporary directory;
- Create a staging environment using in-app uv and CPython;
- Resolve and install dependencies from all enabled Program manifests, recording exact versions and artifact hashes;
- Run import probes, Program registration checks, and worker cold-start probes;
- After all pass, atomically switch
current; on failure, delete staging and retain the original environment.
openprogram or product dependencies. macOS unsigned artifacts provide neither Apple developer identity nor notarization guarantees. Users must manually allow opening as documented and verify files with GitHub Release checksums.8. Installation, upgrades, and uninstallation
8.1 Desktop installation
- macOS users download the architecture-matched DMG with
unsignedin its filename, verify SHA-256, copy the soleOpenProgram.appinto Applications replacing the previous version, then approve first launch through “Privacy & Security → Open Anyway.” - Windows users download only the exact release-attached
win-x64.exe, verify SHA-256 and Authenticode, and run the per-user NSIS wizard. Versions without a signed EXE use CLI/server. - When local macOS developers run
npm --prefix apps/desktop run dist, the script builds an unpacked App in a random temporary directory, validates bundle identifier, version, main executable, and embedded runtime, then stops the official running App and default worker. A candidate older than the current fixed App must be rejected before any App, worker, or Launch Services changes. scripts/refresh-local-app.shsupports same-version macOS source refresh only: checkout Python/desktop versions, existing bundle, runtime manifest, and bundled Python distribution metadata must match exactly. Any difference fails before wheel build, App shutdown, or runtime writes. Version upgrades require repackaging and installing the full App.- macOS packaging uses a user-level lock independent of worktrees. The installer also holds an atomic lock in the target Applications directory throughout the transaction. Concurrent calls must fail explicitly before changing the App or services; cleanup removes only locks held by the current PID.
- If the default profile has a launchd service, unload its KeepAlive service before replacement, then stop the worker actually holding the lock. After success, reinstall the service with the new App’s embedded Python and
-I -B, wait for/healthzsuccess, then open the App. Service ProgramArguments must not retain conda, source-checkout, or deleted-App paths. - macOS scripts stage on the Applications volume first. Only after staging completes does the old App move temporarily into the same transaction directory and the new App activate. Activation failure restores the old App, launchd service, and prior App/worker running state. Success removes the old App, Python wheel build cache, runtime staging, build directory, and transaction directory.
- After macOS activation, explicitly register the fixed
/Applications/OpenProgram.appwith Launch Services. If a subsequent failure restores the old App, best-effort re-register the restored fixed path while preserving the original failure status. - Both platforms’ Desktop artifacts embed platform runtime archives that passed complete capability probes. First launch creates only configuration and state directories; the worker uses bundled CPython. Packaged-mode authenticated URLs are also generated exclusively by bundled Python, without relying on system CLI.
- Linux has no desktop installation; users install the complete CLI/server runtime and use Web UI or TUI.
8.1.1 Same-version local refresh completion
The local refresh starts the new embedded worker once: installed launchd service installation dispatches its start, otherwise the embedded CLI starts one detached worker. Health polling on default port 18100 has a 120-second deadline and individually bounded probes; polling never issues repeated worker starts. Timeout records the failed health endpoint and worker log location and remains a failure. After the complete App passes code-signing verification, completion cleanup attempts to reopen that same App even if health or worker-identity verification fails. Reopening occurs once, preserves the primary failure status, and reports a secondary reopen failure. Failures before signature verification do not launch a partially updated or unverified App. Cleanup retains its staging-directory removal error while attempting the remaining cleanup. A primary failure takes precedence; otherwise the cleanup error becomes the exit status. Cleanup failure never reports refresh success. Existing committed-source, version, foreign-signature, and lock gates still apply.
8.2 CLI / Server installation
- macOS/Linux uses
curl -fsSL https://openprogram.io/install | sh; Windows usesirm https://openprogram.io/install.ps1 | iex. WhenOPENPROGRAM_VERSIONis unspecified, the short bootstrap resolves the stable version through GitHub latest release. - Bootstrap accepts only three-part numeric versions, then downloads the platform-compatible entry from the corresponding immutable tag:
scripts/install-release.shorscripts/install-release.ps1, followed by the official implementation from the same tag. - The official installer downloads the exact OS/architecture runtime archive and checksum from the same GitHub Release, without PyPI access.
- After verification, extract into
runtime/cli/releases/X.Y.Zunder the user state directory. macOS Desktop uses the same archive as a build input; Linux and Windows use the complete archive directly as the official product entry. - The installer uses absolute runtime paths for version, capability, first-party Program, Browser/OCR asset, and worker cold-start probes.
- After all checks pass, macOS/Linux atomically switches the
currentsymlink; Windows atomically replaces the PowerShell launcher while preserving its predecessor. Failure retains the old version.
8.3 Development installation
Development documentation uses a repository checkout,uv sync, Web/Ink builds, and test tools. Development environments must run the same capability probes as releases and permit explicitly configured OCR/Browser backends, first-party Program source editing, and diagnostics. These overlays do not alter the product manifest.
8.4 Upgrades
- macOS Desktop:Automatically check the latest official Release. Settings downloads the complete architecture-matched DMG, verifies byte count and SHA-256, and opens it for user-confirmed App replacement.
- Windows Desktop:Select the exact signed EXE, verify byte count, SHA-256, and Authenticode, then open it for user-confirmed installation.
- CLI / Server:
openprogram upgradedownloads a new complete runtime archive, validates it in a new version directory, then switchescurrent. Failure preserves the previous version; the user explicitly restarts a running worker. - Development:The same command retains fetch, build, complete capability probes, and restart in source checkouts; the target ref must be explicit.
- Compatibility command:Legacy
updateis a compatibility alias forupgrade; worker startup never automatically applies product updates.
GUI, Research, and Wiki first-party Programs upgrade atomically with the product runtime. Any first-party Program or default-asset validation failure prevents activation of the entire new runtime. Third-party Programs migrate in separate environments; failed migration disables only that third-party Program without changing the verified product capability manifest.
8.5 Uninstallation
- Deleting
OpenProgram.appremoves only the desktop application, retaining by default~/.openprogram. - CLI uninstall removes launchers and OpenProgram-managed CLI runtimes, retaining state by default.
- Only explicit
purgedeletes configuration, sessions, Programs, and caches. Show exact directories and require confirmation before execution.
9. Security, integrity, and failure handling
| Condition | Detection | Result |
|---|---|---|
| Missing runtime files or manifest mismatch | Validate hashes before Desktop/CLI startup | Do not start the worker; show reinstallation instructions. |
| Missing product capability, default backend, or asset | Platform runtime build and public-entry probe | Block release of the entire platform artifact; no reduced installation. |
| Old checkout or App overwrites the current App | Compare three-part numeric versions before installation; source refresh requires exact version equality everywhere | Fail before build, service shutdown, or file writes; retain the current App. |
| Apple cannot verify macOS file origin | Unsigned filename, installation instructions, and SHA-256 | Explicitly instruct manual approval; claim neither Developer ID nor notarization. |
| System environment injects Python paths | Isolated startup arguments and explicit sys.path | Ignore system environment and user site. |
| Third-party Program dependencies overwrite core packages | Reserved package rules, path ordering, and import probes | Reject environment activation. |
| New runtime cannot start or fails capability probes | Complete probes before switching | Do not change CLI current; do not publish the Desktop artifact. |
| Release tag, runtime, Python, and Electron versions disagree | release workflow version gate | Block build or release. |
Release needs no Apple or PyPI credentials. Windows Desktop publication requires code-signing certificate secrets. GitHub Actions creates Releases with the repository-provided short-lived token. First-party Program commits, model sources, and runtime archive hashes enter the release manifest. This document adds no system Keychain, keyring, or Credential Manager integration.
10. Public-entry acceptance criteria
10.1 Platform product runtime
- Build on native runners from a pinned OpenProgram commit, dependency lock, first-party Program commits, and model sources.
openprogram --version, worker cold-start,/healthz,/chatand hashed Web assets succeed.- All GUI, Research, and Wiki Functions register. Import/asset probes pass for Channels, Search, Playwright Chromium, GPA detector, and Research PDF support.
- Verify installed distributions exclude PyTorch, torchvision, OpenCV, EasyOCR, sentence-transformers, triton, and NVIDIA/CUDA entries.
- Generate the capability manifest and runtime archive SHA-256; any missing item fails.
10.2 macOS DMG
- Verify separately on clean arm64 and x64 environments with system Git but without OpenProgram, Python, or Node.js installed.
- Filenames, Release notes, and installation pages explicitly say unsigned; verify “Privacy & Security → Open Anyway.”
- With networking disabled, complete first startup, worker, Web, first-party Program registration, Playwright Chromium, GPA detector, and Research PDF probes. First use must not implicitly install GUI perception overlays.
- The Python path started by Electron and capability manifest hash must come from the embedded runtime archive.
Local complete packaging first uses electron-builder to ad-hoc sign Electron components and complete resource signatures, then a fixed local certificate signs the main OpenProgram App and runtime helpers, followed by strict recursive signature verification. Build mode must not skip component signing because publication certificates are unnecessary. Full App build, strict signature verification, runtime checks, fixed-path installation, and default-worker refresh are verified.
10.2.1 Local fixed-App replacement
- After two consecutive local desktop builds, Applications contains only
OpenProgram.app, with no App containing a version, commit, task name, orbeforesuffix. - When two worktrees or installers run concurrently, only one process enters the target-App transaction. The other fails before changing the App or services. No nested App is created, and the success-log version matches the final installed version.
- A corrupt candidate bundle, copy failure, or activation failure must not delete a usable old App. Successful replacement leaves neither old nor build bundles.
- Apps in build and staging paths never execute
open; the final launch command accepts only the fixed installation path. - Validate the installed bundle identifier, version, main executable, ICNS, and embedded runtime. The bundle, runtime manifest,
openprogram --version, and bundled Python distribution metadata must report the same version. Launch Services needs only the fixed installation path registered. - When checkout version X refreshes fixed-App version Y, only X=Y may proceed. Both X<Y and X>Y require a full App build. Full candidates older than the current App must also be rejected before stopping App and worker.
10.2.2 Windows signed EXE
- Native Windows runners use the same complete runtime ZIP as the CLI installer and validate the runtime manifest, bundled Python, worker health, and Web chat from
win-unpacked. OpenProgram.exeand the NSIS installer must have Valid Authenticode status; missing signing credentials immediately fail release.- Terminal’s Windows PowerShell and Claude presets start through ConPTY. Chrome, Edge, Brave, and Chromium profile discovery pass Windows-path tests.
- Updater selects only the exact x64 EXE. Any size/hash/signature failure deletes temporary files and prohibits opening.
10.3 Linux desktop release gate
- Linux desktop artifacts must package the same complete runtime as CLI/server, without removing capabilities, Programs, OCR, models, or Browser assets.
- They must start through public entries on clean x86_64 Linux without system OpenProgram, Python, Node.js, or Git, and complete all probes offline.
- The current AppImage fails in electron-builder’s block-map stage for the complete runtime, so no artifact passes this gate. Release configuration must neither build nor publish AppImage.
- Restore Linux desktop support claims only after a new complete desktop artifact satisfies every condition in this section.
10.4 Third-party Programs and development overlays
- First-party GUI/Research/Wiki must never appear uninstalled or require first-start wizard installation.
- Third-party Programs modify only
~/.openprogram/programsand separate environments, never the product runtime. - After developers replace OCR/Browser backends or enable debugging, the baseline capability manifest must still pass.
10.5 CLI / Server
- macOS/Linux shell bootstrap and Windows PowerShell bootstrap both resolve the latest stable release and download a pinned runtime archive in clean user environments, without PyPI or repository clones.
- Both automatic version resolution and explicit
OPENPROGRAM_VERSIONversion pinning in the short bootstrap require offline entry tests. Resolved versions must be three-part numeric versions; downloads must use the corresponding immutable tag. - Installed runtime archive and capability manifest hashes match the release manifest. macOS and Windows Desktop use the same platform build inputs.
- Installers run complete probes through absolute runtime paths; old versions remain startable after failed upgrades.
10.6 release
Release notes lead with user-visible changes, provide a platform and architecture download table with direct links to published assets, and separate upgrade instructions from developer recovery details. Installation commands stay in copyable code blocks. Documentation-only release-note corrections update the canonical notes and public release body without moving the tag or replacing artifacts.
- Tag, runtime archive, Electron package, manifests, and health endpoint report one version.
- GitHub Release contains macOS runtime archives and unsigned DMG/ZIP, Linux runtime archives, Windows runtime ZIP and signed Desktop EXE, checksums, and capability manifest. It excludes Linux desktop packages failing gates and unsigned Windows Desktop.
- Public GitHub Release titles and bodies use English throughout. Workflows reject release notes containing Chinese, Japanese, or Korean characters before publication.
- Ordinary-user documentation, site indexes, and product-runtime errors must not contain
pip install openprogram, PyPI product-download entries, optional-by-default Programs, or component-installation steps. Missing bundled dependencies require reinstalling the complete product. - Published tags are immutable; fixes use a higher patch version.
Implementation record:Task breakdown, RED/GREEN, reviews, and gate records are in Installation and distribution implementation plan. That record does not change this document’s conceptual boundaries.
11. Implementation status
| Capability | Status | Current evidence or gap |
|---|---|---|
| Single-port worker hosts Web | Implemented | The worker and single-port design jointly provide API, WebSocket, and prebuilt Web UI. |
| Electron worker monitoring and recovery | Implemented | Health checks, recovery logic, and embedded-Python startup are connected. |
| Web ships with wheel/runtime | Implemented | Release asset staging, clean-wheel package-resource checks, and platform runtime probes share the same prebuilt assets. |
| Unified complete capability manifest | Implemented | Schema 2 pins capabilities, lock hash, first-party Program commits, actual distributions, and asset paths. |
| First-party Programs, default OCR, and models in runtime | Implemented | The runtime verifier covers GUI/Research/Wiki, GPA detector, Research PDF, and Playwright Chromium. |
| Desktop and CLI reuse one platform runtime archive | Implemented | The release workflow builds one runtime archive per platform/architecture. macOS/Windows Desktop and CLI jobs consume the same-named artifact. |
| Local single-App build and replacement | Implemented | npm run dist builds the complete runtime and replaces only OpenProgram.app at the fixed Applications path. |
| macOS icon assets | Implemented | Layered AppIcon.icon and version-controlled legacy ICNS both pass build gates. |
| CPython bundled in macOS DMG/ZIP | Implemented | arm64/x64 DMG and ZIP use controlled CPython and the complete product runtime. |
| macOS unsigned DMG/ZIP | Published | The current channel explicitly says unsigned and publishes SHA-256 manifests. |
| Windows signed NSIS EXE | Implemented; release gate pending | Native workflows require signing secrets, verify app/installer Authenticode, and run packaged runtime smoke tests. |
| Linux desktop package | Not published | Linux uses the complete CLI/server runtime without a reduced Desktop substitute. |
| CLI release installer | Implemented | macOS/Linux shell installers and Windows PowerShell installers all perform checksums, complete verification, worker cold-start, and atomic activation. |
| Tag-driven GitHub Release | Implemented | The release workflow uploads platform runtime archives, checksums, Desktop artifacts, developer Python artifacts, and release manifest. |
| pip / PyPI product installation | Unsupported | Ordinary users use only official installers or platform packages. Wheels remain inputs for builds, source development, and testing. |
| Windows distribution | CLI/server and Desktop implemented | Windows x86_64 uses complete ZIP runtimes, PowerShell installers, and atomic launchers. Desktop uses the same runtime, signed NSIS, ConPTY, update-signature validation, and native CI. Sandboxing proceeds separately. |
| System credential-store integration | Explicitly outside scope | This document does not plan Keychain, keyring, or Credential Manager. |
| Local refresh completion | Pending verification | Local refresh completion: Public-script regression cases and affected distribution tests pass in isolation. Contracts include an optional model-catalogue cache skip. Independent reviews and installed-App acceptance remain pending. |
12. Explicit exclusions
- macOS App Store, Developer ID signing, and notarization;
- System Keychain, keyring, Credential Manager, or similar credential-store integration;
- Rewriting OpenProgram to eliminate Python;
- Replacing Electron with PyInstaller, Briefcase, py2app, or Tauri;
- Per-Program process isolation in the first phase;
- Automatic installation of arbitrary third-party Programs;
- Treating replaceable OCR, stealth/agent-browser backends, or debugging tools as ordinary-user product dependencies.
Related designs:Single-port worker and frontend; Self-update. This document takes precedence for conflicting installation/distribution content and is referenced by related designs.
Release build inputs
Clean release runners receive a pinned Office resource archive from the draft release. The archive contains only inventoried editor resources, source materials and licenses. Builders verify its SHA-256 and the Office manifest before staging. A release retry can dispatch the existing immutable tag through a newer build controller; every product checkout remains pinned to that tag. Publication uploads the complete artifact manifest and finalizes the draft only after every native build and installer check succeeds. An already public release is never overwritten.