Commit graph

146 commits

Author SHA1 Message Date
f81f487560 Align ISO config docs with post-install setup 2026-06-04 20:04:23 +02:00
014edc1d9f Clean up docs: fix /login wording, add VPS doc link, remove dead build.cfg IMAGE_NAME, delete stale handoff (Sam & Claude) 2026-06-04 20:04:23 +02:00
ec37206975 Refresh ISO build and setup docs 2026-06-04 20:04:23 +02:00
44ea9d11db Fix LOCAL_LLM_PROVIDER value: llama.cpp -> llama_cpp to match shell modules (Sam & Claude)
shell-deploy.sh:592 checks for llama_cpp, not llama.cpp. Only affects non-live fallback path.
2026-06-04 20:04:23 +02:00
4340731a20 Align live installer defaults before image rebuild (Sam & Codex) 2026-06-04 20:04:23 +02:00
9bcd455fa1 Clean up warden0 bridge documentation 2026-06-04 20:04:23 +02:00
a9ac0013e2 Fix bridge naming to warden0 and correct setup token wording (Sam & Claude)
- shell-pf.sh: BRIDGE is now always warden0 (matches jail-config.ts and AGENTS.md)
- CompletePage.qml: token text now says will be generated after first boot
- NETWORKING.md: updated to reflect warden0 fix
2026-06-04 20:04:23 +02:00
e690b49d27 Add implementation review to live GUI proposal; escalate bridge naming bug (Sam & Claude) 2026-06-04 20:04:23 +02:00
f2c9123a88 Use absolute sudo path in live installer 2026-06-04 20:04:23 +02:00
389cab3aa2 Make ISO build PATH independent 2026-06-04 20:04:23 +02:00
548d28a57a Cache Clawdie AI bundles by resolved commit 2026-06-04 20:04:23 +02:00
8cc2cca60e Add ISO build manifest metadata 2026-06-04 20:04:22 +02:00
f9cc62bb02 Bundle current Clawdie AI for install validation 2026-06-04 20:04:22 +02:00
1a4d98acf8 Add remote-safe setup access slice (Sam & Codex)
Collect optional SSH public key and Tailscale auth key in the live installer, keep the controlplane loopback-bound by default, allow SSH over tailscale0, and rotate the post-install setup token into /var/db/clawdie-installer/setup-token with MOTD guidance for SSH tunnel access.

This slice is install-mode only; upgrade runs do not mint a new setup token.

Build: pass
Tests: pass — sh -n + QML build + config-format + mocked setup-token writer dry-run
Real-disk / bhyve install: NOT YET TESTED
2026-06-04 20:04:22 +02:00
835074ab8d Wire live installer commit path (Sam & Codex)
Live GUI installs now write runtime handoff files under /var/run/clawdie-installer, invoke bsdinstall script through a dedicated commit helper, persist the installed handoff for first HDD boot, and point the operator at /setup after reboot.

The live autologin user is restricted to a narrow sudoers rule for the commit helper and reboot only.

Build: pass
Tests: pass — sh -n + QML build + config-format + stubbed live-commit dry-run
Real-disk / bhyve install: NOT YET TESTED
2026-06-04 20:04:22 +02:00
3a9954f9ec Boot live installer session and narrow install-time contract (Sam & Codex) 2026-06-04 20:04:22 +02:00
d59cc76f30 Narrow installer contract to identity-only and fix cross-repo alignment (Sam & Claude)
ISO-LIVE-GUI-SETUP-PROPOSAL:
- Remove LLM keys and Telegram from install-time field collection
- Add explicit 'not collected at install time' section with rationale
- Narrow clawdie-handoff.sealed scope (no provider keys or Telegram)
- Add QML alignment note about removing ANTHROPIC_API_KEY serialization

setup-import.sh:
- Replace hard-require loop for OPENROUTER/TELEGRAM with identity-only
  validation (ASSISTANT_NAME, AGENT_DOMAIN, TZ)
- Add ZAI_API_KEY, ZAI_API_BASE, OPENAI_API_KEY, ANTHROPIC_API_KEY,
  CLAUDE_CODE_OAUTH_TOKEN to allowed parse keys
- Add provider detection defaults for z.ai, OpenAI, Anthropic with
  z.ai as the new default (matches Clawdie-AI shell-env.sh)

NETWORKING.md:
- Add architecture note: browser jail replaces cage/wayvnc for autonomous
  execution; operator refresh moves to host-side xpra
- Add alignment note: bridge naming must converge to warden0 per
  Clawdie-AI AGENTS.md

README.md:
- Add architecture note on glasspane section with forward reference to
  browser jail and operator browser architecture docs
2026-06-04 20:04:22 +02:00
f0f03ba0c6 Clarify live GUI setup proposal details (Sam & Codex) 2026-06-04 20:04:22 +02:00
5406b879b4 Add live GUI setup proposal (Sam & Codex) 2026-06-04 20:04:22 +02:00
904dd58373 Enable mac_do framework during bootstrap (Codex)
Configure FreeBSD 15 installs to load mac_do with an empty rule set for future narrowly scoped UID transitions.
2026-06-04 20:04:22 +02:00
b04222fa81 Bump FreeBSD 14→15 docs, add CLAWDIE_PROFILE to firstboot
- REQUIREMENTS.md: remove 14.2 minimum floor (15.0+ only)
- firstboot/shell-env.sh: set CLAWDIE_PROFILE=core in fresh install and upgrade append
- AGENTS.md: document mac_do adoption plan reference

---
Build: n/a | Tests: n/a (shell scripts, Linux agent)
2026-06-04 20:04:22 +02:00
f24b427c57 Ignore local Aider artifacts
---
Build: not run | Tests: not run
2026-06-04 20:04:22 +02:00
20f89f7fdd Add btop to host package baseline
---
Build: not run | Tests: not run
2026-06-04 20:04:22 +02:00
850b77ddbe Mirror fd-find in host package list 2026-06-04 20:04:22 +02:00
23f4f1aaec feat(firstboot): unify setup import across USB and VPS 2026-06-04 20:04:22 +02:00
4135f9aa40 pkg(host): add dnsmasq for hierarchical *.home.arpa resolution
mDNS resolves single-label names under .home.arpa (e.g.
mevy.home.arpa) but cannot resolve multi-label names like
blog.mevy.home.arpa because no single device "owns" the compound
name. The Clawdie multitenant naming policy uses hierarchical site
naming (<site>.<tenant>.<base>), so a local DNS resolver is required.

dnsmasq is a small (~2 MB) FreeBSD-native DNS server used by most
home routers and homelabs. Bundling it with the ISO removes the
"works on my machine" failure mode for fresh installs that try to
reach blog.mevy.home.arpa.

Mirrors the addition that will land in clawdie-ai's
infra/packages/host-baseline.txt once the multitenant naming policy
note is approved.
2026-06-04 20:04:22 +02:00
26d2214bd5 Default ISO code hosting: git (no Forgejo)
---

Build: n/a | Tests: n/a (bash -n ok)
2026-06-04 20:04:22 +02:00
127d8d560f feat(firstboot): add controlplane auth + git jail env vars to .env seed
Generate CONTROLPLANE_SHARED_SECRET and BETTER_AUTH_SECRET at install
time via openssl rand. Add CONTROLPLANE_HOST_IP, CONTROLPLANE_AUTH_MODE,
CONTROLPLANE_PORT, BETTER_AUTH_URL, GIT_LOCAL_URL to both install heredoc
and upgrade append path. Default to bare git repo (CODE_HOSTING_MODE=git)
instead of Forgejo.

---
Build: pass | Tests: not run (Linux) — shell script, bash -n validated
2026-06-04 20:04:22 +02:00
819aa43485 Update PostgreSQL 17 → 18 in package lists and docs
Reflects the PG 18 upgrade already applied in the main repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
4c60ed81e3 fix(installer): Phase A — stable ZFS, safe upgrades, module matrix
Four critical fixes before v1.0.0 VM test, informed by PC-BSD failure
modes and GhostBSD's improvements:

1. shell-zfs.sh: zpool labelclear on fresh install
   Clear ZFS labels from every device that was in the old pool before
   bsdinstall writes new ones. Prevents the "can't find pool by GUID"
   boot failure that made PC-BSD reinstalls unreliable.

2. shell-zfs.sh: pre-upgrade snapshot
   When operator selects Upgrade, take zfs snapshot -r
   pool@pre-upgrade-{timestamp} before any changes. One reboot to
   roll back if the upgrade goes wrong. UPGRADE_SNAPSHOT exported for
   downstream modules to reference.

3. shell-env.sh: never overwrite secrets on upgrade
   clawdie_shell_env_generate() now checks CLAWDIE_BOOT_MODE. In
   upgrade mode it calls clawdie_shell_env_append_new_keys() instead
   of regenerating — reads existing .env and appends only keys that
   are absent. Existing DB passwords, JWT secrets, API keys are never
   touched. This fixes the root cause of the orphaned-database bug:
   new passwords that don't match the existing pool's data.

4. firstboot.sh: module execution matrix via run_step_if
   New run_step_if "<modes>" wrapper marks steps as done without
   running them when not applicable to the current boot mode.
   Upgrade skips: gpu, nvidia, ssh, system, desktop, pf, tailscale
   Upgrade runs: pkg, env (append-only), npm-globals, deploy
   Prevents SSH key resets, rc.conf overwrites, and firewall rewrites
   during upgrade — all of which undid operator customisations.

Also adds INSTALLER-PLAN.md: full architecture plan for unified
GUI/TUI installer with Fresh / Upgrade / Repair modes, boot
environment support, and a clear phase roadmap to v1.1.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
68f1c1fad7 fix(firstboot): run installer as root so rc.d service is installed
shell-deploy.sh was dropping to the clawdie user before running
just install. setup/service.ts checks isRoot() to decide whether
to install the rc.d service or generate start/stop wrappers — so
running as clawdie meant the agent was never registered with
FreeBSD's service manager and never started at boot.

Fix: run the installer as root. setup/service.ts already handles
privilege separation correctly when invoked as root: it writes
/usr/local/etc/rc.d/{agent}, adds -u {agent} to daemon args so
the running process is never root, and chowns data/logs/groups to
the agent user to prevent EACCES on first write.

Also adds DB_RUNTIME to the generated .env seed so operators can
see the jail vs host postgres option without reading the docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
e6f91d4517 feat(iso): bundle clawdie-ai node_modules for offline install
- build.sh now runs npm ci at ISO build time and bundles node_modules into the clawdie-ai payload tarball\n- firstboot deploy ensures node_modules exist (fallback: npm ci, network required)\n- test mode skips venv/model seeding + verify to avoid host side effects\n- docs/tests updated to match
2026-06-04 20:04:22 +02:00
014157bd03 fix(firstboot): use just install
ISO deploy module now runs `just install` (with a dev fallback to `npm run install`) instead of `npm run install-all`, and docs/tests are updated accordingly.
2026-06-04 20:04:22 +02:00
e454b3d9a8 Add rustup post-install requirement 2026-06-04 20:04:22 +02:00
3dbb6341f8 docs: update ISO docs for Aider+Pi harness completion and sync with main codebase
- Updated firstboot completion messages: Aider and Pi now listed as primary harnesses, Codex as optional
- Added [Unreleased] section to CHANGELOG documenting Aider venv provisioning and harness integration
- Reflects completion of Aider+Pi harness migration across clawdie-ai and clawdie-iso

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
20a3825e54 feat: add just command runner to host baseline (Sam & Claude)
Bundles the 'just' command runner on the USB image. Provides
discoverable project commands via justfile in Clawdie-AI.

---
Build: pass | Tests: not run (Linux)
2026-06-04 20:04:22 +02:00
0a8bc81247 Fix PF shell module and VPS test defaults 2026-06-04 20:04:22 +02:00
c0bd59cf0b Set locale/keymap defaults and move npm globals to /opt 2026-06-04 20:04:22 +02:00
835214908e Verify Aider CLI after ISO deploy 2026-06-04 20:04:22 +02:00
9e0092e421 Document Aider packages in ISO manifest 2026-06-04 20:04:22 +02:00
9aa63183fb Deduplicate Aider package entry 2026-06-04 20:04:22 +02:00
c687b90034 Add Aider prerequisites to ISO 2026-06-04 20:04:22 +02:00
8ca0544d2a feat: bundle Aider and Forgejo packages, add ZAI_API_BASE to .env seed (Sam & Claude)
Add py311-aider_chat to host baseline for the controlplane harness
(Aider + Pi multi-agent orchestrator). Add forgejo package to jail
list for the code service. Bake ZAI_API_BASE into firstboot .env
to fix litellm endpoint mismatch discovered during Aider testing.

---
Build: pass | Tests: not run (Linux)
2026-06-04 20:04:22 +02:00
0ac086c347 docs: align firstboot module docs 2026-06-04 20:04:22 +02:00
07f315d730 feat(iso): bundle claude/gemini/pi npm CLIs for offline first-boot install
Ships @anthropic-ai/claude-code, @google/gemini-cli, and
@mariozechner/pi-coding-agent as prebuilt .tgz tarballs on the install
media so the agent runtime has its CLI dependencies on first boot
without network access.

Critical: installs to /home/clawdie/.npm-global to match the
npm_config_prefix set by shell-system.sh in /etc/profile.d/clawdie.sh,
so the clawdie user's PATH (and the agent's commandExists() probes)
actually resolve the binaries.

- scripts/fetch-npm-globals.sh: npm pack the 3 CLIs into tmp/npm-globals/
- firstboot/shell-npm-globals.sh: offline install as clawdie user with
  matching prefix, runs between pkg setup and deploy
- build.sh: fetch + bundle into ${SHARE}/npm-globals/
- firstboot.sh: source module and run_step before deploy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
c153445af8 docs: agent identity, cross-repo coordination, handoff convention (Sam & Claude) 2026-06-04 20:04:22 +02:00
18afbae2cd feat: add Claude auth fields to firstboot wizard (Sam & Claude)
Add ANTHROPIC_API_KEY and CLAUDE_CODE_OAUTH_TOKEN as optional password
fields to both shell wizard and GUI installer. Fields flow through to
.env via shell-env.sh. Document /tmp exemption in AGENTS.md.
2026-06-04 20:04:22 +02:00
225b6f1667 bump: Version 0.9.1 — v1.0.0 embeddings + CMS + Crowdin (Sam & Claude) 2026-06-04 20:04:22 +02:00
4932b5ee2b docs: add v1.0.0 release handoff for other agent (Sam & Claude) 2026-06-04 20:04:22 +02:00
1000f28245 docs: v1.0.0 release roadmap (Sam & Claude)
Define testing requirements and release criteria for v1.0.0:
- VM testing (bhyve): Full wizard flow + progress tracking
- Hardware testing: Optional, Intel/AMD/NVIDIA (post-release OK)
- Release prep: Version bump, release notes, git tags

Success criteria: All 6 automation tests pass (compilation, shell syntax,
ISO build, git status, test report). Awaiting VM testing.

Estimated time to release: 2-4 hours (testing + prep)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00