clawdie-iso/README.md

329 lines
11 KiB
Markdown
Raw Normal View History

# Clawdie ISO
docs: purge historical cruft (Lumina/LightDM/QML/Qt6) + de-stale README Broad removal of obsolete decisions and dead subsystems across docs and code: Deleted - firstboot/gui/** — entire Qt6/QML installer subsystem (qml-installer, helloworld, Phase4 notes) — never the active live-session path - live/installer-session/** — orphaned QML installer session - .archive/completed-work/** — 14 historical planning/impl docs - ROADMAP-v1.0.0.md, RELEASE-NOTES-v0.9.0.md — Lumina/LightDM/Qt6-era history - .opencode/plans/phase0-gpu-fix-unified-iso.md — stale Lumina/LightDM plan - dated/handoff docs: PHASE4-TEST-REPORT, COLIBRI-XFCE-HANDOFF, CLAWDIE-CODEX-HANDOFF, CANONICAL-BUILD-PATHS-HANDOFF README de-stale - present-tense intro (drop xfce-operator-usb branch framing) - harness reality: pi (npm global) + Colibri daemon staged/rc.d-enabled; clawdie + zot as opt-in build flags - GPU: NVIDIA auto-detect + universal driver lane (drop "conservative fallback") - drop dead "historical installer/QML files in-tree" limitation CHANGELOG - drop dead "## Archive" + Qt6 "## For v1.0.0" sections - correct stale sudo wording: live image uses mac_do/mdo, not sudo/doas - drop RELEASE-NOTES-*.md pointer (file removed) build.sh - WARN no longer mentions removed QML build stage .gitignore - drop firstboot/gui qml-installer/helloworld ignore rules Live decision guardrails retained (SDDM-over-LightDM notes); BUILD.md qt6 package deps retained (current runtime deps, not history). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 11:29:12 +02:00
**XFCE-based FreeBSD operator USB image.**
docs: purge historical cruft (Lumina/LightDM/QML/Qt6) + de-stale README Broad removal of obsolete decisions and dead subsystems across docs and code: Deleted - firstboot/gui/** — entire Qt6/QML installer subsystem (qml-installer, helloworld, Phase4 notes) — never the active live-session path - live/installer-session/** — orphaned QML installer session - .archive/completed-work/** — 14 historical planning/impl docs - ROADMAP-v1.0.0.md, RELEASE-NOTES-v0.9.0.md — Lumina/LightDM/Qt6-era history - .opencode/plans/phase0-gpu-fix-unified-iso.md — stale Lumina/LightDM plan - dated/handoff docs: PHASE4-TEST-REPORT, COLIBRI-XFCE-HANDOFF, CLAWDIE-CODEX-HANDOFF, CANONICAL-BUILD-PATHS-HANDOFF README de-stale - present-tense intro (drop xfce-operator-usb branch framing) - harness reality: pi (npm global) + Colibri daemon staged/rc.d-enabled; clawdie + zot as opt-in build flags - GPU: NVIDIA auto-detect + universal driver lane (drop "conservative fallback") - drop dead "historical installer/QML files in-tree" limitation CHANGELOG - drop dead "## Archive" + Qt6 "## For v1.0.0" sections - correct stale sudo wording: live image uses mac_do/mdo, not sudo/doas - drop RELEASE-NOTES-*.md pointer (file removed) build.sh - WARN no longer mentions removed QML build stage .gitignore - drop firstboot/gui qml-installer/helloworld ignore rules Live decision guardrails retained (SDDM-over-LightDM notes); BUILD.md qt6 package deps retained (current runtime deps, not history). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 11:29:12 +02:00
A persistent operator USB with XFCE as the live-image baseline:
- bootable USB image
- stable XFCE desktop for the live operator environment
- browser available immediately
- Colibri's agent harness staged with the control plane (under the colibri
umbrella — no separate feature flag)
- `pi` retained as a spawnable agent backend (bundled npm global)
- Tailscale available immediately
- Colibri control-plane daemon staged and enabled as the live-USB rc.d service
(`service colibri_daemon`)
- `service clawdie` reserved as the deployed-system service name for disk/server
installs; the live USB stays on the lighter Colibri control-plane path
2026-05-12 19:26:35 +02:00
**Current validation target:** bootable dev image with `BUILD_CHANNEL=dev` and
bundled Clawdie-AI from `main`. Public release images should use
`BUILD_CHANNEL=release` and a pinned Clawdie-AI tag.
---
2026-05-12 19:26:35 +02:00
## What You Get
Boot a USB and land in an operator environment:
2026-05-12 19:26:35 +02:00
- FreeBSD 15.0 base system
- XFCE desktop via SDDM interactive login
docs: purge historical cruft (Lumina/LightDM/QML/Qt6) + de-stale README Broad removal of obsolete decisions and dead subsystems across docs and code: Deleted - firstboot/gui/** — entire Qt6/QML installer subsystem (qml-installer, helloworld, Phase4 notes) — never the active live-session path - live/installer-session/** — orphaned QML installer session - .archive/completed-work/** — 14 historical planning/impl docs - ROADMAP-v1.0.0.md, RELEASE-NOTES-v0.9.0.md — Lumina/LightDM/Qt6-era history - .opencode/plans/phase0-gpu-fix-unified-iso.md — stale Lumina/LightDM plan - dated/handoff docs: PHASE4-TEST-REPORT, COLIBRI-XFCE-HANDOFF, CLAWDIE-CODEX-HANDOFF, CANONICAL-BUILD-PATHS-HANDOFF README de-stale - present-tense intro (drop xfce-operator-usb branch framing) - harness reality: pi (npm global) + Colibri daemon staged/rc.d-enabled; clawdie + zot as opt-in build flags - GPU: NVIDIA auto-detect + universal driver lane (drop "conservative fallback") - drop dead "historical installer/QML files in-tree" limitation CHANGELOG - drop dead "## Archive" + Qt6 "## For v1.0.0" sections - correct stale sudo wording: live image uses mac_do/mdo, not sudo/doas - drop RELEASE-NOTES-*.md pointer (file removed) build.sh - WARN no longer mentions removed QML build stage .gitignore - drop firstboot/gui qml-installer/helloworld ignore rules Live decision guardrails retained (SDDM-over-LightDM notes); BUILD.md qt6 package deps retained (current runtime deps, not history). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 11:29:12 +02:00
- pre-SDDM live GPU detection for Intel, AMD/ATI, VMware, and NVIDIA auto-detection with a universal driver lane
- Firefox browser on the live image
- Tailscale on the live image
- broad native Wi-Fi firmware bundle on the live image
- Bundled npm globals on the live image, including `pi`
- `bash` as the default operator shell, with `zsh` + packaged oh-my-zsh also available on the USB
- Offline package repository bundled on the USB image, including `blender`
for the parametric-design / CAD/CAM / CNC fabrication roadmap (installed
on the disk-deploy path, not on the live USB during early hardware
validation — see `BUILD.md` "Packages Deferred to Disk Install")
2026-05-12 19:26:35 +02:00
- Clawdie-AI tarball with offline `node_modules`
- Static bootstrap page launched from the desktop
- desktop power actions allowed for `wheel` users, including `clawdie`
Provider keys, Telegram, browser sign-in, and disk deployment are intentionally
deferred on this branch.
### Runtime service split
```text
Live operator USB
SDDM/XFCE desktop
└── colibri_daemon # lightweight control plane, enabled on USB
├── colibri CLI / colibri-tui
├── colibri-mcp # MCP bridge for editor/assistant clients
└── agent harness # Colibri's bundled agent (staged with the
# daemon); pi available as a spawnable backend
Deployed disk/server system
service clawdie # target operator service name
└── persistent Clawdie host duties: health, inventory, watchdog,
credentials, and Colibri-backed agent orchestration
```
Use Colibri names when talking about the live USB control plane. Use Clawdie
service names when talking about the installed/deployed host.
---
## Desktop Strategy
XFCE is the live USB baseline because it is stable, lightweight, and well tested
on FreeBSD. That is a build-time choice for the operator USB, not a permanent
policy for every installed system.
Later disk deployment should grow a desktop profile step. The live USB can stay
XFCE-based while the install-to-disk flow lets the operator choose a target
profile such as:
- XFCE — default, conservative desktop
- KDE Plasma — optional fuller desktop, pulled during deployment
- Headless — no local desktop for server-style installs
The live USB should therefore avoid names and docs that make Xorg or XFCE look
like the whole product contract.
### `clawdie-gui` instead of `clawdie-startx`
The user-facing rescue command should be `clawdie-gui`, not `clawdie-startx`.
`startx` describes one X11 implementation detail; `gui` describes the operator's
intent: start or recover the graphical Clawdie operator session.
Today `clawdie-gui` can still launch the same XFCE/Xorg rescue path. In the
future it can dispatch to the right graphical profile without changing operator
instructions. Existing internal scripts may keep calling the lower-level XFCE
session wrapper, but docs should teach `clawdie-gui` as the stable command.
---
2026-05-12 19:26:35 +02:00
## Pre-Install Requirements
2026-05-12 19:26:35 +02:00
Build host:
2026-05-12 19:26:35 +02:00
- FreeBSD 15.0+
- `pkg`, `curl`, Node/npm, `sudo`
2026-05-12 19:26:35 +02:00
- root or `sudo` for image assembly (`mdconfig`, mount, bootcode)
- 150 GB free build space recommended
- 64 GB USB key minimum
- 128 GB USB key recommended
Optional but recommended:
- Tailscale account and auth key (`tskey-auth-...`)
2026-05-12 19:26:35 +02:00
Tailscale is **recommended**, not mandatory. If no auth key is supplied, the ISO
still builds and the live USB still boots normally. You can either bake
`--tailscale-auth-key` for one-shot first-boot join or run `mdo -u root tailscale up`
later from the live session.
---
2026-05-12 19:26:35 +02:00
## Quick Start: Build Image
2026-05-12 19:26:35 +02:00
```sh
git clone https://code.smilepowered.org/clawdie/clawdie-iso.git
cd Clawdie-ISO
2026-05-12 19:26:35 +02:00
# Full build: fetch FreeBSD, packages, Clawdie-AI, then assemble image.
sudo ./build.sh
```
Useful alternatives:
```sh
# Fetch/cache only. Does not assemble an image.
./build.sh --fetch-only
2026-05-12 19:26:35 +02:00
# Reuse cached packages and image inputs.
# Safe for pinned tags/commits. For moving refs, build.sh caches by resolved commit.
Unify ISO and fix GPU installation gap (Sam & ZAI) BREAKING CHANGE: Removes --target and --gpu-driver flags, unified ISO for all use cases ## Phase 0: GPU Fix + Unified ISO ### Core Changes **GPU Package Installation (FIXES CRITICAL GAP):** - Add clawdie_shell_nvidia_install() function to shell-nvidia.sh - NVIDIA drivers now installed after detection (previously only configured) - Works offline (USB packages) or online (pkg install) - Resolves issue where rc.conf was set but driver not installed **Unified ISO Architecture:** - Remove --target flag from build.sh (no more vps/baremetal branching) - Remove --gpu-driver flag from build.sh (runtime detection instead) - All packages included on every ISO (desktop + all GPU drivers) - Single image works on VPS, baremetal, and cloud **Runtime Detection:** - Add shell-desktop.sh for display detection at firstboot - VPS/cloud: no display → lightdm disabled (headless) - Baremetal: display detected → lightdm enabled (Lumina desktop) - GPU detection always runs, installs correct driver version **Sudo Unification:** - Replace all doas references with sudo across entire codebase - Update AGENTS.md with system configuration guidelines - Update all documentation (BUILD.md, README.md, REQUIREMENTS.md, etc.) - Admin panel now uses sudo for privileged operations ### Files Modified **Core System:** - build.sh: Remove target/gpu-driver logic, unified package selection - firstboot/firstboot.sh: Add desktop detection module - firstboot/shell-nvidia.sh: Add package installation function (+33 lines) **New Files:** - firstboot/shell-desktop.sh: Display detection and desktop enablement - packages/pkg-list-nvidia-all.txt: All three NVIDIA driver versions (390/470/590) - .opencode/plans/phase0-gpu-fix-unified-iso.md: Implementation plan **Documentation:** - PLAN-UNIFY.md: Update Step 3 for unified approach - REQUIREMENTS.md: Simplify (no target choice), update for sudo - BUILD.md: Update for unified ISO, sudo commands - README.md: Update installation instructions - AGENTS.md: Add system configuration section (sudo standardization) - ADMIN-PANEL.md: Update privileged operations to use sudo - CLAWDIE-SHELL.md: Update example commands to sudo - CLAWDIE-ISO-REFACTORED.md: Update access paths to sudo - REFACTOR-SUMMARY.md: Update permissions section to sudo ### Benefits **Simplicity:** - One build command: ./build.sh (no flags needed) - One ISO to test and maintain - No wrong choices for users - No documentation explaining target differences **Flexibility:** - VPS can use GUI via VNC (wayvnc always available) - Baremetal can run headless (disable lightdm) - Repurpose hardware without reinstall - All GPU drivers available for any hardware **Technical:** - Fixes critical GPU driver installation gap - Runtime detection replaces build-time decisions - Disk overhead: ~650MB (1-2% of 50GB - acceptable) - No runtime overhead on VPS (services disabled by detection) ### Testing Required - [ ] Build unified ISO: ./build.sh - [ ] Test on VPS (no display): lightdm disabled, packages installed - [ ] Test on baremetal (display): lightdm enabled, Lumina boots - [ ] Test on NVIDIA hardware: driver installed and loaded - [ ] Test sudo commands work without password prompts - [ ] Verify all doas references removed
2026-04-06 13:28:56 +02:00
sudo ./build.sh --skip-fetch
# Fetch packages but reuse the cached FreeBSD memstick image.
sudo ./build.sh --skip-memstick-fetch
# Dev/test image: set live user clawdie password to quindecim.
sudo ./build.sh --live-default-password
2026-05-12 19:26:35 +02:00
# Validation build from current Clawdie-AI main.
sudo ./build.sh --clawdie-ref main
2026-05-12 19:26:35 +02:00
# Release build from a pinned Clawdie-AI tag.
BUILD_CHANNEL=release sudo ./build.sh --clawdie-version 0.10.0
```
2026-05-12 19:26:35 +02:00
The build prints provenance similar to:
2026-05-12 19:26:35 +02:00
```text
ISO : 0.1.0-dev
FreeBSD : 15.0-RELEASE amd64
Clawdie : main
Clawdie commit: <sha>
```
2026-05-12 19:26:35 +02:00
It also writes `build-manifest.json` into the image and onto the installed
system under `/usr/local/share/clawdie-iso/`.
2026-04-12 18:37:57 +00:00
### Why `quindecim`
Artifact names use a short Latin codename for the FreeBSD major line they were
built on. For FreeBSD `15`, that codename is `quindecim`, so:
```text
clawdie-quindecim-0.2.29.img
```
means:
- `clawdie` — project name
- `quindecim` — Latin for `15`, matching the FreeBSD 15 build line
- `0.2.29` — version, tracking the zot release the image is built upon
Per-build provenance (build date, `clawdie-iso` commit, zot commit) lives in
`build-manifest.json`, not the filename.
Small reference for the current naming convention:
```text
0 = nulla / nihil / zero
1 = unus
2 = duo
3 = tres
4 = quattuor
5 = quinque
6 = sex
7 = septem
8 = octo
9 = novem
10 = decem
11 = undecim
12 = duodecim
13 = tredecim
14 = quattuordecim
15 = quindecim
16 = sedecim
17 = septendecim
18 = duodeviginti
19 = undeviginti
20 = viginti
21 = viginti unus
22 = viginti duo
23 = viginti tres
24 = viginti quattuor
25 = viginti quinque
26 = viginti sex
```
Notes:
- For `0`, Classical Latin did not have one universal everyday numeral word
equivalent to modern `zero`; `nulla` and `nihil` are both common
“none/nothing” stand-ins, while `zero` is later Latin.
- For `21+`, Latin number phrasing has multiple acceptable styles. The forms
above are intentionally simple and readable for image naming.
---
2026-05-12 19:26:35 +02:00
## Write to USB
Published artifacts are compressed as `.img.xz`. Stream them directly into
`dd`; do not unxz first unless you specifically need the raw image file.
Download on Linux or FreeBSD with resume and retries:
2026-05-12 19:26:35 +02:00
```sh
curl -fL --continue-at - --retry 5 --retry-delay 5 --progress-bar -O \
https://osa.smilepowered.org/downloads/iso/clawdie-quindecim-0.2.29.img.xz
curl -fL --retry 5 --retry-delay 5 -O \
https://osa.smilepowered.org/downloads/iso/clawdie-quindecim-0.2.29.img.xz.sha256
2026-05-12 19:26:35 +02:00
```
Linux:
```sh
sha256sum -c clawdie-quindecim-0.2.29.img.xz.sha256
set -o pipefail 2>/dev/null || true
xz -dc clawdie-quindecim-0.2.29.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync
sync
```
FreeBSD:
```sh
HASH=$(awk '{print $1}' clawdie-quindecim-0.2.29.img.xz.sha256)
sha256 -c "$HASH" clawdie-quindecim-0.2.29.img.xz
xz -dc clawdie-quindecim-0.2.29.img.xz | sudo dd of=/dev/daX bs=1M status=progress conv=fsync
sync
```
Replace `/dev/sdX` or `/dev/daX` with the whole USB device, not a partition.
On **Windows**, use Rufus or balenaEtcher — both read `.img.xz` directly (no
manual decompression). See [FLASHING.md](FLASHING.md) for the step-by-step, the
full safety checklist, and the raw `.img` variant.
If you built with `--live-default-password`, both the tty and the SDDM greeter
accept `clawdie` / `quindecim`. The live USB expects an interactive login at
the greeter; autologin is not part of the current operator-USB plan.
2026-05-12 19:26:35 +02:00
The image is sparse on the build host. `build.sh` prints both logical image size
and allocated size; write the logical image to a USB key large enough for it.
---
## Boot the USB
2026-05-12 19:26:35 +02:00
1. Boot from the USB image.
2. `/usr/local/etc/rc.d/clawdie_live_gpu` runs before SDDM and selects a conservative live graphics path.
3. SDDM starts; the operator logs in as `clawdie` and the Clawdie XFCE session launches.
4. A desktop launcher opens the static Clawdie bootstrap page.
5. Confirm the NetworkMgr tray icon appears in the bottom panel, shows interfaces, and can open/join Wi-Fi if needed.
6. Confirm the bottom panel launchers work: Whisker menu, Firefox, pcmanfm, terminal, and volume mixer.
7. Verify the core operator tools:
2026-05-12 19:26:35 +02:00
```sh
pi --help
tailscale version
firefox
tmux -V
python3 -c "import PIL; print(PIL.__version__)"
bastille --help
mdo -u root bastille --help
test -f /usr/local/share/fonts/dejavu/DejaVuSansMono.ttf
2026-05-12 19:26:35 +02:00
```
8. Tailscale can either autojoin from a baked `--tailscale-auth-key` build or
be joined later by hand with FreeBSD `mac_do`:
2026-05-12 19:26:35 +02:00
```sh
mdo -u root tailscale up
2026-05-12 19:26:35 +02:00
```
Disk deployment, upgrade, rescue, and full Clawdie bootstrap are later phases
on this branch.
---
2026-05-12 19:26:35 +02:00
## Documentation
2026-05-12 19:26:35 +02:00
- **[BUILD.md](BUILD.md)** — build flags, cache behavior, and test flow
- **[FLASHING.md](FLASHING.md)** — Linux, FreeBSD, and Windows (Rufus/Etcher) USB flashing
2026-05-12 19:26:35 +02:00
- **[REQUIREMENTS.md](REQUIREMENTS.md)** — build host and deployment requirements
- **[NETWORKING.md](NETWORKING.md)** — PF, Tailscale, `warden0`, and setup access
- **[TESTING.md](TESTING.md)** — bhyve and hardware validation procedures
- **[FIRSTBOOT.md](FIRSTBOOT.md)** — installed-system firstboot module pipeline (philosophy, dependency graph, per-module reference)
- **[docs/VPS-MIGRATION.md](docs/VPS-MIGRATION.md)** — VPS/cloud deployment path
---
2026-05-12 19:26:35 +02:00
## Current Limitations
- USB persistence work is not implemented yet on this branch.
- Disk deployment is intentionally deferred.
docs: purge historical cruft (Lumina/LightDM/QML/Qt6) + de-stale README Broad removal of obsolete decisions and dead subsystems across docs and code: Deleted - firstboot/gui/** — entire Qt6/QML installer subsystem (qml-installer, helloworld, Phase4 notes) — never the active live-session path - live/installer-session/** — orphaned QML installer session - .archive/completed-work/** — 14 historical planning/impl docs - ROADMAP-v1.0.0.md, RELEASE-NOTES-v0.9.0.md — Lumina/LightDM/Qt6-era history - .opencode/plans/phase0-gpu-fix-unified-iso.md — stale Lumina/LightDM plan - dated/handoff docs: PHASE4-TEST-REPORT, COLIBRI-XFCE-HANDOFF, CLAWDIE-CODEX-HANDOFF, CANONICAL-BUILD-PATHS-HANDOFF README de-stale - present-tense intro (drop xfce-operator-usb branch framing) - harness reality: pi (npm global) + Colibri daemon staged/rc.d-enabled; clawdie + zot as opt-in build flags - GPU: NVIDIA auto-detect + universal driver lane (drop "conservative fallback") - drop dead "historical installer/QML files in-tree" limitation CHANGELOG - drop dead "## Archive" + Qt6 "## For v1.0.0" sections - correct stale sudo wording: live image uses mac_do/mdo, not sudo/doas - drop RELEASE-NOTES-*.md pointer (file removed) build.sh - WARN no longer mentions removed QML build stage .gitignore - drop firstboot/gui qml-installer/helloworld ignore rules Live decision guardrails retained (SDDM-over-LightDM notes); BUILD.md qt6 package deps retained (current runtime deps, not history). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 11:29:12 +02:00
- NVIDIA on the live USB auto-detects the card and routes it through the universal driver lane; this lane is pending hardware validation (see `doc/NVIDIA-UNIVERSAL-HANDOFF.md`), so it still falls back to integrated/open graphics when no `nvidia.ko` loads.
- Provider/model, Telegram, and full `Clawdie-AI` service bootstrap are intentionally deferred.
---
docs: purge historical cruft (Lumina/LightDM/QML/Qt6) + de-stale README Broad removal of obsolete decisions and dead subsystems across docs and code: Deleted - firstboot/gui/** — entire Qt6/QML installer subsystem (qml-installer, helloworld, Phase4 notes) — never the active live-session path - live/installer-session/** — orphaned QML installer session - .archive/completed-work/** — 14 historical planning/impl docs - ROADMAP-v1.0.0.md, RELEASE-NOTES-v0.9.0.md — Lumina/LightDM/Qt6-era history - .opencode/plans/phase0-gpu-fix-unified-iso.md — stale Lumina/LightDM plan - dated/handoff docs: PHASE4-TEST-REPORT, COLIBRI-XFCE-HANDOFF, CLAWDIE-CODEX-HANDOFF, CANONICAL-BUILD-PATHS-HANDOFF README de-stale - present-tense intro (drop xfce-operator-usb branch framing) - harness reality: pi (npm global) + Colibri daemon staged/rc.d-enabled; clawdie + zot as opt-in build flags - GPU: NVIDIA auto-detect + universal driver lane (drop "conservative fallback") - drop dead "historical installer/QML files in-tree" limitation CHANGELOG - drop dead "## Archive" + Qt6 "## For v1.0.0" sections - correct stale sudo wording: live image uses mac_do/mdo, not sudo/doas - drop RELEASE-NOTES-*.md pointer (file removed) build.sh - WARN no longer mentions removed QML build stage .gitignore - drop firstboot/gui qml-installer/helloworld ignore rules Live decision guardrails retained (SDDM-over-LightDM notes); BUILD.md qt6 package deps retained (current runtime deps, not history). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 11:29:12 +02:00
**Last updated:** 13.jun.2026