feat(iso): ship git-backed AI source checkouts (Sam & Codex) #57

Merged
clawdie merged 1 commit from feat/source-checkouts-and-version-cleanup into main 2026-06-15 09:25:19 +02:00
5 changed files with 31 additions and 19 deletions

View file

@ -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 : <iso-version>-dev
FreeBSD : 15.0-RELEASE amd64
Clawdie : main
Clawdie commit: <resolved-sha>
@ -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}"

View file

@ -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 |

View file

@ -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 : <iso-version>-dev
FreeBSD : 15.0-RELEASE amd64
Clawdie : main
Clawdie commit: <sha>

View file

@ -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"

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Clawdie Operator USB — v0.9.1</title>
<title>Clawdie Operator USB</title>
<style>
:root {
--bg: #f3f1ea;
@ -84,7 +84,7 @@
</p>
<div class="card">
<strong>Included now (v0.9.1):</strong>
<strong>Included in this build:</strong>
<ul>
<li>XFCE desktop — dual-monitor, panel, wallpaper</li>
<li><code>colibri-daemon</code> — agent supervisor, skills catalog, Glasspane state machine</li>