From 27f960743495c8deb9e7227465506021a489102d Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sat, 21 Nov 2026 15:48:26 -0700 Subject: [PATCH] docs(packaging): installing, the unit's claims, status, and the git decision; the Linux packages depend on git (P15 C1) docs/install.md is three short sections for a person installing. docs/packaging.md records what the installed app is on each system, why NSIS and the macOS bundle are scripts of our own, how signing is wired with the owner's secrets, what was left out, and what bundling git would require (GPL-2.0, separate program, unmodified: notices, source offer), which stays the owner's decision. WB-pkg-1 to WB-pkg-8 are the product rules. The Linux packages, the AUR file and the rpm now depend on git, so the package manager fetches it and a Linux person never meets the missing-git words. Co-Authored-By: Claude Fable 5.2 --- crates/ledger-cli/Cargo.toml | 2 + crates/ledger-cli/tests/extension.rs | 6 +- crates/ledger-cli/tests/packaging.rs | 24 ++++ crates/ledger-host/src/extension.rs | 10 +- deploy/README.md | 3 + deploy/packaging/aur/PKGBUILD | 2 +- deploy/packaging/packager.toml | 6 +- docs/install.md | 63 ++++++++++ docs/packaging.md | 92 +++++++++++++- docs/spec/claims/packaging.md | 175 +++++++++++++++++++++++++++ plan/STATUS.md | 29 +++++ 11 files changed, 399 insertions(+), 13 deletions(-) create mode 100644 docs/install.md create mode 100644 docs/spec/claims/packaging.md diff --git a/crates/ledger-cli/Cargo.toml b/crates/ledger-cli/Cargo.toml index ff19b180..a992303d 100644 --- a/crates/ledger-cli/Cargo.toml +++ b/crates/ledger-cli/Cargo.toml @@ -75,6 +75,8 @@ workspace = true # program: `just package-linux`. Paths are relative to the workspace root. [package.metadata.generate-rpm] name = "wanderbooks" +# Backups run the system's git (WB-pkg-4): dnf fetches it. +requires = { git = "*" } summary = "Double-entry bookkeeping your agent keeps and you can read" license = "MIT OR Apache-2.0" url = "https://wanderbooks.ai" diff --git a/crates/ledger-cli/tests/extension.rs b/crates/ledger-cli/tests/extension.rs index da9a213a..1c0bda51 100644 --- a/crates/ledger-cli/tests/extension.rs +++ b/crates/ledger-cli/tests/extension.rs @@ -6,8 +6,10 @@ //! ```text //! GOAL: a package the Claude desktop app can install, naming this //! program's bridge for one company, with nothing secret in it. -//! SOURCE: WB-pkg-5; github.com/anthropics/mcpb (MANIFEST.md, the 0.3 -//! schema); ledger-host extension.rs. +//! SOURCE: WB-pkg-5; Anthropic's MCP Bundle manifest specification +//! (the manifest page and the version 0.3 JSON schema of its +//! mcpb repository on GitHub); the writer's own spec block in +//! the host crate. //! INVARIANTS: //! 1. The package is a zip whose root holds `manifest.json`; every file //! the manifest names (`icon`, `server.entry_point`) is in the zip. diff --git a/crates/ledger-cli/tests/packaging.rs b/crates/ledger-cli/tests/packaging.rs index 5e5f0e57..b54eaca4 100644 --- a/crates/ledger-cli/tests/packaging.rs +++ b/crates/ledger-cli/tests/packaging.rs @@ -683,3 +683,27 @@ fn only_a_person_runs_the_workflow_that_publishes_the_repositories() { "it refuses a draft" ); } + +/// WB-pkg-4: on Linux git is a dependency of every package, so the package +/// manager fetches it; nothing carries a git of its own. +#[test] +fn the_linux_packages_depend_on_git_and_none_carries_one() { + let packager = read("deploy/packaging/packager.toml"); + assert_eq!( + packager.matches("\"git\"").count(), + 2, + "the deb and the pacman package depend on git" + ); + assert!(read("crates/ledger-cli/Cargo.toml").contains("requires = { git = \"*\" }")); + assert!(read("deploy/packaging/aur/PKGBUILD").contains("'git'")); + for file in [ + "deploy/packaging/windows/wanderbooks.nsi", + "deploy/packaging/macos/build-macos.sh", + ] { + let text = read(file).to_lowercase(); + assert!( + !text.contains("mingit") && !text.contains("git.exe"), + "{file} bundles a git" + ); + } +} diff --git a/crates/ledger-host/src/extension.rs b/crates/ledger-host/src/extension.rs index 546142be..8be6a727 100644 --- a/crates/ledger-host/src/extension.rs +++ b/crates/ledger-host/src/extension.rs @@ -12,11 +12,11 @@ //! desktop's Settings > Extensions > Advanced settings > Install //! Extension, and Claude can keep that company's books, with no //! command typed and no file edited. -//! SOURCE: WB-pkg-5; Anthropic's MCPB manifest specification, version -//! 0.3 (github.com/anthropics/mcpb, MANIFEST.md and -//! schemas/mcpb-manifest-v0.3.schema.json, read 2026-11-21) and -//! Claude's help article "Getting started with Local MCP servers -//! on Claude Desktop" (the install steps). +//! SOURCE: WB-pkg-5; Anthropic's MCP Bundle manifest specification, +//! version 0.3 (the manifest page and the version 0.3 JSON +//! schema of Anthropic's mcpb repository on GitHub, read +//! 2026-11-21) and Claude's help article "Getting started with +//! Local MCP servers on Claude Desktop" (the install steps). //! INVARIANTS: //! 1. The manifest holds only fields the specification defines, with //! `manifest_version` "0.3", a `server` of type `binary` whose diff --git a/deploy/README.md b/deploy/README.md index 8f5641d5..6d0630c8 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -6,6 +6,9 @@ account can read, and agents reach them through the server with a token. Locally the books are `same_user (advisory)` — hidden from the agent, not locked against it; here they are behind an account and a machine boundary. +This is the recipe for a machine with no window. To install the app on a +computer you sit at (Windows, macOS, Linux), see `docs/install.md`. + Nothing here needs the owner's books: every step works on a copy. The pieces: diff --git a/deploy/packaging/aur/PKGBUILD b/deploy/packaging/aur/PKGBUILD index 020b382c..77d469f9 100644 --- a/deploy/packaging/aur/PKGBUILD +++ b/deploy/packaging/aur/PKGBUILD @@ -9,7 +9,7 @@ pkgdesc="Double-entry bookkeeping your agent keeps and you can read" arch=('x86_64') url="https://wanderbooks.ai" license=('MIT' 'Apache-2.0') -depends=('gcc-libs' 'glibc') +depends=('gcc-libs' 'glibc' 'git') provides=('wanderbooks') conflicts=('wanderbooks') options=('!lto' '!strip') diff --git a/deploy/packaging/packager.toml b/deploy/packaging/packager.toml index 4f5d917c..7a0b9791 100644 --- a/deploy/packaging/packager.toml +++ b/deploy/packaging/packager.toml @@ -24,7 +24,9 @@ section = "utils" # A deb marks itself package-managed: `wanderbooks update` refuses on it # and says to use apt (plan 3.9). desktop-template = "deploy/packaging/wanderbooks.desktop" -depends = ["libc6", "libgcc-s1"] +# git: the backups run the system's git (WB-pkg-4); the package manager +# fetches it, so a Linux person never sees the missing-git words. +depends = ["libc6", "libgcc-s1", "git"] [deb.files] "deploy/packaging/install-method-deb" = "usr/share/wanderbooks/install-method" @@ -40,7 +42,7 @@ depends = ["libc6", "libgcc-s1"] "LICENSE-APACHE" = "usr/share/doc/wanderbooks/LICENSE-APACHE" [pacman] -depends = ["gcc-libs", "glibc"] +depends = ["gcc-libs", "glibc", "git"] [pacman.files] "deploy/packaging/install-method-aur" = "usr/share/wanderbooks/install-method" diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 00000000..3fbf7944 --- /dev/null +++ b/docs/install.md @@ -0,0 +1,63 @@ +# Installing Wanderbooks + +For a person who wants to use it. Three short sections, one per system, then +what to do after. The release page has the files: +https://github.com/swaits/wanderbooks/releases/latest + +Wanderbooks keeps your books on your own computer. An assistant (Claude, +ChatGPT, Codex and others) can reach them **only while Wanderbooks is open**, +and only the companies you have open in its tabs. When you are finished, +close the window: that quits Wanderbooks fully and closes your books. + +## Windows + +1. Download `Wanderbooks-…-windows-x64-setup.exe` and double-click it. It asks + for no administrator password: it installs for you alone. +2. Until the installer is signed, Windows shows "Windows protected your PC". + Choose **More info**, then **Run anyway**. (Unsigned software always does + this the first time.) +3. Open **Wanderbooks** from the Start Menu. The first time, it makes your + books' folder and helps you connect your assistant. +4. To update, run the newer installer over the old one. To remove it, use + Settings, Apps, Wanderbooks. Neither touches your books. + +Where things are: the program is in `%LOCALAPPDATA%\Programs\Wanderbooks`; your +books, keys and backups are in `%LOCALAPPDATA%\wanderbooks`. +Backups need Git for Windows (https://git-scm.com/download/win, or `winget +install --id Git.Git -e`); without it Wanderbooks works and says so. + +## macOS + +1. Download `Wanderbooks-…-macos-universal.dmg` (one file for Apple silicon and + Intel), open it, and drag **Wanderbooks** onto **Applications**. +2. Open it from Applications, not from the disk image or your Downloads folder + (an assistant needs the program to stay in one place). Until the app is + notarized by Apple, the first time: right-click it, choose **Open**, then + **Open** again. +3. To update, quit Wanderbooks and drag the newer app over the old one. To + remove it, drag it to the Trash. Neither touches your books. + +Your books, keys and backups are in `~/Library/Application Support/wanderbooks`. +Backups need git: run `xcode-select --install` in Terminal (or `brew install +git`). + +## Linux + +Use the package for your system from the release page: the `.deb` (Debian, +Ubuntu), the `.rpm` (Fedora), the Arch package, or the AppImage (one file: mark +it executable, keep it where you put it, and run it). Open **Wanderbooks** from +the menu. To update, install the newer package, or replace the AppImage. Your +books are in `~/.local/share/wanderbooks` and are never touched by a package. +Backups need git (`sudo apt install git`, `sudo dnf install git`, +`sudo pacman -S git`). + +## After it is installed + +Open the **Assistants** page of a company. Pick the assistant you use: Claude +Code and Codex have a button; **Claude desktop app** has a button that makes one +extension file to open in Claude (Settings, Extensions, Advanced settings, +Install Extension); web assistants have an address and the steps. Wanderbooks +tells you in the window when a newer version is out. + +`wanderbooks serve` (a server with no window, for another computer) is for +people who run it themselves: see `deploy/README.md`. diff --git a/docs/packaging.md b/docs/packaging.md index 5d221ade..730c9a6f 100644 --- a/docs/packaging.md +++ b/docs/packaging.md @@ -16,8 +16,8 @@ not a tool, so there is nothing for a recipe to call. | `.rpm` | `cargo-generate-rpm` (table in `crates/ledger-cli/Cargo.toml`) | same paths, marker `rpm`; 36 MB | dnf repository (`repo-indexes.sh dnf`) | unsigned until step 5 (`--signing-key` takes the PGP key then) | | AUR `PKGBUILD` | `cargo packager` makes the tarball (`pacman` format) and a PKGBUILD for it; ours is `deploy/packaging/aur/PKGBUILD`, which repacks the release's tarball (package `wanderbooks-bin`) | same paths, marker `aur`; built with `makepkg` | pacman (the AUR keeps old PKGBUILDs) | n/a (pacman trusts the AUR's checksums) | | AppImage | `cargo packager` (`appimage`); 44 MB | one file the owner puts anywhere and runs; needs no admin password | `wanderbooks update` (`$APPIMAGE` is the file replaced) against the manifest; minisign | minisign by the release key (step 5) | -| `.dmg` | `cargo packager` (`dmg`), `deploy/packaging/build-macos.sh`; **built in CI, unsigned; the trial on a Mac is the owner's** | `Wanderbooks.app` dragged to Applications; no admin password (the trial will say) | `wanderbooks update` (it replaces the program inside the `.app`: see the note below) | **unsigned**; Developer ID and notarization are step 5 | -| NSIS `.exe` | `cargo packager` (`nsis`) | **not built**: native Windows is unit P11c (D-62) | `wanderbooks update` | the Windows identity (step 5) | +| `.dmg` | `deploy/packaging/macos/build-macos.sh` (P15 C1; it replaced the cargo-packager `dmg` config, unrun) | `Wanderbooks.app` dragged to Applications; one universal program at `Contents/MacOS/wanderbooks`; no admin password | the newer app dragged over the old (the program tells the person one exists) | hardened runtime; Developer ID and notarization when the owner's secrets are in the release workflow, else ad hoc | +| Windows `.exe` | `deploy/packaging/windows/build-windows.sh` with NSIS (P15 C1; not cargo-packager's `nsis`) | `%LOCALAPPDATA%\Programs\Wanderbooks\wanderbooks.exe`, Start Menu entry, Settings > Apps uninstaller; per user, no admin | the newer installer run over the old one (the program tells the person one exists) | Authenticode when the owner's certificate secrets are in the release workflow, else unsigned | `just package-linux` builds the first four (`deploy/packaging/build-linux.sh`, about a minute after the release build, itself 8 to 12 minutes on a @@ -130,7 +130,7 @@ package manager. Not tested: Ubuntu, openSUSE, a package-manager *downgrade* (the repositories keep every release by construction), and the `.rpm` and `.deb` under their real signatures (step 5). -## The macOS bundle (step 6, built in CI, unsigned) +## The macOS bundle (step 6; REPLACED by P15 unit C1, see "P15 unit C1" below) `deploy/packaging/packager-macos.toml` (cargo-packager: the `dmg` format, which makes the `.app` first; the icon is the 512 px PNG, made into an @@ -260,3 +260,89 @@ not a `cfg` gap. Today Unix-only, found by grep (2026-10-29): file with read, write and delete sharing, so a rename never meets an open handle of ours. - The `portable` job runs Windows as a gate (`experimental: false`), since the port landed (P11c). + + +## P15 unit C1: the installed app on the new shape (2026-11-21) + +Written on Linux. **Nothing here has been run on Windows or macOS**: the +`release` workflow's first run on GitHub is the evidence, and it is built to +fail loudly at each step. What Linux checked: `crates/ledger-cli/tests/packaging.rs` +reads the installer script, the plist, the entitlements, the desktop entries and +the workflow; builds the macOS bundle with a stand-in program; compiles the +installer with `makensis` when it is installed; and a real `.deb` and `.rpm` +were built with a stand-in program and their file lists read (program, desktop +entry, icon, licences). + +| | Windows | macOS | Linux | +|---|---|---|---| +| Package | NSIS installer, per user | `.app` in a `.dmg`, one universal program | `.deb`, `.rpm`, pacman tarball, AppImage (unchanged tools) | +| Program path (the bridge's) | `%LOCALAPPDATA%\Programs\Wanderbooks\wanderbooks.exe` | `/Applications/Wanderbooks.app/Contents/MacOS/wanderbooks` | `/usr/bin/wanderbooks`; the AppImage's own file | +| Books | `%LOCALAPPDATA%\wanderbooks` | `~/Library/Application Support/wanderbooks` | `~/.local/share/wanderbooks` (unchanged) | +| Removal leaves the books | the uninstaller names no data folder | dragging to Trash runs nothing | no package script runs | +| No console window | built for the GUI subsystem; attaches to a terminal for commands | n/a | n/a | +| Without git | says how to get Git for Windows | says `xcode-select --install`; the system's stub is not taken for git | says the package manager's command | + +**Why NSIS written by hand, not cargo-packager's.** The installer's rules +(per user, one program, an uninstaller that can never reach the books) are +short and exact; a script of our own states them in a file a test can read, and +needs only `makensis` (free, zlib-licensed, `choco install nsis`). cargo-packager's +NSIS template downloads helper plugins at build time and ships an uninstaller +option that removes application data. **Why the macOS bundle is assembled by a +script:** signing order (inside out, hardened runtime, then the disk image, then +notarization) and the entitlements are exact, and the secrets contract is ours. +cargo-packager stays for Linux. + +**Updating** is installing the newer package over the old one; the program says +when one exists (`ledger_host::newer`: a version number from `latest.json`, +once a day, a fixed download address) and never installs anything. The earlier +staged self-update (`update`, `update.lock`, the daily staged download) still +exists for an AppImage or a program put somewhere by hand and needs a release +key that does not exist yet; on the desktop the detached host it restarted +through is gone (P15 A5). A macOS `.app` is never updated one file at a time. + +**Signing.** Windows (secrets `WINDOWS_CERTIFICATE_PFX_BASE64`, +`WINDOWS_CERTIFICATE_PASSWORD`): `sign-windows.ps1` signs the program, then the +installer. macOS (`APPLE_CERTIFICATE_P12_BASE64`, `APPLE_CERTIFICATE_PASSWORD`, +`APPLE_SIGNING_IDENTITY`; to notarize `APPLE_ID`, `APPLE_TEAM_ID`, +`APPLE_APP_SPECIFIC_PASSWORD`): `import-certificate.sh` puts the certificate in +a temporary keychain, `build-macos.sh` signs with the hardened runtime, +notarizes and staples. With none, each step prints a notice and the package is +unsigned (macOS: ad hoc, so it runs, but Gatekeeper refuses a download). + +**The Claude desktop extension** (`ledger_host::extension`): an MCP Bundle +(`.mcpb`, the renamed `.dxt`; manifest version 0.3), one per company, made by the +Connect page's button; it runs the installed program as `mcp --book `. + +**Left out, on purpose:** an auto-installer; a Windows executable icon resource +(the shortcut and the uninstaller entry carry the icon; the running window uses +the system's default) and the window's own icon on Windows and Linux X11; +`wanderbooks.cmd`/PATH setup so a terminal waits for a command on Windows (a +GUI-subsystem program returns the prompt at once); a macOS refusal for a program +run from a mounted disk image (a path under `/Volumes` may be a real install on +another disk); bundling git on Windows and macOS (the owner's decision, below); the signed `manifest.json` of the earlier self-update +(needs the release key, Q-4). + +### Bundling git (an owner decision, not made here) + +Backups run the system's git. **Linux:** the packages now depend on git, so the +package manager fetches it (nothing is bundled). **Windows and macOS:** the app +detects a missing git and says how to get it (WB-pkg-4); nothing is bundled. + +What bundling would mean. Git is GPL-2.0-only free software. Shipping an +unmodified git as a separate file that our program starts as its own process +(never linked) is what the GPL calls aggregation: our MIT OR Apache-2.0 code is +unaffected, and AGENTS.md's clean-room rule (never copy GnuCash's code) is not +touched, since nothing of git is copied into ours; `deny.toml` governs Rust +crates only and does not see it. It still requires, for each release that +carries git: git's GPL text and copyright notices beside it (Git for Windows' +MinGit adds the notices of the components it carries: OpenSSL/curl, the MSYS2 +runtime); the corresponding source of exactly that git, or a written offer for it +valid three years (GPLv2 section 3), most simply the git version's source +archive attached to the same release; no term of ours that forbids the +recipient what the GPL permits; and a note of any change if git were modified. +`THIRD-PARTY-NOTICES.txt` (cargo-about) covers Rust crates only, so it would +need an addition. On Windows the candidate is MinGit from Git for Windows +(about 40 MB, unpacked beside the program; `Git::find` would look there first); +on macOS Apple's command line tools' git is Apple's and cannot be bundled, so +it would be a build of our own (Homebrew's, or from source), universal, signed +inside the app, with the same obligations. diff --git a/docs/spec/claims/packaging.md b/docs/spec/claims/packaging.md new file mode 100644 index 00000000..d6fd5c05 --- /dev/null +++ b/docs/spec/claims/packaging.md @@ -0,0 +1,175 @@ +# Claims: packaging + +Wanderbooks' own product rules for how the program is installed, named, +updated and removed on Windows, macOS and Linux (plan P15 unit C1, +`plan/p15-app-and-relay.md`). No authority outside this product states them. +They are `WB-pkg-`. + +Rules: none from bookspec's list; these are product rules only. + +--- + +### Product rules + +**WB-pkg-1 It installs like a normal program, and taking it away never takes +the books.** A person downloads one file and opens it. On Windows that is an +installer that asks for no administrator password, installs under their own +profile, adds a Start Menu entry named Wanderbooks with the icon, and lists +an uninstaller in Settings. On macOS it is a disk image holding the app and a +shortcut to Applications to drag it onto. On Linux it is the package manager's +package, or one AppImage file. The Windows uninstaller removes exactly the +files the installer put in its own folder, the Start Menu entry and two +registry keys of its own: it uses no recursive removal and no wildcard and +names the data folder nowhere, and it asks the person to quit the app first +rather than fail on a program that is running. Moving the macOS app to the +Trash, or removing a Linux package, never runs a script. Each leaves the +person's books, keys, backups and settings where they are (WB-pkg-8). +*Enforced:* `deploy/packaging/windows/wanderbooks.nsi`, +`deploy/packaging/macos/build-macos.sh`, `deploy/packaging/packager.toml`. +*Checked:* `ledger-cli` `tests/packaging.rs` +(`the_windows_installer_is_per_user_and_installs_one_program`, +`the_uninstaller_never_removes_the_books`, +`no_package_runs_a_script_that_could_touch_the_books`, +`the_installer_script_compiles_when_nsis_is_here`, +`the_macos_bundle_has_one_program_and_a_plist_that_agrees_with_the_scripts`); +the release workflow's Windows job installs the installer, installs it over +itself and uninstalls it with a marker in the data folder that must survive. + +**WB-pkg-2 One executable is the window, the books server and the +assistants' bridge, and the path an assistant is given does not change.** The +installed program is one file, `wanderbooks`, started three ways: with +nothing to say, as the window; by the window with `server`, as its child; and +by an assistant with `mcp --book`, as the bridge. No second program is +installed. The path an assistant is registered with is the installed file's own: +`%LOCALAPPDATA%\Programs\Wanderbooks\wanderbooks.exe` on Windows, which the +installer replaces in place; `/Applications/Wanderbooks.app/Contents/MacOS/wanderbooks` +on macOS, which dragging a newer app over the old one replaces; `/usr/bin/wanderbooks` +for a Linux package, replaced by the package manager; and the AppImage's own +file, which the person keeps where they put it. On macOS a program running from +the temporary copy the system makes of a quarantined download still refuses to +register an assistant, in words, since that path goes away. On Windows the file +is built for the GUI subsystem, so starting it from the Start Menu opens no +console window; run from a terminal it attaches to that terminal so a +command's words appear there, and it never replaces a pipe an assistant gave +it. The two console programs the window starts (the assistant's own list and +the system's opener) are started without a console window. +*Enforced:* `ledger_host::start::translocation_refusal`, +`ledger_host::start::this_executable`, `crates/ledger-cli/src/console.rs` (the Windows +console), `ledger_host::app_server` (the server child). +*Checked:* `ledger-cli` `tests/one_executable.rs` +(`each_mode_names_itself_in_its_usage`), `tests/translocation.rs` +(`translocated_app_refuses_to_connect`), +`tests/packaging.rs` (`the_windows_program_opens_no_console_window_and_still_speaks_in_a_terminal`, +`the_macos_bundle_has_one_program_and_a_plist_that_agrees_with_the_scripts`); +the release workflow's Windows job checks the built file's subsystem is the GUI one +and that it still prints through a pipe. + +**WB-pkg-3 An update is the newer package installed over the old one, and the +app says when one exists.** The program installs nothing by itself. Once a day +at most, on a thread of its own, it reads one small public file a release +publishes and takes the version number from it and nothing else: where to get +the update is an address fixed in the program, never one the file names. A +higher version shows a notice in the window with a button to the download page, +and says the books, keys and connections stay as they are, because they live in +the data folder and the bridge's path is the same (WB-pkg-2). "Check for +updates" looks at once. The look sends no version, company or identifier and +a failed look is silent. A macOS app is never updated one file at a time +(that would break its signature): the program treats it as managed and says to +drag the newer app over the old one. Where the program may replace itself with +a release signed by our key (an AppImage, a program put somewhere by hand), the +earlier staged update still works; no release key exists yet, so today none does. +*Enforced:* `ledger_host::newer`, `ledger_host::update::install_kind`, +`ledger_host::commands::check_for_updates`, `ledger_gui::owner::NewerVersion`. +*Checked:* `ledger-host` unit tests in `newer.rs` +(`only_a_higher_plain_version_is_newer`, +`the_feed_gives_a_version_and_nothing_else`, +`a_look_is_noted_and_the_next_is_a_day_away`, +`a_failed_look_says_nothing_and_still_counts`, `the_note_is_private`) and +`update.rs` (`a_macos_app_is_never_updated_in_place`); `ledger-gui` +`tests/update_notice.rs` (`a_newer_version_is_told_with_where_to_get_it`). + +**WB-pkg-4 Without git, backups are off and the person is told how to get +it.** Backups run the system's git; the program carries none. With no git found, a +backup says so in plain words for the system it runs on (Git for Windows or winget; Apple's +command line tools or Homebrew; the package manager) and the books work as +ever; the next backup looks again, so installing git needs no restart. On a Mac +without the developer tools, the stub at the system's git path is not taken for a +git. Whether to ship a git with the app is the owner's decision, since git is +GPL-2.0-only free software and shipping it carries a source offer and notices. +*Enforced:* `ledger_store::backup::how_to_get_git`, +`ledger_store::backup::Git::find`. +*Checked:* `ledger-store` unit tests in `backup.rs` +(`a_missing_git_says_how_to_get_it`, +`the_mac_stub_is_not_a_git_until_the_developer_tools_are_there`); +`ledger-cli` `tests/packaging.rs` +(`the_linux_packages_depend_on_git_and_none_carries_one`). + +**WB-pkg-5 The Connect page can write a one-click Claude desktop extension +for a company.** The "Claude desktop app" row has one button. It makes the +company's assistant key if there is none and writes +`wanderbooks-.mcpb` in a folder named Extensions in Documents/Wanderbooks: an +MCP Bundle (Anthropic's extension format, a zip file with a manifest, manifest +version 0.3) whose server is a binary that runs this program's installed path +as `mcp --book ` (WB-pkg-2). The package carries no program, no key, no +passphrase and no path of the data root. The page then says in words where in Claude's +settings to pick the file (Settings, Extensions, Advanced settings, Install +Extension), to keep Wanderbooks open, and offers to show the file. A program +running from a translocated copy writes nothing and says to move it first. +*Enforced:* `ledger_host::extension::claude_desktop_extension`, +`ledger_host::extension::manifest`. +*Checked:* `ledger-cli` `tests/extension.rs` +(`the_manifest_is_one_the_published_schema_accepts`, +`every_file_the_manifest_names_is_in_the_package`, +`the_server_runs_this_programs_bridge_for_the_company`); `ledger-host` unit +tests in `extension.rs` +(`no_secret_and_no_data_root_is_in_the_package`); `ledger-gui` +`tests/assistants.rs` +(`the_claude_desktop_row_makes_the_extension_and_says_what_to_do_next`). + +**WB-pkg-6 One version, and the product is named Wanderbooks wherever a +person sees it.** The version is written once, in the program's own manifest +(`crates/ledger-cli/Cargo.toml`); every package script and the release workflow read it +through `deploy/packaging/version.sh`, which refuses anything that is not three +numbers, and the program reports it to the window, the update look and the +extension. The window's title, the Start Menu entry, the app bundle's name, +the uninstaller's entry and the installer are all "Wanderbooks". The +lower-case `wanderbooks` stays where it is an identifier a person does not +read: the program's file name, the window's app id, the data folder. +*Enforced:* `deploy/packaging/version.sh`, `ledger_host::program_version`. +*Checked:* `ledger-cli` `tests/packaging.rs` +(`the_version_is_written_once_and_every_script_reads_it_from_there`, +`a_version_that_is_not_three_numbers_is_refused`, +`the_desktop_entries_launch_plain_wanderbooks_with_the_icon_and_the_window_id`); +`ledger-gui` `tests/tabs.rs` (the window title tests). + +**WB-pkg-7 A release is a draft that carries the licences and the sums.** +The release workflow runs on a version tag or by hand and never on an +ordinary push. It builds all three packages, runs each system's tests on that +system, and attaches the packages, the licence files, the third-party +notices (every package also carries them), the update note and a file of +SHA-256 sums to a draft release. It never publishes a release, never changes +one already published, and never pushes the apt or dnf repositories (a +separate workflow, by hand, from a published release does). Signing runs only +when the owner's secrets are present and says so in the run's notices when not. +*Enforced:* `.github/workflows/release.yml`, +`.github/workflows/publish-repos.yml`. +*Checked:* `ledger-cli` `tests/packaging.rs` +(`the_release_workflow_makes_a_draft_of_all_three_packages_and_publishes_nothing`, +`only_a_person_runs_the_workflow_that_publishes_the_repositories`, +`every_package_carries_the_licences_and_the_icon`). + +**WB-pkg-8 The books live where each system keeps an app's own data, apart +from the program.** macOS: Library/Application Support/wanderbooks in the person's +home. Windows: the local application data folder, `wanderbooks` (never the +roaming one: the books are large, hold locks and belong to one machine). +Linux: the XDG data folder, `wanderbooks`, where the books have always been +(unchanged). The folder with the private keys and certificate for the web +address is owner-only on each system, as the data root is. No data folder is +inside any folder a program is installed to. +*Enforced:* `ledger_store::root::data_dir_for`, +`ledger_store::root::default_root`, `ledger_link::private::make_dir`. +*Checked:* `ledger-store` `tests/data_locations.rs` +(`each_system_keeps_its_data_where_it_keeps_an_apps_data`, +`no_data_folder_is_inside_an_install_folder`); `ledger-link` unit tests in +`private.rs` (`a_private_file_reads_back_and_is_mode_0600`, +`a_private_file_and_its_folder_are_owner_only_on_windows`). diff --git a/plan/STATUS.md b/plan/STATUS.md index d864f980..5e86bfdb 100644 --- a/plan/STATUS.md +++ b/plan/STATUS.md @@ -1,5 +1,34 @@ # STATUS — 2026-11-10: the evaluation batch: no money arithmetic outside the kernel in any crate, exact Decimal sums, four gates the build did not have +## 2026-11-21: P15 unit C1, the installed app (branch `t3/p15-c1-desktop-packages`) + +Written on Linux; **nothing of it has run on Windows or macOS**, and no +package has been installed anywhere. The `release` workflow's first run is the +evidence. What is there (`docs/packaging.md`, "P15 unit C1"; `docs/install.md`; +claims `WB-pkg-1` to `WB-pkg-8` in `docs/spec/claims/packaging.md`): + +- **Windows**: a per-user NSIS installer (no administrator prompt), one + program, a Start Menu entry named Wanderbooks, a Settings > Apps + uninstaller that cannot reach the books. The program is built for the GUI + subsystem, so no console window; a terminal still gets a command's words. +- **macOS**: a universal `.app` in a `.dmg` (hardened runtime, an empty + entitlements file with the reasons, a Documents-folder purpose string); + signing and notarization run only with the owner's Apple secrets. +- **Linux**: the tools are unchanged; the desktop entries carry the icon and + the window's app id, every package carries the licences, and the packages + depend on git. +- **The Claude desktop extension**: the Connect page's last row writes a + `.mcpb` (Anthropic's MCP Bundle, manifest 0.3) per company. +- **Update**: the window says when a newer version exists and where to get it + (a daily look at one small file; only a version number is read); the update + is the newer package installed over the old. +- **Release**: a draft only, tests on each system, SHA-256 sums, licences; + the apt/dnf publish moved to a by-hand workflow. +- **Owner's, open**: signing identities and their secrets; whether to bundle + git on Windows and macOS (a GPL-2.0 consequence, `docs/packaging.md`); + the first run of the release workflow on GitHub and the first install on a + clean Windows and macOS machine. + ## 2026-11-10: the evaluation batch (plan/2026-11-09_TRIAGE.md) A full evaluation of the project on 2026-11-09 found nothing wrong in the