From 2f7fd7893ea201e73adfcb1eb61d195c6a9191b6 Mon Sep 17 00:00:00 2001 From: Guillermo Serrahima Date: Fri, 26 Jun 2026 13:51:02 +0200 Subject: add submodule-aware setup --- .gitignore | 29 +++++++++++++++++++++++++---- docker/compose.yml | 13 ++++++++----- scripts/setup.sh | 15 +++++++++++++++ 3 files changed, 48 insertions(+), 9 deletions(-) create mode 100755 scripts/setup.sh diff --git a/.gitignore b/.gitignore index 92c7cf0..326cddd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,26 @@ -claude/auth/ -claude/.claude.json +# claude auth files +# I do want an empty claude folder to exist in the repo for docker binding purposes +claude/* + +# claude config +.claude.json + +# private databases and memory contents data/*.db -data/memory/ -data/heartbeat/ +data/memory/*.* +data/contexts/ + +# heartbeat state +data/heartbeat/* + +# private custom persona and contexts +private/ + +# artifacts +.venv/ +__pycache__/ +**/*.pyc +.pytest_cache/ +.DS_Store + +!/.gitmodules diff --git a/docker/compose.yml b/docker/compose.yml index a87efdd..36a02ff 100644 --- a/docker/compose.yml +++ b/docker/compose.yml @@ -14,12 +14,15 @@ services: # workspace — read/write, this is where senia does its work - ../workspace:/workspace - # claude config and auth — read/write so /login persists - - ../claude/auth:/home/senia/.claude - - ../claude/.claude.json:/home/senia/.claude.json + # claude config and auth: read/write so /login persists + - ../claude:/home/senia/.claude + - ../.claude.json:/home/senia/.claude.json - # CLAUDE.md mounted at root, found via hierarchical lookup from any workspace - - ../claude/CLAUDE.md:/home/senia/.claude/CLAUDE.md:ro + # persona: real if submodule initialized, placeholder otherwise + - ../private/CLAUDE.md:/home/senia/.claude/CLAUDE.md:ro + + # contexts: real if submodule initialized, empty dir otherwise + # - ../private/contexts:/etc/senia/data/contexts:ro # dockerfile read-only — senia can read it, suggest edits in conversation, can't modify - ./Dockerfile:/etc/senia/Dockerfile:ro diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000..fbaf391 --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e +cd "$(dirname "$0")/.." + +if git submodule update --init --recursive 2>/dev/null && [ -d private/contexts ]; then + echo "private content available: using real persona and contexts" +else + echo "private content not accessible: generating placeholders" + mkdir -p private/contexts + # create dummy persona file + touch private/CLAUDE.md + # contexts/ stays empty; directory just needs to exist for the mount +fi + +echo "setup complete. run 'docker compose -f docker/compose.yml build' next." -- cgit v1.2.3