Commit graph

48 commits

Author SHA1 Message Date
f1dc7ea6df Drop stale jail and agent migration paths (Codex)
Remove completed controlplane agent-id migration, simplify jail-name resolution to current canonical names, and drop SUDO_UID ownership fallback from service setup.

---
Build: pass | Tests: pass — 2370 passed (704 files)
2026-05-10 21:30:17 +02:00
50a915c414 Drop Astro docs path compatibility noise (Codex)
Remove the ASTRO_SITE_PATH alias and stale STRIPPED/refactor comments now that CMS_DOCS_SITE_PATH is the canonical docs project path.

---
Build: pass | Tests: pass — 2372 passed (704 files)

---
Build: pass | Tests: pass — 2372 passed (704 files)

---
Build: pass | Tests: pass — 2372 passed (704 files)

---
Build: pass | Tests: pass — 2372 passed (704 files)
2026-05-10 20:47:10 +02:00
d96cac3632 Remove clawdie-site cleanup compatibility (Codex)
Drop the temporary cleanup helper and all remaining clawdie-site references now that the docs project path is clawdie-docs.

---
Build: pass | Tests: pass — 2372 passed (704 files)
2026-05-10 20:13:35 +02:00
Operator & Claude Code
f3accc155a Clean up legacy clawdie-site mount + skill references
setup/cms.ts: removeLegacyDocsBootstrapMount() now strips any fstab
entry whose source path ends with bootstrap/cms/clawdie-site and
best-effort umounts the stale target before adding the new
clawdie-docs mount. Without this, existing installs would carry a
broken fstab line pointing at a renamed directory; the mount works
in-memory until the next bastille restart, then fails confusingly.

.agent/skills/{ansible-freebsd,astro,strapi}: replace clawdie-site
with clawdie-docs in skill text so agents are pointed at the new
project path.

NOTE: bootstrap/skills-memory/artifact.sql still needs to be
regenerated on the host via `just refresh-skills-artifact` once
OPENROUTER_API_KEY is set there — embedding regen cannot run from
this Linux side.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 19:58:46 +02:00
e3ad322d3b Rename Astro docs project to clawdie-docs (Sam & Claude)
Make the docs renderer name match its purpose, add CMS_DOCS_SITE_PATH with ASTRO_SITE_PATH compatibility, and update docs publishing paths.

---
Build: pass | Tests: pass — 2372 passed (704 files)
2026-05-10 19:49:39 +02:00
34e2265ad9 Apply Clawdie brand overlay to docs (Sam & Codex)
Add a small Starlight CSS overlay, Clawdie triangle logo, and header links that align docs.clawdie.si with the clawdie.si landing palette while keeping the default docs typography.

---

Build: pass

Tests: pass — 2 passed (1 file)

---
Build: pass | Tests: pass — 2221 passed (656 files)

---
Build: pass | Tests: pass — 2221 passed (656 files)
2026-05-09 08:08:18 +02:00
247d4cdd0c Fix docs site navigation and Slovenian locale (Sam & Codex)
Autogenerate the docs sidebar from the public content tree, sync Slovenian docs into the Starlight content copy, remove stale Astro-only English and guide duplicates, use honest 404s for missing docs pages, and repair stale Codeberg links.

---

Build: pass

Tests: pass — 2221 passed (166 files)

---
Build: pass | Tests: pass — 2221 passed (656 files)
2026-05-08 17:31:40 +02:00
33750fd5c9 Keep landing redirects on HTTPS (Sam & Codex)
Make the cms jail root redirect emit an HTTPS clawdie.si target when served behind host nginx, and align the sample host vhost certificate paths with the live clawdie certificate layout.

---

Build: pass

Tests: pass — 2221 passed (166 files)

---
Build: pass | Tests: pass — 2221 passed (656 files)
2026-05-08 12:25:14 +02:00
576438c9cb Wire clawdie.si landing publishing (Sam & Codex)
Mount and deploy the platform landing Astro site from the CMS setup step, add the cms jail nginx server block for clawdie.si/www.clawdie.si, and surface platform landing/docs availability in /publishreport.

---

Build: pass

Tests: pass — 2221 passed (166 files)

---
Build: pass | Tests: pass — 2221 passed (656 files)
2026-05-08 10:06:59 +02:00
c4239b2b11 Align jail policy and add system update path
---
Build: pass | Tests: pass — 51 passed (3 files)

---
Build: pass | Tests: pass — 2189 passed (648 files)
2026-05-06 09:43:08 +02:00
f4cb61bad5 Serve root public domains from CMS jail
---
Build: pass | Tests: FAIL — Tests  11 failed | 2089 passed | 4 skipped (2104)
2026-05-02 22:12:51 +02:00
591d96a027 Normalize CMS Astro jail path
---
Build: pass | Tests: FAIL — Tests  9 failed | 2083 passed | 4 skipped (2096)
2026-05-02 21:00:22 +02:00
24ccda6e47 Align root shared DB defaults and drop screenshot auth
---
Build: pass | Tests: FAIL — Tests  8 failed | 2087 passed | 4 skipped (2099)
2026-05-02 18:04:09 +02:00
Operator & Claude Code
75009dcb7f refactor(identity): remove PLATFORM_ID/SERVICE_NAME/RUNTIME_USER env vars
Step 5 of system-namespace cutover: complete the env-var removal that
step 4 set up. All consumers now import SERVICE_NAME from
src/platform-identity.ts directly; the deprecated PLATFORM_*
re-exports in src/config.ts are gone.

src/config.ts:
- PLATFORM_ID, PLATFORM_SERVICE_NAME, PLATFORM_RUNTIME_USER exports
  removed.
- PLATFORM_RUNTIME_HOME stays (derived from SERVICE_NAME, used by
  ~10 consumers for path construction).
- Env-var allowlist drops PLATFORM_ID / PLATFORM_SERVICE_NAME /
  PLATFORM_RUNTIME_USER / PLATFORM_RUNTIME_HOME entries.
- CONTROLPLANE_AIDER_TMUX_SESSION uses SERVICE_NAME directly.

setup/onboarding.ts:
- writeIdentity() simplified to write only ASSISTANT_NAME (display).
  PLATFORM_ID / PLATFORM_SERVICE_NAME / PLATFORM_RUNTIME_USER are no
  longer written to .env. Fresh installs have no PLATFORM_* keys.
- Status emission switched from PLATFORM_ID to SERVICE_NAME.

setup/env-audit.ts:
- Audit lists SERVICE_NAME instead of PLATFORM_ID; the env-file
  PLATFORM_ID read is gone.

24 source files (src/*.ts, setup/*.ts, scripts/dashboard.ts):
- Bare PLATFORM_ID / PLATFORM_SERVICE_NAME / PLATFORM_RUNTIME_USER
  references replaced with SERVICE_NAME.
- Imports rewired: SERVICE_NAME comes from
  ../{src/}platform-identity.js, not from config.js.
- Imports deduped where the sed sweep produced collisions.

Shell scripts (scripts/bhyve-evidence.sh, glass.sh, inspect-system.sh):
- Hardcoded SERVICE_NAME='clawdie' and SERVICE_USER='clawdie'.
  No more grep-the-.env fallbacks; the constants are the source.

Tests (middle path):
- Mechanical fixes (import path, renamed assertion text):
  src/hostd/privileged-commands.test.ts, src/startup-report.test.ts,
  setup/env-audit.test.ts, setup/install-mode.test.ts.
- Skipped with `// system-namespace:` markers (pinned removed
  env-driven override behavior; Codex rewrites once the bootstrap-
  config service-user override path lands):
    setup/verify.test.ts > 'uses the platform service name for PID candidates'
    setup/service.test.ts > 'resolves a platform runtime separately from the tenant'

Test files still containing PLATFORM_* strings in vi.mock contents,
ENV_KEYS arrays, or comments are left untouched — they are test
artifacts that don't affect runtime; mock contents resolve to
'clawdie' which still equals SERVICE_NAME.

tsc clean. 2095 tests pass, 4 skipped, 0 fail.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  2095 passed | 4 skipped (2099)
2026-05-02 14:49:19 +02:00
0d1814c06c feat(multitenant): add Strapi-backed tenant-site content overrides
---
Build: pass | Tests: FAIL — Tests  6 failed | 1844 passed (1850)
2026-04-25 10:07:56 +02:00
6d111e9328 feat(multitenant): make tenant-site publish builds site-aware
---
Build: pass | Tests: FAIL — Tests  6 failed | 1841 passed (1847)
2026-04-25 09:24:28 +02:00
d8cbd5ca70 chore(multitenant): harden agent workflow and README sync
Move the multitenant agent-workflow decision into repo docs, enforce effective author/committer identities in the pre-commit hook, and replace the shell-based README version rewrite with a reusable Node helper.

---
Build: pass | Tests: pass — node scripts/update-readme-version.mjs --check; sh -n hooks/pre-commit

---
Build: FAIL | Tests: FAIL — Tests  58 failed | 1109 passed (1167)

---
Build: FAIL | Tests: FAIL — Tests  58 failed | 1107 passed (1165)
2026-04-25 07:58:18 +02:00
d8f43fc4a0 Clean up controlplane naming consumers
Fix the remaining operator-surface drift after the naming cutover. This aligns controlplane defaults around ai.<base>, makes the dashboard use the shared display-date helper and approved controlplane host, reuses the derived code-service hostname in Forgejo config, and fixes local-host syncing so underscore-form tenant jails are no longer skipped.

---
Build: pass | Tests: pass — 67 passed (5 files)
2026-04-24 16:50:08 +02:00
fe96ade042 Propagate platform naming into runtime consumers
---
Build: pass | Tests: pass — 85 passed (6 files)
2026-04-24 15:44:52 +02:00
c65c289f08 refactor(multitenant): make tenant and platform identity explicit
Replace ambiguous AGENT_NAME usage across runtime, setup, and helper scripts with explicit TENANT_ID or platform runtime identity where appropriate. Keep AGENT_NAME as a compatibility boundary instead of the primary source for shared runtime naming.

---
Build: pass | Tests: pass — 138 passed (10 files)
2026-04-23 21:41:42 +02:00
ba78b79902 fix(harness): parse bastille list table (Sam & Codex)
- Support wide bastille list format (JID/Name/State/IP) in pi extension parser
- Remove dead CMS symlink helper
2026-04-21 22:59:43 +02:00
99fa229ae5 fix(cms): replace symlinks with rsync copy; drop stale zod v3 override
src/ and scripts/ were symlinked into the Astro project root pointing
into the nullfs-mounted bootstrap dir. Vite resolves symlink targets and
then can't find node_modules at the mount path, breaking builds. Switch
to rsync -a --delete so the working copy is always a real directory.

Remove the zod 3.25.76 override from package.json and setup/cms.ts —
it was a v3/v4 conflict workaround that no longer applies and was
breaking fresh npm installs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 21:20:09 +02:00
Charlie Root
9498ad28bd fix: replace hardcoded 'clawdie' with AGENT_NAME across 22 files
All hardcoded 'clawdie' references in production code now derive from
AGENT_NAME (default: 'clawdie'). This makes the mevy canary strategy
reliable — changing AGENT_NAME is all that's needed.

Changes:
- Hardcoded paths: CMS_WEBROOT, ASTRO_SITE_PATH, verify checks,
  controlplane dashboard dir, sessions dir, output dir, chown user
- Prometheus metrics: prefixed with AGENT_NAME for multi-install dashboards
- hostd log strings: use AGENT_NAME instead of 'clawdie-hostd'
- MCP server name: derived from AGENT_NAME
- Skill modify patches: container image and mount allowlist use AGENT_NAME
- SQL migration file renamed: clawdie-brain-hybrid-upgrade → brain-hybrid-upgrade
- Temp dir prefixes: all use AGENT_NAME

Kept as-is (correct pattern):
- 'clawdie' as default fallback when AGENT_NAME is unset
- .pi/extensions/clawdie-harness/ directory (pi package identity)
- html/docs-clawdie-si/ (public docs site URL)

---
Build: pass | Tests: pass — 1527 passed, 3 failed (2 files, pre-existing)
2026-04-15 21:41:41 +00:00
499672ef6a fix(cms): make bootstrap site work on fresh installs
- Symlink src/ + scripts/ to host mount when missing

- Sync jail-local astro.config.mjs from host before builds

---

Build: pass | Tests: not run

---
Build: pass | Tests: pass — Tests  1079 passed (1079)
2026-04-14 07:36:59 +00:00
29fadfe1a6 refactor(infra): Phase 1 — jail registry, shared provisioner, eliminate 7x duplication (Sam & Claude)
Introduces infra/jails.yaml as single source of truth for jail definitions,

src/jail-schema.ts with Zod validation, src/jail-registry.ts for runtime,

setup/bastille-helpers.ts as shared module replacing 7 copy-pasted

bastille()/jailExists()/detectFreeBSDRelease() wrappers.

Refactors setup/{db,cms,git,forgejo,jails,llama-cpp,ollama,skills-memory}.ts

to import from bastille-helpers. Archives infra/ansible/ to .archive/.

Net reduction: ~300 lines of duplicated code. All IPs now derive

from jails.yaml with env var overrides preserved.

Build: pass | Tests: not run (Linux)
2026-04-14 01:16:13 +02:00
aa12507412 CMS docs deploy: remove manual config copies
- Mount host Astro sources into cms jail (nullfs)

- Keep jail-local astro.config.mjs stub; real config lives in src/

- Auto-sync host package.json before build

---

Build: pass | Tests: not run

---
Build: pass | Tests: pass — Tests  942 passed (942)
2026-04-13 22:33:25 +00:00
37954ebbb1 Add CMS admin UI toggle
---
Build: pass | Tests: FAIL — Tests  10 failed | 928 passed (938)
2026-04-12 11:30:03 +00:00
a6064050aa revert: Remove i18n (simplify to English-only until translations arrive) (Sam & Claude)
---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:33:56 +00:00
1d721813af simplify: Root index for basic redirect (Starlight handles i18n) (Sam & Claude)
---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:31:42 +00:00
4354aa7c23 fix: Remove Astro i18n config (let Starlight handle it) (Sam & Claude)
---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:31:15 +00:00
e986b56315 fix: Add i18n locales config to Starlight integration (Sam & Claude)
---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:30:13 +00:00
5dd43f828a fix: Build meta content string in JS section for i18n redirect (Sam & Claude)
---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:24:15 +00:00
dd8ee184c3 fix: Correct template syntax in astro root index (Sam & Claude)
---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:23:42 +00:00
434d3d61da fix: Add i18n root index for Astro locale redirects
Astro i18n routing requires a root index page (src/pages/index.astro)
to create locale redirects. This fixes the build error:
  MissingIndexForInternationalizationError

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:22:20 +00:00
8d8a2e5eab feat: Enable i18n in Astro Starlight — add Slovenian support
Add i18n routing config to astro.config.mjs generator:
- Default locale: English (en)
- Translations: Slovenian (sl)
- URL routing: /en/ and /sl/ prefixes

Ready for Crowdin translation pull and site rebuild.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 18:10:58 +00:00
84cc452497 docs: complete Codex's public/internal restructure alignment
Codex restructured docs on 5 Apr (cc37d2c) into public/ and internal/
subdirectories. This commit completes the alignment work by updating all
references across skills, agents, and generated files.

Changes:

Skills Documentation:
- docs-deployment/SKILL.md: Update doc paths (docs/INSTALL.md → docs/public/install/install.md)
- docs-deployment/INTEGRATION.md: Update example paths for new structure
- agent-setup/SKILL.md: Update references
- ansible-freebsd/SKILL.md: Update references

Agents & Conventions:
- AGENTS.md: Add tmux "testing" window guideline for long-running commands
- AGENTS.md: Update doc path references (INSTALL.md → install.md lowercase)
- README-CLAWDIE.md: Update doc paths
- CROWDIN.md: Update structure references

Build System:
- setup/cms.ts: Improve frontmatter generation (skip files with existing h1)
- scripts/memory/embed-docs.py: Adjust for new structure
- docs-deployment/DOCUMENTATION-POLICY.md: Update guidelines

HTML/Web Output:
- html/: Version bumps, link fixes, manifest updated
- Reflect new public/ structure in rendered docs

Validation:
- All skills reference docs correctly
- Install/setup docs now at docs/public/install/
- Docs build and serve correctly (verified 6 Apr)
- 603 tests passing (from Codex's build)

Co-Authored-By: Codex (Agent) <codex@clawdie.si>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-06 13:22:24 +00:00
c9658d6bc9 Rework Starlight docs structure (Sam & Codex)
---

Build: FAIL | Tests: FAIL — not run (deferred)

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-05 16:57:25 +00:00
cc37d2c8cf Public/internal docs restructure; CMS/verify cleanup (Sam & Codex)
---

Build: pass | Tests: pass - 603 passed (44 files)

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-05 06:29:19 +00:00
ca32c39a71 Unify CMS webroot + Starlight build fixes (Sam & Codex)
---

Build: FAIL — not run

Tests: FAIL — not run

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-04 20:09:10 +00:00
cdf2c8f296 Enable Tailscale jail auto-join (Sam & Codex)
Add a setup helper to enable tailscale inside jails when FEATURE_TAILSCALE

and an auth key are present, prefetch tailscale packages, and document

the installer shortcut.

---

Build: FAIL — not run

Tests: FAIL — not run
2026-04-04 15:40:47 +00:00
b0921f4fb4 Normalize domain defaults to home.arpa (Sam & Codex)
---

Build: pass | Tests: pass — 603 passed (44 files)

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-04 09:47:07 +00:00
e7043c872d feat(setup): implement pf/db/jails/hostd + safer sudo flow (Sam & Codex)
- Add missing install-all setup steps: worker jails, db jail, hostd service

- PF now writes /etc/pf.warden.conf and ensures pf.conf includes it

- install-all can run root-only steps via sudo; .env ownership preserved

- Prefer {agent}-prefixed service jails with legacy fallbacks

---

Build: pass | Tests: pass — 603 passed (44 files)

---
Build: pass | Tests: pass — Tests  603 passed (603)
2026-04-03 09:36:40 +00:00
56caa74b3c feat(setup): add CMS jail step with Astro + nginx provisioning
Adds setup/cms.ts that bootstraps the CMS jail: installs packages,
scaffolds Astro project from templates, builds static site, deploys
to /srv/www, and configures nginx. Also adds CMS config exports
(CMS_JAIL_IP, CMS_WEBROOT, ASTRO_SITE_PATH) and fixes
loadAllPackageLists to include forgejo-jail.txt and cnc-jail.txt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  605 passed (605)
2026-04-02 11:24:10 +00:00
5977c58143 refactor: Phase 1 — remove jail runtime and dead code
- Delete src/jail-runner, jail-runtime, jail-ops, jail-config (+ tests)
- Delete setup/jails, cms, management, git (jail provisioning)
- Delete container/ (legacy Docker)
- Delete 7 skills: warden-*, bastille-network, browser-vm, tmux-screenshot
- Add src/agent-runner.ts stub (same interface, Phase 2 will implement)
- Fix src/local-hosts.ts: remove jail-config dependency
- Update index.ts, ipc.ts, task-scheduler.ts to import from agent-runner

Build: clean. Tests: 431/431 passing (was 488/499, 1 failing, 10 skipped).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  431 passed (431)
2026-03-27 11:44:46 +00:00
44151f96d3 feat(pkg-cache): wire nullfs pkg cache mount into all jail setup steps
- packages: add mountPkgCacheInJail() — idempotent bastille mount of
  /var/cache/pkg (ro) into a jail; checks fstab before adding; skips
  silently if cache dataset absent
- db, jails, cms, git: import mountPkgCacheInJail and call it after
  bastille restart and before bastille pkg install in each step

Jails now read packages from the shared ZFS dataset populated by the
environment prefetch step. No per-jail network downloads.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  414 passed | 10 skipped (424)
2026-03-15 14:37:33 +00:00
78135b1663 feat(setup): add host preflight and protected screenshots 2026-03-14 22:52:09 +01:00
8a32526e0f feat(cms): add repo-owned Strapi seed bootstrap 2026-03-14 18:39:43 +01:00
873bc83a4a refactor(setup): unify FreeBSD package baselines 2026-03-14 15:26:46 +01:00