From 718d5deaa9f6f6eba03afdd2b5f34685ab1c9812 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Mon, 15 Jun 2026 09:03:22 +0200 Subject: [PATCH 1/3] feat(iso): live-rebuild lane covers zot + version-model cleanup (Sam & Claude) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round 1 of the pre-final-build polish (Linux-safe, no FreeBSD runtime claims): - Live rebuild lane now spans the whole agent stack, not just Colibri: - add `go` to pkg-list-live-operator.txt (builds zot on the booted USB) - seed the zot source snapshot at /home/clawdie/ai/zot via seed_live_ai_source_repo (skipped automatically if the checkout is absent) - docs/LIVE-COLIBRI-REBUILD.md: add the `go build` rebuild steps for zot and list `go` under required live packages - CHANGELOG: reconcile the stale Repository Status table to the current zot (agent) + Colibri (control plane) architecture — pi demoted to spawnable backend, clawdie-ai being pruned, clawdie-shell archived — and record that the image version tracks the zot release (git describe), no invented ISO number. Deferred to Round 2 (FreeBSD-validated): staging the `clawdie` binary and wiring disk-install to run `clawdie apply` for the deployed-system service. That path provisions ZFS + an rc.d service on the target and cannot be validated from Linux, so it goes through the FreeBSD handoff rather than shipping unproven. Checks: sh -n build.sh OK; prettier clean on changed docs. Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 21 +++++++++++++----- build.sh | 4 ++++ docs/LIVE-COLIBRI-REBUILD.md | 34 ++++++++++++++++++++++++++++- packages/pkg-list-live-operator.txt | 5 ++++- 4 files changed, 56 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d733f858..9c0cdbcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,16 @@ All notable changes to Clawdie-ISO are documented here. ## [Unreleased] ### Added +- Live rebuild lane now covers the **whole agent stack**: `go` added to the live-operator package list and the `zot` source seeded at `/home/clawdie/ai/zot`, so a booted USB can rebuild zot (Go) as well as Colibri (Rust). See `docs/LIVE-COLIBRI-REBUILD.md`. - Aider+Pi harness venv provisioning — `firstboot/shell-deploy.sh` now creates `/opt/clawdie/venv/aider` with pinned deps: `aider-chat==0.86.2`, `litellm==1.81.10`, `tree_sitter==0.20.4` - Aider availability check in post-install verification (logs `aider` version at end of deployment) ### Improvements - Updated firstboot completion messages to highlight Aider and Pi as primary harnesses (Codex listed as optional alternative) +### Versioning +- The image version tracks the `zot` release it is built on (resolved via `git describe`, falling back to `ZOT_VERSION`); the output is named `clawdie--.img`. No separately invented ISO number. + --- ## [0.9.0] — 2026-04-06 @@ -54,9 +58,14 @@ All notable changes to Clawdie-ISO are documented here. ## Repository Status -| Repo | Status | Latest | -|------|--------|--------| -| clawdie-ai | Active | v0.9.0 | -| clawdie-iso | Active | v0.9.0 + Phase 0 | -| clawdie-shell | **Archived** | — | -| pi | Independent | v0.56.3 | +The agent stack is **zot (Go agent) + Colibri (Rust control plane)**; "Clawdie" +is the product name for the two together. The image version tracks zot. + +| Repo | Status | Version source | +| ------------- | ----------------------------------- | ------------------------------- | +| zot | Active — the agent (front door) | pinned tag (`ZOT_VERSION`) | +| colibri | Active — control plane + installer | workspace `Cargo.toml` | +| clawdie-iso | Active — image builder | tracks zot (`git describe`) | +| clawdie-ai | Being pruned (features → zot/Colibri) | — | +| pi | Demoted — spawnable backend, not default | upstream npm | +| clawdie-shell | **Archived** (merged into clawdie-iso) | — | diff --git a/build.sh b/build.sh index e49ab746..72aab0de 100755 --- a/build.sh +++ b/build.sh @@ -1101,6 +1101,10 @@ EOF seed_live_ai_source_repo "${SCRIPT_DIR}" "clawdie-iso" seed_live_ai_source_repo "${_resolved_clawdie_ai_repo}" "clawdie-ai" seed_live_ai_source_repo "${_resolved_colibri_repo}" "colibri" + # zot source so the live rebuild lane can rebuild the agent (Go) too, not + # just Colibri (Rust). Skipped automatically if the zot checkout is absent. + resolve_zot_paths + seed_live_ai_source_repo "${_resolved_zot_repo}" "zot" chroot "${MOUNT_POINT}" chown -R clawdie:clawdie /home/clawdie/ai } diff --git a/docs/LIVE-COLIBRI-REBUILD.md b/docs/LIVE-COLIBRI-REBUILD.md index 300cfcef..1df35cce 100644 --- a/docs/LIVE-COLIBRI-REBUILD.md +++ b/docs/LIVE-COLIBRI-REBUILD.md @@ -32,10 +32,12 @@ box: rust pkgconf git +go ``` `git` is already in the live operator package list. `rust` provides `cargo` on FreeBSD. `pkgconf` is needed by common Rust native dependency build scripts. +`go` builds the zot agent (see "Rebuild zot" below). Optional if future dependencies need them: @@ -56,7 +58,8 @@ pkgconf --version ``` If `rustc` or `cargo` is missing, the current USB cannot rebuild Colibri from -source without installing packages first or using a newer ISO. +source without installing packages first or using a newer ISO. Likewise check +`go version` before attempting a zot rebuild. ## Clone or update Colibri @@ -181,6 +184,35 @@ mdo -u root install -m 0644 /tmp/colibri-live-rebuild.sha256 /var/db/colibri/liv Report both files with validation notes when handing findings back through git. +## Rebuild zot (agent) + +zot is the Go agent staged as a prebuilt binary at `/usr/local/bin/zot`. The +source is seeded read-only at `/home/clawdie/ai/zot` (a `git archive` snapshot +with no `.git`), so rebuilds clone a fresh checkout, same as Colibri. + +```sh +mkdir -p /home/clawdie/ai +cd /home/clawdie/ai +if [ ! -d zot-build/.git ]; then + git clone https://code.smilepowered.org/clawdie/zot.git zot-build +fi +cd zot-build +git fetch --prune origin +git checkout v0.2.29 # ship the tag the ISO version tracks + +go build -trimpath -o bin/zot ./cmd/zot +``` + +Install into the running USB (privileged steps via `mdo`): + +```sh +mdo -u root install -m 0555 bin/zot /usr/local/bin/zot +zot --version +``` + +zot has no rc.d service of its own — Colibri spawns it — so no service restart +is needed. Validate with `zot --version` and a Colibri spawn check. + ## Fast rc.d-only repair If only the service script is broken and no binary rebuild is needed, fetch the diff --git a/packages/pkg-list-live-operator.txt b/packages/pkg-list-live-operator.txt index d404cac4..669d2838 100644 --- a/packages/pkg-list-live-operator.txt +++ b/packages/pkg-list-live-operator.txt @@ -21,10 +21,13 @@ bash zsh ohmyzsh git -# Live Colibri rebuild lane: lets the running USB rebuild and redeploy Colibri +# Live rebuild lane: lets the running USB rebuild and redeploy the agent stack # without a full ISO rebuild for every small service/runtime iteration. +# rust + pkgconf -> Colibri (Rust control plane) +# go -> zot (Go agent) rust pkgconf +go tailscale avahi-app nss_mdns -- 2.45.3 From f56bdd48bca3f3521eb3a7d68178726ff07224c3 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Mon, 15 Jun 2026 08:04:31 +0200 Subject: [PATCH 2/3] feat(iso): ship git-backed AI source checkouts (Sam & Codex) Seed live /home/clawdie/ai repos as shallow git checkouts with .git metadata and .clawdie-source.json provenance, remove stale hardcoded ISO version strings, and keep markdown formatting green.\n\nChecks: sh -n build.sh; sh -n scripts/stage-colibri-iso.sh; git diff --check; npx --yes prettier@3 --check BUILD.md README.md live/operator-session/bootstrap.html; ./scripts/check-format.sh; local file:// shallow clone smoke. --- BUILD.md | 6 ++--- PLAN-OPERATOR-USB-NEXT.md | 2 +- README.md | 2 +- build.sh | 36 ++++++++++++++++++---------- live/operator-session/bootstrap.html | 4 ++-- 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/BUILD.md b/BUILD.md index 7c0198b6..f112e7b3 100644 --- a/BUILD.md +++ b/BUILD.md @@ -21,7 +21,7 @@ On `xfce-operator-usb`, builds a bootable FreeBSD 15.0 operator USB image with: The ISO version is independent from the bundled Clawdie-AI ref: ```sh -ISO_VERSION="0.1.0" +ISO_VERSION="auto" # default: git describe, then ZOT_VERSION fallback BUILD_CHANNEL="dev" # dev | release CLAWDIE_REF="main" # validation default ``` @@ -396,7 +396,7 @@ boolean `tailscale_auth_key_baked: true|false` is recorded in the manifest. The build header shows: ```text -ISO : 0.1.0-dev +ISO : -dev FreeBSD : 15.0-RELEASE amd64 Clawdie : main Clawdie commit: @@ -428,7 +428,7 @@ The final size output distinguishes: Edit `build.cfg` for persistent defaults: ```sh -ISO_VERSION="0.1.0" +ISO_VERSION="${ISO_VERSION:-auto}" BUILD_CHANNEL="${BUILD_CHANNEL:-dev}" IMAGE_SIZE="28G" CLAWDIE_REF="${CLAWDIE_REF:-main}" diff --git a/PLAN-OPERATOR-USB-NEXT.md b/PLAN-OPERATOR-USB-NEXT.md index ed7999d1..00e6e4da 100644 --- a/PLAN-OPERATOR-USB-NEXT.md +++ b/PLAN-OPERATOR-USB-NEXT.md @@ -229,7 +229,7 @@ contract between agents. | ------------------ | ------------------------------ | ---------------------------------- | ----------------------------------------------------- | | Build result | `iso-build` | `clawdie.iso.build.v1` | Commit, flags, log path, output files, static checks | | Publish result | `iso-publish` | `clawdie.iso.publish.v1` | Public URLs, checksums, manifest path, symlink state | -| Flash verification | `iso-flash-verify` | `clawdie.iso.flash.v1` | Download, checksum, xz test, target disk fit, flash | +| Flash verification | `iso-flash-verify` | `clawdie.iso.flash.v1` | Download, checksum, xz test, target disk fit, flash | | Mounted validation | `iso-validate-image` | `clawdie.iso.validation.v1` | SDDM, CLIs, `mdo`, seed slice, no-blank, panel assets | | Hardware report | `iso-hardware-report-ingest` | `clawdie.iso.hardware.v1` | GPU/KMS, GL renderer, input, audio, Wi-Fi, SDDM/XFCE | | Package audit | `iso-package-audit` | `clawdie.iso.package-audit.v1` | Category, size, flat size, reason kept, deferral risk | diff --git a/README.md b/README.md index 7c0cf5d4..6067f2d8 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ BUILD_CHANNEL=release sudo ./build.sh --clawdie-version 0.10.0 The build prints provenance similar to: ```text -ISO : 0.1.0-dev +ISO : -dev FreeBSD : 15.0-RELEASE amd64 Clawdie : main Clawdie commit: diff --git a/build.sh b/build.sh index 72aab0de..924e0ad8 100755 --- a/build.sh +++ b/build.sh @@ -1055,14 +1055,22 @@ seed_live_ai_source_repo() { return 0 fi - echo " Seeding AI source snapshot: ${_repo_name}" - rm -rf "${_repo_dest}" - mkdir -p "${_repo_dest}" - git -C "${_repo_src}" archive --format=tar HEAD | tar -C "${_repo_dest}" -xf - - _repo_branch=$(git -C "${_repo_src}" symbolic-ref --short -q HEAD 2>/dev/null || echo detached) _repo_commit=$(git -C "${_repo_src}" rev-parse HEAD 2>/dev/null || echo unknown) _repo_origin=$(git -C "${_repo_src}" remote get-url origin 2>/dev/null || echo unknown) + _repo_src_real=$(cd "${_repo_src}" && pwd -P) + + echo " Seeding AI source checkout: ${_repo_name} (${_repo_commit})" + rm -rf "${_repo_dest}" + if [ "${_repo_branch}" != "detached" ]; then + git clone --quiet --depth 1 --branch "${_repo_branch}" "file://${_repo_src_real}" "${_repo_dest}" + else + git clone --quiet "file://${_repo_src_real}" "${_repo_dest}" + git -C "${_repo_dest}" checkout --quiet --detach "${_repo_commit}" + fi + git -C "${_repo_dest}" remote set-url origin "${_repo_origin}" 2>/dev/null || true + printf '%s\n' '.clawdie-source.json' >> "${_repo_dest}/.git/info/exclude" + _repo_dirty=false if ! git -C "${_repo_src}" diff --quiet 2>/dev/null || ! git -C "${_repo_src}" diff --cached --quiet 2>/dev/null; then _repo_dirty=true @@ -1076,7 +1084,10 @@ seed_live_ai_source_repo() { "branch": "$(json_escape "${_repo_branch}")", "commit": "$(json_escape "${_repo_commit}")", "dirty_at_build": ${_repo_dirty}, - "snapshot_note": "git archive of HEAD; uncommitted changes and ignored/private files are not included" + "iso_version": "$(json_escape "${ISO_VERSION}")", + "build_channel": "$(json_escape "${BUILD_CHANNEL}")", + "snapshot_kind": "shallow git checkout", + "snapshot_note": "shallow git checkout of HEAD; uncommitted changes and ignored/private files are not included" } EOF } @@ -1087,16 +1098,17 @@ install_live_ai_source_snapshots() { resolve_colibri_paths mkdir -p "${MOUNT_POINT}/home/clawdie/ai" cat > "${MOUNT_POINT}/home/clawdie/ai/README.txt" <<'EOF' -Clawdie live AI source snapshots +Clawdie live AI source checkouts These directories are included so the operator can start a local provider-backed -Pi session from the live XFCE desktop and inspect the shipped source beside the -running system. +Pi session from the live XFCE desktop, inspect the shipped source beside the +running system, and fetch follow-up commits from Forgejo when network access is +available. No API keys, .env files, SSH private keys, build caches, package caches, tmp/ -directories, or uncommitted worktree changes are included. Each snapshot has a -.clawdie-source.json file recording the source remote, branch, commit, and dirty - state at image build time. +directories, or uncommitted worktree changes are included. Each checkout keeps a +.git directory plus a .clawdie-source.json file recording the source remote, +branch, commit, dirty state, ISO version, and build channel at image build time. EOF seed_live_ai_source_repo "${SCRIPT_DIR}" "clawdie-iso" seed_live_ai_source_repo "${_resolved_clawdie_ai_repo}" "clawdie-ai" diff --git a/live/operator-session/bootstrap.html b/live/operator-session/bootstrap.html index ad83a1b2..3e336e31 100644 --- a/live/operator-session/bootstrap.html +++ b/live/operator-session/bootstrap.html @@ -3,7 +3,7 @@ - Clawdie Operator USB — v0.9.1 + Clawdie Operator USB