Skip to content

Commit cd3d338

Browse files
NubsCarsonlalaluneclaude
authored
fix(os): package elizaOS live runtime plugins (#7800)
* fix(os): package elizaOS live runtime plugins * fix(os): address live runtime review feedback * docs(os): clarify elizaOS live validation status * fix(local-inference): return kv persistence status * style(local-inference): format kv backend contract * fix(local-inference): await slot restore so error catch fires Without `await`, the async rejection from `requestSlotRestore` propagates out of `restoreConversationKv` as a raw rejected Promise instead of being caught and swallowed as `false`. The catch was dead for async errors. Adds a direct stress-test case that exercises the 500-on-restore path through `DflashLlamaServer.restoreConversationKv` and asserts the result resolves to `false`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: lalalune <elizamakesmagic@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 75d539b commit cd3d338

26 files changed

Lines changed: 246 additions & 139 deletions

packages/os/DOWNLOADS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ gaps, and a hardware-support matrix.
1313

1414
Current hardening status:
1515

16-
- A prior live-USB ISO passed QEMU greeter/desktop/app-service validation
17-
and guarded USB flash/readback. Current HEAD still needs rebuild,
18-
repeat QEMU, repeat flash/readback, real hardware boot, and real USB
19-
persistence validation before stable release.
16+
- A recent live-USB ISO artifact passed QEMU greeter/desktop/app-service
17+
validation, and a prior artifact passed guarded USB flash/readback. The
18+
exact release commit still needs rebuild/repeat QEMU if HEAD moves,
19+
repeat flash/readback, real hardware boot, and real USB persistence
20+
validation before stable release.
2021
- v1 is USB-only; internal-disk install is deferred.
2122
- A guarded developer writer exists in the live-USB variant. Production
2223
still needs a signed GUI/CLI flasher for macOS, Windows, and Linux.

packages/os/linux/variants/milady-tails/Justfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,46 @@ milady-app:
5454
5555
echo "Building ${package_rel} runtime dist for elizaOS Live"
5656
case "${mode}" in
57+
package-build)
58+
if [ ! -x "${eliza_root}/node_modules/.bin/tsup" ] || [ ! -x "${eliza_root}/node_modules/.bin/tsc" ]; then
59+
echo "Installing workspace build dependencies for ${package_rel}"
60+
( cd "${eliza_root}" && bun install --no-frozen-lockfile --ignore-scripts )
61+
fi
62+
( cd "${package_dir}" && bun run build )
63+
;;
5764
package-js)
65+
if [ ! -x "${eliza_root}/node_modules/.bin/tsup" ]; then
66+
echo "Installing workspace build dependencies for ${package_rel}"
67+
( cd "${eliza_root}" && bun install --no-frozen-lockfile --ignore-scripts )
68+
fi
5869
( cd "${package_dir}" && bun run build:js )
5970
;;
6071
tsup-index)
72+
if [ ! -x "${eliza_root}/node_modules/.bin/tsup" ]; then
73+
echo "Installing workspace build dependencies for ${package_rel}"
74+
( cd "${eliza_root}" && bun install --no-frozen-lockfile --ignore-scripts )
75+
fi
6176
( cd "${package_dir}" && bunx tsup src/index.ts --format esm --clean )
6277
;;
78+
bun-runtime-index)
79+
( cd "${package_dir}" && \
80+
rm -rf dist && \
81+
bun build src/index.ts \
82+
--outdir dist \
83+
--target=node \
84+
--format=esm \
85+
--sourcemap=external \
86+
--external '@elizaos/agent' \
87+
--external '@elizaos/app-core' \
88+
--external '@elizaos/app-core/*' \
89+
--external '@elizaos/core' \
90+
--external '@elizaos/plugin-registry' \
91+
--external '@elizaos/shared' \
92+
--external '@elizaos/vault' \
93+
--external dotenv \
94+
--external 'node:*' \
95+
--external 'bun:*' )
96+
;;
6397
*)
6498
echo "Unknown runtime package build mode: ${mode}" >&2
6599
exit 1
@@ -100,6 +134,8 @@ milady-app:
100134
test -x "${app_out}/bin/launcher" || { echo "missing ${app_out}/bin/launcher"; exit 1; }
101135
ensure_plugin_runtime_dist "plugins/plugin-health" package-js
102136
ensure_plugin_runtime_dist "plugins/plugin-calendly" tsup-index
137+
ensure_plugin_runtime_dist "plugins/plugin-registry" package-js
138+
ensure_plugin_runtime_dist "plugins/plugin-app-manager" bun-runtime-index
103139
if [ -e "${stage}" ] && ! rm -rf "${stage}"; then
104140
sudo -n rm -rf "${stage}"
105141
fi

packages/os/linux/variants/milady-tails/PLAN.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ turn-by-turn directions.
1616

1717
---
1818

19-
## Current status (2026-05-17)
19+
## Current status (2026-05-19)
2020

2121
| | |
2222
|---|---|
2323
| **Phase 0 — Scaffold** | ✅ Done |
2424
| **Phase 1 — Base ISO builds + boots** | ✅ Done — base image builds and boots through QEMU via `-cdrom` |
25-
| **Phase 2 — elizaOS system branding** | ✅ Source implemented; QEMU visual path passed on prior artifact; latest polish needs rebuild |
26-
| **Phase 3 — Privacy mode** | 🔨 Source implemented; needs current-HEAD network/Tor validation |
27-
| **Phase 4 — Bake elizaOS app** | ✅ App payload/install path QEMU-passed on prior artifact; clean checkout still must run `just milady-app` before a full build |
28-
| **Phase 5 — Autolaunch** | ✅ Desktop/systemd wrapper QEMU-passed on prior artifact |
25+
| **Phase 2 — elizaOS system branding** | ✅ Source implemented; latest validated artifact QEMU visual path passed |
26+
| **Phase 3 — Privacy mode** | 🔨 Source implemented; needs exact-release network/Tor validation |
27+
| **Phase 4 — Bake elizaOS app** | ✅ App payload/install path QEMU-passed on latest validated artifact; clean checkout still must run `just milady-app` before a full build |
28+
| **Phase 5 — Autolaunch** | ✅ Desktop/systemd wrapper QEMU-passed on latest validated artifact |
2929
| **Phase 6 — Agent/broker** | 🔨 OS broker/env path implemented; approval-gated privileged actions still need hardening |
3030
| **Phase 7 — Persistence** | 🔨 Tails Persistent Storage row/hooks implemented; real USB persistence validation still pending |
3131
| **Phases 8–9** | 📋 Spec/backlog ([`docs/specs/`](./docs/specs/)), not release-complete |
@@ -56,9 +56,10 @@ What exists right now:
5656
approval-gated policy layer exists.
5757
- Privacy-mode, autolaunch, and `~/.eliza` Persistent Storage overlays are
5858
implemented locally. QEMU has proven the normal greeter/desktop/app path
59-
on a prior ISO, and USB flash/readback passed for that same artifact. The
60-
current gate is rebuilding HEAD, re-running QEMU, then validating real USB
61-
boot, persistence, and privacy behavior.
59+
on the latest validated local ISO artifact, and USB flash/readback passed
60+
on a prior artifact. The current gate is rebuilding/validating the exact
61+
release commit if the branch moves, then repeat USB flash/readback, real
62+
USB boot, persistence, and privacy behavior.
6263
- The old root-level usbeliza Linux prototype was removed from this branch;
6364
this variant is the active Linux distro path.
6465

packages/os/linux/variants/milady-tails/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ sealed.
5454

5555
The target contract is that all four combinations work with the same
5656
feature surface, except for speed and persistence. QEMU has proven the
57-
normal branded greeter/desktop/app path on a prior artifact, but the
58-
current HEAD still needs rebuild, QEMU, real-USB, persistence, and privacy
59-
validation before those rows can be treated as production evidence. See
57+
normal branded greeter/desktop/app path on the latest validated artifact, but
58+
real-USB boot, real-USB persistence, and Privacy Mode network behavior still
59+
need validation before those rows can be treated as production evidence. See
6060
[`docs/user-experience.md`](./docs/user-experience.md) for the boot-time
6161
walkthrough and [`docs/mode-parity.md`](./docs/mode-parity.md) for the
6262
acceptance matrix.
@@ -113,25 +113,25 @@ Apache-2.0 where possible, dual-licensed under both where required.
113113

114114
## Status: Demo Branch Versus Production
115115

116-
**Current branch status, 2026-05-17:** the elizaOS Live source tree has
117-
passed a full ISO build, QEMU greeter/desktop/app-service validation, and
118-
guarded USB flash/readback on a prior artifact. Current HEAD includes
119-
additional source-only branding and docs polish, so it must be rebuilt and
120-
revalidated before that exact image is called final USB-ready. Real
121-
hardware USB boot and real USB Persistent Storage behavior remain pending.
116+
**Current branch status, 2026-05-19:** this branch has produced a fresh
117+
local ISO artifact that passed QEMU greeter/desktop/app onboarding
118+
validation. A prior artifact passed guarded USB flash/readback, but the
119+
latest validated artifact still needs repeat USB flash/readback, real
120+
hardware USB boot, and real USB Persistent Storage validation before it is
121+
called final USB-ready. Release promotion must rebuild and validate the
122+
exact release commit if the branch moves after the latest tested artifact.
122123
See [`docs/current-status.md`](./docs/current-status.md) for the exact
123124
validation state.
124125

125126
**Phase 1 — done.** The containerized build pipeline produced a bootable
126127
base ISO, and Tails' normal live-OS boot path was verified through QEMU
127128
using `-cdrom`.
128129

129-
**Phases 2–7 — implemented in source, QEMU demo path proven on a prior
130-
artifact.** Branding, Privacy Mode plumbing, bundled elizaOS app
130+
**Phases 2–7 — implemented in source, QEMU demo path proven on the latest
131+
validated artifact.** Branding, Privacy Mode plumbing, bundled elizaOS app
131132
install/autostart, the conservative elizaOS capability broker, and elizaOS
132-
Persistent Storage rows/hooks are in the tree. The current gate is a fresh
133-
HEAD rebuild plus QEMU, USB flash/readback, real hardware boot, privacy,
134-
and persistence validation.
133+
Persistent Storage rows/hooks are in the tree. The current gate is USB
134+
flash/readback, real hardware boot, privacy, and persistence validation.
135135

136136
**Phases 8–9 — spec/backlog.** Mode-parity harness and customization
137137
actions are planned but not production-complete. Production also still

packages/os/linux/variants/milady-tails/ROADMAP.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ No optimism inflation. Where something is risky or unknown, it says so.
88

99
---
1010

11-
## Where we are right now (2026-05-17)
11+
## Where we are right now (2026-05-19)
1212

1313
**Done and proven:**
1414
- The **containerized build pipeline** works. A full elizaOS ISO
@@ -23,15 +23,15 @@ No optimism inflation. Where something is risky or unknown, it says so.
2323
- Local overlays now exist for elizaOS branding, Privacy Mode, elizaOS app
2424
install/systemd launch, a conservative elizaOS capability broker, elizaOS
2525
Persistent Storage, and a checked signed-runtime verifier foundation.
26-
- A prior full ISO artifact passed QEMU through the branded greeter,
27-
desktop, and app-service path. The same artifact was flashed to a
26+
- A recent full ISO artifact passed QEMU through the branded greeter,
27+
desktop, and app-service path. A prior artifact was flashed to a
2828
removable USB with guarded write/readback verification.
2929
- The old root-level usbeliza prototype has been removed from this branch;
3030
the active Linux distro work now lives under this live-build variant.
3131

3232
**Not done:**
33-
- Current HEAD includes source-only branding/docs polish after the last
34-
validated artifact. Rebuild and re-run QEMU before calling that exact
33+
- Rebuild and re-run QEMU if the branch moves after the latest validated
34+
artifact; exact release-commit traceability is required before calling an
3535
artifact final USB-ready.
3636
- Privacy/direct networking and real USB Persistent Storage behavior still
3737
need proof inside the rebuilt live OS.
@@ -42,7 +42,8 @@ No optimism inflation. Where something is risky or unknown, it says so.
4242

4343
So: the *build machine* is mostly complete. The *product* — elizaOS Live
4444
— has the core overlays in place, but the next heavy gate is still a
45-
fresh HEAD rebuild + QEMU + real USB boot + mode/persistence validation.
45+
exact release-commit rebuild if needed + QEMU + real USB boot +
46+
mode/persistence validation.
4647

4748
Product identity rule: the boot, greeter, and desktop should read as
4849
elizaOS Live. Tails remains the underlying live-OS plumbing and is credited

packages/os/linux/variants/milady-tails/docs/current-status.md

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Current elizaOS Live Status
22

3-
Last updated: 2026-05-17.
3+
Last updated: 2026-05-19.
44

55
This branch is a working demo/productization branch, not a finished
66
enterprise release.
@@ -15,61 +15,60 @@ enterprise release.
1515
6419dbee227317983ff2c6d02c3fd4bf97c6699ac1d26f0c98476f2ba58cfc10
1616
```
1717

18-
- The current HEAD source has now been rebuilt into a fresh canonical ISO at
19-
`tails/binary.iso` / `out/binary.iso`. Do not use older named ISO copies in
20-
`out/` for validation; they can be stale.
18+
- This branch has produced a fresh canonical ISO at `out/binary.iso`. Do
19+
not use older named ISO copies in `out/` for validation; they can be
20+
stale. If the branch moves after this artifact, rebuild and validate the
21+
exact release commit before publishing or flashing it as final.
2122

2223
```text
23-
2ff679a74464dd1ad37c0202b58fc56c5dd64b6e9ce047945d6ee60fcb139faa
24+
fb706edd7016b415e53fc263c37d09ed26d7f0d8d3bced250bde5b1b3ea9bec8
2425
```
2526

26-
- Normal QEMU boot of that exact current-HEAD artifact reached the elizaOS
27-
greeter, started a normal GNOME desktop, and showed the elizaOS app window
28-
on the desktop.
27+
- Normal QEMU boot of that exact validated artifact reached the elizaOS
28+
greeter, started a normal GNOME desktop, and showed the elizaOS app
29+
onboarding screen. This specifically proves the previous app backend
30+
timeout is gone for the packaged runtime in this artifact.
2931

3032
## Current HEAD Caveat
3133

32-
Current HEAD has QEMU visual evidence for boot, greeter, desktop, and app
33-
window startup. It has not yet been flashed/readback-tested to USB, booted on
34-
real hardware, or validated for real USB Persistent Storage create/unlock/delete
35-
behavior.
34+
The latest validated artifact has QEMU visual evidence for boot, greeter,
35+
desktop, and app onboarding startup. The exact release commit must be
36+
rebuilt and revalidated if HEAD moves. It has not yet been
37+
flashed/readback-tested to USB, booted on real hardware, or validated for
38+
real USB Persistent Storage create/unlock/delete behavior.
3639

3740
## Fixed Tonight
3841

39-
The latest boot blocker was not branding or the app runtime. Debug boots showed
40-
that the live root filesystem could be left mode `0700`, preventing non-root
41-
system services from traversing `/` and causing D-Bus, polkit, GDM, and
42-
Persistent Storage startup failures.
42+
The latest app blocker was packaged-runtime completeness: the app window
43+
opened but the backend timed out because `@elizaos/plugin-app-manager` and
44+
`@elizaos/plugin-registry` were copied as package folders without runtime
45+
`dist/index.js` artifacts.
4346

44-
The current artifact contains the fix:
47+
The latest validated artifact contains the fix:
4548

46-
- `run-nosymfollow.mount.d/elizaos-root-mode.conf` documents the intended
47-
`0755` directory mode for the inherited nosymfollow bind mount.
48-
- `elizaos-root-mode.service` runs after `run-nosymfollow.mount` and
49-
`systemd-tmpfiles-setup.service`, then restores `/` plus
50-
`/run/nosymfollow` to `0755`.
51-
- The earlier D-Bus and polkit working-directory drop-ins were removed because
52-
they were symptom workarounds, not the root cause.
53-
- `milady.path` no longer participates in an ordering cycle with
54-
`elizaos-update-verify.service`; the path unit can arm normally while
55-
`milady.service` waits for verifier setup.
49+
- `just milady-app` now builds runtime JS for those first-party plugin
50+
packages when their `dist/index.js` files are absent.
51+
- `static-smoke.sh` now checks that the staged overlay and installed chroot
52+
copy both contain those plugin runtime artifacts.
53+
- The rebuilt ISO squashfs contains both plugin runtime artifacts under
54+
`/opt/milady/Resources/app/eliza-dist/node_modules/@elizaos/`.
5655

5756
## Tonight Validation Plan
5857

5958
Completed so far:
6059

61-
1. Synced the root-mode and ordering-cycle fixes into the existing build
62-
chroot.
63-
2. Repacked the fixed chroot into a fresh `tails/binary.iso`.
64-
3. Pointed `out/binary.iso` at that exact artifact.
65-
4. Verified the built squashfs contains the root-mode drop-in,
66-
`elizaos-root-mode.service`, update verifier, and health-check fixes.
67-
5. Booted the exact artifact in QEMU and visually confirmed greeter, desktop,
68-
and app window startup.
60+
1. Built the missing first-party plugin runtime artifacts.
61+
2. Re-prepared the staged app overlay and synced it into the existing chroot.
62+
3. Proved the packaged backend reaches `/api/auth/status` from the staged
63+
runtime.
64+
4. Repacked the fixed chroot into `out/binary.iso`.
65+
5. Verified the built squashfs contains both plugin runtime artifacts.
66+
6. Booted the exact artifact in QEMU and visually confirmed greeter, desktop,
67+
and app onboarding startup.
6968

7069
Still required before claiming a final USB demo:
7170

72-
1. Repeat guarded USB flash/readback for the `2ff679a7...` artifact.
71+
1. Repeat guarded USB flash/readback for the `fb706edd...` artifact.
7372
2. Boot that USB on real hardware.
7473
3. Validate real USB Persistent Storage create/unlock/delete behavior.
7574
4. Validate privacy/direct networking behavior for the app, renderer, and any
@@ -139,7 +138,7 @@ proof for embedded browser/OAuth paths, and real USB persistence validation.
139138

140139
## Still Pending
141140

142-
- Repeat guarded USB flash/readback for the current `2ff679a7...` artifact.
141+
- Repeat guarded USB flash/readback for the current `fb706edd...` artifact.
143142
- Boot the USB on real hardware.
144143
- Validate real USB Persistent Storage create/unlock/delete behavior.
145144
- Validate privacy/direct networking behavior for the app, renderer, and any

packages/os/linux/variants/milady-tails/docs/distribution-and-updates.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ The current branch is a demo/productization branch:
3232
a checked signed-runtime verifier foundation.
3333
- Static smoke checks are part of the demo gate and must pass before
3434
promotion.
35-
- A prior rebuilt ISO passed QEMU greeter/desktop/app-service validation and
36-
guarded USB flash/readback. Current HEAD has source-only polish after that
37-
artifact, so repeat rebuild/QEMU/USB readback before calling HEAD final.
35+
- The latest validated local ISO artifact has passed QEMU greeter/desktop/app
36+
onboarding validation. A prior artifact passed guarded USB flash/readback,
37+
so rebuild/revalidate the exact release commit if the branch moves and
38+
repeat USB flash/readback before calling HEAD final.
3839
- Privacy behavior, real hardware USB boot, and real USB Persistent Storage
3940
behavior still need validation before production claims.
4041
- Production release infrastructure is missing: release keys, manifest

packages/os/linux/variants/milady-tails/docs/mode-parity.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ The product requirement is that the same capabilities are available in all
99
four combinations. Mode changes can affect speed, persistence, and trace
1010
footprint, but they must not silently remove features.
1111

12-
Status as of 2026-05-17: Phase 3-7 overlays are present in source, and a
13-
prior ISO passed the normal QEMU greeter/desktop/app-service path. Current
14-
HEAD needs rebuild and repeat validation. Treat the table below as the
15-
target acceptance matrix until Phase 8 produces evidence from QEMU and real
16-
USB across all four modes.
12+
Status as of 2026-05-19: Phase 3-7 overlays are present in source, and a
13+
recent ISO artifact passed the normal QEMU greeter/desktop/app-service path.
14+
Rebuild and repeat validation for the exact release commit if the branch
15+
moves. Treat the table below as the target acceptance matrix until Phase 8
16+
produces evidence from QEMU and real USB across all four modes.
1717

1818
Evidence rule: mark a row as production-ready only after it is exercised
1919
in QEMU and on a real USB boot. Until then, "Yes" means required product

packages/os/linux/variants/milady-tails/docs/production-readiness.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ The production product should add these first:
121121

122122
Clear near-term wins before marketing this as a production AI OS:
123123

124-
1. Rebuild current HEAD and QEMU-test that exact ISO.
125-
2. Flash/readback the rebuilt ISO and boot it on real hardware.
124+
1. Repeat guarded USB flash/readback for the current QEMU-tested ISO.
125+
2. Boot the rebuilt ISO on real hardware.
126126
3. Prove Persistent Storage create/unlock/delete on a real USB.
127127
4. Prove Privacy Mode behavior for agent, renderer, embedded browser, and
128128
OAuth surfaces.

packages/os/linux/variants/milady-tails/docs/specs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ File-level implementation plans for each phase of [`../../PLAN.md`](../../PLAN.m
44
`PLAN.md` is the map (goals, success criteria, status); these specs are the
55
turn-by-turn directions (exact files, exact changes, ordered checklists).
66

7-
Status note, 2026-05-17: Phase 2-7 OS/Tails overlays exist in source and a
8-
prior ISO passed the normal QEMU greeter/desktop/app-service path. Current
9-
HEAD includes later branding/docs polish and needs a fresh rebuild. Keep the
10-
specs as design/source-of-truth for intent, and use `PLAN.md` plus
7+
Status note, 2026-05-19: Phase 2-7 OS/Tails overlays exist in source and a
8+
recent local ISO artifact passed the normal QEMU greeter/desktop/app-service
9+
path. Rebuild and revalidate the exact release commit if the branch moves
10+
after that artifact. Keep the specs as design/source-of-truth for intent, and use `PLAN.md` plus
1111
`docs/current-status.md` for the current validation state.
1212

1313
Each spec was produced by auditing the actual Tails source and the

0 commit comments

Comments
 (0)