`wanderbooks update` reads a release manifest (default: GitHub Releases' fixed address, D-26), refuses anything not higher than this version, downloads the platform's file and accepts it only if its sha256 matches the manifest AND its minisign signature verifies against the release key compiled into the program (WANDERBOOKS_RELEASE_PUBKEY at build time; a build without one updates from nothing but a file:// feed whose key the owner names with --trusted-key, so a local release can be tried). The verified file is staged under <root>/updates/<version>/, the running version is kept under updates/previous/ with the journal format it understood, and the program file is replaced by a rename of a complete copy made beside it (a reader sees the old file or the new, never a part). The new program must answer --help; if not, the old one is put back. Nothing tells the books to stop: the host already notices a replaced executable and restarts onto it, finishing calls in progress (host.rs INVARIANT 7). `wanderbooks rollback` swaps the kept version back, and refuses while any book declares a journal format or feature the kept version does not know (plan 3.9: after the owner consents to a newer format the only way back is the pre-upgrade restore). A package-managed install (a package ships share/wanderbooks/install-method beside bin/) refuses both and says to use the package manager. An AppImage replaces the file named by $APPIMAGE. Tests (crates/ledger-cli/tests/update.rs): update_is_atomic, failed_update_rolls_back, unsigned_update_refused (another key, other bytes, a sha that differs, no signature, not a signature), bridge_survives_update, update_waits_for_a_running_call, package_managed_install_refuses_update, the kept-version and format-gate tests; unit tests in ledger-host/src/update.rs. Dependencies: minisign-verify 0.3 in ledger-host (what cargo-packager's updater uses to check release files; no dependencies of its own) and minisign 0.10 as a ledger-cli dev-dependency (the tests sign with a key they make). sha2 and the two minisign crates are built optimized in debug and test builds: the tests hash a debug build's program. The release profile strips symbols, for the packages (P11a step 3). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
65 lines
2.2 KiB
TOML
65 lines
2.2 KiB
TOML
[package]
|
|
name = "ledger-cli"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "wanderbooks: the one executable (viewer, books server, host, agents' bridge, owner's commands)."
|
|
|
|
[[bin]]
|
|
name = "wanderbooks"
|
|
path = "src/main.rs"
|
|
|
|
[features]
|
|
default = ["gui"]
|
|
# The viewer. Off in the server-only build for another machine (plan
|
|
# D-22, P9), so a headless machine carries no window libraries.
|
|
gui = ["dep:ledger-gui"]
|
|
|
|
[dependencies]
|
|
ledger-host = { path = "../ledger-host" }
|
|
ledger-mcp = { path = "../ledger-mcp" }
|
|
ledger-store = { path = "../ledger-store" }
|
|
ledger-gui = { path = "../ledger-gui", optional = true }
|
|
|
|
[dev-dependencies]
|
|
base64 = "0.22"
|
|
chrono = "0.4"
|
|
# Every test that drives the books server's tools: the CPA package they
|
|
# open, the outputSchemas they check against, the random cases, and the
|
|
# database read_only_tools_change_nothing compares by its rows.
|
|
jsonschema = { version = "0.58", default-features = false }
|
|
libc = "0.2"
|
|
proptest = "1"
|
|
reqwest = "0.13"
|
|
rusqlite = { version = "0.32", features = ["bundled"] }
|
|
rust_decimal = "1"
|
|
rmcp = { version = "3", features = ["client", "transport-streamable-http-client-reqwest"] }
|
|
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time"] }
|
|
ledger-config = { path = "../ledger-config" }
|
|
ledger-core = { path = "../ledger-core" }
|
|
ledger-package = { path = "../ledger-package" }
|
|
ledger-import = { path = "../ledger-import" }
|
|
ledger-vault = { path = "../ledger-vault" }
|
|
serde_json = "1"
|
|
sha2 = "0.10"
|
|
tempfile = "3"
|
|
zip = "9.0.1"
|
|
minisign = "0.10.0"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
# The .rpm (P11a step 3), built by cargo-generate-rpm from the release
|
|
# program: `just package-linux`. Paths are relative to the workspace root.
|
|
[package.metadata.generate-rpm]
|
|
name = "wanderbooks"
|
|
summary = "Double-entry bookkeeping your agent keeps and you can read"
|
|
license = "MIT OR Apache-2.0"
|
|
url = "https://wanderbooks.ai"
|
|
assets = [
|
|
{ source = "target/release/wanderbooks", dest = "/usr/bin/wanderbooks", mode = "0755" },
|
|
{ source = "deploy/packaging/install-method-rpm", dest = "/usr/share/wanderbooks/install-method", mode = "0644" },
|
|
{ source = "deploy/packaging/wanderbooks-static.desktop", dest = "/usr/share/applications/wanderbooks.desktop", mode = "0644" },
|
|
]
|