diff --git a/.devcontainer/backend/Dockerfile b/.devcontainer/backend/Dockerfile index a92d37f6..a8a25f27 100644 --- a/.devcontainer/backend/Dockerfile +++ b/.devcontainer/backend/Dockerfile @@ -18,15 +18,6 @@ RUN curl -fsSL https://github.com/neovim/neovim/releases/latest/download/nvim-li | tar -xz -C /opt \ && ln -s /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim -# # 2) Build and install libpostal from source -# RUN git clone --depth 1 https://github.com/openvenues/libpostal /tmp/libpostal \ -# && cd /tmp/libpostal \ -# && ./bootstrap.sh \ -# && ./configure --datadir=/usr/local/share/libpostal \ -# && make -j"$(nproc)" \ -# && make install \ -# && ldconfig \ -# && rm -rf /tmp/libpostal # 3) Create the user and grant sudo privileges RUN groupadd -g ${USER_GID} ${USER} \ @@ -34,10 +25,7 @@ RUN groupadd -g ${USER_GID} ${USER} \ && echo "${USER} ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/${USER} \ && chmod 0440 /etc/sudoers.d/${USER} -# # 4) Python deps - if you want to run assest list -# ENV PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1 -# ADD asset_list/requirements.txt requirements.txt -# RUN pip install -r requirements.txt + # ENV PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1 @@ -75,21 +63,27 @@ RUN wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key RUN apt update RUN apt install -y postgresql-14 -# Install Node.js + backlog.md +# Install Node.js RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y nodejs \ - && npm install -g backlog.md \ && rm -rf /var/lib/apt/lists/* +# GitHub CLI — used by the postCreate skill installer to authenticate against +# private Hestia-Homes repos via the host's mounted ~/.config/gh. +RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ + | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ + && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \ + > /etc/apt/sources.list.d/github-cli.list \ + && apt update && apt install -y gh \ + && rm -rf /var/lib/apt/lists/* + USER ${USER} # Bootstrap LazyVim starter config RUN git clone https://github.com/LazyVim/starter /home/${USER}/.config/nvim \ && rm -rf /home/${USER}/.config/nvim/.git -# Install Claude -RUN curl -fsSL https://claude.ai/install.sh | bash \ - && export PATH="/home/${USER}/.local/bin:${PATH}" \ - && claude plugin marketplace add JuliusBrussee/caveman \ - && claude plugin install caveman@caveman +# Install Claude Code CLI (skills are installed via postCreate from Hestia-Homes/agentic-toolkit) +RUN curl -fsSL https://claude.ai/install.sh | bash ENV PATH="/home/vscode/.local/bin:${PATH}" USER root diff --git a/.devcontainer/backend/devcontainer.json b/.devcontainer/backend/devcontainer.json index a9b7352a..1c5859e5 100644 --- a/.devcontainer/backend/devcontainer.json +++ b/.devcontainer/backend/devcontainer.json @@ -4,6 +4,14 @@ "service": "model-backend", "remoteUser": "vscode", "workspaceFolder": "/workspaces/model", + + // Host preflight: ensure GitHub auth exists before we try to build. + // Either ~/.config/gh (from `gh auth login`) or a GITHUB_TOKEN env var. + "initializeCommand": "test -d \"$HOME/.config/gh\" || test -n \"$GITHUB_TOKEN\" || { echo >&2 'error: no GitHub auth found. Run `gh auth login && gh auth setup-git` on the host, or export GITHUB_TOKEN, then retry.'; exit 1; }", + + // Install Domna's curated skill set (pinned to 0.0.5) into this workspace. + // `gh repo clone` handles private-repo auth using the mounted host ~/.config/gh. + "postCreateCommand": "gh repo clone Hestia-Homes/agentic-toolkit /tmp/agentic-toolkit -- --branch 0.0.5 --depth 1 && bash /tmp/agentic-toolkit/setup.sh", "postStartCommand": "bash .devcontainer/backend/post-install.sh", "mounts": [ "source=${localEnv:HOME},target=/workspaces/home,type=bind", @@ -44,12 +52,8 @@ "containerEnv": { "PYTHONFLAGS": "-Xfrozen_modules=off" }, - "forwardPorts": [6421, 8000], + "forwardPorts": [8000], "portsAttributes": { - "6421": { - "label": "Backlog.md", - "onAutoForward": "notify" - }, "8000": { "label": "FastAPI", "onAutoForward": "notify" diff --git a/.devcontainer/backend/docker-compose.yml b/.devcontainer/backend/docker-compose.yml index 757cfbe0..cf3bb2c0 100644 --- a/.devcontainer/backend/docker-compose.yml +++ b/.devcontainer/backend/docker-compose.yml @@ -14,8 +14,13 @@ services: volumes: - ../../:/workspaces/model - ~/.gitconfig:/home/vscode/.gitconfig:ro + # GitHub CLI auth from host (created by `gh auth login`). Used by the + # postCreate skill installer to clone private Hestia-Homes repos. + - ~/.config/gh:/home/vscode/.config/gh:ro environment: - SSH_AUTH_SOCK=${SSH_AUTH_SOCK:-} + # Fallback HTTPS auth if ~/.config/gh isn't present on the host. + - GITHUB_TOKEN=${GITHUB_TOKEN:-} networks: - backend-net - shared-dev