Commit eac4287
feat(pilotctl): one-command install + canonical catalogue.json + live smoke test (#235)
Closes the new-user gap: instead of "find a bundle tarball, untar it,
pass the path to install", a user runs:
pilotctl appstore catalogue
pilotctl appstore install io.pilot.wallet
and the tool fetches the bundle from the URL pinned in the
catalogue, sha-checks it, extracts it, and hands it to the existing
install path (which validates the manifest + verifies the embedded
ed25519 signature). The supervisor's rescan picks it up within 2 s.
## What ships
- catalogue/catalogue.json — the canonical list of installable apps.
Schema-versioned (catalogue.version=1). Pilotctl refuses unknown
versions so a future migration can't silently misbehave on old
pilotctl binaries. Each entry pins bundle_url + bundle_sha256.
- catalogue/README.md — schema + how-to-publish-a-new-version doc.
- cmd/pilotctl/appstore_catalogue.go — loads catalogue from
$PILOT_APPSTORE_CATALOG_URL (override), default the raw GitHub URL
for catalogue/catalogue.json on main. Supports file://, https://,
and http:// on loopback only (refuses plaintext install artifacts
from anywhere else).
- cmd/pilotctl/appstore.go — install accepts a catalogue ID
alongside the existing bundle-dir path; catalogue / catalog
subcommand dispatches to the new lister.
## Chain of trust
User trusts pilotctl (release-pipeline-signed binary).
pilotctl fetches catalogue from a URL hardcoded in the binary
(auditable in the public repo). Future: signed catalogue
verified against appstore.EmbeddedCatalogPubkey.
Catalogue pins each bundle's sha256 — a compromised CDN can't
substitute different bytes (mismatch errors out).
Bundle's manifest has an ed25519 signature against an embedded
publisher pubkey; supervisor verifies at install + every rescan.
Defence-in-depth: tarball-unpack refuses any entry with "../" path
traversal, mirroring the supervisor's manifest.binary.path guard.
## Live smoke test
scripts/smoke-test-appstore.sh runs the entire flow end-to-end
against HEAD: builds pilotctl + daemon + wallet, gen-key, sign,
stage a catalogue pointing at the local tarball, start the daemon
(which loads the app-store unconditionally per #PR_1), list +
install by ID, daemon spawns it, run a 50 USDC payment between two
wallet processes, verify replay-guard, uninstall, verify clean. Eight
steps, each with explicit assertions.
scripts/smoke-pay-driver — the wallet-side IPC client. Notably does
NOT import the wallet package; talks to any installed app over raw
ipc.Call with map[string]any payloads. Proves the appstore stays
dynamic: a third-party tool needs no compile-time knowledge of the
app to drive its exposed methods.
Co-authored-by: Teodor Calin <teodor@vulturelabs.io>1 parent f076b77 commit eac4287
7 files changed
Lines changed: 771 additions & 6 deletions
File tree
- catalogue
- cmd/pilotctl
- scripts
- smoke-pay-driver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | | - | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | | - | |
103 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
967 | 971 | | |
968 | 972 | | |
969 | 973 | | |
970 | | - | |
971 | | - | |
| 974 | + | |
| 975 | + | |
972 | 976 | | |
973 | | - | |
| 977 | + | |
974 | 978 | | |
975 | 979 | | |
976 | 980 | | |
| |||
983 | 987 | | |
984 | 988 | | |
985 | 989 | | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
986 | 1001 | | |
987 | 1002 | | |
988 | 1003 | | |
| |||
0 commit comments