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.

Design status: decidedImplementation status: Windows Desktop awaits the signed-release gateDesktop platforms: macOS / WindowsCore runtime: CPython

1. Established design constraints

  1. Python is the core runtime for the OpenProgram backend, CLI, Runtime, and Program execution. Installation must not be simplified by removing Python.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. Desktop packages and CLI runtimes remain read-only during execution. Configuration, sessions, caches, and user-added third-party Programs go into ~/.openprogram.
  7. 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.
  8. stable denotes a published, verified version, not origin/main.main belongs only to development installations.
  9. 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.
  10. pip install openprogram, pipx install openprogram and uv tool install openprogram are 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.
  11. PyInstaller, Briefcase, and py2app are references only and do not replace the existing Electron desktop application.
  12. 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.
  13. 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.
  14. 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.
Definition of complete installation:Every supported nondeveloper installation must have the same capability manifest and contain all declared components and assets, installed and verified. GUI/Research/Wiki packages, Playwright Chromium, GPA detector, and Research PDF support are inside this boundary. PyTorch, torchvision, OpenCV, EasyOCR, sentence-transformers, triton, and NVIDIA/CUDA distributions are outside it. GUI perception paths depending on those exclusions require explicit development or configuration overlays; first use must not implicitly download dependencies. Third-party Programs are additional capabilities explicitly installed by the user.

2. Current implementation and verified gaps

ScopeCurrent implementationDifference from this design
Installation scriptsscripts/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 wheelpyproject.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 UIfrontend.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.
TUIopenprogram_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 installationproduct-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.
Electronapps/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.
Versionpyproject.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.
ReleaseThe 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.
UpgradeThe 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.

ReferenceProvided capabilityMissing or inapplicable capabilityOpenProgram usage
Apple distributionDMG, 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 guidanceThe 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 signingElectron 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 / AppImageLinux 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 BriefcasePython 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.
PyInstallerAssembles 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.
py2appCreates 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 environmentsA 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 Publishingwheel/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.

DESKTOP

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.

CLI / SERVER

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.

DEVELOPMENT

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.

PropertyDesktopCLI / ServerDevelopment
Version sourceGitHub ReleaseSame GitHub ReleaseGit checkout
Product RuntimePlatform runtime archive + ElectronSame platform runtime archiveEquivalent product capabilities + development overlay
System Python / Node.jsNot requiredNot requiredDevelopment toolchain required
System GitRequired for Session/Memory historyRequired for Session/Memory historyRequired for development and history
CapabilitiesComplete capability manifestSame capability manifestSame product capabilities, permitting explicit backend overlays
Upgrade targetPublished complete runtimeSame published complete runtimeExplicit Git ref
Default channelstablestabledev

4.1 Platform support matrix

PlatformNative desktopCLI / ServerBrowser accessDevelopment
macOS arm64 / x64Official support: DMGOfficially supportedLocal or remoteOfficially supported
Linux x86_64No desktop packageComplete runtime verifiedLocal or remoteOfficially supported
Linux arm64No desktop packageComplete runtime verifiedLocal or remoteVerified by Python/Linux gates
Windows x86_64Signed EXE; release gateComplete ZIP runtime + PowerShell installerLocal or remote accessSandbox deferred
iOS / Android / iPadOSNo native applicationNot applicableAccess supported hosts only; no mobile layout commitmentNot 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.

One release buildvX.Y.Z
Pin source, lockfile, first-party Program commits, models, CPython, and uv
→
Platform product runtimeCPython + complete dependencies
Web + Browser + OCR/models
GUI/Research/Wiki Programs
→
Supported public entriesmacOS Desktop: DMG/ZIP
Windows Desktop: signed EXE
macOS/Linux CLI: tar.gz + launcher
Windows CLI: ZIP + PowerShell launcher

Each release generates at least:

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.

Versioned artifacts and installed state are distinct:GitHub Release DMGs, ZIPs, runtime archives, and checksums must include versions and remain permanently associated with the published tag. The local Applications directory retains only the unversioned 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

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

  1. Electron reads the in-app runtime manifest and verifies the complete capability manifest and required files.
  2. Electron uses the in-app Python worker launcher through an explicit absolute path, without searching PATH.
  3. Python starts with -I -B , ignoring system PYTHONPATH, user site-packages, and system Python configuration, and prohibiting bytecode writes into the app.
  4. The launcher sets bundled Playwright Chromium and GPA detector asset paths and imports the pinned first-party Programs.
  5. The worker listens on a local port and returns runtime status and the capability manifest hash through /healthz .
  6. Electron obtains the authenticated URL and loads Web UI. Startup failures show the error category, log location, and repair action.

6.4 Prohibited behavior

6.5 Windows packaging and signing

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:

  1. Resolve the Program source and declarations and write a temporary directory;
  2. Create a staging environment using in-app uv and CPython;
  3. Resolve and install dependencies from all enabled Program manifests, recording exact versions and artifact hashes;
  4. Run import probes, Program registration checks, and worker cold-start probes;
  5. After all pass, atomically switch current; on failure, delete staging and retain the original environment.
Trust boundary:Release-pinned first-party Programs belong to the hash-verified product runtime. Third-party Programs added at runtime fall outside release integrity and must use a separate environment, never overwriting 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

  1. macOS users download the architecture-matched DMG with unsigned in its filename, verify SHA-256, copy the sole OpenProgram.app into Applications replacing the previous version, then approve first launch through “Privacy & Security → Open Anyway.”
  2. 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.
  3. 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.
  4. scripts/refresh-local-app.sh supports 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.
  5. 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.
  6. 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 /healthz success, then open the App. Service ProgramArguments must not retain conda, source-checkout, or deleted-App paths.
  7. 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.
  8. After macOS activation, explicitly register the fixed /Applications/OpenProgram.app with Launch Services. If a subsequent failure restores the old App, best-effort re-register the restored fixed path while preserving the original failure status.
  9. 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.
  10. 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

  1. macOS/Linux uses curl -fsSL https://openprogram.io/install | sh; Windows uses irm https://openprogram.io/install.ps1 | iex. When OPENPROGRAM_VERSION is unspecified, the short bootstrap resolves the stable version through GitHub latest release.
  2. Bootstrap accepts only three-part numeric versions, then downloads the platform-compatible entry from the corresponding immutable tag: scripts/install-release.sh or scripts/install-release.ps1, followed by the official implementation from the same tag.
  3. The official installer downloads the exact OS/architecture runtime archive and checksum from the same GitHub Release, without PyPI access.
  4. After verification, extract into runtime/cli/releases/X.Y.Z under 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.
  5. The installer uses absolute runtime paths for version, capability, first-party Program, Browser/OCR asset, and worker cold-start probes.
  6. After all checks pass, macOS/Linux atomically switches the current symlink; 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

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

9. Security, integrity, and failure handling

ConditionDetectionResult
Missing runtime files or manifest mismatchValidate hashes before Desktop/CLI startupDo not start the worker; show reinstallation instructions.
Missing product capability, default backend, or assetPlatform runtime build and public-entry probeBlock release of the entire platform artifact; no reduced installation.
Old checkout or App overwrites the current AppCompare three-part numeric versions before installation; source refresh requires exact version equality everywhereFail before build, service shutdown, or file writes; retain the current App.
Apple cannot verify macOS file originUnsigned filename, installation instructions, and SHA-256Explicitly instruct manual approval; claim neither Developer ID nor notarization.
System environment injects Python pathsIsolated startup arguments and explicit sys.pathIgnore system environment and user site.
Third-party Program dependencies overwrite core packagesReserved package rules, path ordering, and import probesReject environment activation.
New runtime cannot start or fails capability probesComplete probes before switchingDo not change CLI current; do not publish the Desktop artifact.
Release tag, runtime, Python, and Electron versions disagreerelease workflow version gateBlock 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

  1. Build on native runners from a pinned OpenProgram commit, dependency lock, first-party Program commits, and model sources.
  2. openprogram --version, worker cold-start, /healthz, /chat and hashed Web assets succeed.
  3. All GUI, Research, and Wiki Functions register. Import/asset probes pass for Channels, Search, Playwright Chromium, GPA detector, and Research PDF support.
  4. Verify installed distributions exclude PyTorch, torchvision, OpenCV, EasyOCR, sentence-transformers, triton, and NVIDIA/CUDA entries.
  5. Generate the capability manifest and runtime archive SHA-256; any missing item fails.

10.2 macOS DMG

  1. Verify separately on clean arm64 and x64 environments with system Git but without OpenProgram, Python, or Node.js installed.
  2. Filenames, Release notes, and installation pages explicitly say unsigned; verify “Privacy & Security → Open Anyway.”
  3. 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.
  4. 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

  1. After two consecutive local desktop builds, Applications contains only OpenProgram.app, with no App containing a version, commit, task name, or before suffix.
  2. 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.
  3. A corrupt candidate bundle, copy failure, or activation failure must not delete a usable old App. Successful replacement leaves neither old nor build bundles.
  4. Apps in build and staging paths never execute open; the final launch command accepts only the fixed installation path.
  5. 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.
  6. 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

  1. 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 .
  2. OpenProgram.exe and the NSIS installer must have Valid Authenticode status; missing signing credentials immediately fail release.
  3. Terminal’s Windows PowerShell and Claude presets start through ConPTY. Chrome, Edge, Brave, and Chromium profile discovery pass Windows-path tests.
  4. Updater selects only the exact x64 EXE. Any size/hash/signature failure deletes temporary files and prohibits opening.

10.3 Linux desktop release gate

  1. Linux desktop artifacts must package the same complete runtime as CLI/server, without removing capabilities, Programs, OCR, models, or Browser assets.
  2. They must start through public entries on clean x86_64 Linux without system OpenProgram, Python, Node.js, or Git, and complete all probes offline.
  3. 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.
  4. 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

  1. First-party GUI/Research/Wiki must never appear uninstalled or require first-start wizard installation.
  2. Third-party Programs modify only ~/.openprogram/programs and separate environments, never the product runtime.
  3. After developers replace OCR/Browser backends or enable debugging, the baseline capability manifest must still pass.

10.5 CLI / Server

  1. 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.
  2. Both automatic version resolution and explicit OPENPROGRAM_VERSION version pinning in the short bootstrap require offline entry tests. Resolved versions must be three-part numeric versions; downloads must use the corresponding immutable tag.
  3. Installed runtime archive and capability manifest hashes match the release manifest. macOS and Windows Desktop use the same platform build inputs.
  4. 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.

  1. Tag, runtime archive, Electron package, manifests, and health endpoint report one version.
  2. 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.
  3. Public GitHub Release titles and bodies use English throughout. Workflows reject release notes containing Chinese, Japanese, or Korean characters before publication.
  4. 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.
  5. 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

CapabilityStatusCurrent evidence or gap
Single-port worker hosts WebImplementedThe worker and single-port design jointly provide API, WebSocket, and prebuilt Web UI.
Electron worker monitoring and recoveryImplementedHealth checks, recovery logic, and embedded-Python startup are connected.
Web ships with wheel/runtimeImplementedRelease asset staging, clean-wheel package-resource checks, and platform runtime probes share the same prebuilt assets.
Unified complete capability manifestImplementedSchema 2 pins capabilities, lock hash, first-party Program commits, actual distributions, and asset paths.
First-party Programs, default OCR, and models in runtimeImplementedThe runtime verifier covers GUI/Research/Wiki, GPA detector, Research PDF, and Playwright Chromium.
Desktop and CLI reuse one platform runtime archiveImplementedThe 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 replacementImplementednpm run dist builds the complete runtime and replaces only OpenProgram.app at the fixed Applications path.
macOS icon assetsImplementedLayered AppIcon.icon and version-controlled legacy ICNS both pass build gates.
CPython bundled in macOS DMG/ZIPImplementedarm64/x64 DMG and ZIP use controlled CPython and the complete product runtime.
macOS unsigned DMG/ZIPPublishedThe current channel explicitly says unsigned and publishes SHA-256 manifests.
Windows signed NSIS EXEImplemented; release gate pendingNative workflows require signing secrets, verify app/installer Authenticode, and run packaged runtime smoke tests.
Linux desktop packageNot publishedLinux uses the complete CLI/server runtime without a reduced Desktop substitute.
CLI release installerImplementedmacOS/Linux shell installers and Windows PowerShell installers all perform checksums, complete verification, worker cold-start, and atomic activation.
Tag-driven GitHub ReleaseImplementedThe release workflow uploads platform runtime archives, checksums, Desktop artifacts, developer Python artifacts, and release manifest.
pip / PyPI product installationUnsupportedOrdinary users use only official installers or platform packages. Wheels remain inputs for builds, source development, and testing.
Windows distributionCLI/server and Desktop implementedWindows 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 integrationExplicitly outside scopeThis document does not plan Keychain, keyring, or Credential Manager.
Local refresh completionPending verificationLocal 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

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.

Windows public installer publication

The website assembly publishes install.ps1 at the domain root, next to the POSIX /install entry. A behavioral test executes the actual assembly step against temporary site inputs and checks both root installers byte-for-byte. The bootstrap uses an immutable release tag and never silently falls back to a source checkout. A missing Windows release installer explains that the selected version has no complete Windows release and directs users to the documented source-development installation.

Implementation status: the root-installer assembly regression and independent source reviews pass. Restoring the website entry requires site publication; usable managed Windows installation additionally requires a release containing the versioned installer, complete runtime ZIP and checksum. Local source verification does not establish either publication.

Release platform selection

Release matrices default to macOS and Linux. Set the repository variable OPENPROGRAM_RELEASE_WINDOWS=true to include Windows runtime, installer and Desktop jobs. Windows Desktop publication still requires WINDOWS_CSC_LINK and WINDOWS_CSC_KEY_PASSWORD; missing signing credentials fail the selected release. Platform selection is shared by runtime and installer jobs.

System shell compatibility

The macOS packaged-runtime smoke check supports the system Bash 3.2. Its verifier argument array always includes the runtime directory; the optional deferred-browser flag is appended only when explicitly requested. Normal release validation runs the complete browser check.

Local desktop refresh permissions

The refresh script extracts the installed ASAR, replaces desktop modules, and repacks node-pty as unpacked files. Electron ASAR records executable metadata for packed files only; extraction writes unpacked files with default permissions. This removes execute permission from the node-pty spawn-helper and prevents terminal creation.

The staging step restores original unpacked file modes from the installed unpacked directory before repacking. Known node-pty spawn-helper files under prebuilds and build/Release receive execute bits even when a previous refresh already damaged their installed mode. Other files retain their installed modes. Symlinks are not followed for permission repair.

Reference: the installed @electron/asar insertFile and extractAll implementation. Preserving the unpacked source metadata is adopted; recursive executable chmod and changes to OS privacy permissions are excluded. Signing and installation remain the existing refresh workflow.

Local refresh source integrity

The default /Applications/OpenProgram.app is refreshed only from a committed, clean checkout containing both local main and any locally fetched origin/main. Target paths are resolved before source checks, runtime paths and the installation lock are selected: trailing slashes, dot components and symlink aliases of the default App share the same checks and lock. A genuinely different custom App retains its existing source-check behavior. Tracked edits, staged changes and non-ignored untracked files cause refusal before packaging. The same checks run after packaging and under the installation lock before changing the App, the PATH installation or the worker. Committed HEAD changes during packaging retain the existing rebuild behavior; a later change after the payload is frozen aborts installation. Ignored build outputs and local evidence do not dirty the source gate. GUI Harness continues to use its pinned committed archive, and the existing source/wheel/App version checks remain required. Source-integrity regression tests use temporary Git repositories and fake App/runtime commands; they do not update the installed App. Independent review and combined implementation verification remain pending.